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 and Description |
|---|
NONE
If `EncodingType` is not specified, encoding-dependent information (such as
`begin_offset`) will be set at `-1`.
|
UNRECOGNIZED |
UTF16
Encoding-dependent information (such as `begin_offset`) is calculated based
on the UTF-16 encoding of the input.
|
UTF32
Encoding-dependent information (such as `begin_offset`) is calculated based
on the UTF-32 encoding of the input.
|
UTF8
Encoding-dependent information (such as `begin_offset`) is calculated based
on the UTF-8 encoding of the input.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
NONE_VALUE
If `EncodingType` is not specified, encoding-dependent information (such as
`begin_offset`) will be set at `-1`.
|
static int |
UTF16_VALUE
Encoding-dependent information (such as `begin_offset`) is calculated based
on the UTF-16 encoding of the input.
|
static int |
UTF32_VALUE
Encoding-dependent information (such as `begin_offset`) is calculated based
on the UTF-32 encoding of the input.
|
static int |
UTF8_VALUE
Encoding-dependent information (such as `begin_offset`) is calculated based
on the UTF-8 encoding of the input.
|
| Modifier and Type | Method and Description |
|---|---|
static EncodingType |
forNumber(int value) |
static com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptor() |
com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static com.google.protobuf.Internal.EnumLiteMap<EncodingType> |
internalGetValueMap() |
static EncodingType |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static EncodingType |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static EncodingType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EncodingType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EncodingType NONE
If `EncodingType` is not specified, encoding-dependent information (such as `begin_offset`) will be set at `-1`.
NONE = 0;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;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;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;public static final EncodingType UNRECOGNIZED
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;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;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;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;public static EncodingType[] values()
for (EncodingType c : EncodingType.values()) System.out.println(c);
public static EncodingType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final int getNumber()
getNumber in interface com.google.protobuf.Internal.EnumLitegetNumber in interface com.google.protobuf.ProtocolMessageEnum@Deprecated public static EncodingType valueOf(int value)
forNumber(int) instead.public static EncodingType forNumber(int value)
public static com.google.protobuf.Internal.EnumLiteMap<EncodingType> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnumpublic final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnumpublic static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static EncodingType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2018 Google LLC. All rights reserved.