// Code generated by Wire protocol buffer compiler, do not edit.
// Source: squareup.protos.unknownfields.EnumVersionTwo in unknown_fields.proto
package com.squareup.wire.protos.unknownfields;

import com.squareup.wire.EnumAdapter;
import com.squareup.wire.ProtoAdapter;
import com.squareup.wire.Syntax;
import com.squareup.wire.WireEnum;
import java.lang.Override;

public enum EnumVersionTwo implements WireEnum {
  SHREK_V2(1),

  DONKEY_V2(2),

  FIONA_V2(3),

  PUSS_IN_BOOTS_V2(4);

  public static final ProtoAdapter<EnumVersionTwo> ADAPTER = new ProtoAdapter_EnumVersionTwo();

  private final int value;

  EnumVersionTwo(int value) {
    this.value = value;
  }

  /**
   * Return the constant for {@code value} or null.
   */
  public static EnumVersionTwo fromValue(int value) {
    switch (value) {
      case 1: return SHREK_V2;
      case 2: return DONKEY_V2;
      case 3: return FIONA_V2;
      case 4: return PUSS_IN_BOOTS_V2;
      default: return null;
    }
  }

  @Override
  public int getValue() {
    return value;
  }

  private static final class ProtoAdapter_EnumVersionTwo extends EnumAdapter<EnumVersionTwo> {
    ProtoAdapter_EnumVersionTwo() {
      super(EnumVersionTwo.class, Syntax.PROTO_2, null);
    }

    @Override
    protected EnumVersionTwo fromValue(int value) {
      return EnumVersionTwo.fromValue(value);
    }
  }
}
