Class FeatureMap.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
- com.google.cloud.recommendationengine.v1beta1.FeatureMap.Builder
-
- All Implemented Interfaces:
FeatureMapOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- FeatureMap
public static final class FeatureMap.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder> 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description FeatureMap.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
FeatureMap
build()
FeatureMap
buildPartial()
FeatureMap.Builder
clear()
FeatureMap.Builder
clearCategoricalFeatures()
FeatureMap.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
FeatureMap.Builder
clearNumericalFeatures()
FeatureMap.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
FeatureMap.Builder
clone()
boolean
containsCategoricalFeatures(String key)
Categorical features that can take on one of a limited number of possible values.boolean
containsNumericalFeatures(String key)
Numerical features.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.FeatureMap
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
Map<String,FeatureMap.StringList>
getMutableCategoricalFeatures()
Deprecated.Map<String,FeatureMap.FloatList>
getMutableNumericalFeatures()
Deprecated.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.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
protected com.google.protobuf.MapField
internalGetMutableMapField(int number)
boolean
isInitialized()
FeatureMap.Builder
mergeFrom(FeatureMap other)
FeatureMap.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
FeatureMap.Builder
mergeFrom(com.google.protobuf.Message other)
FeatureMap.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
FeatureMap.Builder
putAllCategoricalFeatures(Map<String,FeatureMap.StringList> values)
Categorical features that can take on one of a limited number of possible values.FeatureMap.Builder
putAllNumericalFeatures(Map<String,FeatureMap.FloatList> values)
Numerical features.FeatureMap.Builder
putCategoricalFeatures(String key, FeatureMap.StringList value)
Categorical features that can take on one of a limited number of possible values.FeatureMap.Builder
putNumericalFeatures(String key, FeatureMap.FloatList value)
Numerical features.FeatureMap.Builder
removeCategoricalFeatures(String key)
Categorical features that can take on one of a limited number of possible values.FeatureMap.Builder
removeNumericalFeatures(String key)
Numerical features.FeatureMap.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
FeatureMap.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
FeatureMap.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
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.Builder<FeatureMap.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
clear
public FeatureMap.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
getDefaultInstanceForType
public FeatureMap getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public FeatureMap build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public FeatureMap buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public FeatureMap.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
setField
public FeatureMap.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
clearField
public FeatureMap.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
clearOneof
public FeatureMap.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
setRepeatedField
public FeatureMap.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
addRepeatedField
public FeatureMap.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
mergeFrom
public FeatureMap.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<FeatureMap.Builder>
-
mergeFrom
public FeatureMap.Builder mergeFrom(FeatureMap other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
mergeFrom
public FeatureMap.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<FeatureMap.Builder>
- Throws:
IOException
-
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
-
clearCategoricalFeatures
public FeatureMap.Builder clearCategoricalFeatures()
-
removeCategoricalFeatures
public FeatureMap.Builder removeCategoricalFeatures(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;
-
getMutableCategoricalFeatures
@Deprecated public Map<String,FeatureMap.StringList> getMutableCategoricalFeatures()
Deprecated.Use alternate mutation accessors instead.
-
putCategoricalFeatures
public FeatureMap.Builder putCategoricalFeatures(String key, FeatureMap.StringList value)
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;
-
putAllCategoricalFeatures
public FeatureMap.Builder putAllCategoricalFeatures(Map<String,FeatureMap.StringList> values)
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;
-
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
-
clearNumericalFeatures
public FeatureMap.Builder clearNumericalFeatures()
-
removeNumericalFeatures
public FeatureMap.Builder removeNumericalFeatures(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;
-
getMutableNumericalFeatures
@Deprecated public Map<String,FeatureMap.FloatList> getMutableNumericalFeatures()
Deprecated.Use alternate mutation accessors instead.
-
putNumericalFeatures
public FeatureMap.Builder putNumericalFeatures(String key, FeatureMap.FloatList value)
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;
-
putAllNumericalFeatures
public FeatureMap.Builder putAllNumericalFeatures(Map<String,FeatureMap.FloatList> values)
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;
-
setUnknownFields
public final FeatureMap.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
mergeUnknownFields
public final FeatureMap.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
-