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 class
FeatureMap.Builder
FeatureMap represents extra features that customers want to include in the recommendation model for catalogs/user events as categorical/numerical features.static class
FeatureMap.FloatList
A list of float features.static interface
FeatureMap.FloatListOrBuilder
static class
FeatureMap.StringList
A list of string features.static interface
FeatureMap.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 int
CATEGORICAL_FEATURES_FIELD_NUMBER
static int
NUMERICAL_FEATURES_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsCategoricalFeatures(String key)
Categorical features that can take on one of a limited number of possible values.boolean
containsNumericalFeatures(String key)
Numerical features.boolean
equals(Object obj)
Map<String,FeatureMap.StringList>
getCategoricalFeatures()
Deprecated.int
getCategoricalFeaturesCount()
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.StringList
getCategoricalFeaturesOrDefault(String key, FeatureMap.StringList defaultValue)
Categorical features that can take on one of a limited number of possible values.FeatureMap.StringList
getCategoricalFeaturesOrThrow(String key)
Categorical features that can take on one of a limited number of possible values.static FeatureMap
getDefaultInstance()
FeatureMap
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
Map<String,FeatureMap.FloatList>
getNumericalFeatures()
Deprecated.int
getNumericalFeaturesCount()
Numerical features.Map<String,FeatureMap.FloatList>
getNumericalFeaturesMap()
Numerical features.FeatureMap.FloatList
getNumericalFeaturesOrDefault(String key, FeatureMap.FloatList defaultValue)
Numerical features.FeatureMap.FloatList
getNumericalFeaturesOrThrow(String key)
Numerical features.com.google.protobuf.Parser<FeatureMap>
getParserForType()
int
getSerializedSize()
int
hashCode()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
boolean
isInitialized()
static FeatureMap.Builder
newBuilder()
static FeatureMap.Builder
newBuilder(FeatureMap prototype)
FeatureMap.Builder
newBuilderForType()
protected FeatureMap.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static FeatureMap
parseDelimitedFrom(InputStream input)
static FeatureMap
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static FeatureMap
parseFrom(byte[] data)
static FeatureMap
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static FeatureMap
parseFrom(com.google.protobuf.ByteString data)
static FeatureMap
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static FeatureMap
parseFrom(com.google.protobuf.CodedInputStream input)
static FeatureMap
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static FeatureMap
parseFrom(InputStream input)
static FeatureMap
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static FeatureMap
parseFrom(ByteBuffer data)
static FeatureMap
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<FeatureMap>
parser()
FeatureMap.Builder
toBuilder()
void
writeTo(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:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getCategoricalFeaturesCount
public int getCategoricalFeaturesCount()
Description copied from interface:FeatureMapOrBuilder
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:
getCategoricalFeaturesCount
in 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:
containsCategoricalFeatures
in interfaceFeatureMapOrBuilder
-
getCategoricalFeatures
@Deprecated public Map<String,FeatureMap.StringList> getCategoricalFeatures()
Deprecated.UsegetCategoricalFeaturesMap()
instead.- Specified by:
getCategoricalFeatures
in 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:
getCategoricalFeaturesMap
in 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:
getCategoricalFeaturesOrDefault
in 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:
getCategoricalFeaturesOrThrow
in interfaceFeatureMapOrBuilder
-
getNumericalFeaturesCount
public int getNumericalFeaturesCount()
Description copied from interface:FeatureMapOrBuilder
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:
getNumericalFeaturesCount
in 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:
containsNumericalFeatures
in interfaceFeatureMapOrBuilder
-
getNumericalFeatures
@Deprecated public Map<String,FeatureMap.FloatList> getNumericalFeatures()
Deprecated.UsegetNumericalFeaturesMap()
instead.- Specified by:
getNumericalFeatures
in 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:
getNumericalFeaturesMap
in 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:
getNumericalFeaturesOrDefault
in 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:
getNumericalFeaturesOrThrow
in interfaceFeatureMapOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in 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:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected FeatureMap.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in 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:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public FeatureMap getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-