/*
 * Copyright 2023 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
 *
 *     https://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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/privacy/dlp/v2/dlp.proto

package com.google.privacy.dlp.v2;

/**
 *
 *
 * <pre>
 * An enum of rules that can be used to transform a value. Can be a
 * record suppression, or one of the transformation rules specified under
 * `PrimitiveTransformation`.
 * </pre>
 *
 * Protobuf enum {@code google.privacy.dlp.v2.TransformationType}
 */
public enum TransformationType implements com.google.protobuf.ProtocolMessageEnum {
  /**
   *
   *
   * <pre>
   * Unused
   * </pre>
   *
   * <code>TRANSFORMATION_TYPE_UNSPECIFIED = 0;</code>
   */
  TRANSFORMATION_TYPE_UNSPECIFIED(0),
  /**
   *
   *
   * <pre>
   * Record suppression
   * </pre>
   *
   * <code>RECORD_SUPPRESSION = 1;</code>
   */
  RECORD_SUPPRESSION(1),
  /**
   *
   *
   * <pre>
   * Replace value
   * </pre>
   *
   * <code>REPLACE_VALUE = 2;</code>
   */
  REPLACE_VALUE(2),
  /**
   *
   *
   * <pre>
   * Replace value using a dictionary.
   * </pre>
   *
   * <code>REPLACE_DICTIONARY = 15;</code>
   */
  REPLACE_DICTIONARY(15),
  /**
   *
   *
   * <pre>
   * Redact
   * </pre>
   *
   * <code>REDACT = 3;</code>
   */
  REDACT(3),
  /**
   *
   *
   * <pre>
   * Character mask
   * </pre>
   *
   * <code>CHARACTER_MASK = 4;</code>
   */
  CHARACTER_MASK(4),
  /**
   *
   *
   * <pre>
   * FFX-FPE
   * </pre>
   *
   * <code>CRYPTO_REPLACE_FFX_FPE = 5;</code>
   */
  CRYPTO_REPLACE_FFX_FPE(5),
  /**
   *
   *
   * <pre>
   * Fixed size bucketing
   * </pre>
   *
   * <code>FIXED_SIZE_BUCKETING = 6;</code>
   */
  FIXED_SIZE_BUCKETING(6),
  /**
   *
   *
   * <pre>
   * Bucketing
   * </pre>
   *
   * <code>BUCKETING = 7;</code>
   */
  BUCKETING(7),
  /**
   *
   *
   * <pre>
   * Replace with info type
   * </pre>
   *
   * <code>REPLACE_WITH_INFO_TYPE = 8;</code>
   */
  REPLACE_WITH_INFO_TYPE(8),
  /**
   *
   *
   * <pre>
   * Time part
   * </pre>
   *
   * <code>TIME_PART = 9;</code>
   */
  TIME_PART(9),
  /**
   *
   *
   * <pre>
   * Crypto hash
   * </pre>
   *
   * <code>CRYPTO_HASH = 10;</code>
   */
  CRYPTO_HASH(10),
  /**
   *
   *
   * <pre>
   * Date shift
   * </pre>
   *
   * <code>DATE_SHIFT = 12;</code>
   */
  DATE_SHIFT(12),
  /**
   *
   *
   * <pre>
   * Deterministic crypto
   * </pre>
   *
   * <code>CRYPTO_DETERMINISTIC_CONFIG = 13;</code>
   */
  CRYPTO_DETERMINISTIC_CONFIG(13),
  /**
   *
   *
   * <pre>
   * Redact image
   * </pre>
   *
   * <code>REDACT_IMAGE = 14;</code>
   */
  REDACT_IMAGE(14),
  UNRECOGNIZED(-1),
  ;

  /**
   *
   *
   * <pre>
   * Unused
   * </pre>
   *
   * <code>TRANSFORMATION_TYPE_UNSPECIFIED = 0;</code>
   */
  public static final int TRANSFORMATION_TYPE_UNSPECIFIED_VALUE = 0;
  /**
   *
   *
   * <pre>
   * Record suppression
   * </pre>
   *
   * <code>RECORD_SUPPRESSION = 1;</code>
   */
  public static final int RECORD_SUPPRESSION_VALUE = 1;
  /**
   *
   *
   * <pre>
   * Replace value
   * </pre>
   *
   * <code>REPLACE_VALUE = 2;</code>
   */
  public static final int REPLACE_VALUE_VALUE = 2;
  /**
   *
   *
   * <pre>
   * Replace value using a dictionary.
   * </pre>
   *
   * <code>REPLACE_DICTIONARY = 15;</code>
   */
  public static final int REPLACE_DICTIONARY_VALUE = 15;
  /**
   *
   *
   * <pre>
   * Redact
   * </pre>
   *
   * <code>REDACT = 3;</code>
   */
  public static final int REDACT_VALUE = 3;
  /**
   *
   *
   * <pre>
   * Character mask
   * </pre>
   *
   * <code>CHARACTER_MASK = 4;</code>
   */
  public static final int CHARACTER_MASK_VALUE = 4;
  /**
   *
   *
   * <pre>
   * FFX-FPE
   * </pre>
   *
   * <code>CRYPTO_REPLACE_FFX_FPE = 5;</code>
   */
  public static final int CRYPTO_REPLACE_FFX_FPE_VALUE = 5;
  /**
   *
   *
   * <pre>
   * Fixed size bucketing
   * </pre>
   *
   * <code>FIXED_SIZE_BUCKETING = 6;</code>
   */
  public static final int FIXED_SIZE_BUCKETING_VALUE = 6;
  /**
   *
   *
   * <pre>
   * Bucketing
   * </pre>
   *
   * <code>BUCKETING = 7;</code>
   */
  public static final int BUCKETING_VALUE = 7;
  /**
   *
   *
   * <pre>
   * Replace with info type
   * </pre>
   *
   * <code>REPLACE_WITH_INFO_TYPE = 8;</code>
   */
  public static final int REPLACE_WITH_INFO_TYPE_VALUE = 8;
  /**
   *
   *
   * <pre>
   * Time part
   * </pre>
   *
   * <code>TIME_PART = 9;</code>
   */
  public static final int TIME_PART_VALUE = 9;
  /**
   *
   *
   * <pre>
   * Crypto hash
   * </pre>
   *
   * <code>CRYPTO_HASH = 10;</code>
   */
  public static final int CRYPTO_HASH_VALUE = 10;
  /**
   *
   *
   * <pre>
   * Date shift
   * </pre>
   *
   * <code>DATE_SHIFT = 12;</code>
   */
  public static final int DATE_SHIFT_VALUE = 12;
  /**
   *
   *
   * <pre>
   * Deterministic crypto
   * </pre>
   *
   * <code>CRYPTO_DETERMINISTIC_CONFIG = 13;</code>
   */
  public static final int CRYPTO_DETERMINISTIC_CONFIG_VALUE = 13;
  /**
   *
   *
   * <pre>
   * Redact image
   * </pre>
   *
   * <code>REDACT_IMAGE = 14;</code>
   */
  public static final int REDACT_IMAGE_VALUE = 14;

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

  /**
   * @param value The numeric wire value of the corresponding enum entry.
   * @return The enum associated with the given numeric wire value.
   * @deprecated Use {@link #forNumber(int)} instead.
   */
  @java.lang.Deprecated
  public static TransformationType valueOf(int value) {
    return forNumber(value);
  }

  /**
   * @param value The numeric wire value of the corresponding enum entry.
   * @return The enum associated with the given numeric wire value.
   */
  public static TransformationType forNumber(int value) {
    switch (value) {
      case 0:
        return TRANSFORMATION_TYPE_UNSPECIFIED;
      case 1:
        return RECORD_SUPPRESSION;
      case 2:
        return REPLACE_VALUE;
      case 15:
        return REPLACE_DICTIONARY;
      case 3:
        return REDACT;
      case 4:
        return CHARACTER_MASK;
      case 5:
        return CRYPTO_REPLACE_FFX_FPE;
      case 6:
        return FIXED_SIZE_BUCKETING;
      case 7:
        return BUCKETING;
      case 8:
        return REPLACE_WITH_INFO_TYPE;
      case 9:
        return TIME_PART;
      case 10:
        return CRYPTO_HASH;
      case 12:
        return DATE_SHIFT;
      case 13:
        return CRYPTO_DETERMINISTIC_CONFIG;
      case 14:
        return REDACT_IMAGE;
      default:
        return null;
    }
  }

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

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

  public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
    if (this == UNRECOGNIZED) {
      throw new java.lang.IllegalStateException(
          "Can't get the descriptor of an unrecognized enum value.");
    }
    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.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(2);
  }

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

  public static TransformationType 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 TransformationType(int value) {
    this.value = value;
  }

  // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.TransformationType)
}
