• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2020 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.vms;
18 
19 import static com.android.car.internal.ExcludeFromCodeCoverageGeneratedReport.BOILERPLATE_CODE;
20 
21 import android.annotation.NonNull;
22 import android.car.annotation.AddedInOrBefore;
23 import android.os.Parcel;
24 import android.os.Parcelable;
25 
26 import com.android.car.internal.ExcludeFromCodeCoverageGeneratedReport;
27 import com.android.car.internal.util.AnnotationValidations;
28 import com.android.car.internal.util.DataClass;
29 
30 import java.util.Objects;
31 
32 /**
33  * Hidden data object used to communicate Vehicle Map Service client tokens and system state on
34  * client registration.
35  *
36  * @hide
37  */
38 @DataClass(
39         genEqualsHashCode = true,
40         genAidl = true)
41 public class VmsRegistrationInfo implements Parcelable {
42     private @NonNull VmsAvailableLayers mAvailableLayers;
43     private @NonNull VmsSubscriptionState mSubscriptionState;
44 
45 
46 
47     // Code below generated by codegen v1.0.23.
48     //
49     // DO NOT MODIFY!
50     // CHECKSTYLE:OFF Generated code
51     //
52     // To regenerate run:
53     // $ codegen $ANDROID_BUILD_TOP/packages/services/Car/car-lib/src/android/car/vms/VmsRegistrationInfo.java
54     //
55     // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
56     //   Settings > Editor > Code Style > Formatter Control
57     //@formatter:off
58 
59 
60     @DataClass.Generated.Member
VmsRegistrationInfo( @onNull VmsAvailableLayers availableLayers, @NonNull VmsSubscriptionState subscriptionState)61     public VmsRegistrationInfo(
62             @NonNull VmsAvailableLayers availableLayers,
63             @NonNull VmsSubscriptionState subscriptionState) {
64         this.mAvailableLayers = availableLayers;
65         AnnotationValidations.validate(
66                 NonNull.class, null, mAvailableLayers);
67         this.mSubscriptionState = subscriptionState;
68         AnnotationValidations.validate(
69                 NonNull.class, null, mSubscriptionState);
70 
71         // onConstructed(); // You can define this method to get a callback
72     }
73 
74     @DataClass.Generated.Member
75     @AddedInOrBefore(majorVersion = 33)
getAvailableLayers()76     public @NonNull VmsAvailableLayers getAvailableLayers() {
77         return mAvailableLayers;
78     }
79 
80     @DataClass.Generated.Member
81     @AddedInOrBefore(majorVersion = 33)
getSubscriptionState()82     public @NonNull VmsSubscriptionState getSubscriptionState() {
83         return mSubscriptionState;
84     }
85 
86     @Override
87     @DataClass.Generated.Member
88     @AddedInOrBefore(majorVersion = 33)
equals(@ndroid.annotation.Nullable Object o)89     public boolean equals(@android.annotation.Nullable Object o) {
90         // You can override field equality logic by defining either of the methods like:
91         // boolean fieldNameEquals(VmsRegistrationInfo other) { ... }
92         // boolean fieldNameEquals(FieldType otherValue) { ... }
93 
94         if (this == o) return true;
95         if (o == null || getClass() != o.getClass()) return false;
96         @SuppressWarnings("unchecked")
97         VmsRegistrationInfo that = (VmsRegistrationInfo) o;
98         //noinspection PointlessBooleanExpression
99         return true
100                 && Objects.equals(mAvailableLayers, that.mAvailableLayers)
101                 && Objects.equals(mSubscriptionState, that.mSubscriptionState);
102     }
103 
104     @Override
105     @DataClass.Generated.Member
106     @AddedInOrBefore(majorVersion = 33)
hashCode()107     public int hashCode() {
108         // You can override field hashCode logic by defining methods like:
109         // int fieldNameHashCode() { ... }
110 
111         int _hash = 1;
112         _hash = 31 * _hash + Objects.hashCode(mAvailableLayers);
113         _hash = 31 * _hash + Objects.hashCode(mSubscriptionState);
114         return _hash;
115     }
116 
117     @Override
118     @DataClass.Generated.Member
119     @AddedInOrBefore(majorVersion = 33)
writeToParcel(@onNull Parcel dest, int flags)120     public void writeToParcel(@NonNull Parcel dest, int flags) {
121         // You can override field parcelling by defining methods like:
122         // void parcelFieldName(Parcel dest, int flags) { ... }
123 
124         dest.writeTypedObject(mAvailableLayers, flags);
125         dest.writeTypedObject(mSubscriptionState, flags);
126     }
127 
128     @Override
129     @DataClass.Generated.Member
130     @ExcludeFromCodeCoverageGeneratedReport(reason = BOILERPLATE_CODE)
131     @AddedInOrBefore(majorVersion = 33)
describeContents()132     public int describeContents() { return 0; }
133 
134     /** @hide */
135     @SuppressWarnings({"unchecked", "RedundantCast"})
136     @DataClass.Generated.Member
VmsRegistrationInfo(@onNull Parcel in)137     protected VmsRegistrationInfo(@NonNull Parcel in) {
138         // You can override field unparcelling by defining methods like:
139         // static FieldType unparcelFieldName(Parcel in) { ... }
140 
141         VmsAvailableLayers availableLayers = (VmsAvailableLayers) in.readTypedObject(VmsAvailableLayers.CREATOR);
142         VmsSubscriptionState subscriptionState = (VmsSubscriptionState) in.readTypedObject(VmsSubscriptionState.CREATOR);
143 
144         this.mAvailableLayers = availableLayers;
145         AnnotationValidations.validate(
146                 NonNull.class, null, mAvailableLayers);
147         this.mSubscriptionState = subscriptionState;
148         AnnotationValidations.validate(
149                 NonNull.class, null, mSubscriptionState);
150 
151         // onConstructed(); // You can define this method to get a callback
152     }
153 
154     @DataClass.Generated.Member
155     @AddedInOrBefore(majorVersion = 33)
156     public static final @NonNull Parcelable.Creator<VmsRegistrationInfo> CREATOR
157             = new Parcelable.Creator<VmsRegistrationInfo>() {
158         @Override
159         public VmsRegistrationInfo[] newArray(int size) {
160             return new VmsRegistrationInfo[size];
161         }
162 
163         @Override
164         public VmsRegistrationInfo createFromParcel(@NonNull Parcel in) {
165             return new VmsRegistrationInfo(in);
166         }
167     };
168 
169     @DataClass.Generated(
170             time = 1628099251439L,
171             codegenVersion = "1.0.23",
172             sourceFile = "packages/services/Car/car-lib/src/android/car/vms/VmsRegistrationInfo.java",
173             inputSignatures = "private @android.annotation.NonNull android.car.vms.VmsAvailableLayers mAvailableLayers\nprivate @android.annotation.NonNull android.car.vms.VmsSubscriptionState mSubscriptionState\nclass VmsRegistrationInfo extends java.lang.Object implements [android.os.Parcelable]\n@com.android.car.internal.util.DataClass(genEqualsHashCode=true, genAidl=true)")
174     @Deprecated
__metadata()175     private void __metadata() {}
176 
177 
178     //@formatter:on
179     // End of generated code
180 
181 }
182