// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto

package com.google.devtools.clouderrorreporting.v1beta1;

/**
 *
 *
 * <pre>
 * Specifies how the time periods of error group counts are aligned.
 * </pre>
 *
 * Protobuf enum {@code google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment}
 */
public enum TimedCountAlignment implements com.google.protobuf.ProtocolMessageEnum {
  /**
   *
   *
   * <pre>
   * No alignment specified.
   * </pre>
   *
   * <code>ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0;</code>
   */
  ERROR_COUNT_ALIGNMENT_UNSPECIFIED(0),
  /**
   *
   *
   * <pre>
   * The time periods shall be consecutive, have width equal to the
   * requested duration, and be aligned at the `alignment_time` provided in
   * the request.
   * The `alignment_time` does not have to be inside the query period but
   * even if it is outside, only time periods are returned which overlap
   * with the query period.
   * A rounded alignment will typically result in a
   * different size of the first or the last time period.
   * </pre>
   *
   * <code>ALIGNMENT_EQUAL_ROUNDED = 1;</code>
   */
  ALIGNMENT_EQUAL_ROUNDED(1),
  /**
   *
   *
   * <pre>
   * The time periods shall be consecutive, have width equal to the
   * requested duration, and be aligned at the end of the requested time
   * period. This can result in a different size of the
   * first time period.
   * </pre>
   *
   * <code>ALIGNMENT_EQUAL_AT_END = 2;</code>
   */
  ALIGNMENT_EQUAL_AT_END(2),
  UNRECOGNIZED(-1),
  ;

  /**
   *
   *
   * <pre>
   * No alignment specified.
   * </pre>
   *
   * <code>ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0;</code>
   */
  public static final int ERROR_COUNT_ALIGNMENT_UNSPECIFIED_VALUE = 0;
  /**
   *
   *
   * <pre>
   * The time periods shall be consecutive, have width equal to the
   * requested duration, and be aligned at the `alignment_time` provided in
   * the request.
   * The `alignment_time` does not have to be inside the query period but
   * even if it is outside, only time periods are returned which overlap
   * with the query period.
   * A rounded alignment will typically result in a
   * different size of the first or the last time period.
   * </pre>
   *
   * <code>ALIGNMENT_EQUAL_ROUNDED = 1;</code>
   */
  public static final int ALIGNMENT_EQUAL_ROUNDED_VALUE = 1;
  /**
   *
   *
   * <pre>
   * The time periods shall be consecutive, have width equal to the
   * requested duration, and be aligned at the end of the requested time
   * period. This can result in a different size of the
   * first time period.
   * </pre>
   *
   * <code>ALIGNMENT_EQUAL_AT_END = 2;</code>
   */
  public static final int ALIGNMENT_EQUAL_AT_END_VALUE = 2;

  public final int getNumber() {
    if (this == UNRECOGNIZED) {
      throw new java.lang.IllegalArgumentException(
          "Can't get the number of an unknown enum value.");
    }
    return value;
  }

  /** @deprecated Use {@link #forNumber(int)} instead. */
  @java.lang.Deprecated
  public static TimedCountAlignment valueOf(int value) {
    return forNumber(value);
  }

  public static TimedCountAlignment forNumber(int value) {
    switch (value) {
      case 0:
        return ERROR_COUNT_ALIGNMENT_UNSPECIFIED;
      case 1:
        return ALIGNMENT_EQUAL_ROUNDED;
      case 2:
        return ALIGNMENT_EQUAL_AT_END;
      default:
        return null;
    }
  }

  public static com.google.protobuf.Internal.EnumLiteMap<TimedCountAlignment>
      internalGetValueMap() {
    return internalValueMap;
  }

  private static final com.google.protobuf.Internal.EnumLiteMap<TimedCountAlignment>
      internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap<TimedCountAlignment>() {
            public TimedCountAlignment findValueByNumber(int number) {
              return TimedCountAlignment.forNumber(number);
            }
          };

  public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
    return getDescriptor().getValues().get(ordinal());
  }

  public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
    return getDescriptor();
  }

  public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
    return com.google.devtools.clouderrorreporting.v1beta1.ErrorStatsServiceProto.getDescriptor()
        .getEnumTypes()
        .get(0);
  }

  private static final TimedCountAlignment[] VALUES = values();

  public static TimedCountAlignment valueOf(
      com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
    if (desc.getType() != getDescriptor()) {
      throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
    }
    if (desc.getIndex() == -1) {
      return UNRECOGNIZED;
    }
    return VALUES[desc.getIndex()];
  }

  private final int value;

  private TimedCountAlignment(int value) {
    this.value = value;
  }

  // @@protoc_insertion_point(enum_scope:google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment)
}
