// THIS FILE IS AUTOGENERATED. DO NOT MODIFY.

<?cs if:creator_package ?>
package <?cs var:creator_package ?>;
<?cs /if ?>

/**
 * @hide
 */
@SuppressWarnings({"unchecked", "rawtypes", "Var", "WrongConstant"})
<?cs each:annotation=annotations ?>
<?cs var:annotation ?>
<?cs /each ?>
public <?cs if:creatorIsFinal ?>final<?cs /if ?> class <?cs var:creator_name ?> implements android.os.Parcelable.Creator< <?cs var:class ?> > {
    public static final int CONTENT_DESCRIPTION = 0;

    public <?cs var:creator_name ?>() {
    }

    @Override
    public <?cs var:class ?> createFromParcel(final android.os.Parcel parcel) {
        final int end = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.validateObjectHeader(parcel);

        <?cs each:declaration=declarations ?>
        <?cs var:declaration.type ?> <?cs var:declaration.var_name ?> = <?cs var:declaration.initial_value ?>;
        <?cs /each ?>

        while (parcel.dataPosition() < end) {
            final int header = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readHeader(parcel);
            switch (com.google.android.gms.common.internal.safeparcel.SafeParcelReader.getFieldId(header)) {
                <?cs each:field=fields ?>
                    case <?cs var:field.id ?>:
                        <?cs if:field.is_assignment ?>
                            <?cs var:field.read_name ?>
                                    = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.<?cs var:field.create ?>(
                                            parcel, header
                                            <?cs if:field.creator ?>, <?cs var:field.creator ?><?cs /if ?>
                                            );
                        <?cs else ?>
                            com.google.android.gms.common.internal.safeparcel.SafeParcelReader.<?cs var:field.create ?>(
                                    parcel, header, <?cs var:field.read_name ?>
                                    <?cs if:field.creator ?>, <?cs var:field.creator ?><?cs /if ?>
                                    );
                        <?cs /if ?>
                        break;
                <?cs /each ?>
                default:
                    com.google.android.gms.common.internal.safeparcel.SafeParcelReader.skipUnknownField(parcel, header);
                    break;
            }
        }

        com.google.android.gms.common.internal.safeparcel.SafeParcelReader.ensureAtEnd(parcel, end);

        final <?cs var:class ?> obj = new <?cs var:class ?>(<?cs var:params ?>);

        <?cs if:call_validateContents ?>
        obj.validateContents();
        <?cs /if ?>

        return obj;
    }

    @Override
    public <?cs var:class ?>[] newArray(int size) {
        return new <?cs var:class ?>[size];
    }

    static void writeToParcel(<?cs var:class ?> obj, android.os.Parcel parcel, int flags) {
        int myStart = com.google.android.gms.common.internal.safeparcel.SafeParcelWriter.beginObjectHeader(parcel);

        <?cs each:field=fields ?>
        <?cs if:field.write ?>
        <?cs if:doNotParcelTypeDefaultValues ?>
        if (!isDefault(obj.<?cs var:field.write_name ?>)) {
        <?cs /if ?>
          com.google.android.gms.common.internal.safeparcel.SafeParcelWriter.<?cs var:field.write ?>(parcel
                , <?cs var:field.id ?>
                , obj.<?cs var:field.write_name ?>
                <?cs if:field.writeWithFlags ?>, flags<?cs /if ?>
                <?cs if:field.hasWriteNull ?>, false<?cs /if ?>
                );
        <?cs if:doNotParcelTypeDefaultValues ?>
        }
        <?cs /if ?>
        <?cs /if ?>
        <?cs /each ?>

        com.google.android.gms.common.internal.safeparcel.SafeParcelWriter.finishObjectHeader(parcel, myStart);
    }
    <?cs if:doNotParcelTypeDefaultValues ?>
    public static boolean isDefault(boolean value) {
        return !value;
    }

    public static boolean isDefault(byte value) {
        return value == 0;
    }

    public static boolean isDefault(char value) {
        return value == 0;
    }

    public static boolean isDefault(short value) {
        return value == 0;
    }

    public static boolean isDefault(int value) {
        return value == 0;
    }

    public static boolean isDefault(long value) {
        return value == 0L;
    }

    public static boolean isDefault(float value) {
        return value == 0.0f;
    }

    public static boolean isDefault(double value) {
        return value == 0.0;
    }

    public static boolean isDefault(Object value) {
        return value == null;
    }
    <?cs /if ?>
}
