Class ServingConfig.MediaConfig

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.discoveryengine.v1beta.ServingConfig.MediaConfig
All Implemented Interfaces:
ServingConfig.MediaConfigOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
ServingConfig

public static final class ServingConfig.MediaConfig extends com.google.protobuf.GeneratedMessage 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
See Also:
  • Field Details

    • CONTENT_WATCHED_PERCENTAGE_THRESHOLD_FIELD_NUMBER

      public static final int CONTENT_WATCHED_PERCENTAGE_THRESHOLD_FIELD_NUMBER
      See Also:
    • CONTENT_WATCHED_SECONDS_THRESHOLD_FIELD_NUMBER

      public static final int CONTENT_WATCHED_SECONDS_THRESHOLD_FIELD_NUMBER
      See Also:
    • DEMOTION_EVENT_TYPE_FIELD_NUMBER

      public static final int DEMOTION_EVENT_TYPE_FIELD_NUMBER
      See Also:
    • DEMOTE_CONTENT_WATCHED_PAST_DAYS_FIELD_NUMBER

      public static final int DEMOTE_CONTENT_WATCHED_PAST_DAYS_FIELD_NUMBER
      See Also:
    • CONTENT_FRESHNESS_CUTOFF_DAYS_FIELD_NUMBER

      public static final int CONTENT_FRESHNESS_CUTOFF_DAYS_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getDemoteContentWatchedCase

      public ServingConfig.MediaConfig.DemoteContentWatchedCase getDemoteContentWatchedCase()
      Specified by:
      getDemoteContentWatchedCase in interface ServingConfig.MediaConfigOrBuilder
    • 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:
      hasContentWatchedPercentageThreshold in interface ServingConfig.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:
      getContentWatchedPercentageThreshold in interface ServingConfig.MediaConfigOrBuilder
      Returns:
      The contentWatchedPercentageThreshold.
    • hasContentWatchedSecondsThreshold

      public boolean hasContentWatchedSecondsThreshold()
       Specifies the content watched minutes threshold for demotion.
       
      float content_watched_seconds_threshold = 5;
      Specified by:
      hasContentWatchedSecondsThreshold in interface ServingConfig.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:
      getContentWatchedSecondsThreshold in interface ServingConfig.MediaConfigOrBuilder
      Returns:
      The contentWatchedSecondsThreshold.
    • getDemotionEventType

      public String 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:
      getDemotionEventType in interface ServingConfig.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:
      getDemotionEventTypeBytes in interface ServingConfig.MediaConfigOrBuilder
      Returns:
      The bytes for demotionEventType.
    • 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:
      getDemoteContentWatchedPastDays in interface ServingConfig.MediaConfigOrBuilder
      Returns:
      The demoteContentWatchedPastDays.
    • 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:
      getContentFreshnessCutoffDays in interface ServingConfig.MediaConfigOrBuilder
      Returns:
      The contentFreshnessCutoffDays.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static ServingConfig.MediaConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ServingConfig.MediaConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ServingConfig.MediaConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ServingConfig.MediaConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ServingConfig.MediaConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ServingConfig.MediaConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ServingConfig.MediaConfig parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ServingConfig.MediaConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ServingConfig.MediaConfig parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ServingConfig.MediaConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ServingConfig.MediaConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ServingConfig.MediaConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public ServingConfig.MediaConfig.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static ServingConfig.MediaConfig.Builder newBuilder()
    • newBuilder

      public static ServingConfig.MediaConfig.Builder newBuilder(ServingConfig.MediaConfig prototype)
    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected ServingConfig.MediaConfig.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static ServingConfig.MediaConfig getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<ServingConfig.MediaConfig> parser()
    • getParserForType

      public com.google.protobuf.Parser<ServingConfig.MediaConfig> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public ServingConfig.MediaConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder