• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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 android.car.watchdog;
18 
19 import static com.android.car.internal.ExcludeFromCodeCoverageGeneratedReport.BOILERPLATE_CODE;
20 
21 import android.os.Parcelable;
22 
23 import com.android.car.internal.ExcludeFromCodeCoverageGeneratedReport;
24 import com.android.internal.util.DataClass;
25 
26 /**
27  * Number of bytes attributed to each application or system state.
28  */
29 @DataClass(genToString = true)
30 public final class PerStateBytes implements Parcelable {
31     /**
32      * Number of bytes attributed to the application foreground mode.
33      */
34     private long mForegroundModeBytes;
35 
36     /**
37      * Number of bytes attributed to the application background mode.
38      */
39     private long mBackgroundModeBytes;
40 
41     /**
42      * Number of bytes attributed to the system garage mode.
43      */
44     private long mGarageModeBytes;
45 
46 
47 
48     // Code below generated by codegen v1.0.22.
49     //
50     // DO NOT MODIFY!
51     // CHECKSTYLE:OFF Generated code
52     //
53     // To regenerate run:
54     // $ codegen $ANDROID_BUILD_TOP/packages/services/Car/car-lib/src/android/car/watchdog/PerStateBytes.java
55     //
56     // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
57     //   Settings > Editor > Code Style > Formatter Control
58     //@formatter:off
59 
60 
61     /**
62      * Creates a new PerStateBytes.
63      *
64      * @param foregroundModeBytes
65      *   Number of bytes attributed to the application foreground mode.
66      * @param backgroundModeBytes
67      *   Number of bytes attributed to the application background mode.
68      * @param garageModeBytes
69      *   Number of bytes attributed to the system garage mode.
70      */
71     @DataClass.Generated.Member
PerStateBytes( long foregroundModeBytes, long backgroundModeBytes, long garageModeBytes)72     public PerStateBytes(
73             long foregroundModeBytes,
74             long backgroundModeBytes,
75             long garageModeBytes) {
76         this.mForegroundModeBytes = foregroundModeBytes;
77         this.mBackgroundModeBytes = backgroundModeBytes;
78         this.mGarageModeBytes = garageModeBytes;
79 
80         // onConstructed(); // You can define this method to get a callback
81     }
82 
83     /**
84      * Number of bytes attributed to the application foreground mode.
85      */
86     @DataClass.Generated.Member
getForegroundModeBytes()87     public long getForegroundModeBytes() {
88         return mForegroundModeBytes;
89     }
90 
91     /**
92      * Number of bytes attributed to the application background mode.
93      */
94     @DataClass.Generated.Member
getBackgroundModeBytes()95     public long getBackgroundModeBytes() {
96         return mBackgroundModeBytes;
97     }
98 
99     /**
100      * Number of bytes attributed to the system garage mode.
101      */
102     @DataClass.Generated.Member
getGarageModeBytes()103     public long getGarageModeBytes() {
104         return mGarageModeBytes;
105     }
106 
107     @Override
108     @DataClass.Generated.Member
toString()109     public String toString() {
110         // You can override field toString logic by defining methods like:
111         // String fieldNameToString() { ... }
112 
113         return "PerStateBytes { " +
114                 "foregroundModeBytes = " + mForegroundModeBytes + ", " +
115                 "backgroundModeBytes = " + mBackgroundModeBytes + ", " +
116                 "garageModeBytes = " + mGarageModeBytes +
117         " }";
118     }
119 
120     @Override
121     @DataClass.Generated.Member
writeToParcel(@ndroid.annotation.NonNull android.os.Parcel dest, int flags)122     public void writeToParcel(@android.annotation.NonNull android.os.Parcel dest, int flags) {
123         // You can override field parcelling by defining methods like:
124         // void parcelFieldName(Parcel dest, int flags) { ... }
125 
126         dest.writeLong(mForegroundModeBytes);
127         dest.writeLong(mBackgroundModeBytes);
128         dest.writeLong(mGarageModeBytes);
129     }
130 
131     @Override
132     @DataClass.Generated.Member
describeContents()133     public int describeContents() { return 0; }
134 
135     /** @hide */
136     @SuppressWarnings({"unchecked", "RedundantCast"})
137     @DataClass.Generated.Member
PerStateBytes(@ndroid.annotation.NonNull android.os.Parcel in)138     /* package-private */ PerStateBytes(@android.annotation.NonNull android.os.Parcel in) {
139         // You can override field unparcelling by defining methods like:
140         // static FieldType unparcelFieldName(Parcel in) { ... }
141 
142         long foregroundModeBytes = in.readLong();
143         long backgroundModeBytes = in.readLong();
144         long garageModeBytes = in.readLong();
145 
146         this.mForegroundModeBytes = foregroundModeBytes;
147         this.mBackgroundModeBytes = backgroundModeBytes;
148         this.mGarageModeBytes = garageModeBytes;
149 
150         // onConstructed(); // You can define this method to get a callback
151     }
152 
153     @DataClass.Generated.Member
154     public static final @android.annotation.NonNull Parcelable.Creator<PerStateBytes> CREATOR
155             = new Parcelable.Creator<PerStateBytes>() {
156         @Override
157         public PerStateBytes[] newArray(int size) {
158             return new PerStateBytes[size];
159         }
160 
161         @Override
162         public PerStateBytes createFromParcel(@android.annotation.NonNull android.os.Parcel in) {
163             return new PerStateBytes(in);
164         }
165     };
166 
167     @DataClass.Generated(
168             time = 1614388529869L,
169             codegenVersion = "1.0.22",
170             sourceFile = "packages/services/Car/car-lib/src/android/car/watchdog/PerStateBytes.java",
171             inputSignatures = "private  long mForegroundModeBytes\nprivate  long mBackgroundModeBytes\nprivate  long mGarageModeBytes\nclass PerStateBytes extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true)")
172     @Deprecated
173     @ExcludeFromCodeCoverageGeneratedReport(reason = BOILERPLATE_CODE)
__metadata()174     private void __metadata() {}
175 
176 
177     //@formatter:on
178     // End of generated code
179 
180 }
181