diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/HasExpirationTime.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/HasExpirationTime.docx new file mode 100644 index 000000000..9ceec4972 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/HasExpirationTime.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/HasExpirationTime.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/HasExpirationTime.scala deleted file mode 100644 index e20c75131..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/HasExpirationTime.scala +++ /dev/null @@ -1,9 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt - -import com.twitter.util.Time - -trait HasExpirationTime { - def expirationTime: Option[Time] = None - - final def expirationTimeInMillis: Option[Long] = expirationTime.map(_.inMillis) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/HasSortIndex.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/HasSortIndex.docx new file mode 100644 index 000000000..26e280e8d Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/HasSortIndex.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/HasSortIndex.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/HasSortIndex.scala deleted file mode 100644 index e3a9f6d55..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/HasSortIndex.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt - -trait HasSortIndex { timelineEntry: TimelineEntry => - def sortIndex: Option[Long] - - def withSortIndex(sortIndex: Long): TimelineEntry -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ModuleItemTreeDisplay.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ModuleItemTreeDisplay.docx new file mode 100644 index 000000000..08774de4a Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ModuleItemTreeDisplay.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ModuleItemTreeDisplay.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ModuleItemTreeDisplay.scala deleted file mode 100644 index c1d612f3d..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ModuleItemTreeDisplay.scala +++ /dev/null @@ -1,9 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt - -import com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module.ModuleDisplayType - -case class ModuleItemTreeDisplay( - parentModuleEntryItemId: Option[String], - indentFromParent: Option[Boolean], - displayType: Option[ModuleDisplayType], - isAnchorChild: Option[Boolean]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ReaderModeConfig.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ReaderModeConfig.docx new file mode 100644 index 000000000..2896183a2 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ReaderModeConfig.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ReaderModeConfig.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ReaderModeConfig.scala deleted file mode 100644 index 412e6aa67..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ReaderModeConfig.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt - -import metadata.Url - -case class ReaderModeConfig(isReaderModeAvailable: Boolean, landingUrl: Url) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ShowAlert.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ShowAlert.docx new file mode 100644 index 000000000..7a0c59b3b Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ShowAlert.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ShowAlert.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ShowAlert.scala deleted file mode 100644 index 602af7498..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/ShowAlert.scala +++ /dev/null @@ -1,46 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt - -import com.twitter.product_mixer.core.model.marshalling.response.urt.ShowAlert.ShowAlertEntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.alert.ShowAlertColorConfiguration -import com.twitter.product_mixer.core.model.marshalling.response.urt.alert.ShowAlertDisplayLocation -import com.twitter.product_mixer.core.model.marshalling.response.urt.alert.ShowAlertIconDisplayInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.alert.ShowAlertNavigationMetadata -import com.twitter.product_mixer.core.model.marshalling.response.urt.alert.ShowAlertType -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText -import com.twitter.util.Duration - -/** - * Domain model for the URT ShowAlert [[https://docbird.twitter.biz/unified_rich_timelines_urt/gen/com/twitter/timelines/render/thriftscala/ShowAlert.html]] - * - * @note the text field (id: 2) has been deliberately excluded as it's been deprecated since 2018. Use RichText instead. - */ -case class ShowAlert( - override val id: String, - override val sortIndex: Option[Long], - alertType: ShowAlertType, - triggerDelay: Option[Duration], - displayDuration: Option[Duration], - clientEventInfo: Option[ClientEventInfo], - collapseDelay: Option[Duration], - userIds: Option[Seq[Long]], - richText: Option[RichText], - iconDisplayInfo: Option[ShowAlertIconDisplayInfo], - colorConfig: ShowAlertColorConfiguration, - displayLocation: ShowAlertDisplayLocation, - navigationMetadata: Option[ShowAlertNavigationMetadata], -) extends TimelineItem { - override val entryNamespace: EntryNamespace = ShowAlertEntryNamespace - - // Note that sort index is not used for ShowAlerts, as they are not TimelineEntry and do not have entryId - override def withSortIndex(newSortIndex: Long): TimelineEntry = - copy(sortIndex = Some(newSortIndex)) - - // Not used for ShowAlerts - override def feedbackActionInfo: Option[FeedbackActionInfo] = None -} - -object ShowAlert { - val ShowAlertEntryNamespace: EntryNamespace = EntryNamespace("show-alert") -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/Timeline.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/Timeline.docx new file mode 100644 index 000000000..80f6e49ce Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/Timeline.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/Timeline.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/Timeline.scala deleted file mode 100644 index 83c46cb9f..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/Timeline.scala +++ /dev/null @@ -1,10 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt - -import com.twitter.product_mixer.core.model.marshalling.HasMarshalling - -case class Timeline( - id: String, - instructions: Seq[TimelineInstruction], - // responseObjects::feedbackActions actions are populated implicitly, see UrtTransportMarshaller - metadata: Option[TimelineMetadata] = None) - extends HasMarshalling diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineEntry.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineEntry.docx new file mode 100644 index 000000000..b654cab1b Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineEntry.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineEntry.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineEntry.scala deleted file mode 100644 index 70163f3a8..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineEntry.scala +++ /dev/null @@ -1,56 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ContainsFeedbackActionInfos -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.HasClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.HasFeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.PinnableEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ReplaceableEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.MarkUnreadableEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module.ModuleDisplayType -import com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module.ModuleFooter -import com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module.ModuleHeader -import com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module.ModuleMetadata -import com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module.ModuleShowMoreBehavior - -sealed trait TimelineEntry - extends HasEntryIdentifier - with HasSortIndex - with HasExpirationTime - with PinnableEntry - with ReplaceableEntry - with MarkUnreadableEntry - -trait TimelineItem extends TimelineEntry with HasClientEventInfo with HasFeedbackActionInfo - -case class ModuleItem( - item: TimelineItem, - dispensable: Option[Boolean], - treeDisplay: Option[ModuleItemTreeDisplay]) - -case class TimelineModule( - override val id: Long, - override val sortIndex: Option[Long], - override val entryNamespace: EntryNamespace, - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - override val isPinned: Option[Boolean], - items: Seq[ModuleItem], - displayType: ModuleDisplayType, - header: Option[ModuleHeader], - footer: Option[ModuleFooter], - metadata: Option[ModuleMetadata], - showMoreBehavior: Option[ModuleShowMoreBehavior]) - extends TimelineEntry - with HasClientEventInfo - with HasFeedbackActionInfo - with ContainsFeedbackActionInfos { - override def feedbackActionInfos: Seq[Option[FeedbackActionInfo]] = { - items.map(_.item.feedbackActionInfo) :+ feedbackActionInfo - } - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} - -trait TimelineOperation extends TimelineEntry diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineInstruction.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineInstruction.docx new file mode 100644 index 000000000..c4b79520b Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineInstruction.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineInstruction.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineInstruction.scala deleted file mode 100644 index 9b89750cb..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineInstruction.scala +++ /dev/null @@ -1,65 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ContainsFeedbackActionInfos -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.HasFeedbackActionInfo - -sealed trait TimelineInstruction - -case class AddEntriesTimelineInstruction(entries: Seq[TimelineEntry]) - extends TimelineInstruction - with ContainsFeedbackActionInfos { - override def feedbackActionInfos: Seq[Option[FeedbackActionInfo]] = - entries.flatMap { - // Order is important, as entries that implement both ContainsFeedbackActionInfos and - // HasFeedbackActionInfo are expected to include both when implementing ContainsFeedbackActionInfos - case containsFeedbackActionInfos: ContainsFeedbackActionInfos => - containsFeedbackActionInfos.feedbackActionInfos - case hasFeedbackActionInfo: HasFeedbackActionInfo => - Seq(hasFeedbackActionInfo.feedbackActionInfo) - case _ => Seq.empty - } -} - -case class ReplaceEntryTimelineInstruction(entry: TimelineEntry) - extends TimelineInstruction - with ContainsFeedbackActionInfos { - override def feedbackActionInfos: Seq[Option[FeedbackActionInfo]] = - entry match { - // Order is important, as entries that implement both ContainsFeedbackActionInfos and - // HasFeedbackActionInfo are expected to include both when implementing ContainsFeedbackActionInfos - case containsFeedbackActionInfos: ContainsFeedbackActionInfos => - containsFeedbackActionInfos.feedbackActionInfos - case hasFeedbackActionInfo: HasFeedbackActionInfo => - Seq(hasFeedbackActionInfo.feedbackActionInfo) - case _ => Seq.empty - } -} - -case class AddToModuleTimelineInstruction( - moduleItems: Seq[ModuleItem], - moduleEntryId: String, - moduleItemEntryId: Option[String], - prepend: Option[Boolean]) - extends TimelineInstruction - with ContainsFeedbackActionInfos { - override def feedbackActionInfos: Seq[Option[FeedbackActionInfo]] = - moduleItems.map(_.item.feedbackActionInfo) -} - -case class PinEntryTimelineInstruction(entry: TimelineEntry) extends TimelineInstruction - -case class MarkEntriesUnreadInstruction(entryIds: Seq[String]) extends TimelineInstruction - -case class ClearCacheTimelineInstruction() extends TimelineInstruction - -sealed trait TimelineTerminationDirection -case object TopTermination extends TimelineTerminationDirection -case object BottomTermination extends TimelineTerminationDirection -case object TopAndBottomTermination extends TimelineTerminationDirection -case class TerminateTimelineInstruction(terminateTimelineDirection: TimelineTerminationDirection) - extends TimelineInstruction - -case class ShowCoverInstruction(cover: Cover) extends TimelineInstruction - -case class ShowAlertInstruction(showAlert: ShowAlert) extends TimelineInstruction diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineMetadata.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineMetadata.docx new file mode 100644 index 000000000..3816668e8 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineMetadata.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineMetadata.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineMetadata.scala deleted file mode 100644 index 88b74ea41..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineMetadata.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt - -case class TimelineMetadata( - title: Option[String], - scribeConfig: Option[TimelineScribeConfig], - readerModeConfig: Option[ReaderModeConfig] = None) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineScribeConfig.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineScribeConfig.docx new file mode 100644 index 000000000..bd2e44299 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineScribeConfig.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineScribeConfig.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineScribeConfig.scala deleted file mode 100644 index 6a7c46bbc..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/TimelineScribeConfig.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt - -case class TimelineScribeConfig( - page: Option[String], - section: Option[String], - entityToken: Option[String]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/BUILD deleted file mode 100644 index d5a4881bd..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext", - "util/util-core:scala", - ], - exports = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext", - "util/util-core:scala", - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/BUILD.docx new file mode 100644 index 000000000..b8c91e938 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertColorConfiguration.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertColorConfiguration.docx new file mode 100644 index 000000000..04721a42a Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertColorConfiguration.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertColorConfiguration.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertColorConfiguration.scala deleted file mode 100644 index e8378270d..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertColorConfiguration.scala +++ /dev/null @@ -1,9 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.alert - -import com.twitter.product_mixer.core.model.marshalling.response.urt.color.RosettaColor - -case class ShowAlertColorConfiguration( - background: RosettaColor, - text: RosettaColor, - border: Option[RosettaColor], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertDisplayLocation.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertDisplayLocation.docx new file mode 100644 index 000000000..c69c44a51 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertDisplayLocation.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertDisplayLocation.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertDisplayLocation.scala deleted file mode 100644 index adf797f9b..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertDisplayLocation.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.alert - -sealed trait ShowAlertDisplayLocation -case object Top extends ShowAlertDisplayLocation -case object Bottom extends ShowAlertDisplayLocation diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertIcon.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertIcon.docx new file mode 100644 index 000000000..28c54a8a6 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertIcon.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertIcon.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertIcon.scala deleted file mode 100644 index 0405ca0ba..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertIcon.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.alert - -sealed trait ShowAlertIcon -case object UpArrow extends ShowAlertIcon -case object DownArrow extends ShowAlertIcon diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertIconDisplayInfo.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertIconDisplayInfo.docx new file mode 100644 index 000000000..a25bc72e8 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertIconDisplayInfo.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertIconDisplayInfo.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertIconDisplayInfo.scala deleted file mode 100644 index e55498c10..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertIconDisplayInfo.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.alert - -import com.twitter.product_mixer.core.model.marshalling.response.urt.color.RosettaColor - -case class ShowAlertIconDisplayInfo(icon: ShowAlertIcon, tint: RosettaColor) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertNavigationMetadata.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertNavigationMetadata.docx new file mode 100644 index 000000000..80b5162c0 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertNavigationMetadata.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertNavigationMetadata.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertNavigationMetadata.scala deleted file mode 100644 index 5cef1453f..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertNavigationMetadata.scala +++ /dev/null @@ -1,3 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.alert - -case class ShowAlertNavigationMetadata(navigateToEntryId: String) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertType.docx new file mode 100644 index 000000000..4e73379ae Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertType.scala deleted file mode 100644 index 191ebed40..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/alert/ShowAlertType.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.alert - -sealed trait ShowAlertType -case object NewTweets extends ShowAlertType -case object Navigate extends ShowAlertType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/BUILD deleted file mode 100644 index 5e528fdc8..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/BUILD +++ /dev/null @@ -1,15 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata", - ], - exports = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata", - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/BUILD.docx new file mode 100644 index 000000000..a1a1107fa Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/ButtonStyle.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/ButtonStyle.docx new file mode 100644 index 000000000..2100a70e7 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/ButtonStyle.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/ButtonStyle.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/ButtonStyle.scala deleted file mode 100644 index 241a9c78e..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/ButtonStyle.scala +++ /dev/null @@ -1,12 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.button - -sealed trait ButtonStyle - -case object Default extends ButtonStyle -case object Primary extends ButtonStyle -case object Secondary extends ButtonStyle -case object Text extends ButtonStyle -case object Destructive extends ButtonStyle -case object Neutral extends ButtonStyle -case object DestructiveSecondary extends ButtonStyle -case object DestructiveText extends ButtonStyle diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/CtaButton.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/CtaButton.docx new file mode 100644 index 000000000..d4d81d6e4 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/CtaButton.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/CtaButton.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/CtaButton.scala deleted file mode 100644 index 9820c52ab..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button/CtaButton.scala +++ /dev/null @@ -1,11 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.button - -import com.twitter.product_mixer.core.model.marshalling.response.urt.icon.HorizonIcon -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url - -sealed trait CtaButton - -case class TextCtaButton(buttonText: String, url: Url) extends CtaButton - -case class IconCtaButton(buttonIcon: HorizonIcon, accessibilityLabel: String, url: Url) - extends CtaButton diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/BUILD deleted file mode 100644 index c9ed8c7eb..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/BUILD +++ /dev/null @@ -1,8 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/BUILD.docx new file mode 100644 index 000000000..700567406 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/Color.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/Color.docx new file mode 100644 index 000000000..51d7c0674 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/Color.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/Color.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/Color.scala deleted file mode 100644 index 6dc9f1869..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/Color.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.color - -case class Color( - red: Short, - green: Short, - blue: Short, - opacity: Option[Short]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/ColorPalette.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/ColorPalette.docx new file mode 100644 index 000000000..f6bb150f9 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/ColorPalette.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/ColorPalette.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/ColorPalette.scala deleted file mode 100644 index 36486ee43..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/ColorPalette.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.color - -case class ColorPalette( - rgb: Color, - percentage: Double) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/RosettaColor.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/RosettaColor.docx new file mode 100644 index 000000000..75fef6ce3 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/RosettaColor.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/RosettaColor.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/RosettaColor.scala deleted file mode 100644 index cbc36d9bb..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color/RosettaColor.scala +++ /dev/null @@ -1,47 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.color - -sealed trait RosettaColor - -case object WhiteRosettaColor extends RosettaColor -case object BlackRosettaColor extends RosettaColor -case object ClearRosettaColor extends RosettaColor - -case object TextBlackRosettaColor extends RosettaColor -case object TextBlueRosettaColor extends RosettaColor - -case object DeepGrayRosettaColor extends RosettaColor -case object MediumGrayRosettaColor extends RosettaColor -case object LightGrayRosettaColor extends RosettaColor -case object FadedGrayRosettaColor extends RosettaColor -case object FaintGrayRosettaColor extends RosettaColor - -case object DeepOrangeRosettaColor extends RosettaColor -case object MediumOrangeRosettaColor extends RosettaColor -case object LightOrangeRosettaColor extends RosettaColor -case object FadedOrangeRosettaColor extends RosettaColor - -case object DeepYellowRosettaColor extends RosettaColor -case object MediumYellowRosettaColor extends RosettaColor -case object LightYellowRosettaColor extends RosettaColor -case object FadedYellowRosettaColor extends RosettaColor - -case object DeepGreenRosettaColor extends RosettaColor -case object MediumGreenRosettaColor extends RosettaColor -case object LightGreenRosettaColor extends RosettaColor -case object FadedGreenRosettaColor extends RosettaColor - -case object DeepBlueRosettaColor extends RosettaColor -case object TwitterBlueRosettaColor extends RosettaColor -case object LightBlueRosettaColor extends RosettaColor -case object FadedBlueRosettaColor extends RosettaColor -case object FaintBlueRosettaColor extends RosettaColor - -case object DeepPurpleRosettaColor extends RosettaColor -case object MediumPurpleRosettaColor extends RosettaColor -case object LightPurpleRosettaColor extends RosettaColor -case object FadedPurpleRosettaColor extends RosettaColor - -case object DeepRedRosettaColor extends RosettaColor -case object MediumRedRosettaColor extends RosettaColor -case object LightRedRosettaColor extends RosettaColor -case object FadedRedRosettaColor extends RosettaColor diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/BUILD deleted file mode 100644 index b58811811..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/BUILD +++ /dev/null @@ -1,15 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/rtf/safety_level", - ], - exports = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/rtf/safety_level", - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/BUILD.docx new file mode 100644 index 000000000..a6d2cd7dc Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/ContextualTweetRef.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/ContextualTweetRef.docx new file mode 100644 index 000000000..cb11ee47c Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/ContextualTweetRef.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/ContextualTweetRef.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/ContextualTweetRef.scala deleted file mode 100644 index 9936003b6..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/ContextualTweetRef.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.contextual_ref - -case class ContextualTweetRef( - id: Long, - hydrationContext: Option[TweetHydrationContext]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/OuterTweetContext.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/OuterTweetContext.docx new file mode 100644 index 000000000..8026a68c0 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/OuterTweetContext.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/OuterTweetContext.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/OuterTweetContext.scala deleted file mode 100644 index c3dd55a0f..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/OuterTweetContext.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.contextual_ref - -sealed trait OuterTweetContext - -case class QuoteTweetId(id: Long) extends OuterTweetContext -case class RetweetId(id: Long) extends OuterTweetContext diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/TweetHydrationContext.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/TweetHydrationContext.docx new file mode 100644 index 000000000..0f892274e Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/TweetHydrationContext.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/TweetHydrationContext.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/TweetHydrationContext.scala deleted file mode 100644 index 9104faf7d..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref/TweetHydrationContext.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.contextual_ref - -import com.twitter.product_mixer.core.model.marshalling.response.rtf.safety_level.SafetyLevel - -case class TweetHydrationContext( - safetyLevelOverride: Option[SafetyLevel], - outerTweetContext: Option[OuterTweetContext]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/BUILD deleted file mode 100644 index 699f48119..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/BUILD +++ /dev/null @@ -1,16 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata", - ], - exports = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata", - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/BUILD.docx new file mode 100644 index 000000000..70855288f Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverContent.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverContent.docx new file mode 100644 index 000000000..86f1a951a Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverContent.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverContent.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverContent.scala deleted file mode 100644 index 0753432c0..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverContent.scala +++ /dev/null @@ -1,34 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.cover - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Callback -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.DismissInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageDisplayType -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageVariant -import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText - -sealed trait CoverContent - -case class FullCoverContent( - displayType: FullCoverDisplayType, - primaryText: RichText, - primaryCoverCta: CoverCta, - secondaryCoverCta: Option[CoverCta], - secondaryText: Option[RichText], - imageVariant: Option[ImageVariant], - details: Option[RichText], - dismissInfo: Option[DismissInfo], - imageDisplayType: Option[ImageDisplayType], - impressionCallbacks: Option[List[Callback]]) - extends CoverContent - -case class HalfCoverContent( - displayType: HalfCoverDisplayType, - primaryText: RichText, - primaryCoverCta: CoverCta, - secondaryCoverCta: Option[CoverCta], - secondaryText: Option[RichText], - impressionCallbacks: Option[List[Callback]], - dismissible: Option[Boolean], - coverImage: Option[CoverImage], - dismissInfo: Option[DismissInfo]) - extends CoverContent diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverCta.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverCta.docx new file mode 100644 index 000000000..1f7326df0 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverCta.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverCta.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverCta.scala deleted file mode 100644 index 2b4bfe706..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverCta.scala +++ /dev/null @@ -1,14 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.cover - -import com.twitter.product_mixer.core.model.marshalling.response.urt.button.ButtonStyle -import com.twitter.product_mixer.core.model.marshalling.response.urt.icon.HorizonIcon -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Callback -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo - -case class CoverCta( - text: String, - ctaBehavior: CoverCtaBehavior, - callbacks: Option[List[Callback]], - clientEventInfo: Option[ClientEventInfo], - icon: Option[HorizonIcon], - buttonStyle: Option[ButtonStyle]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverCtaBehavior.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverCtaBehavior.docx new file mode 100644 index 000000000..c92eff3b4 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverCtaBehavior.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverCtaBehavior.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverCtaBehavior.scala deleted file mode 100644 index 07e2d6c84..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverCtaBehavior.scala +++ /dev/null @@ -1,9 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.cover - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url -import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText - -sealed trait CoverCtaBehavior - -case class CoverBehaviorNavigate(url: Url) extends CoverCtaBehavior -case class CoverBehaviorDismiss(feedbackMessage: Option[RichText]) extends CoverCtaBehavior diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverImage.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverImage.docx new file mode 100644 index 000000000..7d652299c Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverImage.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverImage.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverImage.scala deleted file mode 100644 index 45d4b702e..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/CoverImage.scala +++ /dev/null @@ -1,10 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.cover - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageAnimationType -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageDisplayType -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageVariant - -case class CoverImage( - imageVariant: ImageVariant, - imageDisplayType: ImageDisplayType, - imageAnimationType: Option[ImageAnimationType]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/FullCoverDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/FullCoverDisplayType.docx new file mode 100644 index 000000000..caafa3879 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/FullCoverDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/FullCoverDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/FullCoverDisplayType.scala deleted file mode 100644 index 6c0ef1ec0..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/FullCoverDisplayType.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.cover - -sealed trait FullCoverDisplayType - -case object CoverFullCoverDisplayType extends FullCoverDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/HalfCoverDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/HalfCoverDisplayType.docx new file mode 100644 index 000000000..e77d488ed Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/HalfCoverDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/HalfCoverDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/HalfCoverDisplayType.scala deleted file mode 100644 index 2160bc3a7..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/HalfCoverDisplayType.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.cover - -sealed trait HalfCoverDisplayType - -case object CoverHalfCoverDisplayType extends HalfCoverDisplayType -case object CenterCoverHalfCoverDisplayType extends HalfCoverDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/ShowCover.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/ShowCover.docx new file mode 100644 index 000000000..e2d805516 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/ShowCover.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/ShowCover.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/ShowCover.scala deleted file mode 100644 index 8062d23a6..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/cover/ShowCover.scala +++ /dev/null @@ -1,49 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.cover - -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.Cover -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.cover.FullCover.FullCoverEntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.cover.HalfCover.HalfCoverEntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo - -object HalfCover { - val HalfCoverEntryNamespace = EntryNamespace("half-cover") -} -case class HalfCover( - override val id: String, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - content: HalfCoverContent) - extends Cover { - - override val entryNamespace: EntryNamespace = HalfCoverEntryNamespace - - // Note that sort index is not used for Covers, as they are not TimelineEntry and do not have entryId - override def withSortIndex(newSortIndex: Long): TimelineEntry = - copy(sortIndex = Some(newSortIndex)) - - // Not used for covers - override def feedbackActionInfo: Option[FeedbackActionInfo] = None -} - -object FullCover { - val FullCoverEntryNamespace = EntryNamespace("full-cover") -} -case class FullCover( - override val id: String, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - content: FullCoverContent) - extends Cover { - - override val entryNamespace: EntryNamespace = FullCoverEntryNamespace - - // Note that sort index is not used for Covers, as they are not TimelineEntry and do not have entryId - override def withSortIndex(newSortIndex: Long): TimelineEntry = - copy(sortIndex = Some(newSortIndex)) - - // Not used for covers - override def feedbackActionInfo: Option[FeedbackActionInfo] = None -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon/BUILD deleted file mode 100644 index f2657f7bf..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon/BUILD +++ /dev/null @@ -1,9 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [], - exports = [], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon/BUILD.docx new file mode 100644 index 000000000..201704911 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon/HorizonIcon.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon/HorizonIcon.docx new file mode 100644 index 000000000..0ef84c57b Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon/HorizonIcon.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon/HorizonIcon.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon/HorizonIcon.scala deleted file mode 100644 index dbabdaa46..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon/HorizonIcon.scala +++ /dev/null @@ -1,43 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.icon - -sealed trait HorizonIcon - -case object Bookmark extends HorizonIcon -case object Moment extends HorizonIcon -case object Debug extends HorizonIcon -case object Error extends HorizonIcon -case object Follow extends HorizonIcon -case object Unfollow extends HorizonIcon -case object Smile extends HorizonIcon -case object Frown extends HorizonIcon -case object Help extends HorizonIcon -case object Link extends HorizonIcon -case object Message extends HorizonIcon -case object No extends HorizonIcon -case object Outgoing extends HorizonIcon -case object Pin extends HorizonIcon -case object Retweet extends HorizonIcon -case object Speaker extends HorizonIcon -case object Trashcan extends HorizonIcon -case object Feedback extends HorizonIcon -case object FeedbackClose extends HorizonIcon -case object EyeOff extends HorizonIcon -case object Moderation extends HorizonIcon -case object Topic extends HorizonIcon -case object TopicClose extends HorizonIcon -case object Flag extends HorizonIcon -case object TopicFilled extends HorizonIcon -case object NotificationsFollow extends HorizonIcon -case object Person extends HorizonIcon -case object BalloonStroke extends HorizonIcon -case object Calendar extends HorizonIcon -case object LocationStroke extends HorizonIcon -case object PersonStroke extends HorizonIcon -case object Safety extends HorizonIcon -case object Logo extends HorizonIcon -case object SparkleOn extends HorizonIcon -case object StarRising extends HorizonIcon -case object CameraVideo extends HorizonIcon -case object ShoppingClock extends HorizonIcon -case object ArrowRight extends HorizonIcon -case object SpeakerOff extends HorizonIcon diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/BUILD deleted file mode 100644 index 1b67082a3..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/BUILD +++ /dev/null @@ -1,24 +0,0 @@ -scala_library( - sources = ["**/*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext", - ], - exports = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction", - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/BUILD.docx new file mode 100644 index 000000000..8fdaa9203 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleDisplayType.docx new file mode 100644 index 000000000..0f52a691d Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleDisplayType.scala deleted file mode 100644 index 401c5f879..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleDisplayType.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.article - -sealed trait ArticleDisplayType - -case object Default extends ArticleDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleItem.docx new file mode 100644 index 000000000..6a9c4441b Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleItem.scala deleted file mode 100644 index 1f892bea3..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleItem.scala +++ /dev/null @@ -1,26 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.article - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.SocialContext -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -object ArticleItem { - val ArticleEntryNamespace = EntryNamespace("article") -} - -case class ArticleItem( - override val id: Int, - articleSeedType: ArticleSeedType, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - displayType: Option[ArticleDisplayType], - socialContext: Option[SocialContext]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = ArticleItem.ArticleEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleSeedType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleSeedType.docx new file mode 100644 index 000000000..8e8826f26 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleSeedType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleSeedType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleSeedType.scala deleted file mode 100644 index c08ce74ec..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/article/ArticleSeedType.scala +++ /dev/null @@ -1,18 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.article - -sealed trait ArticleSeedType - -/** - * Seed UTEG with a user's following list (1st degree network) - */ -case object FollowingListSeed extends ArticleSeedType - -/** - * Seed UTEG with a user's friends of friends (follow graph + 1) list - */ -case object FriendsOfFriendsSeed extends ArticleSeedType - -/** - * Seed UTEG with a given lists' members - */ -case object ListIdSeed extends ArticleSeedType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/audio_space/AudioSpaceItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/audio_space/AudioSpaceItem.docx new file mode 100644 index 000000000..0a235625c Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/audio_space/AudioSpaceItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/audio_space/AudioSpaceItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/audio_space/AudioSpaceItem.scala deleted file mode 100644 index a4699ebd9..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/audio_space/AudioSpaceItem.scala +++ /dev/null @@ -1,22 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.audio_space - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -object AudioSpaceItem { - val SpaceEntryNamespace = EntryNamespace("audiospace") -} - -case class AudioSpaceItem( - override val id: String, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = AudioSpaceItem.SpaceEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/card/CardDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/card/CardDisplayType.docx new file mode 100644 index 000000000..177adb6ec Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/card/CardDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/card/CardDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/card/CardDisplayType.scala deleted file mode 100644 index 4ec0b6216..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/card/CardDisplayType.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.card - -sealed trait CardDisplayType - -case object HeroDisplayType extends CardDisplayType -case object CellDisplayType extends CardDisplayType -case object TweetCardDisplayType extends CardDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/card/CardItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/card/CardItem.docx new file mode 100644 index 000000000..0a204e883 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/card/CardItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/card/CardItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/card/CardItem.scala deleted file mode 100644 index b8ebc0240..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/card/CardItem.scala +++ /dev/null @@ -1,28 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.card - -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url - -object CardItem { - val CardEntryNamespace = EntryNamespace("card") -} - -case class CardItem( - override val id: String, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - cardUrl: String, - text: Option[String], - subtext: Option[String], - url: Option[Url], - displayType: Option[CardDisplayType]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = CardItem.CardEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/commerce/CommerceProductGroupItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/commerce/CommerceProductGroupItem.docx new file mode 100644 index 000000000..49111a474 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/commerce/CommerceProductGroupItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/commerce/CommerceProductGroupItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/commerce/CommerceProductGroupItem.scala deleted file mode 100644 index b77fde3fc..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/commerce/CommerceProductGroupItem.scala +++ /dev/null @@ -1,23 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.commerce - -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem -import com.twitter.product_mixer.core.model.marshalling.response.urt.item.commerce.CommerceProductGroupItem.CommerceProductGroupEntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo - -object CommerceProductGroupItem { - val CommerceProductGroupEntryNamespace: EntryNamespace = EntryNamespace("commerce-product-group") -} - -case class CommerceProductGroupItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo]) - extends TimelineItem { - - val entryNamespace: EntryNamespace = CommerceProductGroupEntryNamespace - def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/commerce/CommerceProductItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/commerce/CommerceProductItem.docx new file mode 100644 index 000000000..dd5496f3a Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/commerce/CommerceProductItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/commerce/CommerceProductItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/commerce/CommerceProductItem.scala deleted file mode 100644 index a7f3820bc..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/commerce/CommerceProductItem.scala +++ /dev/null @@ -1,23 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.commerce - -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem -import com.twitter.product_mixer.core.model.marshalling.response.urt.item.commerce.CommerceProductItem.CommerceProductEntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo - -object CommerceProductItem { - val CommerceProductEntryNamespace: EntryNamespace = EntryNamespace("commerce-product") -} - -case class CommerceProductItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo]) - extends TimelineItem { - - val entryNamespace: EntryNamespace = CommerceProductEntryNamespace - def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/conversation_annotation/ConversationAnnotation.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/conversation_annotation/ConversationAnnotation.docx new file mode 100644 index 000000000..3904e7815 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/conversation_annotation/ConversationAnnotation.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/conversation_annotation/ConversationAnnotation.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/conversation_annotation/ConversationAnnotation.scala deleted file mode 100644 index 5fa93a9d1..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/conversation_annotation/ConversationAnnotation.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.conversation_annotation - -import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText - -case class ConversationAnnotation( - conversationAnnotationType: ConversationAnnotationType, - header: Option[RichText], - description: Option[RichText]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/conversation_annotation/ConversationAnnotationType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/conversation_annotation/ConversationAnnotationType.docx new file mode 100644 index 000000000..57bed6caf Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/conversation_annotation/ConversationAnnotationType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/conversation_annotation/ConversationAnnotationType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/conversation_annotation/ConversationAnnotationType.scala deleted file mode 100644 index ed8d6573a..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/conversation_annotation/ConversationAnnotationType.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.conversation_annotation - -sealed trait ConversationAnnotationType - -case object Political extends ConversationAnnotationType -case object Large extends ConversationAnnotationType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/event/EventSummaryDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/event/EventSummaryDisplayType.docx new file mode 100644 index 000000000..04149da80 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/event/EventSummaryDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/event/EventSummaryDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/event/EventSummaryDisplayType.scala deleted file mode 100644 index 4b6e0b161..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/event/EventSummaryDisplayType.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.event - -sealed trait EventSummaryDisplayType - -case object CellEventSummaryDisplayType extends EventSummaryDisplayType -case object HeroEventSummaryDisplayType extends EventSummaryDisplayType -case object CellWithProminentSocialContextEventSummaryDisplayType extends EventSummaryDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/event/EventSummaryItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/event/EventSummaryItem.docx new file mode 100644 index 000000000..41fd0d267 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/event/EventSummaryItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/event/EventSummaryItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/event/EventSummaryItem.scala deleted file mode 100644 index f011d72ab..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/event/EventSummaryItem.scala +++ /dev/null @@ -1,30 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.event - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageVariant -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -object EventSummaryItem { - val EventSummaryItemEntryNamespace = EntryNamespace("eventsummary") -} - -case class EventSummaryItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - title: String, - displayType: EventSummaryDisplayType, - url: Url, - image: Option[ImageVariant], - timeString: Option[String]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = - EventSummaryItem.EventSummaryItemEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/ForwardPivot.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/ForwardPivot.docx new file mode 100644 index 000000000..7ac3ae669 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/ForwardPivot.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/ForwardPivot.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/ForwardPivot.scala deleted file mode 100644 index ad75952c0..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/ForwardPivot.scala +++ /dev/null @@ -1,18 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.forward_pivot - -import com.twitter.product_mixer.core.model.marshalling.response.urt.color.RosettaColor -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Badge -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageVariant -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url -import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText - -case class ForwardPivot( - text: RichText, - landingUrl: Url, - displayType: ForwardPivotDisplayType, - iconImageVariant: Option[ImageVariant], - stateBadge: Option[Badge], - subtext: Option[RichText], - backgroundColorName: Option[RosettaColor], - engagementNudge: Option[Boolean], - softInterventionDisplayType: Option[SoftInterventionDisplayType]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/ForwardPivotDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/ForwardPivotDisplayType.docx new file mode 100644 index 000000000..97647aceb Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/ForwardPivotDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/ForwardPivotDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/ForwardPivotDisplayType.scala deleted file mode 100644 index 7c13a05f0..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/ForwardPivotDisplayType.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.forward_pivot - -sealed trait ForwardPivotDisplayType - -case object LiveEvent extends ForwardPivotDisplayType -case object SoftIntervention extends ForwardPivotDisplayType -case object CommunityNotes extends ForwardPivotDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/SoftInterventionDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/SoftInterventionDisplayType.docx new file mode 100644 index 000000000..93520110b Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/SoftInterventionDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/SoftInterventionDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/SoftInterventionDisplayType.scala deleted file mode 100644 index 1c07e95b8..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/forward_pivot/SoftInterventionDisplayType.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.forward_pivot - -sealed trait SoftInterventionDisplayType - -case object GetTheLatest extends SoftInterventionDisplayType -case object StayInformed extends SoftInterventionDisplayType -case object Misleading extends SoftInterventionDisplayType -case object GovernmentRequested extends SoftInterventionDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryAction.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryAction.docx new file mode 100644 index 000000000..700794ac9 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryAction.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryAction.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryAction.scala deleted file mode 100644 index ce3cebc55..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryAction.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.generic_summary - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url - -case class GenericSummaryAction( - url: Url, - clientEventInfo: Option[ClientEventInfo]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryContext.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryContext.docx new file mode 100644 index 000000000..1b1071d95 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryContext.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryContext.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryContext.scala deleted file mode 100644 index fe1a87749..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryContext.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.generic_summary - -import com.twitter.product_mixer.core.model.marshalling.response.urt.icon.HorizonIcon -import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText - -case class GenericSummaryContext( - text: RichText, - icon: Option[HorizonIcon]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryDisplayType.docx new file mode 100644 index 000000000..eede717a5 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryDisplayType.scala deleted file mode 100644 index b4c15baac..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryDisplayType.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.generic_summary - -sealed trait GenericSummaryItemDisplayType - -case object HeroDisplayType extends GenericSummaryItemDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryItem.docx new file mode 100644 index 000000000..7a60e004a Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryItem.scala deleted file mode 100644 index 74cc6b1c1..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/generic_summary/GenericSummaryItem.scala +++ /dev/null @@ -1,34 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.generic_summary - -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem -import com.twitter.product_mixer.core.model.marshalling.response.urt.media.Media -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.promoted.PromotedMetadata -import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText -import com.twitter.util.Time - -object GenericSummaryItem { - val GenericSummaryItemNamespace: EntryNamespace = EntryNamespace("genericsummary") -} - -case class GenericSummaryItem( - override val id: String, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - headline: RichText, - displayType: GenericSummaryItemDisplayType, - userAttributionIds: Seq[Long], - media: Option[Media], - context: Option[GenericSummaryContext], - timestamp: Option[Time], - onClickAction: Option[GenericSummaryAction], - promotedMetadata: Option[PromotedMetadata]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = GenericSummaryItem.GenericSummaryItemNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/highlight/HighlightedSection.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/highlight/HighlightedSection.docx new file mode 100644 index 000000000..e140575c3 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/highlight/HighlightedSection.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/highlight/HighlightedSection.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/highlight/HighlightedSection.scala deleted file mode 100644 index 5f9263de5..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/highlight/HighlightedSection.scala +++ /dev/null @@ -1,3 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.highlight - -case class HighlightedSection(startIndex: Int, endIndex: Int) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/icon_label/IconLabelItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/icon_label/IconLabelItem.docx new file mode 100644 index 000000000..d3a9364d4 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/icon_label/IconLabelItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/icon_label/IconLabelItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/icon_label/IconLabelItem.scala deleted file mode 100644 index 63f6d29c9..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/icon_label/IconLabelItem.scala +++ /dev/null @@ -1,26 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.icon_label - -import com.twitter.product_mixer.core.model.marshalling.response.urt.icon.HorizonIcon -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -object IconLabelItem { - val IconLabelEntryNamespace = EntryNamespace("iconlabel") -} - -case class IconLabelItem( - override val id: String, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - text: RichText, - icon: Option[HorizonIcon]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = IconLabelItem.IconLabelEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/label/LabelDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/label/LabelDisplayType.docx new file mode 100644 index 000000000..12f7a761e Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/label/LabelDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/label/LabelDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/label/LabelDisplayType.scala deleted file mode 100644 index 3b3a7cedf..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/label/LabelDisplayType.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.label - -sealed trait LabelDisplayType - -case object InlineHeaderLabelDisplayType extends LabelDisplayType -case object OtherRepliesSectionHeaderLabelDisplayType extends LabelDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/label/LabelItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/label/LabelItem.docx new file mode 100644 index 000000000..34348e093 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/label/LabelItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/label/LabelItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/label/LabelItem.scala deleted file mode 100644 index 890a9ea92..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/label/LabelItem.scala +++ /dev/null @@ -1,28 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.label - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -object LabelItem { - val LabelEntryNamespace = EntryNamespace("label") -} - -case class LabelItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - text: String, - subtext: Option[String], - disclosureIndicator: Option[Boolean], - url: Option[Url], - displayType: Option[LabelDisplayType]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = LabelItem.LabelEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageAction.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageAction.docx new file mode 100644 index 000000000..09f8345a3 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageAction.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageAction.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageAction.scala deleted file mode 100644 index 7939a2446..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageAction.scala +++ /dev/null @@ -1,10 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.message - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Callback -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo - -case class MessageAction( - dismissOnClick: Boolean, - url: Option[String], - clientEventInfo: Option[ClientEventInfo], - onClickCallbacks: Option[Seq[Callback]]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageActionType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageActionType.docx new file mode 100644 index 000000000..042ce0f3f Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageActionType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageActionType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageActionType.scala deleted file mode 100644 index feeaab391..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageActionType.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.message - -sealed trait MessageActionType - -case object FollowAllMessageActionType extends MessageActionType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageContent.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageContent.docx new file mode 100644 index 000000000..9d4df72ae Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageContent.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageContent.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageContent.scala deleted file mode 100644 index b8c9c495f..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageContent.scala +++ /dev/null @@ -1,38 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.message - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.SocialContext -import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText - -sealed trait MessageContent - -case class InlinePromptMessageContent( - headerText: String, - bodyText: Option[String], - primaryButtonAction: Option[MessageTextAction], - secondaryButtonAction: Option[MessageTextAction], - headerRichText: Option[RichText], - bodyRichText: Option[RichText], - socialContext: Option[SocialContext], - userFacepile: Option[UserFacepile]) - extends MessageContent - -case class HeaderImagePromptMessageContent( - headerImage: MessageImage, - headerText: Option[String], - bodyText: Option[String], - primaryButtonAction: Option[MessageTextAction], - secondaryButtonAction: Option[MessageTextAction], - action: Option[MessageAction], - headerRichText: Option[RichText], - bodyRichText: Option[RichText]) - extends MessageContent - -case class CompactPromptMessageContent( - headerText: String, - bodyText: Option[String], - primaryButtonAction: Option[MessageTextAction], - secondaryButtonAction: Option[MessageTextAction], - action: Option[MessageAction], - headerRichText: Option[RichText], - bodyRichText: Option[RichText]) - extends MessageContent diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageImage.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageImage.docx new file mode 100644 index 000000000..c48404262 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageImage.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageImage.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageImage.scala deleted file mode 100644 index a8ac940e4..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageImage.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.message - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageVariant - -case class MessageImage( - imageVariants: Set[ImageVariant], - backgroundColor: Option[String]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessagePromptItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessagePromptItem.docx new file mode 100644 index 000000000..07f8467e3 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessagePromptItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessagePromptItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessagePromptItem.scala deleted file mode 100644 index df8d1cc4e..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessagePromptItem.scala +++ /dev/null @@ -1,27 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.message - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Callback -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -object MessagePromptItem { - val MessagePromptEntryNamespace = EntryNamespace("messageprompt") -} - -case class MessagePromptItem( - override val id: String, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - override val isPinned: Option[Boolean], - content: MessageContent, - impressionCallbacks: Option[List[Callback]]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = - MessagePromptItem.MessagePromptEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageTextAction.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageTextAction.docx new file mode 100644 index 000000000..b4ecd1348 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageTextAction.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageTextAction.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageTextAction.scala deleted file mode 100644 index fc1b793f7..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/MessageTextAction.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.message - -case class MessageTextAction( - text: String, - action: MessageAction) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/UserFacepile.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/UserFacepile.docx new file mode 100644 index 000000000..88d611207 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/UserFacepile.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/UserFacepile.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/UserFacepile.scala deleted file mode 100644 index 91757a0fe..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/UserFacepile.scala +++ /dev/null @@ -1,9 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.message - -case class UserFacepile( - userIds: Seq[Long], - featuredUserIds: Seq[Long], - action: Option[MessageTextAction], - actionType: Option[MessageActionType], - displaysFeaturingText: Option[Boolean], - displayType: Option[UserFacepileDisplayType]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/UserFacepileDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/UserFacepileDisplayType.docx new file mode 100644 index 000000000..00ed3ce0d Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/UserFacepileDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/UserFacepileDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/UserFacepileDisplayType.scala deleted file mode 100644 index f592ee1ca..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/message/UserFacepileDisplayType.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.message - -sealed trait UserFacepileDisplayType - -case object LargeUserFacepileDisplayType extends UserFacepileDisplayType -case object CompactUserFacepileDisplayType extends UserFacepileDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/moment/MomentAnnotationItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/moment/MomentAnnotationItem.docx new file mode 100644 index 000000000..c719f3a7c Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/moment/MomentAnnotationItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/moment/MomentAnnotationItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/moment/MomentAnnotationItem.scala deleted file mode 100644 index de057c0a0..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/moment/MomentAnnotationItem.scala +++ /dev/null @@ -1,33 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.moment - -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText - -object MomentAnnotationItem { - val MomentAnnotationEntryNamespace = EntryNamespace("momentannotation") -} - -/** - * Represents a MomentAnnotation URT item. - * This is primarily used by Trends Searth Result Page for displaying Trends Title or Description - * URT API Reference: https://docbird.twitter.biz/unified_rich_timelines_urt/gen/com/twitter/timelines/render/thriftscala/MomentAnnotation.html - */ -case class MomentAnnotationItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - override val isPinned: Option[Boolean], - text: Option[RichText], - header: Option[RichText], -) extends TimelineItem { - - override val entryNamespace: EntryNamespace = - MomentAnnotationItem.MomentAnnotationEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/PromptContent.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/PromptContent.docx new file mode 100644 index 000000000..e04f113bf Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/PromptContent.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/PromptContent.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/PromptContent.scala deleted file mode 100644 index d665c5c94..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/PromptContent.scala +++ /dev/null @@ -1,28 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.prompt - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Callback - -/** - * Represents different types of URT Prompts supported such as the Relevance Prompt. - * - * URT API Reference: https://docbird.twitter.biz/unified_rich_timelines_urt/gen/com/twitter/timelines/render/thriftscala/PromptContent.html - */ -sealed trait PromptContent - -/** - * Relevance Prompt is a Yes-No style prompt that can be used for collecting feedback from a User - * about a part of their timeline. - * - * URT API Reference: https://docbird.twitter.biz/unified_rich_timelines_urt/gen/com/twitter/timelines/render/thriftscala/RelevancePrompt.html - */ -case class RelevancePromptContent( - title: String, - confirmation: String, - isRelevantText: String, - notRelevantText: String, - isRelevantCallback: Callback, - notRelevantCallback: Callback, - displayType: RelevancePromptDisplayType, - isRelevantFollowUp: Option[RelevancePromptFollowUpFeedbackType], - notRelevantFollowUp: Option[RelevancePromptFollowUpFeedbackType]) - extends PromptContent diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/PromptItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/PromptItem.docx new file mode 100644 index 000000000..128fb2c82 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/PromptItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/PromptItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/PromptItem.scala deleted file mode 100644 index 59ef60bce..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/PromptItem.scala +++ /dev/null @@ -1,26 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.prompt - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Callback - -object PromptItem { - val PromptEntryNamespace = EntryNamespace("relevanceprompt") -} - -case class PromptItem( - override val id: String, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo] = None, - content: PromptContent, - impressionCallbacks: Option[List[Callback]]) - extends TimelineItem { - - override val entryNamespace: EntryNamespace = PromptItem.PromptEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/RelevancePromptDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/RelevancePromptDisplayType.docx new file mode 100644 index 000000000..36d36ba1d Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/RelevancePromptDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/RelevancePromptDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/RelevancePromptDisplayType.scala deleted file mode 100644 index f4c04dd15..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/RelevancePromptDisplayType.scala +++ /dev/null @@ -1,13 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.prompt - -/** - * Represents the different ways to display the Relevance Prompt in a timeline. - * - * URT API Reference: https://docbird.twitter.biz/unified_rich_timelines_urt/gen/com/twitter/timelines/render/thriftscala/RelevancePromptDisplayType.html - */ -sealed trait RelevancePromptDisplayType - -case object Normal extends RelevancePromptDisplayType -case object Compact extends RelevancePromptDisplayType -case object Large extends RelevancePromptDisplayType -case object ThumbsUpAndDown extends RelevancePromptDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/RelevancePromptFollowUpFeedbackType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/RelevancePromptFollowUpFeedbackType.docx new file mode 100644 index 000000000..e905516a1 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/RelevancePromptFollowUpFeedbackType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/RelevancePromptFollowUpFeedbackType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/RelevancePromptFollowUpFeedbackType.scala deleted file mode 100644 index a8b6d59a5..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/prompt/RelevancePromptFollowUpFeedbackType.scala +++ /dev/null @@ -1,16 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.prompt - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Callback - -/** - * Different kinds of follow-ups after a positive-negative feedback on a prompt button. - * - * URT API Reference: https://docbird.twitter.biz/unified_rich_timelines_urt/gen/com/twitter/timelines/render/thriftscala/RelevancePromptFollowUpFeedbackType.html - */ -sealed trait RelevancePromptFollowUpFeedbackType - -case class RelevancePromptFollowUpTextInput( - context: String, - textFieldPlaceholder: String, - sendTextCallback: Callback) - extends RelevancePromptFollowUpFeedbackType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/SpellingActionType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/SpellingActionType.docx new file mode 100644 index 000000000..bc4b72ff5 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/SpellingActionType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/SpellingActionType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/SpellingActionType.scala deleted file mode 100644 index a686f1f94..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/SpellingActionType.scala +++ /dev/null @@ -1,26 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.suggestion - -/** - * Represents the different types of Spelling Suggestion items. - * - * URT API Reference: https://docbird.twitter.biz/unified_rich_timelines_urt/gen/com/twitter/timelines/render/thriftscala/SpellingActionType.html - */ -sealed trait SpellingActionType - -/** - * Used when the original query is replaced completed by another query in the backend. - * Clients use the text 'Searching instead for …' to display this suggestion. - */ -case object ReplaceSpellingActionType extends SpellingActionType - -/** - * Used when the original query is expanded by a suggestion when performing the search. - * Clients use the text 'Including results for …' to display this suggestion. - */ -case object ExpandSpellingActionType extends SpellingActionType - -/** - * Used when the search query is not changed and a suggestion is displayed as an alternative query. - * Clients use the text 'Did you mean … ?' to display the suggestion. - */ -case object SuggestSpellingActionType extends SpellingActionType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/SpellingItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/SpellingItem.docx new file mode 100644 index 000000000..aaa138af7 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/SpellingItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/SpellingItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/SpellingItem.scala deleted file mode 100644 index 439c2023f..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/SpellingItem.scala +++ /dev/null @@ -1,32 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.suggestion - -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo - -object SpellingItem { - val SpellingEntryNamespace = EntryNamespace("spelling") -} - -/** - * Represents a Spelling Suggestion URT item. This is primary used by Search timelines for - * displaying Spelling correction information. - * - * URT API Reference: https://docbird.twitter.biz/unified_rich_timelines_urt/gen/com/twitter/timelines/render/thriftscala/Spelling.html - */ -case class SpellingItem( - override val id: String, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - textResult: TextResult, - spellingActionType: Option[SpellingActionType], - originalQuery: Option[String]) - extends TimelineItem { - - override val entryNamespace: EntryNamespace = SpellingItem.SpellingEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/TextResult.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/TextResult.docx new file mode 100644 index 000000000..500e8988b Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/TextResult.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/TextResult.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/TextResult.scala deleted file mode 100644 index b6d0afb8a..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/suggestion/TextResult.scala +++ /dev/null @@ -1,14 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.suggestion - -import com.twitter.product_mixer.core.model.marshalling.response.urt.item.highlight.HighlightedSection - -/** - * Represents text with hit-highlights used for returning search query suggestions. - * - * URT API Reference: https://docbird.twitter.biz/unified_rich_timelines_urt/gen/com/twitter/timelines/render/thriftscala/TextResult.html - */ -case class TextResult( - text: String, - hitHighlights: Option[Seq[HighlightedSection]], - score: Option[Double], - querySource: Option[String]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/thread/ThreadHeaderContent.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/thread/ThreadHeaderContent.docx new file mode 100644 index 000000000..8c4b7ca7b Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/thread/ThreadHeaderContent.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/thread/ThreadHeaderContent.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/thread/ThreadHeaderContent.scala deleted file mode 100644 index bd2a5a7d8..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/thread/ThreadHeaderContent.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.thread - -sealed trait ThreadHeaderContent - -case class UserThreadHeader(userId: Long) extends ThreadHeaderContent diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/thread/ThreadHeaderItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/thread/ThreadHeaderItem.docx new file mode 100644 index 000000000..f96611ea5 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/thread/ThreadHeaderItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/thread/ThreadHeaderItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/thread/ThreadHeaderItem.scala deleted file mode 100644 index 074d81ec3..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/thread/ThreadHeaderItem.scala +++ /dev/null @@ -1,24 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.thread - -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo - -object ThreadHeaderItem { - val ThreadHeaderEntryNamespace = EntryNamespace("threadheader") -} - -case class ThreadHeaderItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - override val isPinned: Option[Boolean], - content: ThreadHeaderContent) - extends TimelineItem { - override val entryNamespace: EntryNamespace = ThreadHeaderItem.ThreadHeaderEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tile/TileContent.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tile/TileContent.docx new file mode 100644 index 000000000..56e6145d5 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tile/TileContent.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tile/TileContent.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tile/TileContent.scala deleted file mode 100644 index 85c212c76..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tile/TileContent.scala +++ /dev/null @@ -1,21 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.tile - -import com.twitter.product_mixer.core.model.marshalling.response.urt.button.CtaButton -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Badge -import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText - -sealed trait TileContent - -case class StandardTileContent( - title: String, - supportingText: String, - badge: Option[Badge]) - extends TileContent - -case class CallToActionTileContent( - text: String, - richText: Option[RichText], - ctaButton: Option[CtaButton]) - extends TileContent - -//todo: Add other TileContent types later diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tile/TileItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tile/TileItem.docx new file mode 100644 index 000000000..d1fa9490f Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tile/TileItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tile/TileItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tile/TileItem.scala deleted file mode 100644 index 8d6498c69..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tile/TileItem.scala +++ /dev/null @@ -1,29 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.tile - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageVariant -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -object TileItem { - val TileEntryNamespace = EntryNamespace("tile") -} - -case class TileItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - title: String, - supportingText: String, - url: Option[Url], - image: Option[ImageVariant], - content: TileContent) - extends TimelineItem { - override val entryNamespace: EntryNamespace = TileItem.TileEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneDisplayType.docx new file mode 100644 index 000000000..721f31e1f Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneDisplayType.scala deleted file mode 100644 index 1fa166559..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneDisplayType.scala +++ /dev/null @@ -1,9 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.tombstone - -sealed trait TombstoneDisplayType - -case object TweetUnavailable extends TombstoneDisplayType -case object DisconnectedRepliesAncestor extends TombstoneDisplayType -case object DisconnectedRepliesDescendant extends TombstoneDisplayType -case object Inline extends TombstoneDisplayType -case object NonCompliant extends TombstoneDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneInfo.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneInfo.docx new file mode 100644 index 000000000..d14179c20 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneInfo.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneInfo.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneInfo.scala deleted file mode 100644 index 12e030af4..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneInfo.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.tombstone - -import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText - -case class TombstoneInfo( - text: String, - richText: Option[RichText], - richRevealText: Option[RichText]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneItem.docx new file mode 100644 index 000000000..9319aed2f Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneItem.scala deleted file mode 100644 index 00c053439..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tombstone/TombstoneItem.scala +++ /dev/null @@ -1,26 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.tombstone - -import com.twitter.product_mixer.core.model.marshalling.response.urt.item.tweet.TweetItem -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -object TombstoneItem { - val TombstoneEntryNamespace = EntryNamespace("tombstone") -} - -case class TombstoneItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - tombstoneDisplayType: TombstoneDisplayType, - tombstoneInfo: Option[TombstoneInfo], - tweet: Option[TweetItem]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = TombstoneItem.TombstoneEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicDisplayType.docx new file mode 100644 index 000000000..e42267c68 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicDisplayType.scala deleted file mode 100644 index ea6941f9b..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicDisplayType.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.topic - -sealed trait TopicDisplayType - -case object BasicTopicDisplayType extends TopicDisplayType -case object PillTopicDisplayType extends TopicDisplayType -case object NoIconTopicDisplayType extends TopicDisplayType -case object PillWithoutActionIconDisplayType extends TopicDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFollowPromptDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFollowPromptDisplayType.docx new file mode 100644 index 000000000..3af032dcd Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFollowPromptDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFollowPromptDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFollowPromptDisplayType.scala deleted file mode 100644 index 1774abf40..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFollowPromptDisplayType.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.topic - -sealed trait TopicFollowPromptDisplayType - -case object IncentiveFocusTopicFollowPromptDisplayType extends TopicFollowPromptDisplayType -case object TopicFocusTopicFollowPromptDisplayType extends TopicFollowPromptDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFollowPromptItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFollowPromptItem.docx new file mode 100644 index 000000000..e6c397971 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFollowPromptItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFollowPromptItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFollowPromptItem.scala deleted file mode 100644 index ac9466939..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFollowPromptItem.scala +++ /dev/null @@ -1,26 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.topic - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -object TopicFollowPromptItem { - val TopicFollowPromptEntryNamespace = EntryNamespace("topicfollowprompt") -} - -case class TopicFollowPromptItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - topicFollowPromptDisplayType: TopicFollowPromptDisplayType, - followIncentiveTitle: Option[String], - followIncentiveText: Option[String]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = - TopicFollowPromptItem.TopicFollowPromptEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFunctionalityType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFunctionalityType.docx new file mode 100644 index 000000000..fb479a710 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFunctionalityType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFunctionalityType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFunctionalityType.scala deleted file mode 100644 index 6ba979b66..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicFunctionalityType.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.topic - -sealed trait TopicFunctionalityType - -case object BasicTopicFunctionalityType extends TopicFunctionalityType -case object PivotTopicFunctionalityType extends TopicFunctionalityType -case object RecommendationTopicFunctionalityType extends TopicFunctionalityType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicItem.docx new file mode 100644 index 000000000..1e4a47348 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicItem.scala deleted file mode 100644 index bd2467abd..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/topic/TopicItem.scala +++ /dev/null @@ -1,24 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.topic - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -object TopicItem { - val TopicEntryNamespace = EntryNamespace("topic") -} - -case class TopicItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - topicFunctionalityType: Option[TopicFunctionalityType], - topicDisplayType: Option[TopicDisplayType]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = TopicItem.TopicEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/trend/TrendItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/trend/TrendItem.docx new file mode 100644 index 000000000..1a1790a77 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/trend/TrendItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/trend/TrendItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/trend/TrendItem.scala deleted file mode 100644 index 86e7fac48..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/trend/TrendItem.scala +++ /dev/null @@ -1,35 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.trend - -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url -import com.twitter.product_mixer.core.model.marshalling.response.urt.promoted.PromotedMetadata - -object TrendItem { - val TrendItemEntryNamespace = EntryNamespace("trend") -} - -case class GroupedTrend(trendName: String, url: Url) - -case class TrendItem( - override val id: String, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - normalizedTrendName: String, - trendName: String, - url: Url, - description: Option[String], - metaDescription: Option[String], - tweetCount: Option[Int], - domainContext: Option[String], - promotedMetadata: Option[PromotedMetadata], - groupedTrends: Option[Seq[GroupedTrend]]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = TrendItem.TrendItemEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TimelinesScoreInfo.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TimelinesScoreInfo.docx new file mode 100644 index 000000000..40f40785e Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TimelinesScoreInfo.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TimelinesScoreInfo.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TimelinesScoreInfo.scala deleted file mode 100644 index 168dd47a9..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TimelinesScoreInfo.scala +++ /dev/null @@ -1,3 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.tweet - -case class TimelinesScoreInfo(score: Double) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetDisplayType.docx new file mode 100644 index 000000000..c94c0dcfb Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetDisplayType.scala deleted file mode 100644 index d54512f6a..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetDisplayType.scala +++ /dev/null @@ -1,16 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.tweet - -sealed trait TweetDisplayType - -case object Tweet extends TweetDisplayType -case object TweetFollowOnly extends TweetDisplayType -case object Media extends TweetDisplayType -case object MomentTimelineTweet extends TweetDisplayType -case object EmphasizedPromotedTweet extends TweetDisplayType -case object QuotedTweet extends TweetDisplayType -case object SelfThread extends TweetDisplayType -case object CompactPromotedTweet extends TweetDisplayType -case object TweetWithoutCard extends TweetDisplayType -case object ReaderModeRoot extends TweetDisplayType -case object ReaderMode extends TweetDisplayType -case object CondensedTweet extends TweetDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetHighlights.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetHighlights.docx new file mode 100644 index 000000000..32756fa6f Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetHighlights.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetHighlights.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetHighlights.scala deleted file mode 100644 index e2c1caa4f..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetHighlights.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.tweet - -import com.twitter.product_mixer.core.model.marshalling.response.urt.item.highlight.HighlightedSection - -case class TweetHighlights( - textHighlights: Option[List[HighlightedSection]], - cardTitleHighlights: Option[List[HighlightedSection]], - cardDescriptionHighlights: Option[List[HighlightedSection]]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetItem.docx new file mode 100644 index 000000000..f887cd830 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetItem.scala deleted file mode 100644 index 15690bd2d..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet/TweetItem.scala +++ /dev/null @@ -1,62 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.tweet - -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem -import com.twitter.product_mixer.core.model.marshalling.response.urt.contextual_ref.ContextualTweetRef -import com.twitter.product_mixer.core.model.marshalling.response.urt.item.conversation_annotation.ConversationAnnotation -import com.twitter.product_mixer.core.model.marshalling.response.urt.item.forward_pivot.ForwardPivot -import com.twitter.product_mixer.core.model.marshalling.response.urt.item.tombstone.TombstoneInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Badge -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.SocialContext -import com.twitter.product_mixer.core.model.marshalling.response.urt.promoted.PrerollMetadata -import com.twitter.product_mixer.core.model.marshalling.response.urt.promoted.PromotedMetadata -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url - -object TweetItem { - val TweetEntryNamespace = EntryNamespace("tweet") - val PromotedTweetEntryNamespace = EntryNamespace("promoted-tweet") -} - -case class TweetItem( - override val id: Long, - override val entryNamespace: EntryNamespace, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - override val isPinned: Option[Boolean], - override val entryIdToReplace: Option[String], - socialContext: Option[SocialContext], - highlights: Option[TweetHighlights], - displayType: TweetDisplayType, - innerTombstoneInfo: Option[TombstoneInfo], - timelinesScoreInfo: Option[TimelinesScoreInfo], - hasModeratedReplies: Option[Boolean], - forwardPivot: Option[ForwardPivot], - innerForwardPivot: Option[ForwardPivot], - promotedMetadata: Option[PromotedMetadata], - conversationAnnotation: Option[ConversationAnnotation], - contextualTweetRef: Option[ContextualTweetRef], - prerollMetadata: Option[PrerollMetadata], - replyBadge: Option[Badge], - destination: Option[Url]) - extends TimelineItem { - - /** - * Promoted tweets need to include the impression ID in the entry ID since some clients have - * client-side logic that deduplicates ads impression callbacks based on a combination of the - * tweet and impression IDs. Not including the impression ID will lead to over deduplication. - */ - override lazy val entryIdentifier: String = promotedMetadata - .map { metadata => - val impressionId = metadata.impressionString match { - case Some(impressionString) if impressionString.nonEmpty => impressionString - case _ => throw new IllegalStateException(s"Promoted Tweet $id missing impression ID") - } - s"$entryNamespace-$id-$impressionId" - }.getOrElse(s"$entryNamespace-$id") - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet_composer/TweetComposerDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet_composer/TweetComposerDisplayType.docx new file mode 100644 index 000000000..8e3aecdd8 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet_composer/TweetComposerDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet_composer/TweetComposerDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet_composer/TweetComposerDisplayType.scala deleted file mode 100644 index a477bb239..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet_composer/TweetComposerDisplayType.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.tweet_composer - -sealed trait TweetComposerDisplayType - -case object TweetComposerSelfThread extends TweetComposerDisplayType -case object Reply extends TweetComposerDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet_composer/TweetComposerItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet_composer/TweetComposerItem.docx new file mode 100644 index 000000000..44b168955 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet_composer/TweetComposerItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet_composer/TweetComposerItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet_composer/TweetComposerItem.scala deleted file mode 100644 index 4340c5328..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/tweet_composer/TweetComposerItem.scala +++ /dev/null @@ -1,26 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.tweet_composer - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -object TweetComposerItem { - val TweetComposerEntryNameSpace = EntryNamespace("tweetcomposer") -} - -case class TweetComposerItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - displayType: TweetComposerDisplayType, - text: String, - url: Url) - extends TimelineItem { - override val entryNamespace: EntryNamespace = TweetComposerItem.TweetComposerEntryNameSpace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/twitter_list/TwitterListDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/twitter_list/TwitterListDisplayType.docx new file mode 100644 index 000000000..b44743337 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/twitter_list/TwitterListDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/twitter_list/TwitterListDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/twitter_list/TwitterListDisplayType.scala deleted file mode 100644 index b80e8cc05..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/twitter_list/TwitterListDisplayType.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.twitter_list - -sealed trait TwitterListDisplayType - -case object List extends TwitterListDisplayType -case object ListTile extends TwitterListDisplayType -case object ListWithPin extends TwitterListDisplayType -case object ListWithSubscribe extends TwitterListDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/twitter_list/TwitterListItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/twitter_list/TwitterListItem.docx new file mode 100644 index 000000000..adad9ca03 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/twitter_list/TwitterListItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/twitter_list/TwitterListItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/twitter_list/TwitterListItem.scala deleted file mode 100644 index c585b145b..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/twitter_list/TwitterListItem.scala +++ /dev/null @@ -1,23 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.twitter_list - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -object TwitterListItem { - val ListEntryNamespace = EntryNamespace("list") -} - -case class TwitterListItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - displayType: Option[TwitterListDisplayType]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = TwitterListItem.ListEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserDisplayType.docx new file mode 100644 index 000000000..1212807ee Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserDisplayType.scala deleted file mode 100644 index a73e76d54..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserDisplayType.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.user - -sealed trait UserDisplayType - -case object User extends UserDisplayType -case object UserDetailed extends UserDisplayType -case object PendingFollowUser extends UserDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserItem.docx new file mode 100644 index 000000000..d08e3c0ed Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserItem.scala deleted file mode 100644 index 5bb1209c9..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserItem.scala +++ /dev/null @@ -1,30 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.user - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.SocialContext -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem -import com.twitter.product_mixer.core.model.marshalling.response.urt.promoted.PromotedMetadata - -object UserItem { - val UserEntryNamespace: EntryNamespace = EntryNamespace("user") -} - -case class UserItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - override val isMarkUnread: Option[Boolean], - displayType: UserDisplayType, - promotedMetadata: Option[PromotedMetadata], - socialContext: Option[SocialContext], - reactiveTriggers: Option[UserReactiveTriggers], - enableReactiveBlending: Option[Boolean]) - extends TimelineItem { - override val entryNamespace: EntryNamespace = UserItem.UserEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserReactiveTriggers.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserReactiveTriggers.docx new file mode 100644 index 000000000..8995fd113 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserReactiveTriggers.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserReactiveTriggers.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserReactiveTriggers.scala deleted file mode 100644 index 87bdda4b9..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/user/UserReactiveTriggers.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.user - -import com.twitter.product_mixer.core.model.marshalling.response.urt.reaction.TimelineReaction - -case class UserReactiveTriggers(onFollow: Option[TimelineReaction]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItem.docx new file mode 100644 index 000000000..672908445 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItem.scala deleted file mode 100644 index d96416a1f..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItem.scala +++ /dev/null @@ -1,29 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.vertical_grid_item - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -sealed trait VerticalGridItem extends TimelineItem - -object VerticalGridItemTopicTile { - val VerticalGridItemTopicTileEntryNamespace = EntryNamespace("verticalgriditemtopictile") -} - -case class VerticalGridItemTopicTile( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - style: Option[VerticalGridItemTileStyle], - functionalityType: Option[VerticalGridItemTopicFunctionalityType], - url: Option[Url]) - extends VerticalGridItem { - override val entryNamespace: EntryNamespace = - VerticalGridItemTopicTile.VerticalGridItemTopicTileEntryNamespace - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItemTileStyle.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItemTileStyle.docx new file mode 100644 index 000000000..9b8b6ea5a Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItemTileStyle.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItemTileStyle.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItemTileStyle.scala deleted file mode 100644 index 869322ebc..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItemTileStyle.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.vertical_grid_item - -sealed trait VerticalGridItemTileStyle - -case object SingleStateDefaultVerticalGridItemTileStyle extends VerticalGridItemTileStyle -case object DoubleStateDefaultVerticalGridItemTileStyle extends VerticalGridItemTileStyle diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItemTopicFunctionalityType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItemTopicFunctionalityType.docx new file mode 100644 index 000000000..3cc02c450 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItemTopicFunctionalityType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItemTopicFunctionalityType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItemTopicFunctionalityType.scala deleted file mode 100644 index 961aadc27..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/item/vertical_grid_item/VerticalGridItemTopicFunctionalityType.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.item.vertical_grid_item - -sealed trait VerticalGridItemTopicFunctionalityType - -case object PivotVerticalGridItemTopicFunctionalityType - extends VerticalGridItemTopicFunctionalityType -case object RecommendationVerticalGridItemTopicFunctionalityType - extends VerticalGridItemTopicFunctionalityType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/AspectRatio.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/AspectRatio.docx new file mode 100644 index 000000000..71d18f462 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/AspectRatio.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/AspectRatio.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/AspectRatio.scala deleted file mode 100644 index f81020c8b..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/AspectRatio.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.media - -case class AspectRatio( - numerator: Short, - denominator: Short) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/BUILD deleted file mode 100644 index ae81ac4e2..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/BUILD +++ /dev/null @@ -1,13 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/functional_component/marshaller/response/urt/metadata", - ], - exports = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/functional_component/marshaller/response/urt/metadata", - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/BUILD.docx new file mode 100644 index 000000000..556caa89c Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/Media.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/Media.docx new file mode 100644 index 000000000..b9d855487 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/Media.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/Media.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/Media.scala deleted file mode 100644 index 82fcb3e9f..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/Media.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.media - -case class Media( - mediaEntity: Option[MediaEntity], - mediaKey: Option[MediaKey], - imagePossibleCropping: Option[List[Rect]], - aspectRatio: Option[AspectRatio]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/MediaEntity.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/MediaEntity.docx new file mode 100644 index 000000000..b42c2033e Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/MediaEntity.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/MediaEntity.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/MediaEntity.scala deleted file mode 100644 index 5def14bc6..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/MediaEntity.scala +++ /dev/null @@ -1,14 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.media - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageVariant - -sealed trait MediaEntity - -case class TweetMedia( - tweetId: Long, - momentId: Option[Long]) - extends MediaEntity - -case class BroadcastId(id: String) extends MediaEntity - -case class Image(image: ImageVariant) extends MediaEntity diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/MediaKey.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/MediaKey.docx new file mode 100644 index 000000000..1721aa951 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/MediaKey.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/MediaKey.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/MediaKey.scala deleted file mode 100644 index 191a5d3f4..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/MediaKey.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.media - -case class MediaKey( - id: Long, - category: Int) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/Rect.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/Rect.docx new file mode 100644 index 000000000..a689e61d8 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/Rect.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/Rect.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/Rect.scala deleted file mode 100644 index ecd3d2c82..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media/Rect.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.media - -case class Rect( - left: Int, - top: Int, - width: Int, - height: Int) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ArticleDetails.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ArticleDetails.docx new file mode 100644 index 000000000..1216d33c6 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ArticleDetails.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ArticleDetails.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ArticleDetails.scala deleted file mode 100644 index 135a5d2ad..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ArticleDetails.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -case class ArticleDetails( - articlePosition: Int, - shareCount: Int) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/BUILD deleted file mode 100644 index 669bbc52b..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/BUILD +++ /dev/null @@ -1,17 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext", - ], - exports = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext", - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/BUILD.docx new file mode 100644 index 000000000..8005bb9ef Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Badge.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Badge.docx new file mode 100644 index 000000000..43bf7c63d Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Badge.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Badge.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Badge.scala deleted file mode 100644 index 1c12ce262..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Badge.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -import com.twitter.product_mixer.core.model.marshalling.response.urt.color.RosettaColor - -case class Badge( - text: Option[String], - textColorName: Option[RosettaColor], - backgroundColorName: Option[RosettaColor]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Callback.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Callback.docx new file mode 100644 index 000000000..5a96014c5 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Callback.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Callback.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Callback.scala deleted file mode 100644 index 9ab8c082c..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Callback.scala +++ /dev/null @@ -1,3 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -case class Callback(endpoint: String) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ClientEventInfo.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ClientEventInfo.docx new file mode 100644 index 000000000..6c0b2dfc1 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ClientEventInfo.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ClientEventInfo.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ClientEventInfo.scala deleted file mode 100644 index f78750ca0..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ClientEventInfo.scala +++ /dev/null @@ -1,29 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -trait HasClientEventInfo { - def clientEventInfo: Option[ClientEventInfo] -} - -/** - * Information used to build Client Events - * @see [[http://go/client-events]] - */ -case class ClientEventInfo( - component: Option[String], - element: Option[String], - details: Option[ClientEventDetails], - action: Option[String], - entityToken: Option[String]) - -/** - * Additional client events fields - * - * @note if a field from [[http://go/client_app.thrift]] is needed but is not here - * contact the `#product-mixer` team to have it added. - */ -case class ClientEventDetails( - conversationDetails: Option[ConversationDetails], - timelinesDetails: Option[TimelinesDetails], - articleDetails: Option[ArticleDetails], - liveEventDetails: Option[LiveEventDetails], - commerceDetails: Option[CommerceDetails]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/CommerceDetails.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/CommerceDetails.docx new file mode 100644 index 000000000..6a427a47e Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/CommerceDetails.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/CommerceDetails.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/CommerceDetails.scala deleted file mode 100644 index 86cc9dc15..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/CommerceDetails.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -case class CommerceDetails( - dropId: Option[Long], - shopV2Id: Option[Long], - productKey: Option[Long], - merchantId: Option[Long], - productIndex: Option[Int]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConfirmationDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConfirmationDisplayType.docx new file mode 100644 index 000000000..d8d5a7749 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConfirmationDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConfirmationDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConfirmationDisplayType.scala deleted file mode 100644 index 66aed65f5..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConfirmationDisplayType.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -sealed trait ConfirmationDisplayType - -case object Inline extends ConfirmationDisplayType -case object BottomSheet extends ConfirmationDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConversationDetails.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConversationDetails.docx new file mode 100644 index 000000000..6f596726e Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConversationDetails.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConversationDetails.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConversationDetails.scala deleted file mode 100644 index be7a48935..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConversationDetails.scala +++ /dev/null @@ -1,3 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -case class ConversationDetails(conversationSection: Option[ConversationSection]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConversationSection.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConversationSection.docx new file mode 100644 index 000000000..99f595d14 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConversationSection.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConversationSection.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConversationSection.scala deleted file mode 100644 index 0ba7a68b4..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ConversationSection.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -sealed trait ConversationSection - -case object HighQuality extends ConversationSection -case object LowQuality extends ConversationSection -case object AbusiveQuality extends ConversationSection -case object RelatedTweet extends ConversationSection diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/DismissInfo.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/DismissInfo.docx new file mode 100644 index 000000000..6484f35a2 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/DismissInfo.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/DismissInfo.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/DismissInfo.scala deleted file mode 100644 index 3f11122ad..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/DismissInfo.scala +++ /dev/null @@ -1,3 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -case class DismissInfo(callbacks: Option[Seq[Callback]]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackAction.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackAction.docx new file mode 100644 index 000000000..651e74479 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackAction.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackAction.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackAction.scala deleted file mode 100644 index 753ae9ca8..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackAction.scala +++ /dev/null @@ -1,29 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -import com.twitter.product_mixer.core.model.marshalling.response.urt.icon.HorizonIcon - -case class FeedbackAction( - feedbackType: FeedbackType, - prompt: Option[String], - confirmation: Option[String], - childFeedbackActions: Option[Seq[ChildFeedbackAction]], - feedbackUrl: Option[String], - hasUndoAction: Option[Boolean], - confirmationDisplayType: Option[ConfirmationDisplayType], - clientEventInfo: Option[ClientEventInfo], - icon: Option[HorizonIcon], - richBehavior: Option[RichFeedbackBehavior], - subprompt: Option[String], - encodedFeedbackRequest: Option[String]) - -case class ChildFeedbackAction( - feedbackType: FeedbackType, - prompt: Option[String], - confirmation: Option[String], - feedbackUrl: Option[String], - hasUndoAction: Option[Boolean], - confirmationDisplayType: Option[ConfirmationDisplayType], - clientEventInfo: Option[ClientEventInfo], - icon: Option[HorizonIcon], - richBehavior: Option[RichFeedbackBehavior], - subprompt: Option[String]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackActionInfo.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackActionInfo.docx new file mode 100644 index 000000000..a71d8b149 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackActionInfo.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackActionInfo.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackActionInfo.scala deleted file mode 100644 index 1eebf6cf5..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackActionInfo.scala +++ /dev/null @@ -1,15 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -trait HasFeedbackActionInfo { - def feedbackActionInfo: Option[FeedbackActionInfo] -} - -trait ContainsFeedbackActionInfos { - def feedbackActionInfos: Seq[Option[FeedbackActionInfo]] -} - -case class FeedbackActionInfo( - feedbackActions: Seq[FeedbackAction], - feedbackMetadata: Option[String], - displayContext: Option[FeedbackDisplayContext], - clientEventInfo: Option[ClientEventInfo]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackInfo.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackInfo.docx new file mode 100644 index 000000000..9ec2fcf37 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackInfo.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackInfo.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackInfo.scala deleted file mode 100644 index e257b909b..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackInfo.scala +++ /dev/null @@ -1,13 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -trait HasFeedbackInfo { - def feedbackInfo: Option[FeedbackInfo] -} - -case class FeedbackDisplayContext(reason: String) - -case class FeedbackInfo( - feedbackKeys: Seq[String], - feedbackMetadata: Option[String], - displayContext: Option[FeedbackDisplayContext], - clientEventInfo: Option[ClientEventInfo]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackType.docx new file mode 100644 index 000000000..026778d0d Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackType.scala deleted file mode 100644 index df2c274b5..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/FeedbackType.scala +++ /dev/null @@ -1,18 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -sealed trait FeedbackType - -case object Dismiss extends FeedbackType -case object SeeFewer extends FeedbackType -case object DontLike extends FeedbackType -case object NotRelevant extends FeedbackType -case object SeeMore extends FeedbackType -case object NotCredible extends FeedbackType -case object GiveFeedback extends FeedbackType -case object NotRecent extends FeedbackType -case object UnfollowEntity extends FeedbackType -case object Relevant extends FeedbackType -case object Moderate extends FeedbackType -case object RichBehavior extends FeedbackType -case object NotAboutTopic extends FeedbackType -case object Generic extends FeedbackType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageAnimationType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageAnimationType.docx new file mode 100644 index 000000000..e8bccaa24 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageAnimationType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageAnimationType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageAnimationType.scala deleted file mode 100644 index 143af16c9..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageAnimationType.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -sealed trait ImageAnimationType - -case object Bounce extends ImageAnimationType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageDisplayType.docx new file mode 100644 index 000000000..49d5e7485 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageDisplayType.scala deleted file mode 100644 index 79008df60..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageDisplayType.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -sealed trait ImageDisplayType - -case object Icon extends ImageDisplayType -case object FullWidth extends ImageDisplayType -case object IconSmall extends ImageDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageVariant.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageVariant.docx new file mode 100644 index 000000000..828a591a2 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageVariant.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageVariant.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageVariant.scala deleted file mode 100644 index 08b57a66e..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ImageVariant.scala +++ /dev/null @@ -1,9 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -import com.twitter.product_mixer.core.model.marshalling.response.urt.color.ColorPalette - -case class ImageVariant( - url: String, - width: Int, - height: Int, - palette: Option[List[ColorPalette]]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/LiveEventDetails.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/LiveEventDetails.docx new file mode 100644 index 000000000..a1ae970e1 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/LiveEventDetails.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/LiveEventDetails.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/LiveEventDetails.scala deleted file mode 100644 index 931c98bba..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/LiveEventDetails.scala +++ /dev/null @@ -1,3 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -case class LiveEventDetails(eventId: Option[Long]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/MarkUnreadableEntry.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/MarkUnreadableEntry.docx new file mode 100644 index 000000000..2b778da72 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/MarkUnreadableEntry.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/MarkUnreadableEntry.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/MarkUnreadableEntry.scala deleted file mode 100644 index f26eed533..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/MarkUnreadableEntry.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -// Track unread entries for the MarkUnread URT instruction. -trait MarkUnreadableEntry { - def isMarkUnread: Option[Boolean] = None -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/PinnableEntry.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/PinnableEntry.docx new file mode 100644 index 000000000..2e9cfaa71 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/PinnableEntry.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/PinnableEntry.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/PinnableEntry.scala deleted file mode 100644 index f99565d8f..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/PinnableEntry.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -trait PinnableEntry { - def isPinned: Option[Boolean] = None -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ReplaceableEntry.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ReplaceableEntry.docx new file mode 100644 index 000000000..3d4daeea3 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ReplaceableEntry.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ReplaceableEntry.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ReplaceableEntry.scala deleted file mode 100644 index 2fc7442b5..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ReplaceableEntry.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -trait ReplaceableEntry { - def entryIdToReplace: Option[String] = None -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ReplyPinState.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ReplyPinState.docx new file mode 100644 index 000000000..0363b0a75 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ReplyPinState.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ReplyPinState.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ReplyPinState.scala deleted file mode 100644 index 83a056bf7..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/ReplyPinState.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -sealed trait ReplyPinState - -object PinnedReplyPinState extends ReplyPinState -object PinnableReplyPinState extends ReplyPinState -object NotPinnableReplyPinState extends ReplyPinState diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/RichFeedbackBehavior.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/RichFeedbackBehavior.docx new file mode 100644 index 000000000..38fcaf2f6 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/RichFeedbackBehavior.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/RichFeedbackBehavior.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/RichFeedbackBehavior.scala deleted file mode 100644 index 2ae86471f..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/RichFeedbackBehavior.scala +++ /dev/null @@ -1,15 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -sealed trait RichFeedbackBehavior - -case class RichFeedbackBehaviorReportList(listId: Long, userId: Long) extends RichFeedbackBehavior -case class RichFeedbackBehaviorBlockUser(userId: Long) extends RichFeedbackBehavior -case class RichFeedbackBehaviorToggleFollowTopic(topicId: Long) extends RichFeedbackBehavior -case class RichFeedbackBehaviorToggleFollowTopicV2(topicId: String) extends RichFeedbackBehavior -case class RichFeedbackBehaviorToggleMuteList(listId: Long) extends RichFeedbackBehavior -case class RichFeedbackBehaviorMarkNotInterestedTopic(topicId: String) extends RichFeedbackBehavior -case class RichFeedbackBehaviorReplyPinState(replyPinState: ReplyPinState) - extends RichFeedbackBehavior -case class RichFeedbackBehaviorToggleMuteUser(userId: Long) extends RichFeedbackBehavior -case class RichFeedbackBehaviorToggleFollowUser(userId: Long) extends RichFeedbackBehavior -case class RichFeedbackBehaviorReportTweet(entryId: Long) extends RichFeedbackBehavior diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/SocialContext.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/SocialContext.docx new file mode 100644 index 000000000..307a7904c Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/SocialContext.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/SocialContext.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/SocialContext.scala deleted file mode 100644 index ed6fc2652..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/SocialContext.scala +++ /dev/null @@ -1,49 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -sealed trait SocialContext - -trait HasSocialContext { - def socialContext: Option[SocialContext] -} - -sealed trait GeneralContextType -case object LikeGeneralContextType extends GeneralContextType -case object FollowGeneralContextType extends GeneralContextType -case object MomentGeneralContextType extends GeneralContextType -case object ReplyGeneralContextType extends GeneralContextType -case object ConversationGeneralContextType extends GeneralContextType -case object PinGeneralContextType extends GeneralContextType -case object TextOnlyGeneralContextType extends GeneralContextType -case object FacePileGeneralContextType extends GeneralContextType -case object MegaPhoneGeneralContextType extends GeneralContextType -case object BirdGeneralContextType extends GeneralContextType -case object FeedbackGeneralContextType extends GeneralContextType -case object TopicGeneralContextType extends GeneralContextType -case object ListGeneralContextType extends GeneralContextType -case object RetweetGeneralContextType extends GeneralContextType -case object LocationGeneralContextType extends GeneralContextType -case object CommunityGeneralContextType extends GeneralContextType -case object NewUserGeneralContextType extends GeneralContextType -case object SmartblockExpirationGeneralContextType extends GeneralContextType -case object TrendingGeneralContextType extends GeneralContextType -case object SparkleGeneralContextType extends GeneralContextType -case object SpacesGeneralContextType extends GeneralContextType -case object ReplyPinGeneralContextType extends GeneralContextType - -case class GeneralContext( - contextType: GeneralContextType, - text: String, - url: Option[String], - contextImageUrls: Option[List[String]], - landingUrl: Option[Url]) - extends SocialContext - -sealed trait TopicContextFunctionalityType -case object BasicTopicContextFunctionalityType extends TopicContextFunctionalityType -case object RecommendationTopicContextFunctionalityType extends TopicContextFunctionalityType -case object RecWithEducationTopicContextFunctionalityType extends TopicContextFunctionalityType - -case class TopicContext( - topicId: String, - functionalityType: Option[TopicContextFunctionalityType]) - extends SocialContext diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/TimelinesDetails.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/TimelinesDetails.docx new file mode 100644 index 000000000..1fa123d8e Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/TimelinesDetails.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/TimelinesDetails.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/TimelinesDetails.scala deleted file mode 100644 index 57f6fd58a..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/TimelinesDetails.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -case class TimelinesDetails( - injectionType: Option[String], - controllerData: Option[String], - sourceData: Option[String]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Url.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Url.docx new file mode 100644 index 000000000..3c1ab2e5d Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Url.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Url.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Url.scala deleted file mode 100644 index 112b278d7..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata/Url.scala +++ /dev/null @@ -1,17 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.metadata - -import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.ReferenceObject - -sealed trait UrlType -case object ExternalUrl extends UrlType -case object DeepLink extends UrlType -case object UrtEndpoint extends UrlType - -case class UrtEndpointOptions( - requestParams: Option[Map[String, String]], - title: Option[String], - cacheId: Option[String], - subtitle: Option[String]) - -case class Url(urlType: UrlType, url: String, urtEndpointOptions: Option[UrtEndpointOptions] = None) - extends ReferenceObject diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/BUILD deleted file mode 100644 index 25898763c..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/BUILD +++ /dev/null @@ -1,15 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata", - ], - exports = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata", - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/BUILD.docx new file mode 100644 index 000000000..bda3dc20f Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorDisplayTreatment.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorDisplayTreatment.docx new file mode 100644 index 000000000..bcaa9f48b Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorDisplayTreatment.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorDisplayTreatment.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorDisplayTreatment.scala deleted file mode 100644 index babf20ea6..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorDisplayTreatment.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.operation - -case class CursorDisplayTreatment( - actionText: Option[String], - labelText: Option[String]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorItem.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorItem.docx new file mode 100644 index 000000000..1f648a9b0 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorItem.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorItem.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorItem.scala deleted file mode 100644 index 0ea733c08..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorItem.scala +++ /dev/null @@ -1,31 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.operation - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo -import com.twitter.product_mixer.core.model.marshalling.response.urt.operation.CursorOperation.CursorEntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem - -/** - * CursorItem should only be used for Module cursors - * For timeline cursors, see - * [[com.twitter.product_mixer.core.model.marshalling.response.urt.operation.CursorOperation]] - */ -case class CursorItem( - override val id: Long, - override val sortIndex: Option[Long], - override val clientEventInfo: Option[ClientEventInfo], - override val feedbackActionInfo: Option[FeedbackActionInfo], - value: String, - cursorType: CursorType, - displayTreatment: Option[CursorDisplayTreatment]) - extends TimelineItem { - - override val entryNamespace: EntryNamespace = CursorEntryNamespace - - override lazy val entryIdentifier: String = - s"$entryNamespace-${cursorType.entryNamespace}-$id" - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorOperation.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorOperation.docx new file mode 100644 index 000000000..6dde0015d Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorOperation.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorOperation.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorOperation.scala deleted file mode 100644 index 9bcf0a1d1..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorOperation.scala +++ /dev/null @@ -1,31 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.operation - -import com.twitter.product_mixer.core.model.marshalling.response.urt.operation.CursorOperation.CursorEntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry -import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineOperation - -object CursorOperation { - val CursorEntryNamespace = EntryNamespace("cursor") - - private def entryIdentifier(cursorType: CursorType, identifier: Long): String = - s"$CursorEntryNamespace-${cursorType.entryNamespace.toString}-$identifier" -} - -case class CursorOperation( - override val id: Long, - override val sortIndex: Option[Long], - value: String, - cursorType: CursorType, - displayTreatment: Option[CursorDisplayTreatment], - idToReplace: Option[Long]) - extends TimelineOperation { - override val entryNamespace: EntryNamespace = CursorEntryNamespace - - override lazy val entryIdentifier: String = CursorOperation.entryIdentifier(cursorType, id) - - override def entryIdToReplace: Option[String] = - idToReplace.map(CursorOperation.entryIdentifier(cursorType, _)) - - override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorType.docx new file mode 100644 index 000000000..512f55027 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorType.scala deleted file mode 100644 index 298a24052..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/operation/CursorType.scala +++ /dev/null @@ -1,37 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.operation - -import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace -import com.twitter.product_mixer.core.model.marshalling.response.urt.HasEntryNamespace - -sealed trait CursorType extends HasEntryNamespace - -case object TopCursor extends CursorType { - override val entryNamespace: EntryNamespace = EntryNamespace("top") -} -case object BottomCursor extends CursorType { - override val entryNamespace: EntryNamespace = EntryNamespace("bottom") -} -case object GapCursor extends CursorType { - override val entryNamespace: EntryNamespace = EntryNamespace("gap") -} -case object PivotCursor extends CursorType { - override val entryNamespace: EntryNamespace = EntryNamespace("pivot") -} -case object SubBranchCursor extends CursorType { - override val entryNamespace: EntryNamespace = EntryNamespace("subbranch") -} -case object ShowMoreCursor extends CursorType { - override val entryNamespace: EntryNamespace = EntryNamespace("showmore") -} -case object ShowMoreThreadsCursor extends CursorType { - override val entryNamespace: EntryNamespace = EntryNamespace("showmorethreads") -} -case object ShowMoreThreadsPromptCursor extends CursorType { - override val entryNamespace: EntryNamespace = EntryNamespace("showmorethreadsprompt") -} -case object SecondRepliesSectionCursor extends CursorType { - override val entryNamespace: EntryNamespace = EntryNamespace("secondrepliessection") -} -case object ThirdRepliesSectionCursor extends CursorType { - override val entryNamespace: EntryNamespace = EntryNamespace("thirdrepliessection") -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/AdMetadataContainer.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/AdMetadataContainer.docx new file mode 100644 index 000000000..9ef65978f Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/AdMetadataContainer.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/AdMetadataContainer.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/AdMetadataContainer.scala deleted file mode 100644 index 756c2ceb3..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/AdMetadataContainer.scala +++ /dev/null @@ -1,11 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -case class AdMetadataContainer( - removePromotedAttributionForPreroll: Option[Boolean], - sponsorshipCandidate: Option[String], - sponsorshipOrganization: Option[String], - sponsorshipOrganizationWebsite: Option[String], - sponsorshipType: Option[SponsorshipType], - disclaimerType: Option[DisclaimerType], - skAdNetworkDataList: Option[Seq[SkAdNetworkData]], - unifiedCardOverride: Option[String]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/BUILD deleted file mode 100644 index 7ef37be56..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/BUILD +++ /dev/null @@ -1,11 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - ], - exports = [ - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/BUILD.docx new file mode 100644 index 000000000..cb2b72de3 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/CallToAction.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/CallToAction.docx new file mode 100644 index 000000000..4806fed9b Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/CallToAction.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/CallToAction.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/CallToAction.scala deleted file mode 100644 index 4cabb4855..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/CallToAction.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -case class CallToAction( - callToActionType: Option[String], - url: Option[String]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/ClickTrackingInfo.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/ClickTrackingInfo.docx new file mode 100644 index 000000000..b8e647254 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/ClickTrackingInfo.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/ClickTrackingInfo.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/ClickTrackingInfo.scala deleted file mode 100644 index a29da2634..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/ClickTrackingInfo.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -import scala.collection.Map - -case class ClickTrackingInfo( - urlParams: Map[String, String], - urlOverride: Option[String], - urlOverrideType: Option[UrlOverrideType]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DisclaimerType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DisclaimerType.docx new file mode 100644 index 000000000..51e3c514e Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DisclaimerType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DisclaimerType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DisclaimerType.scala deleted file mode 100644 index 72508ccd4..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DisclaimerType.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -sealed trait DisclaimerType - -object DisclaimerPolitical extends DisclaimerType -object DisclaimerIssue extends DisclaimerType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DisclosureType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DisclosureType.docx new file mode 100644 index 000000000..9260241da Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DisclosureType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DisclosureType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DisclosureType.scala deleted file mode 100644 index 624c871b3..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DisclosureType.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -sealed trait DisclosureType - -case object NoDisclosure extends DisclosureType -case object Political extends DisclosureType -case object Earned extends DisclosureType -case object Issue extends DisclosureType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DynamicPrerollType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DynamicPrerollType.docx new file mode 100644 index 000000000..ad1dcbc8d Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DynamicPrerollType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DynamicPrerollType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DynamicPrerollType.scala deleted file mode 100644 index c4a7c3306..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/DynamicPrerollType.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -sealed trait DynamicPrerollType - -object Amplify extends DynamicPrerollType -object Marketplace extends DynamicPrerollType -object LiveTvEvent extends DynamicPrerollType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/MediaInfo.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/MediaInfo.docx new file mode 100644 index 000000000..f714ff5aa Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/MediaInfo.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/MediaInfo.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/MediaInfo.scala deleted file mode 100644 index 5e2eb001d..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/MediaInfo.scala +++ /dev/null @@ -1,11 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -case class MediaInfo( - uuid: Option[String], - publisherId: Option[Long], - callToAction: Option[CallToAction], - durationMillis: Option[Int], - videoVariants: Option[Seq[VideoVariant]], - advertiserName: Option[String], - renderAdByAdvertiserName: Option[Boolean], - advertiserProfileImageUrl: Option[String]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/Preroll.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/Preroll.docx new file mode 100644 index 000000000..fa824e376 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/Preroll.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/Preroll.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/Preroll.scala deleted file mode 100644 index 51e83da8b..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/Preroll.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -case class Preroll( - prerollId: Option[String], - dynamicPrerollType: Option[DynamicPrerollType], - mediaInfo: Option[MediaInfo]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/PrerollMetadata.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/PrerollMetadata.docx new file mode 100644 index 000000000..b4c6bad25 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/PrerollMetadata.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/PrerollMetadata.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/PrerollMetadata.scala deleted file mode 100644 index ee7a72940..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/PrerollMetadata.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -case class PrerollMetadata( - preroll: Option[Preroll], - videoAnalyticsScribePassthrough: Option[String]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/PromotedMetadata.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/PromotedMetadata.docx new file mode 100644 index 000000000..6756c5be2 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/PromotedMetadata.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/PromotedMetadata.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/PromotedMetadata.scala deleted file mode 100644 index 1fa5ff04a..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/PromotedMetadata.scala +++ /dev/null @@ -1,23 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -/* - * As per discussion with #revenue-serving on 9/22/2017, `impressionId` should be set from `impressionString`. - * impressionId often returns None from adserver, as it's been replaced with impressionString. - * - * However, Android (at least) crashes without impressionId filled out in the response. - * - * So, we've removed `impressionId` from this case class, and our marshaller will set both `impressionId` - * and `impressionString` in the render thrift from `impressionString`. - */ - -case class PromotedMetadata( - advertiserId: Long, - disclosureType: Option[DisclosureType], - experimentValues: Option[Map[String, String]], - promotedTrendId: Option[Long], - promotedTrendName: Option[String], - promotedTrendQueryTerm: Option[String], - adMetadataContainer: Option[AdMetadataContainer], - promotedTrendDescription: Option[String], - impressionString: Option[String], - clickTrackingInfo: Option[ClickTrackingInfo]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/SkAdNetworkData.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/SkAdNetworkData.docx new file mode 100644 index 000000000..f254268b1 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/SkAdNetworkData.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/SkAdNetworkData.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/SkAdNetworkData.scala deleted file mode 100644 index a5ab45755..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/SkAdNetworkData.scala +++ /dev/null @@ -1,13 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -case class SkAdNetworkData( - version: Option[String], // version of the SKAdNetwork protocol - srcAppId: Option[String], // app showing the ad (Twitter app or app promoting through MOPUB) - dstAppId: Option[String], // app being promoted - adNetworkId: Option[String], // the ad-network-id being used - campaignId: Option[Long], // the sk-campaign-id - different from the Twitter campaign id - impressionTimeInMillis: Option[Long], // the timestamp of the impression - nonce: Option[String], // nonce used to generate the signature - signature: Option[String], // the signed payload - fidelityType: Option[Long] // th -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/SponsorshipType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/SponsorshipType.docx new file mode 100644 index 000000000..fc6e0c403 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/SponsorshipType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/SponsorshipType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/SponsorshipType.scala deleted file mode 100644 index 5594450d5..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/SponsorshipType.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -sealed trait SponsorshipType - -case object DirectSponsorshipType extends SponsorshipType -case object IndirectSponsorshipType extends SponsorshipType -case object NoSponsorshipSponsorshipType extends SponsorshipType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/UrlOverrideType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/UrlOverrideType.docx new file mode 100644 index 000000000..d3831fc55 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/UrlOverrideType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/UrlOverrideType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/UrlOverrideType.scala deleted file mode 100644 index 86730c18d..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/UrlOverrideType.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -sealed trait UrlOverrideType - -object UnknownUrlOverrideType extends UrlOverrideType -object DcmUrlOverrideType extends UrlOverrideType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/VideoVariant.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/VideoVariant.docx new file mode 100644 index 000000000..170cae94b Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/VideoVariant.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/VideoVariant.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/VideoVariant.scala deleted file mode 100644 index c4b56034a..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted/VideoVariant.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.promoted - -case class VideoVariant( - url: Option[String], - contentType: Option[String], - bitrate: Option[Int]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/BUILD deleted file mode 100644 index 7ef37be56..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/BUILD +++ /dev/null @@ -1,11 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - ], - exports = [ - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/BUILD.docx new file mode 100644 index 000000000..cb2b72de3 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/TimelineReaction.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/TimelineReaction.docx new file mode 100644 index 000000000..82fd654a9 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/TimelineReaction.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/TimelineReaction.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/TimelineReaction.scala deleted file mode 100644 index 0dd5fe4a8..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/TimelineReaction.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.reaction - -case class TimelineReaction( - execution: TimelineReactionExecution, - maxExecutionCount: Option[Short]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/TimelineReactionExecution.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/TimelineReactionExecution.docx new file mode 100644 index 000000000..c2645c1b8 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/TimelineReactionExecution.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/TimelineReactionExecution.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/TimelineReactionExecution.scala deleted file mode 100644 index d2785b2cb..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction/TimelineReactionExecution.scala +++ /dev/null @@ -1,10 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.reaction - -sealed abstract class TimelineReactionExecution - -case class ImmediateTimelineReaction(key: String) extends TimelineReactionExecution - -case class RemoteTimelineReaction( - requestParams: Map[String, String], - timeoutInSeconds: Option[Short]) - extends TimelineReactionExecution diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/BUILD deleted file mode 100644 index 7ef37be56..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/BUILD +++ /dev/null @@ -1,11 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - ], - exports = [ - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/BUILD.docx new file mode 100644 index 000000000..cb2b72de3 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/ReferenceObject.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/ReferenceObject.docx new file mode 100644 index 000000000..1b6d5f091 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/ReferenceObject.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/ReferenceObject.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/ReferenceObject.scala deleted file mode 100644 index 5f4d808a7..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/ReferenceObject.scala +++ /dev/null @@ -1,9 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.richtext - -trait ReferenceObject - -case class RichTextUser(id: Long) extends ReferenceObject -case class RichTextMention(id: Long, screenName: String) extends ReferenceObject -case class RichTextHashtag(text: String) extends ReferenceObject -case class RichTextCashtag(text: String) extends ReferenceObject -case class RichTextList(id: Long, url: String) extends ReferenceObject diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichText.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichText.docx new file mode 100644 index 000000000..09f303087 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichText.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichText.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichText.scala deleted file mode 100644 index 8ff4a2788..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichText.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.richtext - -case class RichText( - text: String, - entities: List[RichTextEntity], - rtl: Option[Boolean], - alignment: Option[RichTextAlignment]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextAlignment.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextAlignment.docx new file mode 100644 index 000000000..f3bfcef00 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextAlignment.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextAlignment.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextAlignment.scala deleted file mode 100644 index fe18486bc..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextAlignment.scala +++ /dev/null @@ -1,6 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.richtext - -sealed trait RichTextAlignment - -case object Natural extends RichTextAlignment -case object Center extends RichTextAlignment diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextEntity.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextEntity.docx new file mode 100644 index 000000000..222fdfe34 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextEntity.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextEntity.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextEntity.scala deleted file mode 100644 index a3a577a80..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextEntity.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.richtext - -case class RichTextEntity( - fromIndex: Int, - toIndex: Int, - ref: Option[ReferenceObject], - format: Option[RichTextFormat]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextFormat.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextFormat.docx new file mode 100644 index 000000000..126e61f87 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextFormat.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextFormat.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextFormat.scala deleted file mode 100644 index da8afe13a..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext/RichTextFormat.scala +++ /dev/null @@ -1,13 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.richtext - -sealed trait RichTextFormat { - def name: String -} - -case object Plain extends RichTextFormat { - override val name: String = "Plain" -} - -case object Strong extends RichTextFormat { - override val name: String = "Strong" -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/AdsMetadata.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/AdsMetadata.docx new file mode 100644 index 000000000..8fc3f9829 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/AdsMetadata.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/AdsMetadata.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/AdsMetadata.scala deleted file mode 100644 index b1f77a489..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/AdsMetadata.scala +++ /dev/null @@ -1,3 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module - -case class AdsMetadata(carouselId: Option[Long]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/BUILD deleted file mode 100644 index bac59b4cb..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/BUILD +++ /dev/null @@ -1,13 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata", - ], - exports = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata", - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/BUILD.docx new file mode 100644 index 000000000..7e465df93 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/GridCarouselMetadata.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/GridCarouselMetadata.docx new file mode 100644 index 000000000..2ca9e5616 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/GridCarouselMetadata.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/GridCarouselMetadata.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/GridCarouselMetadata.scala deleted file mode 100644 index f596e1b10..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/GridCarouselMetadata.scala +++ /dev/null @@ -1,3 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module - -case class GridCarouselMetadata(numRows: Option[Int]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleConversationMetadata.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleConversationMetadata.docx new file mode 100644 index 000000000..5350e23bf Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleConversationMetadata.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleConversationMetadata.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleConversationMetadata.scala deleted file mode 100644 index 03826fb33..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleConversationMetadata.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.SocialContext - -case class ModuleConversationMetadata( - allTweetIds: Option[Seq[Long]], - socialContext: Option[SocialContext], - enableDeduplication: Option[Boolean]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleDisplayType.docx new file mode 100644 index 000000000..a9fcd0bd5 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleDisplayType.scala deleted file mode 100644 index 9b5d3e5a0..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleDisplayType.scala +++ /dev/null @@ -1,12 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module - -sealed trait ModuleDisplayType - -case object Carousel extends ModuleDisplayType -case object CompactCarousel extends ModuleDisplayType -case object ConversationTree extends ModuleDisplayType -case object GridCarousel extends ModuleDisplayType -case object Vertical extends ModuleDisplayType -case object VerticalConversation extends ModuleDisplayType -case object VerticalGrid extends ModuleDisplayType -case object VerticalWithContextLine extends ModuleDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleFooter.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleFooter.docx new file mode 100644 index 000000000..a994bc692 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleFooter.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleFooter.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleFooter.scala deleted file mode 100644 index 826df3bc0..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleFooter.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module - -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url - -case class ModuleFooter( - text: String, - landingUrl: Option[Url]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleHeader.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleHeader.docx new file mode 100644 index 000000000..9b473cc2c Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleHeader.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleHeader.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleHeader.scala deleted file mode 100644 index 06f7bd14c..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleHeader.scala +++ /dev/null @@ -1,13 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module - -import com.twitter.product_mixer.core.model.marshalling.response.urt.icon.HorizonIcon -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageVariant -import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.SocialContext - -case class ModuleHeader( - text: String, - sticky: Option[Boolean], - icon: Option[HorizonIcon], - customIcon: Option[ImageVariant], - socialContext: Option[SocialContext], - moduleHeaderDisplayType: ModuleHeaderDisplayType) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleHeaderDisplayType.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleHeaderDisplayType.docx new file mode 100644 index 000000000..84d141431 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleHeaderDisplayType.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleHeaderDisplayType.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleHeaderDisplayType.scala deleted file mode 100644 index 1f0088c4a..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleHeaderDisplayType.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module - -sealed trait ModuleHeaderDisplayType - -case object Classic extends ModuleHeaderDisplayType -case object ContextEmphasis extends ModuleHeaderDisplayType -case object ClassicNoDivider extends ModuleHeaderDisplayType diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleMetadata.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleMetadata.docx new file mode 100644 index 000000000..d81ca2e7d Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleMetadata.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleMetadata.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleMetadata.scala deleted file mode 100644 index 5d840f3da..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleMetadata.scala +++ /dev/null @@ -1,11 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module - -object ModuleMetadata { - def isConversationModule(moduleMetadata: Option[ModuleMetadata]): Boolean = - moduleMetadata.map(_.conversationMetadata).isDefined -} - -case class ModuleMetadata( - adsMetadata: Option[AdsMetadata], - conversationMetadata: Option[ModuleConversationMetadata], - gridCarouselMetadata: Option[GridCarouselMetadata]) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleShowMoreBehavior.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleShowMoreBehavior.docx new file mode 100644 index 000000000..70dd647db Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleShowMoreBehavior.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleShowMoreBehavior.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleShowMoreBehavior.scala deleted file mode 100644 index c7e3ae3f6..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/timeline_module/ModuleShowMoreBehavior.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module - -sealed trait ModuleShowMoreBehavior - -case class ModuleShowMoreBehaviorRevealByCount( - initialItemsCount: Int, - showMoreItemsCount: Int) - extends ModuleShowMoreBehavior diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ABDeciderModule.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ABDeciderModule.docx new file mode 100644 index 000000000..7a583543c Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ABDeciderModule.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ABDeciderModule.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ABDeciderModule.scala deleted file mode 100644 index e695dcede..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ABDeciderModule.scala +++ /dev/null @@ -1,51 +0,0 @@ -package com.twitter.product_mixer.core.module - -import com.google.inject.Provides -import com.twitter.abdecider.ABDeciderFactory -import com.twitter.abdecider.LoggingABDecider -import com.twitter.finagle.stats.StatsReceiver -import com.twitter.inject.TwitterModule -import com.twitter.inject.annotations.Flag -import com.twitter.logging._ -import com.twitter.product_mixer.core.module.product_mixer_flags.ProductMixerFlagModule.ScribeABImpressions -import javax.inject.Singleton - -object ABDeciderModule extends TwitterModule { - private val YmlPath = "/usr/local/config/abdecider/abdecider.yml" - - @Provides - @Singleton - def provideLoggingABDecider( - @Flag(ScribeABImpressions) isScribeAbImpressions: Boolean, - stats: StatsReceiver - ): LoggingABDecider = { - val clientEventsHandler: HandlerFactory = - if (isScribeAbImpressions) { - QueueingHandler( - maxQueueSize = 10000, - handler = ScribeHandler( - category = "client_event", - formatter = BareFormatter, - level = Some(Level.INFO), - statsReceiver = stats.scope("abdecider")) - ) - } else { () => - NullHandler - } - - val factory = LoggerFactory( - node = "abdecider", - level = Some(Level.INFO), - useParents = false, - handlers = clientEventsHandler :: Nil - ) - - val abDeciderFactory = ABDeciderFactory( - abDeciderYmlPath = YmlPath, - scribeLogger = Some(factory()), - environment = Some("production") - ) - - abDeciderFactory.buildWithLogging() - } -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/BUILD deleted file mode 100644 index 846bbbacc..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/BUILD +++ /dev/null @@ -1,49 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "3rdparty/jvm/com/google/inject:guice", - "3rdparty/jvm/com/google/inject/extensions:guice-assistedinject", - "3rdparty/jvm/net/codingwell:scala-guice", - "3rdparty/jvm/org/slf4j:slf4j-api", - "abdecider", - "decider", - "featureswitches/featureswitches-core/src/main/scala/com/twitter/featureswitches/v2/builder", - "finatra-internal/decider/src/main/scala", - "finatra-internal/international/src/main/scala/com/twitter/finatra/international/modules", - "finatra-internal/mtls-thriftmux/src/main/scala", - "finatra/inject/inject-core/src/main/scala", - "finatra/inject/inject-thrift-client/src/main/scala", - "finatra/jackson/src/main/scala/com/twitter/finatra/jackson/modules", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/functional_component/configapi", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags", - "servo/decider", - "strato/src/main/scala/com/twitter/strato/client", - "timelines/src/main/scala/com/twitter/timelines/features/app", - "util-internal/scribe", - "util/util-slf4j-api/src/main/scala", - ], - exports = [ - "3rdparty/jvm/com/google/inject:guice", - "3rdparty/jvm/com/google/inject/extensions:guice-assistedinject", - "3rdparty/jvm/net/codingwell:scala-guice", - "3rdparty/jvm/org/slf4j:slf4j-api", - "abdecider", - "decider", - "finatra-internal/decider/src/main/scala", - "finatra-internal/international/src/main/scala/com/twitter/finatra/international/modules", - "finatra-internal/mtls-thriftmux/src/main/scala", - "finatra/inject/inject-core/src/main/scala", - "finatra/inject/inject-thrift-client/src/main/scala", - "finatra/jackson/src/main/scala/com/twitter/finatra/jackson/modules", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/functional_component/configapi", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags", - "servo/decider", - "timelines/src/main/scala/com/twitter/timelines/features/app", - "util-internal/scribe", - "util/util-slf4j-api/src/main/scala", - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/BUILD.docx new file mode 100644 index 000000000..61464b1c6 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ConfigApiModule.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ConfigApiModule.docx new file mode 100644 index 000000000..5ffc7f4da Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ConfigApiModule.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ConfigApiModule.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ConfigApiModule.scala deleted file mode 100644 index c7b1bec0b..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ConfigApiModule.scala +++ /dev/null @@ -1,21 +0,0 @@ -package com.twitter.product_mixer.core.module - -import com.google.inject.Provides -import com.twitter.decider.Decider -import com.twitter.inject.TwitterModule -import com.twitter.product_mixer.core.functional_component.configapi.ConfigBuilder -import com.twitter.servo.decider.DeciderGateBuilder -import com.twitter.timelines.configapi.Config -import javax.inject.Singleton - -object ConfigApiModule extends TwitterModule { - - @Provides - @Singleton - def providesDeciderGateBuilder(decider: Decider): DeciderGateBuilder = - new DeciderGateBuilder(decider) - - @Provides - @Singleton - def providesConfig(configBuilder: ConfigBuilder): Config = configBuilder.build() -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/FeatureSwitchesModule.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/FeatureSwitchesModule.docx new file mode 100644 index 000000000..d995266ca Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/FeatureSwitchesModule.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/FeatureSwitchesModule.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/FeatureSwitchesModule.scala deleted file mode 100644 index c2f615696..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/FeatureSwitchesModule.scala +++ /dev/null @@ -1,53 +0,0 @@ -package com.twitter.product_mixer.core.module - -import com.google.inject.Provides -import com.twitter.abdecider.LoggingABDecider -import com.twitter.featureswitches.v2.FeatureSwitches -import com.twitter.featureswitches.v2.builder.FeatureSwitchesBuilder -import com.twitter.finagle.stats.StatsReceiver -import com.twitter.inject.TwitterModule -import com.twitter.inject.annotations.Flag -import com.twitter.product_mixer.core.module.product_mixer_flags.ProductMixerFlagModule.ConfigRepoLocalPath -import com.twitter.product_mixer.core.module.product_mixer_flags.ProductMixerFlagModule.FeatureSwitchesPath -import com.twitter.product_mixer.core.module.product_mixer_flags.ProductMixerFlagModule.ServiceLocal -import com.twitter.timelines.features.app.ForcibleFeatureValuesModule -import javax.inject.Singleton - -object FeatureSwitchesModule extends TwitterModule with ForcibleFeatureValuesModule { - private val DefaultConfigRepoPath = "/usr/local/config" - - @Provides - @Singleton - def providesFeatureSwitches( - abDecider: LoggingABDecider, - statsReceiver: StatsReceiver, - @Flag(ServiceLocal) isServiceLocal: Boolean, - @Flag(ConfigRepoLocalPath) localConfigRepoPath: String, - @Flag(FeatureSwitchesPath) featuresPath: String - ): FeatureSwitches = { - val configRepoPath = if (isServiceLocal) { - localConfigRepoPath - } else { - DefaultConfigRepoPath - } - - val baseBuilder = FeatureSwitchesBuilder - .createDefault(featuresPath, abDecider, Some(statsReceiver)) - .configRepoAbsPath(configRepoPath) - .forcedValues(getFeatureSwitchOverrides) - // Track stats when an experiment impression is made. For example: - // "experiment_impressions/test_experiment_1234/" - // "experiment_impressions/test_experiment_1234/control" - // "experiment_impressions/test_experiment_1234/treatment" - .experimentImpressionStatsEnabled(true) - .unitsOfDiversionEnable(true) - - val finalBuilder = if (isServiceLocal) { - baseBuilder - } else { - baseBuilder.serviceDetailsFromAurora() - } - - finalBuilder.build() - } -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/LoggingThrowableExceptionMapper.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/LoggingThrowableExceptionMapper.docx new file mode 100644 index 000000000..2802da742 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/LoggingThrowableExceptionMapper.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/LoggingThrowableExceptionMapper.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/LoggingThrowableExceptionMapper.scala deleted file mode 100644 index 0332e9819..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/LoggingThrowableExceptionMapper.scala +++ /dev/null @@ -1,24 +0,0 @@ -package com.twitter.product_mixer.core.module - -import com.twitter.finatra.thrift.exceptions.ExceptionMapper -import com.twitter.inject.Logging -import com.twitter.util.Future -import javax.inject.Singleton -import scala.util.control.NonFatal - -/** - * Similar to [[com.twitter.finatra.thrift.internal.exceptions.ThrowableExceptionMapper]] - * - * But this one also logs the exceptions. - */ -@Singleton -class LoggingThrowableExceptionMapper extends ExceptionMapper[Throwable, Nothing] with Logging { - - override def handleException(throwable: Throwable): Future[Nothing] = { - error("Unhandled Exception", throwable) - - throwable match { - case NonFatal(e) => Future.exception(e) - } - } -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/PipelineExecutionLoggerModule.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/PipelineExecutionLoggerModule.docx new file mode 100644 index 000000000..b6f379765 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/PipelineExecutionLoggerModule.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/PipelineExecutionLoggerModule.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/PipelineExecutionLoggerModule.scala deleted file mode 100644 index 3047135fa..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/PipelineExecutionLoggerModule.scala +++ /dev/null @@ -1,12 +0,0 @@ -package com.twitter.product_mixer.core.module - -import com.twitter.inject.TwitterModule -import com.twitter.product_mixer.core.service.pipeline_execution_logger.AllowListedPipelineExecutionLogger -import com.twitter.product_mixer.core.service.pipeline_execution_logger.PipelineExecutionLogger - -object PipelineExecutionLoggerModule extends TwitterModule { - - override protected def configure(): Unit = { - bind[PipelineExecutionLogger].to[AllowListedPipelineExecutionLogger] - } -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ProductMixerModule.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ProductMixerModule.docx new file mode 100644 index 000000000..dfa94829a Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ProductMixerModule.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ProductMixerModule.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ProductMixerModule.scala deleted file mode 100644 index 8c7f98eb8..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/ProductMixerModule.scala +++ /dev/null @@ -1,30 +0,0 @@ -package com.twitter.product_mixer.core.module - -import com.twitter.inject.TwitterModule -import com.twitter.product_mixer.core.module.product_mixer_flags.ProductMixerFlagModule -import com.twitter.finatra.decider.modules.DeciderModule -import com.twitter.finatra.international.modules.LanguagesModule -import com.twitter.product_mixer.core.product.guice.ProductScopeModule -import com.twitter.finatra.jackson.modules.ScalaObjectMapperModule -import com.twitter.inject.thrift.modules.ThriftClientIdModule - -/** - * ProductMixerModule provides modules required by all Product Mixer services. - * - * @note if your service calls Strato you will need to add the [[StratoClientModule]] yourself. - */ -object ProductMixerModule extends TwitterModule { - - override val modules = Seq( - ABDeciderModule, - ConfigApiModule, - DeciderModule, - FeatureSwitchesModule, - LanguagesModule, - PipelineExecutionLoggerModule, - ProductMixerFlagModule, - new ProductScopeModule(), - ScalaObjectMapperModule, - ThriftClientIdModule, - ) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/StratoClientModule.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/StratoClientModule.docx new file mode 100644 index 000000000..af12283e6 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/StratoClientModule.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/StratoClientModule.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/StratoClientModule.scala deleted file mode 100644 index fc5680aa1..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/StratoClientModule.scala +++ /dev/null @@ -1,39 +0,0 @@ -package com.twitter.product_mixer.core.module - -import com.google.inject.Provides -import com.twitter.finagle.mtls.authentication.ServiceIdentifier -import com.twitter.finagle.ssl.OpportunisticTls -import com.twitter.inject.TwitterModule -import com.twitter.inject.annotations.Flag -import com.twitter.product_mixer.core.module.product_mixer_flags.ProductMixerFlagModule.ServiceLocal -import com.twitter.product_mixer.core.module.product_mixer_flags.ProductMixerFlagModule.StratoLocalRequestTimeout -import com.twitter.strato.client.Client -import com.twitter.strato.client.Strato -import com.twitter.util.Duration -import javax.inject.Singleton - -/** - * Product Mixer prefers to use a single strato client module over having a variety with different - * timeouts. Latency Budgets in Product Mixer systems should be defined at the application layer. - */ -object StratoClientModule extends TwitterModule { - - @Provides - @Singleton - def providesStratoClient( - serviceIdentifier: ServiceIdentifier, - @Flag(ServiceLocal) isServiceLocal: Boolean, - @Flag(StratoLocalRequestTimeout) timeout: Option[Duration] - ): Client = { - val stratoClient = Strato.client.withMutualTls(serviceIdentifier, OpportunisticTls.Required) - - // For local development it can be useful to have a larger timeout than the Strato default of - // 280ms. We strongly discourage setting client-level timeouts outside of this use-case. We - // recommend setting an overall timeout for your pipeline's end-to-end running time. - if (isServiceLocal && timeout.isDefined) - stratoClient.withRequestTimeout(timeout.get).build() - else { - stratoClient.build() - } - } -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags/BUILD deleted file mode 100644 index 00b2668ca..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags/BUILD +++ /dev/null @@ -1,15 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "finatra/inject/inject-app/src/main/java/com/twitter/inject/annotations", - "finatra/inject/inject-core/src/main/scala", - ], - exports = [ - "finatra/inject/inject-app/src/main/java/com/twitter/inject/annotations", - "finatra/inject/inject-core/src/main/scala", - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags/BUILD.docx new file mode 100644 index 000000000..e45543650 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags/ProductMixerFlagModule.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags/ProductMixerFlagModule.docx new file mode 100644 index 000000000..ff5aae63c Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags/ProductMixerFlagModule.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags/ProductMixerFlagModule.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags/ProductMixerFlagModule.scala deleted file mode 100644 index 6426928be..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/product_mixer_flags/ProductMixerFlagModule.scala +++ /dev/null @@ -1,74 +0,0 @@ -package com.twitter.product_mixer.core.module.product_mixer_flags - -import com.twitter.inject.annotations.Flags -import com.twitter.inject.Injector -import com.twitter.inject.TwitterModule -import com.twitter.util.Duration - -object ProductMixerFlagModule extends TwitterModule { - final val ServiceLocal = "service.local" - final val ConfigRepoLocalPath = "configrepo.local_path" - final val FeatureSwitchesPath = "feature_switches.path" - final val StratoLocalRequestTimeout = "strato.local.request_timeout" - final val ScribeABImpressions = "scribe.ab_impressions" - final val PipelineExecutionLoggerAllowList = "pipeline_execution_logger.allow_list" - - flag[Boolean]( - name = ServiceLocal, - default = false, - help = "Is the server running locally or in a DC") - - flag[String]( - name = ConfigRepoLocalPath, - default = System.getProperty("user.home") + "/workspace/config", - help = "Path to your local config repo" - ) - - flag[Boolean]( - name = ScribeABImpressions, - help = "Enable scribing of AB impressions" - ) - - flag[String]( - name = FeatureSwitchesPath, - help = "Path to your local config repo" - ) - - flag[Duration]( - name = StratoLocalRequestTimeout, - help = "Override the request timeout for Strato when running locally" - ) - - flag[Seq[String]]( - name = PipelineExecutionLoggerAllowList, - default = Seq.empty, - help = - "Specify user role(s) for which detailed log messages (containing PII) can be made. Accepts a single role or a comma separated list 'a,b,c'" - ) - - /** - * Invoked at the end of server startup. - * - * If we're running locally, we display a nice message and a link to the admin page - */ - override def singletonPostWarmupComplete(injector: Injector): Unit = { - val isLocalService = injector.instance[Boolean](Flags.named(ServiceLocal)) - if (isLocalService) { - // Extract service name from clientId since there isn't a specific flag for that - val clientId = injector.instance[String](Flags.named("thrift.clientId")) - val name = clientId.split("\\.")(0) - - val adminPort = injector.instance[String](Flags.named("admin.port")) - val url = s"http://localhost$adminPort/" - - // Print instead of log, so it goes on stdout and doesn't get the logging decorations. - // Update our local development recipe (local-development.rst) if making changes to this - // message. - println("===============================================================================") - println(s"Welcome to a Product Mixer Service, $name") - println(s"You can view the admin endpoint and thrift web forms at $url") - println("Looking for support? Have questions? #product-mixer on Slack.") - println("===============================================================================") - } - } -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/stringcenter/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/stringcenter/BUILD deleted file mode 100644 index ad9cb35b3..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/stringcenter/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -scala_library( - sources = ["*.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "3rdparty/jvm/com/google/inject:guice", - "3rdparty/jvm/javax/inject:javax.inject", - "finatra/inject/inject-app/src/main/java/com/twitter/inject/annotations", - "finatra/inject/inject-core/src/main/scala", - "product-mixer/core/src/main/java/com/twitter/product_mixer/core/product/guice/scope", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/common", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/common/identifier", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/request", - "stringcenter/client/src/main/scala/com/twitter/stringcenter/client", - "stringcenter/client/src/main/scala/com/twitter/stringcenter/client/sources", - "stringcenter/client/src/main/scala/com/twitter/stringcenter/client/sources/refreshing", - "util/util-jackson/src/main/scala/com/twitter/util/jackson", - ], - exports = [ - "product-mixer/core/src/main/java/com/twitter/product_mixer/core/product/guice/scope", - "stringcenter/client/src/main/scala/com/twitter/stringcenter/client", - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/stringcenter/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/stringcenter/BUILD.docx new file mode 100644 index 000000000..d329a3710 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/stringcenter/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/stringcenter/ProductScopeStringCenterModule.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/stringcenter/ProductScopeStringCenterModule.docx new file mode 100644 index 000000000..d6671aafa Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/stringcenter/ProductScopeStringCenterModule.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/stringcenter/ProductScopeStringCenterModule.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/stringcenter/ProductScopeStringCenterModule.scala deleted file mode 100644 index 3db236d9d..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/module/stringcenter/ProductScopeStringCenterModule.scala +++ /dev/null @@ -1,135 +0,0 @@ -package com.twitter.product_mixer.core.module.stringcenter - -import com.google.inject.Provides -import com.twitter.abdecider.LoggingABDecider -import com.twitter.conversions.DurationOps._ -import com.twitter.finagle.stats.StatsReceiver -import com.twitter.util.jackson.ScalaObjectMapper -import com.twitter.inject.TwitterModule -import com.twitter.inject.annotations.Flag -import com.twitter.product_mixer.core.product.guice.scope.ProductScoped -import com.twitter.product_mixer.core.model.marshalling.request.Product -import com.twitter.stringcenter.client.ExternalStringRegistry -import com.twitter.stringcenter.client.StringCenter -import com.twitter.stringcenter.client.StringCenterClientConfig -import com.twitter.stringcenter.client.sources.RefreshingStringSource -import com.twitter.stringcenter.client.sources.RefreshingStringSourceConfig -import com.twitter.stringcenter.client.sources.StringSource -import com.twitter.translation.Languages -import javax.inject.Singleton -import scala.collection.concurrent - -/* - * Fun trivia - this has to be a Class not an Object, otherwise when you ./bazel test blah/... - * and glob multiple feature tests together it'll reuse the concurrentMaps below across - * executions / different server objects. - */ -class ProductScopeStringCenterModule extends TwitterModule { - - private val loadNothing = - flag[Boolean](name = "stringcenter.dontload", default = false, help = "Avoid loading any files") - - flag[Boolean]( - name = "stringcenter.handle.language.fallback", - default = true, - help = "Handle language fallback for services that don't already handle it") - - flag[String]( - name = "stringcenter.default_bundle_path", - default = "stringcenter", - help = "The path on disk to the default bundle available at startup time") - - private val refreshingInterval = flag[Int]( - name = "stringcenter.refresh_interval_minutes", - default = 3, - help = "How often to poll the refreshing bundle path to check for new bundles") - - /* The Guice injector is single threaded, but out of a preponderance of caution we use a concurrent Map. - * - * We need to ensure that we only build one StringSource, StringCenter client, and External String - * Registry for each String Center Project. @ProductScoped doesn't ensure this on it's own as - * two products can have the same String Center Project set. - */ - val stringSources: concurrent.Map[String, StringSource] = concurrent.TrieMap.empty - val stringCenterClients: concurrent.Map[String, StringCenter] = concurrent.TrieMap.empty - val externalStringRegistries: concurrent.Map[String, ExternalStringRegistry] = - concurrent.TrieMap.empty - - @ProductScoped - @Provides - def providesStringCenterClients( - abDecider: LoggingABDecider, - stringSource: StringSource, - languages: Languages, - statsReceiver: StatsReceiver, - clientConfig: StringCenterClientConfig, - product: Product - ): StringCenter = { - stringCenterClients.getOrElseUpdate( - stringCenterForProduct(product), { - new StringCenter( - abDecider, - stringSource, - languages, - statsReceiver, - clientConfig - ) - }) - } - - @ProductScoped - @Provides - def providesExternalStringRegistries( - product: Product - ): ExternalStringRegistry = { - externalStringRegistries.getOrElseUpdate( - stringCenterForProduct(product), { - new ExternalStringRegistry() - }) - } - - @ProductScoped - @Provides - def providesStringCenterSources( - mapper: ScalaObjectMapper, - statsReceiver: StatsReceiver, - product: Product, - @Flag("stringcenter.default_bundle_path") defaultBundlePath: String - ): StringSource = { - if (loadNothing()) { - StringSource.Empty - } else { - val stringCenterProduct = stringCenterForProduct(product) - - stringSources.getOrElseUpdate( - stringCenterProduct, { - val config = RefreshingStringSourceConfig( - stringCenterProduct, - defaultBundlePath, - "stringcenter/downloaded/current/stringcenter", - refreshingInterval().minutes - ) - new RefreshingStringSource( - config, - mapper, - statsReceiver - .scope("StringCenter", "refreshing", "project", stringCenterProduct)) - } - ) - } - } - - private def stringCenterForProduct(product: Product): String = - product.stringCenterProject.getOrElse { - throw new UnsupportedOperationException( - s"No StringCenter project defined for Product ${product.identifier}") - } - - @Singleton - @Provides - def providesStringCenterClientConfig( - @Flag("stringcenter.handle.language.fallback") handleLanguageFallback: Boolean - ): StringCenterClientConfig = { - StringCenterClientConfig(handleLanguageFallback = handleLanguageFallback) - } -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/BUILD b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/BUILD deleted file mode 100644 index bbb46c4c3..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/BUILD +++ /dev/null @@ -1,92 +0,0 @@ -scala_library( - name = "query", - sources = ["PipelineQuery.scala"], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/feature", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/feature/featuremap", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/functional_component/marshaller", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/request", - ], - exports = [ - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/feature", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/feature/featuremap", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/functional_component/marshaller", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/request", - ], -) - -scala_library( - name = "executor", - sources = [ - "FailOpenPolicy.scala", - "PipelineResult.scala", - ], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - "product-mixer/component-library/src/main/scala/com/twitter/product_mixer/component_library/model/candidate", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/common/presentation", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/pipeline_failure", - "util/util-core", - ], - exports = [ - "product-mixer/component-library/src/main/scala/com/twitter/product_mixer/component_library/model/candidate", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/common/presentation", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/pipeline_failure", - "util/util-core", - ], -) - -scala_library( - sources = [ - "!FailOpenPolicy.scala", - "!PipelineQuery.scala", - "!PipelineResult.scala", - "*.scala", - ], - compiler_option_sets = ["fatal_warnings"], - platform = "java8", - strict_deps = True, - tags = ["bazel-compatible"], - dependencies = [ - ":executor", - ":query", - "3rdparty/jvm/javax/inject:javax.inject", - "finatra/inject/inject-core/src/main/scala", - "finatra/inject/inject-core/src/main/scala/com/twitter/inject", - "product-mixer/component-library/src/main/scala/com/twitter/product_mixer/component_library/model/candidate", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/feature", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/feature/featuremap", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/functional_component/common/alert", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/functional_component/marshaller", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/common", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/common/presentation", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/request", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/state", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/step", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/service", - "scrooge/scrooge-serializer/src/main/scala", - "stitch/stitch-core", - ], - exports = [ - ":executor", - ":query", - "3rdparty/jvm/javax/inject:javax.inject", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/feature", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/feature/featuremap", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/functional_component/common/alert", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/functional_component/marshaller", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/common", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/request", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/state", - "product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/step", - "scrooge/scrooge-serializer/src/main/scala", - "stitch/stitch-core", - ], -) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/BUILD.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/BUILD.docx new file mode 100644 index 000000000..a639cbb15 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/BUILD.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/CandidatePipelineFeatures.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/CandidatePipelineFeatures.docx new file mode 100644 index 000000000..692b7b55d Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/CandidatePipelineFeatures.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/CandidatePipelineFeatures.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/CandidatePipelineFeatures.scala deleted file mode 100644 index 49a31cbec..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/CandidatePipelineFeatures.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.twitter.product_mixer.core.pipeline - -import com.twitter.product_mixer.core.feature.Feature -import com.twitter.product_mixer.core.model.common.presentation.CandidateWithDetails - -private[core] object CandidatePipelineResults - extends Feature[PipelineQuery, Seq[CandidateWithDetails]] diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/FailOpenPolicy.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/FailOpenPolicy.docx new file mode 100644 index 000000000..390887a2c Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/FailOpenPolicy.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/FailOpenPolicy.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/FailOpenPolicy.scala deleted file mode 100644 index f36664e1d..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/FailOpenPolicy.scala +++ /dev/null @@ -1,42 +0,0 @@ -package com.twitter.product_mixer.core.pipeline - -import com.twitter.product_mixer.core.pipeline.pipeline_failure.MisconfiguredFeatureMapFailure -import com.twitter.product_mixer.core.pipeline.pipeline_failure.PipelineFailureCategory - -/** - * [[FailOpenPolicy]] determines what should happen in the event that a candidate pipeline fails - * to execute successfully. - * - * Exercise caution when creating new fail open policies. Product Mixer will fail open by default in - * certain error cases (e.g. closed gate on a candidate pipeline) but these might inadvertently be - * excluded by a new policy. - */ -trait FailOpenPolicy { - def apply(failureCategory: PipelineFailureCategory): Boolean -} - -object FailOpenPolicy { - - /** - * Always fail open on candidate pipeline failures except - * for [[MisconfiguredFeatureMapFailure]]s because it's a programmer error - * and should always fail loudly, even with an [[Always]] p[[FailOpenPolicy]] - */ - val Always: FailOpenPolicy = (category: PipelineFailureCategory) => { - category != MisconfiguredFeatureMapFailure - } - - /** - * Never fail open on candidate pipeline failures. - * - * @note this is more restrictive than the default behavior which is to allow gate closed - * failures. - */ - val Never: FailOpenPolicy = (_: PipelineFailureCategory) => false - - // Build a policy that will fail open for a given set of categories - def apply(categories: Set[PipelineFailureCategory]): FailOpenPolicy = - (failureCategory: PipelineFailureCategory) => - categories - .contains(failureCategory) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/InvalidStepStateException.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/InvalidStepStateException.docx new file mode 100644 index 000000000..157134da6 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/InvalidStepStateException.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/InvalidStepStateException.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/InvalidStepStateException.scala deleted file mode 100644 index 889f1f8e4..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/InvalidStepStateException.scala +++ /dev/null @@ -1,8 +0,0 @@ -package com.twitter.product_mixer.core.pipeline - -import com.twitter.product_mixer.core.model.common.identifier.PipelineStepIdentifier - -case class InvalidStepStateException(step: PipelineStepIdentifier, missingData: String) - extends Exception( - s"Invalid Step State: Step $step requires $missingData" - ) diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineArrowBuilder.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineArrowBuilder.docx new file mode 100644 index 000000000..4d5d4fe57 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineArrowBuilder.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineArrowBuilder.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineArrowBuilder.scala deleted file mode 100644 index 14e8b0778..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineArrowBuilder.scala +++ /dev/null @@ -1,181 +0,0 @@ -package com.twitter.product_mixer.core.pipeline - -import com.twitter.finagle.stats.StatsReceiver -import com.twitter.product_mixer.core.model.common.identifier.ComponentIdentifier -import com.twitter.product_mixer.core.model.common.identifier.PipelineStepIdentifier -import com.twitter.product_mixer.core.pipeline.pipeline_failure.PipelineFailure -import com.twitter.product_mixer.core.pipeline.state.HasExecutorResults -import com.twitter.product_mixer.core.pipeline.state.HasResult -import com.twitter.product_mixer.core.pipeline.step.Step -import com.twitter.product_mixer.core.quality_factor.QualityFactorStatus -import com.twitter.product_mixer.core.service.Executor -import com.twitter.product_mixer.core.service.Executor.Context -import com.twitter.product_mixer.core.service.ExecutorResult -import com.twitter.stitch.Arrow -import com.twitter.stitch.Arrow.Iso -import com.twitter.util.Return -import com.twitter.util.Throw - -/** - * Pipeline Arrow Builder used for constructing a final arrow for a pipeline after adding necessary - * steps. - * - * @param steps The kept non-empty Pipeline Steps - * @param addedSteps Steps that have been added, but not necessarily kept. - * @param statsReceiver Stats Receiver for metric book keeping - * @tparam Result sThe expected final result type of the pipeline. - * @tparam State The input state type, which should implement [[HasResult]]. - */ -case class NewPipelineArrowBuilder[ - Result, - State <: HasExecutorResults[State] with HasResult[Result] -] private ( - private val steps: Seq[PipelineStep[State, _, _, _]], - override val statsReceiver: StatsReceiver) - extends Executor { - - def add[Config, ExecutorInput, ExResult <: ExecutorResult]( - pipelineStepIdentifier: PipelineStepIdentifier, - step: Step[State, Config, ExecutorInput, ExResult], - executorConfig: Config - ): NewPipelineArrowBuilder[Result, State] = { - require( - !steps.contains(pipelineStepIdentifier), - s"Found duplicate step $pipelineStepIdentifier when building pipeline arrow") - - // If the step has nothing to execute, drop it for simplification but still added it to the - // "addedSteps" field for build time validation - if (step.isEmpty(executorConfig)) { - this - } else { - val newPipelineStep = - PipelineStep(pipelineStepIdentifier, executorConfig, step) - val newSteps = steps :+ newPipelineStep - this.copy(steps = newSteps) - } - } - - def buildArrow( - context: Executor.Context - ): Arrow[State, NewPipelineResult[Result]] = { - val initialArrow = Arrow - .map { input: State => NewStepData[State](input) } - val allStepArrows = steps.map { step => - Iso.onlyIf[NewStepData[State]] { stepData => !stepData.stopExecuting } { - wrapStepWithExecutorBookkeeping(step, context) - } - } - val combinedArrow = isoArrowsSequentially(allStepArrows) - val resultArrow = Arrow.map { stepData: NewStepData[State] => - stepData.pipelineFailure match { - case Some(failure) => - NewPipelineResult.Failure(failure, stepData.pipelineState.executorResultsByPipelineStep) - case None => - NewPipelineResult.Success( - stepData.pipelineState.buildResult, - stepData.pipelineState.executorResultsByPipelineStep) - } - } - initialArrow.andThen(combinedArrow).andThen(resultArrow) - } - - private[this] def wrapStepWithExecutorBookkeeping( - step: PipelineStep[State, _, _, _], - context: Context - ): Arrow.Iso[NewStepData[State]] = { - val wrapped = wrapStepWithExecutorBookkeeping[NewStepData[State], NewStepData[State]]( - context = context, - identifier = step.stepIdentifier, - arrow = step.arrow(context), - // extract the failure only if it's present. Not sure if this is needed??? - transformer = _.pipelineFailure.map(Throw(_)).getOrElse(Return.Unit) - ) - - Arrow - .zipWithArg(wrapped.liftToTry) - .map { - case (_: NewStepData[State], Return(result)) => - // if Step was successful, return the result - result - case (previous: NewStepData[State], Throw(pipelineFailure: PipelineFailure)) => - // if the Step failed in such a way that the failure was NOT captured - // in the result object, then update the State with the failure - previous.withFailure(pipelineFailure) - case (_, Throw(ex)) => - // an exception was thrown which was not handled by the failure classifier - // this only happens with cancellation exceptions which are re-thrown - throw ex - } - } - - /** - * Sets up stats [[com.twitter.finagle.stats.Gauge]]s for any [[QualityFactorStatus]] - * - * @note We use provideGauge so these gauges live forever even without a reference. - */ - private[pipeline] def buildGaugesForQualityFactor( - pipelineIdentifier: ComponentIdentifier, - qualityFactorStatus: QualityFactorStatus, - statsReceiver: StatsReceiver - ): Unit = { - qualityFactorStatus.qualityFactorByPipeline.foreach { - case (identifier, qualityFactor) => - // QF is a relative stat (since the parent pipeline is monitoring a child pipeline) - val scopes = pipelineIdentifier.toScopes ++ identifier.toScopes :+ "QualityFactor" - statsReceiver.provideGauge(scopes: _*) { qualityFactor.currentValue.toFloat } - } - } -} - -object NewPipelineArrowBuilder { - def apply[Result, InputState <: HasExecutorResults[InputState] with HasResult[Result]]( - statsReceiver: StatsReceiver - ): NewPipelineArrowBuilder[Result, InputState] = { - NewPipelineArrowBuilder( - Seq.empty, - statsReceiver - ) - } -} - -/** - * This is a pipeline specific instance of a step, i.e, a generic step with the step identifier - * within the pipeline and its executor configs. - * @param stepIdentifier Step identifier of the step within a pipeline - * @param executorConfig Config to execute the step with - * @param step The underlying step to be used - * @tparam InputState The input state object - * @tparam ExecutorConfig The config expected for the given step - * @tparam ExecutorInput Input for the underlying executor - * @tparam ExecResult The result type - */ -case class PipelineStep[ - State <: HasExecutorResults[State], - PipelineStepConfig, - ExecutorInput, - ExecResult <: ExecutorResult -]( - stepIdentifier: PipelineStepIdentifier, - executorConfig: PipelineStepConfig, - step: Step[State, PipelineStepConfig, ExecutorInput, ExecResult]) { - - def arrow( - context: Executor.Context - ): Arrow.Iso[NewStepData[State]] = { - val inputArrow = Arrow.map { stepData: NewStepData[State] => - step.adaptInput(stepData.pipelineState, executorConfig) - } - - Arrow - .zipWithArg(inputArrow.andThen(step.arrow(executorConfig, context))).map { - case (stepData: NewStepData[State], executorResult: ExecResult @unchecked) => - val updatedResultsByPipelineStep = - stepData.pipelineState.executorResultsByPipelineStep + (stepIdentifier -> executorResult) - val updatedPipelineState = step - .updateState(stepData.pipelineState, executorResult, executorConfig).setExecutorResults( - updatedResultsByPipelineStep) - - NewStepData(updatedPipelineState) - } - } -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineBuilder.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineBuilder.docx new file mode 100644 index 000000000..161551f78 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineBuilder.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineBuilder.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineBuilder.scala deleted file mode 100644 index a93d735d4..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineBuilder.scala +++ /dev/null @@ -1,31 +0,0 @@ -package com.twitter.product_mixer.core.pipeline - -import com.twitter.product_mixer.core.model.common.identifier.ComponentIdentifierStack -import com.twitter.product_mixer.core.pipeline.state.HasExecutorResults -import com.twitter.product_mixer.core.pipeline.state.HasResult - -/** - * A pipeline builder that is responsible for taking a PipelineConfig and creating a final pipeline - * from it. It provides an [[NewPipelineArrowBuilder]] for composing the pipeline's underlying arrow - * from [[Step]]s. - * - * @tparam Config The Pipeline Config - * @tparam PipelineArrowResult The expected final result - * @tparam PipelineArrowState State object for maintaining state across the pipeline. - * @tparam OutputPipeline The final pipeline - */ -trait NewPipelineBuilder[ - Config <: PipelineConfig, - PipelineArrowResult, - PipelineArrowState <: HasExecutorResults[PipelineArrowState] with HasResult[PipelineArrowResult], - OutputPipeline <: Pipeline[_, _]] { - - type ArrowResult = PipelineArrowResult - type ArrowState = PipelineArrowState - - def build( - parentComponentIdentifierStack: ComponentIdentifierStack, - arrowBuilder: NewPipelineArrowBuilder[ArrowResult, ArrowState], - config: Config - ): OutputPipeline -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineResult.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineResult.docx new file mode 100644 index 000000000..c31498669 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineResult.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineResult.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineResult.scala deleted file mode 100644 index 0e473dfc3..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewPipelineResult.scala +++ /dev/null @@ -1,22 +0,0 @@ -package com.twitter.product_mixer.core.pipeline - -import com.twitter.product_mixer.core.model.common.identifier.PipelineStepIdentifier -import com.twitter.product_mixer.core.pipeline.pipeline_failure.PipelineFailure -import com.twitter.product_mixer.core.service.ExecutorResult -import scala.collection.immutable.ListMap - -sealed trait NewPipelineResult[-Result] { - def executorResultsByPipelineStep: ListMap[PipelineStepIdentifier, ExecutorResult] -} - -object NewPipelineResult { - case class Failure( - failure: PipelineFailure, - override val executorResultsByPipelineStep: ListMap[PipelineStepIdentifier, ExecutorResult]) - extends NewPipelineResult[Any] - - case class Success[Result]( - result: Result, - override val executorResultsByPipelineStep: ListMap[PipelineStepIdentifier, ExecutorResult]) - extends NewPipelineResult[Result] -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewStepData.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewStepData.docx new file mode 100644 index 000000000..af6eaafef Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewStepData.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewStepData.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewStepData.scala deleted file mode 100644 index 3981d316c..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/NewStepData.scala +++ /dev/null @@ -1,13 +0,0 @@ -package com.twitter.product_mixer.core.pipeline - -import com.twitter.product_mixer.core.pipeline.pipeline_failure.PipelineFailure -import com.twitter.product_mixer.core.pipeline.state.HasExecutorResults - -case class NewStepData[State <: HasExecutorResults[State]]( - pipelineState: State, - pipelineFailure: Option[PipelineFailure] = None) { - - val stopExecuting = pipelineFailure.isDefined - def withFailure(failure: PipelineFailure): NewStepData[State] = - this.copy(pipelineFailure = Some(failure)) -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/Pipeline.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/Pipeline.docx new file mode 100644 index 000000000..b79e13dec Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/Pipeline.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/Pipeline.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/Pipeline.scala deleted file mode 100644 index c53ec81ed..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/Pipeline.scala +++ /dev/null @@ -1,46 +0,0 @@ -package com.twitter.product_mixer.core.pipeline - -import com.twitter.product_mixer.core.model.common.Component -import com.twitter.stitch.Arrow -import com.twitter.stitch.Stitch - -/** Base trait for all `pipeline` implementations */ -trait Pipeline[-Query, Result] extends Component { - - /** The [[PipelineConfig]] that was used to create this [[Pipeline]] */ - private[core] val config: PipelineConfig - - /** Returns the underlying arrow that represents the pipeline. This is a val because we want to ensure - * that the arrow is long-lived and consistent, not generated per-request. - * - * Directly using this arrow allows you to combine it with other arrows efficiently. - */ - val arrow: Arrow[Query, PipelineResult[Result]] - - /** all child [[Component]]s that this [[Pipeline]] contains which will be registered and monitored */ - val children: Seq[Component] - - /** - * A helper for executing a single query. - * - * toResultTry and lowerFromTry has the end result of adapting PipelineResult into either a - * successful result or a Stitch exception, which is a common use-case for callers, - * particularly in the case of [[com.twitter.product_mixer.core.pipeline.product.ProductPipeline]]. - */ - def process(query: Query): Stitch[Result] = arrow(query).map(_.toResultTry).lowerFromTry - - final override def toString = s"Pipeline(identifier=$identifier)" - - /** - * [[Pipeline]]s are equal to one another if they were generated from the same [[PipelineConfig]], - * we check this by doing a reference checks first then comparing the [[PipelineConfig]] instances. - * - * We can skip additional checks because the other fields (e.g. [[identifier]] and [[children]]) - * are derived from the [[PipelineConfig]]. - */ - final override def equals(obj: Any): Boolean = obj match { - case pipeline: Pipeline[_, _] => - pipeline.eq(this) || pipeline.config.eq(config) || pipeline.config == config - case _ => false - } -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineBuilder.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineBuilder.docx new file mode 100644 index 000000000..59638a70e Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineBuilder.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineBuilder.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineBuilder.scala deleted file mode 100644 index 377c06233..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineBuilder.scala +++ /dev/null @@ -1,194 +0,0 @@ -package com.twitter.product_mixer.core.pipeline - -import com.twitter.finagle.stats.StatsReceiver -import com.twitter.product_mixer.core.model.common.identifier.ComponentIdentifier -import com.twitter.product_mixer.core.model.common.identifier.PipelineStepIdentifier -import com.twitter.product_mixer.core.pipeline.pipeline_failure.PipelineFailure -import com.twitter.product_mixer.core.quality_factor.QualityFactorStatus -import com.twitter.product_mixer.core.service.Executor -import com.twitter.product_mixer.core.service.Executor.Context -import com.twitter.product_mixer.core.service -import com.twitter.stitch.Arrow -import com.twitter.util.Return -import com.twitter.util.Throw - -trait PipelineBuilder[Query] extends Executor { - - /** - * When a step is mostly the same, but only the result update changes, - * you can pass in a [[ResultUpdater]] to the [[Step]] to perform the update - * such as with multi-step hydration. - */ - trait ResultUpdater[R <: PipelineResult[_], ER <: service.ExecutorResult] { - def apply(existingResult: R, executorResult: ER): R - } - - type UnderlyingResultType - type PipelineResultType <: PipelineResult[UnderlyingResultType] - - /** the data that every step has as input and output - the query, and the in-progress result */ - case class StepData(query: Query, result: PipelineResultType) - - /** An [[Arrow.Iso]] [[Arrow]] is an arrow with the same input and output types. */ - type StepArrow = Arrow.Iso[StepData] - - /** - * We break pipeline execution into a linear sequence of [[Step]]s. The execution logic of each - * step is represented as an [[Executor]] (which is reusable between pipelines). - * - * Each step has access to the [[PipelineResult]] generated by previous steps, and can update it - * with some new data. - * - * We define a pipeline Step as having three parts: - * - * - An underlying [[Executor]] [[Arrow]], from the underlying executor - * - An input adaptor to extract the right data from the previous [[PipelineResult]] - * - A result updater to update the [[PipelineResult]] - * - * This keeps knowledge of [[PipelineResult]] out of the executors, so they're reusable. - * - * @tparam ExecutorInput The input type used by the executor - * @tparam ExecutorResult The output/result type used by the executor - */ - trait Step[ExecutorInput, ExecutorResult] { - def identifier: PipelineStepIdentifier - def executorArrow: Arrow[ExecutorInput, ExecutorResult] - def inputAdaptor(query: Query, previousResult: PipelineResultType): ExecutorInput - def resultUpdater( - previousPipelineResult: PipelineResultType, - executorResult: ExecutorResult - ): PipelineResultType - - /** - * Optionally, steps can define a function to update the Query - */ - def queryUpdater(query: Query, executorResult: ExecutorResult): Query = query - - /** - * Arrow that adapts the input, runs the underlying Executor, adapts the output, and updates the state - */ - val stepArrow: StepArrow = { - val inputAdaptorArrow: Arrow[StepData, ExecutorInput] = Arrow.map { stepData: StepData => - inputAdaptor(stepData.query, stepData.result) - } - val outputAdaptorArrow: Arrow[(StepData, ExecutorResult), StepData] = Arrow.map { - // abstract type pattern ExecutorResult is unchecked since it is eliminated by erasure - case (previousStepData: StepData, executorResult: ExecutorResult @unchecked) => - StepData( - query = queryUpdater(previousStepData.query, executorResult), - result = resultUpdater(previousStepData.result, executorResult) - ) - } - - Arrow - .zipWithArg(inputAdaptorArrow.andThen(executorArrow)) - .andThen(outputAdaptorArrow) - } - } - - /** - * Wraps a step with [[wrapStepWithExecutorBookkeeping]] - * - * When an error is encountered in execution, we update the [[PipelineResult.failure]] field, - * and we return the partial results from all previously executed steps. - */ - def wrapStepWithExecutorBookkeeping( - context: Context, - step: Step[_, _] - ): Arrow.Iso[StepData] = { - val wrapped = wrapStepWithExecutorBookkeeping[StepData, StepData]( - context = context, - identifier = step.identifier, - arrow = step.stepArrow, - // extract the failure only if it's present - transformer = _.result.failure match { - case Some(pipelineFailure) => Throw(pipelineFailure) - case None => Return.Unit - } - ) - - Arrow - .zipWithArg(wrapped.liftToTry) - .map { - case (_: StepData, Return(result)) => - // if Step was successful, return the result - result - case (StepData(query, previousResult), Throw(pipelineFailure: PipelineFailure)) => - // if the Step failed in such a way that the failure was NOT captured - // in the result object, then update the State with the failure - StepData( - query, - previousResult.withFailure(pipelineFailure).asInstanceOf[PipelineResultType]) - case (_, Throw(ex)) => - // an exception was thrown which was not handled by the failure classifier - // this only happens with cancellation exceptions which are re-thrown - throw ex - } - } - - /** - * Builds a combined arrow out of steps. - * - * Wraps them in error handling, and only executes each step if the previous step is successful. - */ - def buildCombinedArrowFromSteps( - steps: Seq[Step[_, _]], - context: Executor.Context, - initialEmptyResult: PipelineResultType, - stepsInOrderFromConfig: Seq[PipelineStepIdentifier] - ): Arrow[Query, PipelineResultType] = { - - validateConfigAndBuilderAreInSync(steps, stepsInOrderFromConfig) - - /** - * Prepare the step arrows. - * 1. Wrap them in executor bookkeeping - * 2. Wrap them in Iso.onlyIf - so we only execute them if we don't have a result or failure yet - * 3. Combine them using [[isoArrowsSequentially]] - * - * @note this results in no Executor bookkeeping actions for [[Step]]s after - * we reach a [[PipelineResult.stopExecuting]]. - */ - val stepArrows = isoArrowsSequentially(steps.map { step => - Arrow.Iso.onlyIf[StepData](stepData => !stepData.result.stopExecuting)( - wrapStepWithExecutorBookkeeping(context, step)) - }) - - Arrow - .identity[Query] - .map { query => StepData(query, initialEmptyResult) } - .andThen(stepArrows) - .map { case StepData(_, result) => result } - } - - /** - * Sets up stats [[com.twitter.finagle.stats.Gauge]]s for any [[QualityFactorStatus]] - * - * @note We use provideGauge so these gauges live forever even without a reference. - */ - private[pipeline] def buildGaugesForQualityFactor( - pipelineIdentifier: ComponentIdentifier, - qualityFactorStatus: QualityFactorStatus, - statsReceiver: StatsReceiver - ): Unit = { - qualityFactorStatus.qualityFactorByPipeline.foreach { - case (identifier, qualityFactor) => - // QF is a relative stat (since the parent pipeline is monitoring a child pipeline) - val scopes = pipelineIdentifier.toScopes ++ identifier.toScopes :+ "QualityFactor" - statsReceiver.provideGauge(scopes: _*) { qualityFactor.currentValue.toFloat } - } - } - - /** Validates that the [[PipelineConfigCompanion]] is in sync with the [[Step]]s a [[PipelineBuilder]] produces */ - private[this] def validateConfigAndBuilderAreInSync( - builtSteps: Seq[Step[_, _]], - stepsInOrder: Seq[PipelineStepIdentifier] - ): Unit = { - require( - builtSteps.map(_.identifier) == stepsInOrder, - s"Builder and Config are out of sync, bug in Product Mixer Core, `PipelineCompanion` and `PipelineBuilder` " + - s"have different definitions of what Steps are run in this Pipeline \n" + - s"${builtSteps.map(_.identifier).zip(stepsInOrder).mkString("\n")}" - ) - } -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineConfig.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineConfig.docx new file mode 100644 index 000000000..21943f9b4 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineConfig.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineConfig.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineConfig.scala deleted file mode 100644 index 5b99e32fc..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineConfig.scala +++ /dev/null @@ -1,20 +0,0 @@ -package com.twitter.product_mixer.core.pipeline - -import com.twitter.product_mixer.core.model.common.identifier.HasComponentIdentifier -import com.twitter.product_mixer.core.model.common.identifier.PipelineStepIdentifier - -trait PipelineConfig extends HasComponentIdentifier - -trait PipelineConfigCompanion { - - /** used to generate `AsyncFeaturesFor` [[PipelineStepIdentifier]]s for the internal Async Features Step */ - private[core] def asyncFeaturesStep( - stepToHydrateFor: PipelineStepIdentifier - ): PipelineStepIdentifier = - PipelineStepIdentifier("AsyncFeaturesFor" + stepToHydrateFor.name) - - /** All the Steps which are executed by a [[Pipeline]] in the order in which they are run */ - val stepsInOrder: Seq[PipelineStepIdentifier] - - val stepsAsyncFeatureHydrationCanBeCompletedBy: Set[PipelineStepIdentifier] = Set.empty -} diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineCursor.docx b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineCursor.docx new file mode 100644 index 000000000..e9b153ed3 Binary files /dev/null and b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineCursor.docx differ diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineCursor.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineCursor.scala deleted file mode 100644 index 3428939e4..000000000 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/pipeline/PipelineCursor.scala +++ /dev/null @@ -1,38 +0,0 @@ -package com.twitter.product_mixer.core.pipeline - -/** - * PipelineCursor represents any product-specific cursor model. Typically the PipelineCursor will be - * a de-serialized base 64 thrift struct from initial request. - */ -trait PipelineCursor - -/** - * HasPipelineCursor indicates that a [[PipelineQuery]] has a cursor - */ -trait HasPipelineCursor[+Cursor <: PipelineCursor] { - def pipelineCursor: Option[Cursor] - - /** - * If the cursor is not present, this typically means that we are on the first page - */ - def isFirstPage: Boolean = pipelineCursor.isEmpty -} - -/** - * UrtPipelineCursor represents a URT product-specific cursor model. Typically the UrtPipelineCursor - * will be a de-serialized base 64 thrift struct from initial request. - */ -trait UrtPipelineCursor extends PipelineCursor { - - /** See [[UrtCursorBuilder]] for background on building initialSortIndex */ - def initialSortIndex: Long -} - -object UrtPipelineCursor { - def getCursorInitialSortIndex(query: PipelineQuery with HasPipelineCursor[_]): Option[Long] = { - query.pipelineCursor match { - case Some(cursor: UrtPipelineCursor) => Some(cursor.initialSortIndex) - case _ => None - } - } -}