Enum Entity.Type

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

public static enum Entity.Type extends Enum<Entity.Type> implements com.google.protobuf.ProtocolMessageEnum
 The type of the entity. For most entity types, the associated metadata is a
 Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table
 below lists the associated fields for entities that have different
 metadata.
 
Protobuf enum google.cloud.language.v1.Entity.Type
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Address The metadata identifies the street number and locality plus whichever additional elements appear in the text: * `street_number` - street number * `locality` - city or town * `street_name` - street/route name, if detected * `postal_code` - postal code, if detected * `country` - country, if detected< * `broad_region` - administrative area, such as the state, if detected * `narrow_region` - smaller administrative area, such as county, if detected * `sublocality` - used in Asian addresses to demark a district within a city, if detected
    Consumer product
    Date The metadata identifies the components of the date: * `year` - four digit year, if detected * `month` - two digit month number, if detected * `day` - two digit day number, if detected
    Event
    Location
    Number The metadata is the number itself.
    Organization
    Other types of entities
    Person
    Phone number The metadata lists the phone number, formatted according to local convention, plus whichever additional elements appear in the text: * `number` - the actual number, broken down into sections as per local convention * `national_prefix` - country code, if detected * `area_code` - region or area code, if detected * `extension` - phone extension (to be dialed after connection), if detected
    Price The metadata identifies the `value` and `currency`.
    Unknown
     
    Artwork
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Address The metadata identifies the street number and locality plus whichever additional elements appear in the text: * `street_number` - street number * `locality` - city or town * `street_name` - street/route name, if detected * `postal_code` - postal code, if detected * `country` - country, if detected< * `broad_region` - administrative area, such as the state, if detected * `narrow_region` - smaller administrative area, such as county, if detected * `sublocality` - used in Asian addresses to demark a district within a city, if detected
    static final int
    Consumer product
    static final int
    Date The metadata identifies the components of the date: * `year` - four digit year, if detected * `month` - two digit month number, if detected * `day` - two digit day number, if detected
    static final int
    Event
    static final int
    Location
    static final int
    Number The metadata is the number itself.
    static final int
    Organization
    static final int
    Other types of entities
    static final int
    Person
    static final int
    Phone number The metadata lists the phone number, formatted according to local convention, plus whichever additional elements appear in the text: * `number` - the actual number, broken down into sections as per local convention * `national_prefix` - country code, if detected * `area_code` - region or area code, if detected * `extension` - phone extension (to be dialed after connection), if detected
    static final int
    Price The metadata identifies the `value` and `currency`.
    static final int
    Unknown
    static final int
    Artwork
  • 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<Entity.Type>
     
    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 Entity.Type[]
    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

    • UNKNOWN

      public static final Entity.Type UNKNOWN
       Unknown
       
      UNKNOWN = 0;
    • PERSON

      public static final Entity.Type PERSON
       Person
       
      PERSON = 1;
    • LOCATION

      public static final Entity.Type LOCATION
       Location
       
      LOCATION = 2;
    • ORGANIZATION

      public static final Entity.Type ORGANIZATION
       Organization
       
      ORGANIZATION = 3;
    • EVENT

      public static final Entity.Type EVENT
       Event
       
      EVENT = 4;
    • WORK_OF_ART

      public static final Entity.Type WORK_OF_ART
       Artwork
       
      WORK_OF_ART = 5;
    • CONSUMER_GOOD

      public static final Entity.Type CONSUMER_GOOD
       Consumer product
       
      CONSUMER_GOOD = 6;
    • OTHER

      public static final Entity.Type OTHER
       Other types of entities
       
      OTHER = 7;
    • PHONE_NUMBER

      public static final Entity.Type PHONE_NUMBER
       Phone number
      
       The metadata lists the phone number, formatted according to local
       convention, plus whichever additional elements appear in the text:
      
       * `number` - the actual number, broken down into sections as per local
       convention
       * `national_prefix` - country code, if detected
       * `area_code` - region or area code, if detected
       * `extension` - phone extension (to be dialed after connection), if
       detected
       
      PHONE_NUMBER = 9;
    • ADDRESS

      public static final Entity.Type ADDRESS
       Address
      
       The metadata identifies the street number and locality plus whichever
       additional elements appear in the text:
      
       * `street_number` - street number
       * `locality` - city or town
       * `street_name` - street/route name, if detected
       * `postal_code` - postal code, if detected
       * `country` - country, if detected<
       * `broad_region` - administrative area, such as the state, if detected
       * `narrow_region` - smaller administrative area, such as county, if
       detected
       * `sublocality` - used in Asian addresses to demark a district within a
       city, if detected
       
      ADDRESS = 10;
    • DATE

      public static final Entity.Type DATE
       Date
      
       The metadata identifies the components of the date:
      
       * `year` - four digit year, if detected
       * `month` - two digit month number, if detected
       * `day` - two digit day number, if detected
       
      DATE = 11;
    • NUMBER

      public static final Entity.Type NUMBER
       Number
      
       The metadata is the number itself.
       
      NUMBER = 12;
    • PRICE

      public static final Entity.Type PRICE
       Price
      
       The metadata identifies the `value` and `currency`.
       
      PRICE = 13;
    • UNRECOGNIZED

      public static final Entity.Type UNRECOGNIZED
  • Field Details

    • UNKNOWN_VALUE

      public static final int UNKNOWN_VALUE
       Unknown
       
      UNKNOWN = 0;
      See Also:
    • PERSON_VALUE

      public static final int PERSON_VALUE
       Person
       
      PERSON = 1;
      See Also:
    • LOCATION_VALUE

      public static final int LOCATION_VALUE
       Location
       
      LOCATION = 2;
      See Also:
    • ORGANIZATION_VALUE

      public static final int ORGANIZATION_VALUE
       Organization
       
      ORGANIZATION = 3;
      See Also:
    • EVENT_VALUE

      public static final int EVENT_VALUE
       Event
       
      EVENT = 4;
      See Also:
    • WORK_OF_ART_VALUE

      public static final int WORK_OF_ART_VALUE
       Artwork
       
      WORK_OF_ART = 5;
      See Also:
    • CONSUMER_GOOD_VALUE

      public static final int CONSUMER_GOOD_VALUE
       Consumer product
       
      CONSUMER_GOOD = 6;
      See Also:
    • OTHER_VALUE

      public static final int OTHER_VALUE
       Other types of entities
       
      OTHER = 7;
      See Also:
    • PHONE_NUMBER_VALUE

      public static final int PHONE_NUMBER_VALUE
       Phone number
      
       The metadata lists the phone number, formatted according to local
       convention, plus whichever additional elements appear in the text:
      
       * `number` - the actual number, broken down into sections as per local
       convention
       * `national_prefix` - country code, if detected
       * `area_code` - region or area code, if detected
       * `extension` - phone extension (to be dialed after connection), if
       detected
       
      PHONE_NUMBER = 9;
      See Also:
    • ADDRESS_VALUE

      public static final int ADDRESS_VALUE
       Address
      
       The metadata identifies the street number and locality plus whichever
       additional elements appear in the text:
      
       * `street_number` - street number
       * `locality` - city or town
       * `street_name` - street/route name, if detected
       * `postal_code` - postal code, if detected
       * `country` - country, if detected<
       * `broad_region` - administrative area, such as the state, if detected
       * `narrow_region` - smaller administrative area, such as county, if
       detected
       * `sublocality` - used in Asian addresses to demark a district within a
       city, if detected
       
      ADDRESS = 10;
      See Also:
    • DATE_VALUE

      public static final int DATE_VALUE
       Date
      
       The metadata identifies the components of the date:
      
       * `year` - four digit year, if detected
       * `month` - two digit month number, if detected
       * `day` - two digit day number, if detected
       
      DATE = 11;
      See Also:
    • NUMBER_VALUE

      public static final int NUMBER_VALUE
       Number
      
       The metadata is the number itself.
       
      NUMBER = 12;
      See Also:
    • PRICE_VALUE

      public static final int PRICE_VALUE
       Price
      
       The metadata identifies the `value` and `currency`.
       
      PRICE = 13;
      See Also:
  • Method Details

    • values

      public static Entity.Type[] 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 Entity.Type 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 Entity.Type 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 Entity.Type 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<Entity.Type> 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 Entity.Type 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