// Copyright 2018 Google LLC
//
// 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 com.google.firebase.dynamiclinks.internal;

import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;

// Autogenerated, do not edit
public class WarningImplCreator implements Parcelable.Creator<ShortDynamicLinkImpl.WarningImpl> {
  public static final int CONTENT_DESCRIPTION = 0;

  public WarningImplCreator() {}

  public ShortDynamicLinkImpl.WarningImpl createFromParcel(Parcel parcel) {
    int end = SafeParcelReader.validateObjectHeader(parcel);

    String _local_safe_0a1b_message = null;

    while (parcel.dataPosition() < end) {
      int header = SafeParcelReader.readHeader(parcel);
      switch (SafeParcelReader.getFieldId(header)) {
        case 2:
          _local_safe_0a1b_message = SafeParcelReader.createString(parcel, header);

          break;

        default:
          SafeParcelReader.skipUnknownField(parcel, header);
      }
    }

    SafeParcelReader.ensureAtEnd(parcel, end);

    ShortDynamicLinkImpl.WarningImpl obj =
        new ShortDynamicLinkImpl.WarningImpl(_local_safe_0a1b_message);

    return obj;
  }

  public ShortDynamicLinkImpl.WarningImpl[] newArray(int size) {
    return new ShortDynamicLinkImpl.WarningImpl[size];
  }

  static void writeToParcel(ShortDynamicLinkImpl.WarningImpl obj, Parcel parcel, int flags) {
    int myStart = SafeParcelWriter.beginObjectHeader(parcel);

    SafeParcelWriter.writeString(parcel, 2, obj.getMessage(), false);

    SafeParcelWriter.finishObjectHeader(parcel, myStart);
  }
}
