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