• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2023 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.remoteaccess;
18 
19 import static com.android.car.internal.util.VersionUtils.assertPlatformVersionAtLeastU;
20 
21 import android.annotation.NonNull;
22 import android.car.annotation.ApiRequirements;
23 import android.car.annotation.ApiRequirements.CarVersion;
24 import android.car.annotation.ApiRequirements.PlatformVersion;
25 import android.os.Parcelable;
26 
27 import com.android.car.internal.util.AnnotationValidations;
28 import com.android.car.internal.util.DataClass;
29 
30 /**
31  * Car remote task client registration info definition.
32  */
33 @DataClass(genHiddenConstructor = true)
34 public final class RemoteTaskClientRegistrationInfo implements Parcelable {
35     /**
36      * Globally unique identifier to specify the wake-up server.
37      */
38     private final @NonNull String mServiceId;
39 
40     /**
41      * Globally unique identifier to specify the vehicle.
42      */
43     private final @NonNull String mVehicleId;
44 
45     /**
46      * Locally unique identifier to specify the processor where the task execution will be done.
47      *
48      * <p>There might be multiple processors running Android or other OS in single vehicle device.
49      */
50     private final @NonNull String mProcessorId;
51 
52     /**
53      * Locally unique identifier to specify the remote task client.
54      */
55     private final @NonNull String mClientId;
56 
57 
58 
59     // Code below generated by codegen v1.0.23.
60     //
61     // DO NOT MODIFY!
62     // CHECKSTYLE:OFF Generated code
63     //
64     // To regenerate run:
65     // $ codegen $ANDROID_BUILD_TOP/packages/services/Car/car-lib/src/android/car/remoteaccess/RemoteTaskClientRegistrationInfo.java
66     //
67     // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
68     //   Settings > Editor > Code Style > Formatter Control
69     //@formatter:off
70 
71 
72     /**
73      * Creates a new RemoteTaskClientRegistrationInfo.
74      *
75      * @param serviceId
76      *   Globally unique identifier to specify the wake-up service.
77      * @param vehicleId
78      *   Globally unique identifier to specify the vehicle.
79      * @param processorId
80      *   Locally unique identifier to specify the processor where the task execution will be done.
81      * @param clientId
82      *   Locally unique identifier to specify the remote task client.
83      * @hide
84      */
85     @DataClass.Generated.Member
RemoteTaskClientRegistrationInfo( @onNull String serviceId, @NonNull String vehicleId, @NonNull String processorId, @NonNull String clientId)86     public RemoteTaskClientRegistrationInfo(
87             @NonNull String serviceId,
88             @NonNull String vehicleId,
89             @NonNull String processorId,
90             @NonNull String clientId) {
91         this.mServiceId = serviceId;
92         AnnotationValidations.validate(
93                 NonNull.class, null, mServiceId);
94         this.mVehicleId = vehicleId;
95         AnnotationValidations.validate(
96                 NonNull.class, null, mVehicleId);
97         this.mProcessorId = processorId;
98         AnnotationValidations.validate(
99                 NonNull.class, null, mProcessorId);
100         this.mClientId = clientId;
101         AnnotationValidations.validate(
102                 NonNull.class, null, mClientId);
103 
104         // onConstructed(); // You can define this method to get a callback
105     }
106 
107     /**
108      * Globally unique identifier to specify the wake-up service.
109      */
110     @ApiRequirements(minCarVersion = CarVersion.UPSIDE_DOWN_CAKE_0,
111                      minPlatformVersion = PlatformVersion.UPSIDE_DOWN_CAKE_0)
112     @DataClass.Generated.Member
getServiceId()113     public @NonNull String getServiceId() {
114         assertPlatformVersionAtLeastU();
115         return mServiceId;
116     }
117 
118     /**
119      * Globally unique identifier to specify the vehicle.
120      */
121     @ApiRequirements(minCarVersion = CarVersion.UPSIDE_DOWN_CAKE_0,
122                      minPlatformVersion = PlatformVersion.UPSIDE_DOWN_CAKE_0)
123     @DataClass.Generated.Member
getVehicleId()124     public @NonNull String getVehicleId() {
125         assertPlatformVersionAtLeastU();
126         return mVehicleId;
127     }
128 
129     /**
130      * Locally unique identifier to specify the processor where the task execution will be done.
131      */
132     @ApiRequirements(minCarVersion = CarVersion.UPSIDE_DOWN_CAKE_0,
133                      minPlatformVersion = PlatformVersion.UPSIDE_DOWN_CAKE_0)
134     @DataClass.Generated.Member
getProcessorId()135     public @NonNull String getProcessorId() {
136         assertPlatformVersionAtLeastU();
137         return mProcessorId;
138     }
139 
140     /**
141      * Locally unique identifier to specify the remote task client.
142      */
143     @ApiRequirements(minCarVersion = CarVersion.UPSIDE_DOWN_CAKE_0,
144                      minPlatformVersion = PlatformVersion.UPSIDE_DOWN_CAKE_0)
145     @DataClass.Generated.Member
getClientId()146     public @NonNull String getClientId() {
147         assertPlatformVersionAtLeastU();
148         return mClientId;
149     }
150 
151     @ApiRequirements(minCarVersion = CarVersion.UPSIDE_DOWN_CAKE_0,
152                      minPlatformVersion = PlatformVersion.UPSIDE_DOWN_CAKE_0)
153     @Override
154     @DataClass.Generated.Member
writeToParcel(@onNull android.os.Parcel dest, int flags)155     public void writeToParcel(@NonNull android.os.Parcel dest, int flags) {
156         // You can override field parcelling by defining methods like:
157         // void parcelFieldName(Parcel dest, int flags) { ... }
158 
159         dest.writeString(mServiceId);
160         dest.writeString(mVehicleId);
161         dest.writeString(mProcessorId);
162         dest.writeString(mClientId);
163     }
164 
165     @ApiRequirements(minCarVersion = CarVersion.UPSIDE_DOWN_CAKE_0,
166                      minPlatformVersion = PlatformVersion.UPSIDE_DOWN_CAKE_0)
167     @Override
168     @DataClass.Generated.Member
describeContents()169     public int describeContents() { return 0; }
170 
171     /** @hide */
172     @SuppressWarnings({"unchecked", "RedundantCast"})
173     @DataClass.Generated.Member
RemoteTaskClientRegistrationInfo(@onNull android.os.Parcel in)174     /* package-private */ RemoteTaskClientRegistrationInfo(@NonNull android.os.Parcel in) {
175         // You can override field unparcelling by defining methods like:
176         // static FieldType unparcelFieldName(Parcel in) { ... }
177 
178         String serviceId = in.readString();
179         String vehicleId = in.readString();
180         String processorId = in.readString();
181         String clientId = in.readString();
182 
183         this.mServiceId = serviceId;
184         AnnotationValidations.validate(
185                 NonNull.class, null, mServiceId);
186         this.mVehicleId = vehicleId;
187         AnnotationValidations.validate(
188                 NonNull.class, null, mVehicleId);
189         this.mProcessorId = processorId;
190         AnnotationValidations.validate(
191                 NonNull.class, null, mProcessorId);
192         this.mClientId = clientId;
193         AnnotationValidations.validate(
194                 NonNull.class, null, mClientId);
195 
196         // onConstructed(); // You can define this method to get a callback
197     }
198 
199     @ApiRequirements(minCarVersion = CarVersion.UPSIDE_DOWN_CAKE_0,
200                      minPlatformVersion = PlatformVersion.UPSIDE_DOWN_CAKE_0)
201     @DataClass.Generated.Member
202     public static final @NonNull Parcelable.Creator<RemoteTaskClientRegistrationInfo> CREATOR
203             = new Parcelable.Creator<RemoteTaskClientRegistrationInfo>() {
204         @Override
205         public RemoteTaskClientRegistrationInfo[] newArray(int size) {
206             return new RemoteTaskClientRegistrationInfo[size];
207         }
208 
209         @Override
210         public RemoteTaskClientRegistrationInfo createFromParcel(@NonNull android.os.Parcel in) {
211             return new RemoteTaskClientRegistrationInfo(in);
212         }
213     };
214 
215     @DataClass.Generated(
216             time = 1679098324017L,
217             codegenVersion = "1.0.23",
218             sourceFile = "packages/services/Car/car-lib/src/android/car/remoteaccess/RemoteTaskClientRegistrationInfo.java",
219             inputSignatures = "private final @android.annotation.NonNull java.lang.String mServiceId\nprivate final @android.annotation.NonNull java.lang.String mVehicleId\nprivate final @android.annotation.NonNull java.lang.String mProcessorId\nprivate final @android.annotation.NonNull java.lang.String mClientId\nclass RemoteTaskClientRegistrationInfo extends java.lang.Object implements [android.os.Parcelable]\n@com.android.car.internal.util.DataClass(genHiddenConstructor=true)")
220     @Deprecated
__metadata()221     private void __metadata() {}
222 
223 
224     //@formatter:on
225     // End of generated code
226 
227 }
228