Enum EncodingType

java.lang.Object
java.lang.Enum<EncodingType>
com.google.cloud.language.v1.EncodingType
All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<EncodingType>

@Generated public enum EncodingType extends Enum<EncodingType> implements com.google.protobuf.ProtocolMessageEnum
 Represents the text encoding that the caller uses to process the output.
 Providing an `EncodingType` is recommended because the API provides the
 beginning offsets for various outputs, such as tokens and mentions, and
 languages that natively use different text encodings may access offsets
 differently.
 
Protobuf enum google.cloud.language.v1.EncodingType
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    If `EncodingType` is not specified, encoding-dependent information (such as `begin_offset`) will be set at `-1`.
     
    Encoding-dependent information (such as `begin_offset`) is calculated based on the UTF-16 encoding of the input.
    Encoding-dependent information (such as `begin_offset`) is calculated based on the UTF-32 encoding of the input.
    Encoding-dependent information (such as `begin_offset`) is calculated based on the UTF-8 encoding of the input.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    If `EncodingType` is not specified, encoding-dependent information (such as `begin_offset`) will be set at `-1`.
    static final int
    Encoding-dependent information (such as `begin_offset`) is calculated based on the UTF-16 encoding of the input.
    static final int
    Encoding-dependent information (such as `begin_offset`) is calculated based on the UTF-32 encoding of the input.
    static final int
    Encoding-dependent information (such as `begin_offset`) is calculated based on the UTF-8 encoding of the input.
  • Method Summary

    Modifier and Type
    Method
    Description
    forNumber(int value)
     
    static com.google.protobuf.Descriptors.EnumDescriptor
     
    final com.google.protobuf.Descriptors.EnumDescriptor
     
    final int
     
    final com.google.protobuf.Descriptors.EnumValueDescriptor
     
    static com.google.protobuf.Internal.EnumLiteMap<EncodingType>
     
    valueOf(int value)
    Deprecated.
    valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
    Returns the enum constant of this type with the specified name.
    Returns the enum constant of this type with the specified name.
    static EncodingType[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NONE

      public static final EncodingType NONE
       If `EncodingType` is not specified, encoding-dependent information (such as
       `begin_offset`) will be set at `-1`.
       
      NONE = 0;
    • UTF8

      public static final EncodingType UTF8
       Encoding-dependent information (such as `begin_offset`) is calculated based
       on the UTF-8 encoding of the input. C++ and Go are examples of languages
       that use this encoding natively.
       
      UTF8 = 1;
    • UTF16

      public static final EncodingType UTF16
       Encoding-dependent information (such as `begin_offset`) is calculated based
       on the UTF-16 encoding of the input. Java and JavaScript are examples of
       languages that use this encoding natively.
       
      UTF16 = 2;
    • UTF32

      public static final EncodingType UTF32
       Encoding-dependent information (such as `begin_offset`) is calculated based
       on the UTF-32 encoding of the input. Python is an example of a language
       that uses this encoding natively.
       
      UTF32 = 3;
    • UNRECOGNIZED

      public static final EncodingType UNRECOGNIZED
  • Field Details

    • NONE_VALUE

      public static final int NONE_VALUE
       If `EncodingType` is not specified, encoding-dependent information (such as
       `begin_offset`) will be set at `-1`.
       
      NONE = 0;
      See Also:
    • UTF8_VALUE

      public static final int UTF8_VALUE
       Encoding-dependent information (such as `begin_offset`) is calculated based
       on the UTF-8 encoding of the input. C++ and Go are examples of languages
       that use this encoding natively.
       
      UTF8 = 1;
      See Also:
    • UTF16_VALUE

      public static final int UTF16_VALUE
       Encoding-dependent information (such as `begin_offset`) is calculated based
       on the UTF-16 encoding of the input. Java and JavaScript are examples of
       languages that use this encoding natively.
       
      UTF16 = 2;
      See Also:
    • UTF32_VALUE

      public static final int UTF32_VALUE
       Encoding-dependent information (such as `begin_offset`) is calculated based
       on the UTF-32 encoding of the input. Python is an example of a language
       that uses this encoding natively.
       
      UTF32 = 3;
      See Also:
  • Method Details

    • values

      public static EncodingType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static EncodingType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static EncodingType valueOf(int value)
      Deprecated.
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      value - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • forNumber

      public static EncodingType forNumber(int value)
      Parameters:
      value - The numeric wire value of the corresponding enum entry.
      Returns:
      The enum associated with the given numeric wire value.
    • internalGetValueMap

      public static com.google.protobuf.Internal.EnumLiteMap<EncodingType> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      public static EncodingType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      desc - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null