Class FeatureMap.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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 type
google.cloud.recommendationengine.v1beta1.FeatureMap-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()booleanCategorical features that can take on one of a limited number of possible values.booleanNumerical features.Deprecated.intCategorical features that can take on one of a limited number of possible values.Categorical features that can take on one of a limited number of possible values.getCategoricalFeaturesOrDefault(String key, FeatureMap.StringList defaultValue) Categorical features that can take on one of a limited number of possible values.Categorical features that can take on one of a limited number of possible values.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDeprecated.Deprecated.Deprecated.intNumerical features.Numerical features.getNumericalFeaturesOrDefault(String key, FeatureMap.FloatList defaultValue) Numerical features.Numerical features.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(FeatureMap other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Categorical features that can take on one of a limited number of possible values.Numerical features.putCategoricalFeatures(String key, FeatureMap.StringList value) Categorical features that can take on one of a limited number of possible values.Categorical features that can take on one of a limited number of possible values.putNumericalFeatures(String key, FeatureMap.FloatList value) Numerical features.Numerical features.Categorical features that can take on one of a limited number of possible values.Numerical features.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<FeatureMap.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<FeatureMap.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<FeatureMap.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.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.GeneratedMessage.Builder<FeatureMap.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<FeatureMap.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.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
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.UsegetCategoricalFeaturesMap()instead.- Specified by:
getCategoricalFeaturesin interfaceFeatureMapOrBuilder
-
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
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
-
removeCategoricalFeatures
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.Use alternate mutation accessors instead. -
putCategoricalFeatures
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
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; -
putCategoricalFeaturesBuilderIfAbsent
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
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.UsegetNumericalFeaturesMap()instead.- Specified by:
getNumericalFeaturesin interfaceFeatureMapOrBuilder
-
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
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
-
removeNumericalFeatures
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.Use alternate mutation accessors instead. -
putNumericalFeatures
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
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; -
putNumericalFeaturesBuilderIfAbsent
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;
-