Class ServingConfig.MediaConfig.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ServingConfig.MediaConfig.Builder>
com.google.cloud.discoveryengine.v1beta.ServingConfig.MediaConfig.Builder
- All Implemented Interfaces:
ServingConfig.MediaConfigOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- ServingConfig.MediaConfig
public static final class ServingConfig.MediaConfig.Builder
extends com.google.protobuf.GeneratedMessage.Builder<ServingConfig.MediaConfig.Builder>
implements ServingConfig.MediaConfigOrBuilder
Specifies the configurations needed for Media Discovery. Currently we support: * `demote_content_watched`: Threshold for watched content demotion. Customers can specify if using watched content demotion or use viewed detail page. Using the content watched demotion, customers need to specify the watched minutes or percentage exceeds the threshold, the content will be demoted in the recommendation result. * `promote_fresh_content`: cutoff days for fresh content promotion. Customers can specify if using content freshness promotion. If the content was published within the cutoff days, the content will be promoted in the recommendation result. Can only be set if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].Protobuf type
google.cloud.discoveryengine.v1beta.ServingConfig.MediaConfig-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Specifies the content freshness used for recommendation result.Specifies the content watched percentage threshold for demotion.Specifies the content watched minutes threshold for demotion.Optional.Specifies the event type used for demoting recommendation result.intSpecifies the content freshness used for recommendation result.floatSpecifies the content watched percentage threshold for demotion.floatSpecifies the content watched minutes threshold for demotion.intOptional.Specifies the event type used for demoting recommendation result.com.google.protobuf.ByteStringSpecifies the event type used for demoting recommendation result.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanSpecifies the content watched percentage threshold for demotion.booleanSpecifies the content watched minutes threshold for demotion.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setContentFreshnessCutoffDays(int value) Specifies the content freshness used for recommendation result.setContentWatchedPercentageThreshold(float value) Specifies the content watched percentage threshold for demotion.setContentWatchedSecondsThreshold(float value) Specifies the content watched minutes threshold for demotion.setDemoteContentWatchedPastDays(int value) Optional.setDemotionEventType(String value) Specifies the event type used for demoting recommendation result.setDemotionEventTypeBytes(com.google.protobuf.ByteString value) Specifies the event type used for demoting recommendation result.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, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, 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() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<ServingConfig.MediaConfig.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<ServingConfig.MediaConfig.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<ServingConfig.MediaConfig.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<ServingConfig.MediaConfig.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<ServingConfig.MediaConfig.Builder>
-
mergeFrom
public ServingConfig.MediaConfig.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<ServingConfig.MediaConfig.Builder>- Throws:
IOException
-
getDemoteContentWatchedCase
- Specified by:
getDemoteContentWatchedCasein interfaceServingConfig.MediaConfigOrBuilder
-
clearDemoteContentWatched
-
hasContentWatchedPercentageThreshold
public boolean hasContentWatchedPercentageThreshold()Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.
float content_watched_percentage_threshold = 2;- Specified by:
hasContentWatchedPercentageThresholdin interfaceServingConfig.MediaConfigOrBuilder- Returns:
- Whether the contentWatchedPercentageThreshold field is set.
-
getContentWatchedPercentageThreshold
public float getContentWatchedPercentageThreshold()Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.
float content_watched_percentage_threshold = 2;- Specified by:
getContentWatchedPercentageThresholdin interfaceServingConfig.MediaConfigOrBuilder- Returns:
- The contentWatchedPercentageThreshold.
-
setContentWatchedPercentageThreshold
Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.
float content_watched_percentage_threshold = 2;- Parameters:
value- The contentWatchedPercentageThreshold to set.- Returns:
- This builder for chaining.
-
clearContentWatchedPercentageThreshold
Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.
float content_watched_percentage_threshold = 2;- Returns:
- This builder for chaining.
-
hasContentWatchedSecondsThreshold
public boolean hasContentWatchedSecondsThreshold()Specifies the content watched minutes threshold for demotion.
float content_watched_seconds_threshold = 5;- Specified by:
hasContentWatchedSecondsThresholdin interfaceServingConfig.MediaConfigOrBuilder- Returns:
- Whether the contentWatchedSecondsThreshold field is set.
-
getContentWatchedSecondsThreshold
public float getContentWatchedSecondsThreshold()Specifies the content watched minutes threshold for demotion.
float content_watched_seconds_threshold = 5;- Specified by:
getContentWatchedSecondsThresholdin interfaceServingConfig.MediaConfigOrBuilder- Returns:
- The contentWatchedSecondsThreshold.
-
setContentWatchedSecondsThreshold
Specifies the content watched minutes threshold for demotion.
float content_watched_seconds_threshold = 5;- Parameters:
value- The contentWatchedSecondsThreshold to set.- Returns:
- This builder for chaining.
-
clearContentWatchedSecondsThreshold
Specifies the content watched minutes threshold for demotion.
float content_watched_seconds_threshold = 5;- Returns:
- This builder for chaining.
-
getDemotionEventType
Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.
string demotion_event_type = 1;- Specified by:
getDemotionEventTypein interfaceServingConfig.MediaConfigOrBuilder- Returns:
- The demotionEventType.
-
getDemotionEventTypeBytes
public com.google.protobuf.ByteString getDemotionEventTypeBytes()Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.
string demotion_event_type = 1;- Specified by:
getDemotionEventTypeBytesin interfaceServingConfig.MediaConfigOrBuilder- Returns:
- The bytes for demotionEventType.
-
setDemotionEventType
Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.
string demotion_event_type = 1;- Parameters:
value- The demotionEventType to set.- Returns:
- This builder for chaining.
-
clearDemotionEventType
Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.
string demotion_event_type = 1;- Returns:
- This builder for chaining.
-
setDemotionEventTypeBytes
public ServingConfig.MediaConfig.Builder setDemotionEventTypeBytes(com.google.protobuf.ByteString value) Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.
string demotion_event_type = 1;- Parameters:
value- The bytes for demotionEventType to set.- Returns:
- This builder for chaining.
-
getDemoteContentWatchedPastDays
public int getDemoteContentWatchedPastDays()Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.
int32 demote_content_watched_past_days = 37 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDemoteContentWatchedPastDaysin interfaceServingConfig.MediaConfigOrBuilder- Returns:
- The demoteContentWatchedPastDays.
-
setDemoteContentWatchedPastDays
Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.
int32 demote_content_watched_past_days = 37 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The demoteContentWatchedPastDays to set.- Returns:
- This builder for chaining.
-
clearDemoteContentWatchedPastDays
Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.
int32 demote_content_watched_past_days = 37 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
getContentFreshnessCutoffDays
public int getContentFreshnessCutoffDays()Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.
int32 content_freshness_cutoff_days = 4;- Specified by:
getContentFreshnessCutoffDaysin interfaceServingConfig.MediaConfigOrBuilder- Returns:
- The contentFreshnessCutoffDays.
-
setContentFreshnessCutoffDays
Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.
int32 content_freshness_cutoff_days = 4;- Parameters:
value- The contentFreshnessCutoffDays to set.- Returns:
- This builder for chaining.
-
clearContentFreshnessCutoffDays
Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.
int32 content_freshness_cutoff_days = 4;- Returns:
- This builder for chaining.
-