Class FeatureMap
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.recommendationengine.v1beta1.FeatureMap
-
- All Implemented Interfaces:
FeatureMapOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class FeatureMap extends com.google.protobuf.GeneratedMessageV3 implements FeatureMapOrBuilder
FeatureMap represents extra features that customers want to include in the recommendation model for catalogs/user events as categorical/numerical features.
Protobuf typegoogle.cloud.recommendationengine.v1beta1.FeatureMap- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFeatureMap.BuilderFeatureMap represents extra features that customers want to include in the recommendation model for catalogs/user events as categorical/numerical features.static classFeatureMap.FloatListA list of float features.static interfaceFeatureMap.FloatListOrBuilderstatic classFeatureMap.StringListA list of string features.static interfaceFeatureMap.StringListOrBuilder-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intCATEGORICAL_FEATURES_FIELD_NUMBERstatic intNUMERICAL_FEATURES_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancontainsCategoricalFeatures(String key)Categorical features that can take on one of a limited number of possible values.booleancontainsNumericalFeatures(String key)Numerical features.booleanequals(Object obj)Map<String,FeatureMap.StringList>getCategoricalFeatures()Deprecated.intgetCategoricalFeaturesCount()Categorical features that can take on one of a limited number of possible values.Map<String,FeatureMap.StringList>getCategoricalFeaturesMap()Categorical features that can take on one of a limited number of possible values.FeatureMap.StringListgetCategoricalFeaturesOrDefault(String key, FeatureMap.StringList defaultValue)Categorical features that can take on one of a limited number of possible values.FeatureMap.StringListgetCategoricalFeaturesOrThrow(String key)Categorical features that can take on one of a limited number of possible values.static FeatureMapgetDefaultInstance()FeatureMapgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()Map<String,FeatureMap.FloatList>getNumericalFeatures()Deprecated.intgetNumericalFeaturesCount()Numerical features.Map<String,FeatureMap.FloatList>getNumericalFeaturesMap()Numerical features.FeatureMap.FloatListgetNumericalFeaturesOrDefault(String key, FeatureMap.FloatList defaultValue)Numerical features.FeatureMap.FloatListgetNumericalFeaturesOrThrow(String key)Numerical features.com.google.protobuf.Parser<FeatureMap>getParserForType()intgetSerializedSize()inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldinternalGetMapField(int number)booleanisInitialized()static FeatureMap.BuildernewBuilder()static FeatureMap.BuildernewBuilder(FeatureMap prototype)FeatureMap.BuildernewBuilderForType()protected FeatureMap.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static FeatureMapparseDelimitedFrom(InputStream input)static FeatureMapparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static FeatureMapparseFrom(byte[] data)static FeatureMapparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static FeatureMapparseFrom(com.google.protobuf.ByteString data)static FeatureMapparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static FeatureMapparseFrom(com.google.protobuf.CodedInputStream input)static FeatureMapparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static FeatureMapparseFrom(InputStream input)static FeatureMapparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static FeatureMapparseFrom(ByteBuffer data)static FeatureMapparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<FeatureMap>parser()FeatureMap.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
CATEGORICAL_FEATURES_FIELD_NUMBER
public static final int CATEGORICAL_FEATURES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
NUMERICAL_FEATURES_FIELD_NUMBER
public static final int NUMERICAL_FEATURES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapFieldin classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getCategoricalFeaturesCount
public int getCategoricalFeaturesCount()
Description copied from interface:FeatureMapOrBuilderCategorical features that can take on one of a limited number of possible values. Some examples would be the brand/maker of a product, or country of a customer. Feature names and values must be UTF-8 encoded strings. For example: `{ "colors": {"value": ["yellow", "green"]}, "sizes": {"value":["S", "M"]}`map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.StringList> categorical_features = 1;- Specified by:
getCategoricalFeaturesCountin interfaceFeatureMapOrBuilder
-
containsCategoricalFeatures
public boolean containsCategoricalFeatures(String key)
Categorical features that can take on one of a limited number of possible values. Some examples would be the brand/maker of a product, or country of a customer. Feature names and values must be UTF-8 encoded strings. For example: `{ "colors": {"value": ["yellow", "green"]}, "sizes": {"value":["S", "M"]}`map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.StringList> categorical_features = 1;- Specified by:
containsCategoricalFeaturesin interfaceFeatureMapOrBuilder
-
getCategoricalFeatures
@Deprecated public Map<String,FeatureMap.StringList> getCategoricalFeatures()
Deprecated.UsegetCategoricalFeaturesMap()instead.- Specified by:
getCategoricalFeaturesin interfaceFeatureMapOrBuilder
-
getCategoricalFeaturesMap
public Map<String,FeatureMap.StringList> getCategoricalFeaturesMap()
Categorical features that can take on one of a limited number of possible values. Some examples would be the brand/maker of a product, or country of a customer. Feature names and values must be UTF-8 encoded strings. For example: `{ "colors": {"value": ["yellow", "green"]}, "sizes": {"value":["S", "M"]}`map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.StringList> categorical_features = 1;- Specified by:
getCategoricalFeaturesMapin interfaceFeatureMapOrBuilder
-
getCategoricalFeaturesOrDefault
public FeatureMap.StringList getCategoricalFeaturesOrDefault(String key, FeatureMap.StringList defaultValue)
Categorical features that can take on one of a limited number of possible values. Some examples would be the brand/maker of a product, or country of a customer. Feature names and values must be UTF-8 encoded strings. For example: `{ "colors": {"value": ["yellow", "green"]}, "sizes": {"value":["S", "M"]}`map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.StringList> categorical_features = 1;- Specified by:
getCategoricalFeaturesOrDefaultin interfaceFeatureMapOrBuilder
-
getCategoricalFeaturesOrThrow
public FeatureMap.StringList getCategoricalFeaturesOrThrow(String key)
Categorical features that can take on one of a limited number of possible values. Some examples would be the brand/maker of a product, or country of a customer. Feature names and values must be UTF-8 encoded strings. For example: `{ "colors": {"value": ["yellow", "green"]}, "sizes": {"value":["S", "M"]}`map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.StringList> categorical_features = 1;- Specified by:
getCategoricalFeaturesOrThrowin interfaceFeatureMapOrBuilder
-
getNumericalFeaturesCount
public int getNumericalFeaturesCount()
Description copied from interface:FeatureMapOrBuilderNumerical features. Some examples would be the height/weight of a product, or age of a customer. Feature names must be UTF-8 encoded strings. For example: `{ "lengths_cm": {"value":[2.3, 15.4]}, "heights_cm": {"value":[8.1, 6.4]} }`map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.FloatList> numerical_features = 2;- Specified by:
getNumericalFeaturesCountin interfaceFeatureMapOrBuilder
-
containsNumericalFeatures
public boolean containsNumericalFeatures(String key)
Numerical features. Some examples would be the height/weight of a product, or age of a customer. Feature names must be UTF-8 encoded strings. For example: `{ "lengths_cm": {"value":[2.3, 15.4]}, "heights_cm": {"value":[8.1, 6.4]} }`map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.FloatList> numerical_features = 2;- Specified by:
containsNumericalFeaturesin interfaceFeatureMapOrBuilder
-
getNumericalFeatures
@Deprecated public Map<String,FeatureMap.FloatList> getNumericalFeatures()
Deprecated.UsegetNumericalFeaturesMap()instead.- Specified by:
getNumericalFeaturesin interfaceFeatureMapOrBuilder
-
getNumericalFeaturesMap
public Map<String,FeatureMap.FloatList> getNumericalFeaturesMap()
Numerical features. Some examples would be the height/weight of a product, or age of a customer. Feature names must be UTF-8 encoded strings. For example: `{ "lengths_cm": {"value":[2.3, 15.4]}, "heights_cm": {"value":[8.1, 6.4]} }`map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.FloatList> numerical_features = 2;- Specified by:
getNumericalFeaturesMapin interfaceFeatureMapOrBuilder
-
getNumericalFeaturesOrDefault
public FeatureMap.FloatList getNumericalFeaturesOrDefault(String key, FeatureMap.FloatList defaultValue)
Numerical features. Some examples would be the height/weight of a product, or age of a customer. Feature names must be UTF-8 encoded strings. For example: `{ "lengths_cm": {"value":[2.3, 15.4]}, "heights_cm": {"value":[8.1, 6.4]} }`map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.FloatList> numerical_features = 2;- Specified by:
getNumericalFeaturesOrDefaultin interfaceFeatureMapOrBuilder
-
getNumericalFeaturesOrThrow
public FeatureMap.FloatList getNumericalFeaturesOrThrow(String key)
Numerical features. Some examples would be the height/weight of a product, or age of a customer. Feature names must be UTF-8 encoded strings. For example: `{ "lengths_cm": {"value":[2.3, 15.4]}, "heights_cm": {"value":[8.1, 6.4]} }`map<string, .google.cloud.recommendationengine.v1beta1.FeatureMap.FloatList> numerical_features = 2;- Specified by:
getNumericalFeaturesOrThrowin interfaceFeatureMapOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static FeatureMap parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FeatureMap parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FeatureMap parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FeatureMap parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FeatureMap parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FeatureMap parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FeatureMap parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static FeatureMap parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static FeatureMap parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static FeatureMap parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static FeatureMap parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static FeatureMap parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public FeatureMap.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static FeatureMap.Builder newBuilder()
-
newBuilder
public static FeatureMap.Builder newBuilder(FeatureMap prototype)
-
toBuilder
public FeatureMap.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected FeatureMap.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static FeatureMap getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<FeatureMap> parser()
-
getParserForType
public com.google.protobuf.Parser<FeatureMap> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public FeatureMap getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-