1 /*
2  * Copyright (C) 2024 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.service.autofill;
18 
19 import android.annotation.NonNull;
20 import android.annotation.Nullable;
21 import android.os.Bundle;
22 import android.os.Parcel;
23 import android.os.Parcelable;
24 
25 import com.android.internal.util.DataClass;
26 
27 /**
28  * Response for a {@Link ConvertCredentialRequest}
29  *
30  * @hide
31  */
32 @DataClass(
33         genToString = true,
34         genHiddenConstructor = true,
35         genHiddenConstDefs = true)
36 public final class ConvertCredentialResponse implements Parcelable {
37     private final @NonNull Dataset mDataset;
38     private final @Nullable Bundle mClientState;
39 
40 
41 
42 
43     // Code below generated by codegen v1.0.23.
44     //
45     // DO NOT MODIFY!
46     // CHECKSTYLE:OFF Generated code
47     //
48     // To regenerate run:
49     // $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/android/service/autofill/ConvertCredentialResponse.java
50     //
51     // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
52     //   Settings > Editor > Code Style > Formatter Control
53     //@formatter:off
54 
55 
56     /**
57      * Creates a new ConvertCredentialResponse.
58      *
59      * @hide
60      */
61     @DataClass.Generated.Member
ConvertCredentialResponse( @onNull Dataset dataset, @Nullable Bundle clientState)62     public ConvertCredentialResponse(
63             @NonNull Dataset dataset,
64             @Nullable Bundle clientState) {
65         this.mDataset = dataset;
66         com.android.internal.util.AnnotationValidations.validate(
67                 NonNull.class, null, mDataset);
68         this.mClientState = clientState;
69 
70         // onConstructed(); // You can define this method to get a callback
71     }
72 
73     @DataClass.Generated.Member
getDataset()74     public @NonNull Dataset getDataset() {
75         return mDataset;
76     }
77 
78     @DataClass.Generated.Member
getClientState()79     public @Nullable Bundle getClientState() {
80         return mClientState;
81     }
82 
83     @Override
84     @DataClass.Generated.Member
toString()85     public String toString() {
86         // You can override field toString logic by defining methods like:
87         // String fieldNameToString() { ... }
88 
89         return "ConvertCredentialResponse { " +
90                 "dataset = " + mDataset + ", " +
91                 "clientState = " + mClientState +
92         " }";
93     }
94 
95     @Override
96     @DataClass.Generated.Member
writeToParcel(@onNull Parcel dest, int flags)97     public void writeToParcel(@NonNull Parcel dest, int flags) {
98         // You can override field parcelling by defining methods like:
99         // void parcelFieldName(Parcel dest, int flags) { ... }
100 
101         byte flg = 0;
102         if (mClientState != null) flg |= 0x2;
103         dest.writeByte(flg);
104         dest.writeTypedObject(mDataset, flags);
105         if (mClientState != null) dest.writeBundle(mClientState);
106     }
107 
108     @Override
109     @DataClass.Generated.Member
describeContents()110     public int describeContents() { return 0; }
111 
112     /** @hide */
113     @SuppressWarnings({"unchecked", "RedundantCast"})
114     @DataClass.Generated.Member
ConvertCredentialResponse(@onNull Parcel in)115     /* package-private */ ConvertCredentialResponse(@NonNull Parcel in) {
116         // You can override field unparcelling by defining methods like:
117         // static FieldType unparcelFieldName(Parcel in) { ... }
118 
119         byte flg = in.readByte();
120         Dataset dataset = (Dataset) in.readTypedObject(Dataset.CREATOR);
121         Bundle clientState = (flg & 0x2) == 0 ? null : in.readBundle();
122 
123         this.mDataset = dataset;
124         com.android.internal.util.AnnotationValidations.validate(
125                 NonNull.class, null, mDataset);
126         this.mClientState = clientState;
127 
128         // onConstructed(); // You can define this method to get a callback
129     }
130 
131     @DataClass.Generated.Member
132     public static final @NonNull Parcelable.Creator<ConvertCredentialResponse> CREATOR
133             = new Parcelable.Creator<ConvertCredentialResponse>() {
134         @Override
135         public ConvertCredentialResponse[] newArray(int size) {
136             return new ConvertCredentialResponse[size];
137         }
138 
139         @Override
140         public ConvertCredentialResponse createFromParcel(@NonNull Parcel in) {
141             return new ConvertCredentialResponse(in);
142         }
143     };
144 
145     @DataClass.Generated(
146             time = 1706132669373L,
147             codegenVersion = "1.0.23",
148             sourceFile = "frameworks/base/core/java/android/service/autofill/ConvertCredentialResponse.java",
149             inputSignatures = "private final @android.annotation.NonNull android.service.autofill.Dataset mDataset\nprivate final @android.annotation.Nullable android.os.Bundle mClientState\nclass ConvertCredentialResponse extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true, genHiddenConstructor=true, genHiddenConstDefs=true)")
150     @Deprecated
__metadata()151     private void __metadata() {}
152 
153 
154     //@formatter:on
155     // End of generated code
156 
157 }
158