blob: 12bee070cc8bea1480c6b66dcbba4c13c637c418 [file] [log] [blame]
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.car.user;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.Parcelable;
import com.android.internal.util.DataClass;
/**
* Results of a {@link CarUserManager#getUserIdentificationAssociation(int[]) request.
*
* @hide
*/
@DataClass(
genToString = true,
genHiddenConstructor = true,
genHiddenConstDefs = true)
public final class GetUserIdentificationAssociationResponse implements Parcelable {
/**
* Gets the error message returned by the HAL.
*/
@Nullable
private String mErrorMessage;
/**
* Gets the list of
* {@link android.hardware.automotive.vehicle.V2_0.UserIdentificationAssociationValue}
* associates with the request.
*/
@NonNull
private final int[] mValues;
// Code below generated by codegen v1.0.15.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
//
// To regenerate run:
// $ codegen $ANDROID_BUILD_TOP/packages/services/Car/car-lib/src/android/car/user/GetUserIdentificationAssociationResponse.java
//
// To exclude the generated code from IntelliJ auto-formatting enable (one-time):
// Settings > Editor > Code Style > Formatter Control
//@formatter:off
/**
* Creates a new GetUserIdentificationAssociationResponse.
*
* @param errorMessage
* Gets the error message returned by the HAL.
* @param values
* Gets the list of
* {@link android.hardware.automotive.vehicle.V2_0.UserIdentificationAssociationValue}
* associates with the request.
* @hide
*/
@DataClass.Generated.Member
public GetUserIdentificationAssociationResponse(
@Nullable String errorMessage,
@NonNull int[] values) {
this.mErrorMessage = errorMessage;
this.mValues = values;
com.android.internal.util.AnnotationValidations.validate(
NonNull.class, null, mValues);
// onConstructed(); // You can define this method to get a callback
}
/**
* Gets the error message returned by the HAL.
*/
@DataClass.Generated.Member
public @Nullable String getErrorMessage() {
return mErrorMessage;
}
/**
* Gets the list of
* {@link android.hardware.automotive.vehicle.V2_0.UserIdentificationAssociationValue}
* associates with the request.
*/
@DataClass.Generated.Member
public @NonNull int[] getValues() {
return mValues;
}
@Override
@DataClass.Generated.Member
public String toString() {
// You can override field toString logic by defining methods like:
// String fieldNameToString() { ... }
return "GetUserIdentificationAssociationResponse { " +
"errorMessage = " + mErrorMessage + ", " +
"values = " + java.util.Arrays.toString(mValues) +
" }";
}
@Override
@DataClass.Generated.Member
public void writeToParcel(@NonNull android.os.Parcel dest, int flags) {
// You can override field parcelling by defining methods like:
// void parcelFieldName(Parcel dest, int flags) { ... }
byte flg = 0;
if (mErrorMessage != null) flg |= 0x1;
dest.writeByte(flg);
if (mErrorMessage != null) dest.writeString(mErrorMessage);
dest.writeIntArray(mValues);
}
@Override
@DataClass.Generated.Member
public int describeContents() { return 0; }
/** @hide */
@SuppressWarnings({"unchecked", "RedundantCast"})
@DataClass.Generated.Member
/* package-private */ GetUserIdentificationAssociationResponse(@NonNull android.os.Parcel in) {
// You can override field unparcelling by defining methods like:
// static FieldType unparcelFieldName(Parcel in) { ... }
byte flg = in.readByte();
String errorMessage = (flg & 0x1) == 0 ? null : in.readString();
int[] values = in.createIntArray();
this.mErrorMessage = errorMessage;
this.mValues = values;
com.android.internal.util.AnnotationValidations.validate(
NonNull.class, null, mValues);
// onConstructed(); // You can define this method to get a callback
}
@DataClass.Generated.Member
public static final @NonNull Parcelable.Creator<GetUserIdentificationAssociationResponse> CREATOR
= new Parcelable.Creator<GetUserIdentificationAssociationResponse>() {
@Override
public GetUserIdentificationAssociationResponse[] newArray(int size) {
return new GetUserIdentificationAssociationResponse[size];
}
@Override
public GetUserIdentificationAssociationResponse createFromParcel(@NonNull android.os.Parcel in) {
return new GetUserIdentificationAssociationResponse(in);
}
};
@DataClass.Generated(
time = 1587769987549L,
codegenVersion = "1.0.15",
sourceFile = "packages/services/Car/car-lib/src/android/car/user/GetUserIdentificationAssociationResponse.java",
inputSignatures = "private @android.annotation.Nullable java.lang.String mErrorMessage\nprivate final @android.annotation.NonNull int[] mValues\nclass GetUserIdentificationAssociationResponse extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true, genHiddenConstructor=true, genHiddenConstDefs=true)")
@Deprecated
private void __metadata() {}
//@formatter:on
// End of generated code
}