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.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)FeatureMapbuild()FeatureMapbuildPartial()FeatureMap.Builderclear()FeatureMap.BuilderclearCategoricalFeatures()FeatureMap.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)FeatureMap.BuilderclearNumericalFeatures()FeatureMap.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)FeatureMap.Builderclone()booleancontainsCategoricalFeatures(String key)Categorical features that can take on one of a limited number of possible values.booleancontainsNumericalFeatures(String key)Numerical features.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.FeatureMapgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()Map<String,FeatureMap.StringList>getMutableCategoricalFeatures()Deprecated.Map<String,FeatureMap.FloatList>getMutableNumericalFeatures()Deprecated.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.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldinternalGetMapField(int number)protected com.google.protobuf.MapFieldinternalGetMutableMapField(int number)booleanisInitialized()FeatureMap.BuildermergeFrom(FeatureMap other)FeatureMap.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)FeatureMap.BuildermergeFrom(com.google.protobuf.Message other)FeatureMap.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)FeatureMap.BuilderputAllCategoricalFeatures(Map<String,FeatureMap.StringList> values)Categorical features that can take on one of a limited number of possible values.FeatureMap.BuilderputAllNumericalFeatures(Map<String,FeatureMap.FloatList> values)Numerical features.FeatureMap.BuilderputCategoricalFeatures(String key, FeatureMap.StringList value)Categorical features that can take on one of a limited number of possible values.FeatureMap.BuilderputNumericalFeatures(String key, FeatureMap.FloatList value)Numerical features.FeatureMap.BuilderremoveCategoricalFeatures(String key)Categorical features that can take on one of a limited number of possible values.FeatureMap.BuilderremoveNumericalFeatures(String key)Numerical features.FeatureMap.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)FeatureMap.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)FeatureMap.BuildersetUnknownFields(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:
internalGetMapFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
clear
public FeatureMap.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
getDefaultInstanceForType
public FeatureMap getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public FeatureMap build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public FeatureMap buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public FeatureMap.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
setField
public FeatureMap.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
clearField
public FeatureMap.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
clearOneof
public FeatureMap.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
setRepeatedField
public FeatureMap.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
addRepeatedField
public FeatureMap.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
mergeFrom
public FeatureMap.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<FeatureMap.Builder>
-
mergeFrom
public FeatureMap.Builder mergeFrom(FeatureMap other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<FeatureMap.Builder>- Throws:
IOException
-
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
-
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: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
-
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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
mergeUnknownFields
public final FeatureMap.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<FeatureMap.Builder>
-
-