package com.onedrive.sdk.generated; import com.google.gson.JsonObject; import com.google.gson.annotations.SerializedName; import com.onedrive.sdk.extensions.IdentitySet; import com.onedrive.sdk.extensions.Item; import com.onedrive.sdk.extensions.ItemCollectionPage; import com.onedrive.sdk.extensions.Quota; import com.onedrive.sdk.serializer.IJsonBackedObject; import com.onedrive.sdk.serializer.ISerializer; import java.util.Arrays; public class BaseDrive implements IJsonBackedObject { @SerializedName("driveType") public String driveType; @SerializedName("id") public String id; public transient ItemCollectionPage items; private transient JsonObject mRawObject; private transient ISerializer mSerializer; @SerializedName("owner") public IdentitySet owner; @SerializedName("quota") public Quota quota; public transient ItemCollectionPage shared; public transient ItemCollectionPage special; public JsonObject getRawObject() { return this.mRawObject; } /* access modifiers changed from: protected */ public ISerializer getSerializer() { return this.mSerializer; } @Override // com.onedrive.sdk.serializer.IJsonBackedObject public void setRawObject(ISerializer iSerializer, JsonObject jsonObject) { this.mSerializer = iSerializer; this.mRawObject = jsonObject; if (jsonObject.x("items")) { BaseItemCollectionResponse baseItemCollectionResponse = new BaseItemCollectionResponse(); if (jsonObject.x("items@odata.nextLink")) { baseItemCollectionResponse.nextLink = jsonObject.u("items@odata.nextLink").j(); } JsonObject[] jsonObjectArr = (JsonObject[]) iSerializer.deserializeObject(jsonObject.u("items").toString(), JsonObject[].class); Item[] itemArr = new Item[jsonObjectArr.length]; for (int i10 = 0; i10 < jsonObjectArr.length; i10++) { itemArr[i10] = (Item) iSerializer.deserializeObject(jsonObjectArr[i10].toString(), Item.class); itemArr[i10].setRawObject(iSerializer, jsonObjectArr[i10]); } baseItemCollectionResponse.value = Arrays.asList(itemArr); this.items = new ItemCollectionPage(baseItemCollectionResponse, null); } if (jsonObject.x("shared")) { BaseItemCollectionResponse baseItemCollectionResponse2 = new BaseItemCollectionResponse(); if (jsonObject.x("shared@odata.nextLink")) { baseItemCollectionResponse2.nextLink = jsonObject.u("shared@odata.nextLink").j(); } JsonObject[] jsonObjectArr2 = (JsonObject[]) iSerializer.deserializeObject(jsonObject.u("shared").toString(), JsonObject[].class); Item[] itemArr2 = new Item[jsonObjectArr2.length]; for (int i11 = 0; i11 < jsonObjectArr2.length; i11++) { itemArr2[i11] = (Item) iSerializer.deserializeObject(jsonObjectArr2[i11].toString(), Item.class); itemArr2[i11].setRawObject(iSerializer, jsonObjectArr2[i11]); } baseItemCollectionResponse2.value = Arrays.asList(itemArr2); this.shared = new ItemCollectionPage(baseItemCollectionResponse2, null); } if (jsonObject.x("special")) { BaseItemCollectionResponse baseItemCollectionResponse3 = new BaseItemCollectionResponse(); if (jsonObject.x("special@odata.nextLink")) { baseItemCollectionResponse3.nextLink = jsonObject.u("special@odata.nextLink").j(); } JsonObject[] jsonObjectArr3 = (JsonObject[]) iSerializer.deserializeObject(jsonObject.u("special").toString(), JsonObject[].class); Item[] itemArr3 = new Item[jsonObjectArr3.length]; for (int i12 = 0; i12 < jsonObjectArr3.length; i12++) { itemArr3[i12] = (Item) iSerializer.deserializeObject(jsonObjectArr3[i12].toString(), Item.class); itemArr3[i12].setRawObject(iSerializer, jsonObjectArr3[i12]); } baseItemCollectionResponse3.value = Arrays.asList(itemArr3); this.special = new ItemCollectionPage(baseItemCollectionResponse3, null); } } }