Created
February 13, 2017 01:31
-
-
Save JoeEnnever/c42ded6032e07eec73f15340489f0908 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.dwnld.thrift | |
import _root_.shapeless.{Generic, HNil, ::, Nat} | |
object implicits { | |
type ScaledImage = scala.collection.Map[String, HostedImage] | |
type AppliedExperiments = scala.collection.Map[String, Int] | |
implicit val DateTimeGeneric: Generic.Aux[DateTime, Option[Long] :: HNil] = new Generic[DateTime] { | |
type Repr = Option[Long] :: HNil | |
def to(t: DateTime): Repr = t._1 :: HNil | |
def from(r: Repr): DateTime = DateTime.apply(r(Nat(0))) | |
} | |
implicit val SizeGeneric: Generic.Aux[Size, Option[Int] :: Option[Int] :: HNil] = new Generic[Size] { | |
type Repr = Option[Int] :: Option[Int] :: HNil | |
def to(t: Size): Repr = t._1 :: t._2 :: HNil | |
def from(r: Repr): Size = Size.apply(r(Nat(0)),r(Nat(1))) | |
} | |
implicit val PointGeneric: Generic.Aux[Point, Option[Double] :: Option[Double] :: HNil] = new Generic[Point] { | |
type Repr = Option[Double] :: Option[Double] :: HNil | |
def to(t: Point): Repr = t._1 :: t._2 :: HNil | |
def from(r: Repr): Point = Point.apply(r(Nat(0)),r(Nat(1))) | |
} | |
implicit val UploadedImageGeneric: Generic.Aux[UploadedImage, Option[String] :: Option[Size] :: Option[String] :: Option[Long] :: Option[String] :: HNil] = new Generic[UploadedImage] { | |
type Repr = Option[String] :: Option[Size] :: Option[String] :: Option[Long] :: Option[String] :: HNil | |
def to(t: UploadedImage): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: HNil | |
def from(r: Repr): UploadedImage = UploadedImage.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4))) | |
} | |
implicit val HostedImageGeneric: Generic.Aux[HostedImage, Option[String] :: Option[Size] :: Option[String] :: Option[Long] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[Boolean] :: Option[Int] :: Option[Point] :: HNil] = new Generic[HostedImage] { | |
type Repr = Option[String] :: Option[Size] :: Option[String] :: Option[Long] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[Boolean] :: Option[Int] :: Option[Point] :: HNil | |
def to(t: HostedImage): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: t._7 :: t._8 :: t._9 :: t._10 :: t._11 :: t._12 :: HNil | |
def from(r: Repr): HostedImage = HostedImage.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5)),r(Nat(6)),r(Nat(7)),r(Nat(8)),r(Nat(9)),r(Nat(10)),r(Nat(11))) | |
} | |
implicit val RgbGeneric: Generic.Aux[Rgb, Option[Short] :: Option[Short] :: Option[Short] :: HNil] = new Generic[Rgb] { | |
type Repr = Option[Short] :: Option[Short] :: Option[Short] :: HNil | |
def to(t: Rgb): Repr = t._1 :: t._2 :: t._3 :: HNil | |
def from(r: Repr): Rgb = Rgb.apply(r(Nat(0)),r(Nat(1)),r(Nat(2))) | |
} | |
implicit val DisplayPropertiesGeneric: Generic.Aux[DisplayProperties, Option[Int] :: Option[DisplayFloat] :: Option[DisplayClear] :: Option[Boolean] :: HNil] = new Generic[DisplayProperties] { | |
type Repr = Option[Int] :: Option[DisplayFloat] :: Option[DisplayClear] :: Option[Boolean] :: HNil | |
def to(t: DisplayProperties): Repr = t._1 :: t._2 :: t._3 :: t._4 :: HNil | |
def from(r: Repr): DisplayProperties = DisplayProperties.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3))) | |
} | |
implicit val AudioContentGeneric: Generic.Aux[AudioContent, Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: HNil] = new Generic[AudioContent] { | |
type Repr = Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: HNil | |
def to(t: AudioContent): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: t._7 :: t._8 :: HNil | |
def from(r: Repr): AudioContent = AudioContent.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5)),r(Nat(6)),r(Nat(7))) | |
} | |
implicit val ITunesMusicGeneric: Generic.Aux[ITunesMusic, Option[DisplayProperties] :: Option[String] :: Option[AudioContent] :: HNil] = new Generic[ITunesMusic] { | |
type Repr = Option[DisplayProperties] :: Option[String] :: Option[AudioContent] :: HNil | |
def to(t: ITunesMusic): Repr = t._1 :: t._2 :: t._3 :: HNil | |
def from(r: Repr): ITunesMusic = ITunesMusic.apply(r(Nat(0)),r(Nat(1)),r(Nat(2))) | |
} | |
implicit val SoundCloudMusicGeneric: Generic.Aux[SoundCloudMusic, Option[DisplayProperties] :: Option[String] :: Option[String] :: Option[AudioContentType] :: Option[AudioContent] :: HNil] = new Generic[SoundCloudMusic] { | |
type Repr = Option[DisplayProperties] :: Option[String] :: Option[String] :: Option[AudioContentType] :: Option[AudioContent] :: HNil | |
def to(t: SoundCloudMusic): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: HNil | |
def from(r: Repr): SoundCloudMusic = SoundCloudMusic.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4))) | |
} | |
implicit val SpotifyMusicGeneric: Generic.Aux[SpotifyMusic, Option[DisplayProperties] :: Option[String] :: Option[String] :: Option[AudioContentType] :: Option[AudioContent] :: HNil] = new Generic[SpotifyMusic] { | |
type Repr = Option[DisplayProperties] :: Option[String] :: Option[String] :: Option[AudioContentType] :: Option[AudioContent] :: HNil | |
def to(t: SpotifyMusic): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: HNil | |
def from(r: Repr): SpotifyMusic = SpotifyMusic.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4))) | |
} | |
implicit val DirectAudioGeneric: Generic.Aux[DirectAudio, Option[DisplayProperties] :: Option[String] :: Option[AudioContent] :: HNil] = new Generic[DirectAudio] { | |
type Repr = Option[DisplayProperties] :: Option[String] :: Option[AudioContent] :: HNil | |
def to(t: DirectAudio): Repr = t._1 :: t._2 :: t._3 :: HNil | |
def from(r: Repr): DirectAudio = DirectAudio.apply(r(Nat(0)),r(Nat(1)),r(Nat(2))) | |
} | |
implicit val TextBlockGeneric: Generic.Aux[TextBlock, Option[DisplayProperties] :: Option[String] :: Option[Alignment] :: Option[Boolean] :: Option[TextBlockStyle] :: HNil] = new Generic[TextBlock] { | |
type Repr = Option[DisplayProperties] :: Option[String] :: Option[Alignment] :: Option[Boolean] :: Option[TextBlockStyle] :: HNil | |
def to(t: TextBlock): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: HNil | |
def from(r: Repr): TextBlock = TextBlock.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4))) | |
} | |
implicit val ListBlockGeneric: Generic.Aux[ListBlock, Option[DisplayProperties] :: Option[scala.collection.Seq[String]] :: Option[Alignment] :: Option[Boolean] :: HNil] = new Generic[ListBlock] { | |
type Repr = Option[DisplayProperties] :: Option[scala.collection.Seq[String]] :: Option[Alignment] :: Option[Boolean] :: HNil | |
def to(t: ListBlock): Repr = t._1 :: t._2 :: t._3 :: t._4 :: HNil | |
def from(r: Repr): ListBlock = ListBlock.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3))) | |
} | |
implicit val ImageGalleryBlockElementGeneric: Generic.Aux[ImageGalleryBlockElement, Option[DisplayProperties] :: Option[UploadedImage] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[HostedImage] :: Option[String] :: Option[String] :: HNil] = new Generic[ImageGalleryBlockElement] { | |
type Repr = Option[DisplayProperties] :: Option[UploadedImage] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[HostedImage] :: Option[String] :: Option[String] :: HNil | |
def to(t: ImageGalleryBlockElement): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: t._7 :: t._8 :: t._9 :: t._10 :: HNil | |
def from(r: Repr): ImageGalleryBlockElement = ImageGalleryBlockElement.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5)),r(Nat(6)),r(Nat(7)),r(Nat(8)),r(Nat(9))) | |
} | |
implicit val ImageGalleryBlockGeneric: Generic.Aux[ImageGalleryBlock, scala.collection.Seq[ImageGalleryBlockElement] :: Option[SingleVisualBlockWidth] :: Option[ImageGalleryStyle] :: HNil] = new Generic[ImageGalleryBlock] { | |
type Repr = scala.collection.Seq[ImageGalleryBlockElement] :: Option[SingleVisualBlockWidth] :: Option[ImageGalleryStyle] :: HNil | |
def to(t: ImageGalleryBlock): Repr = t._1 :: t._2 :: t._3 :: HNil | |
def from(r: Repr): ImageGalleryBlock = ImageGalleryBlock.apply(r(Nat(0)),r(Nat(1)),r(Nat(2))) | |
} | |
implicit val YouTubeMetadataGeneric: Generic.Aux[YouTubeMetadata, Option[String] :: HNil] = new Generic[YouTubeMetadata] { | |
type Repr = Option[String] :: HNil | |
def to(t: YouTubeMetadata): Repr = t._1 :: HNil | |
def from(r: Repr): YouTubeMetadata = YouTubeMetadata.apply(r(Nat(0))) | |
} | |
implicit val DirectVideoGeneric: Generic.Aux[DirectVideo, Option[String] :: HNil] = new Generic[DirectVideo] { | |
type Repr = Option[String] :: HNil | |
def to(t: DirectVideo): Repr = t._1 :: HNil | |
def from(r: Repr): DirectVideo = DirectVideo.apply(r(Nat(0))) | |
} | |
implicit val EmbeddedVideoGeneric: Generic.Aux[EmbeddedVideo, Option[String] :: Option[String] :: Option[ProviderMetadata] :: HNil] = new Generic[EmbeddedVideo] { | |
type Repr = Option[String] :: Option[String] :: Option[ProviderMetadata] :: HNil | |
def to(t: EmbeddedVideo): Repr = t._1 :: t._2 :: t._3 :: HNil | |
def from(r: Repr): EmbeddedVideo = EmbeddedVideo.apply(r(Nat(0)),r(Nat(1)),r(Nat(2))) | |
} | |
implicit val VideoBlockGeneric: Generic.Aux[VideoBlock, Option[DisplayProperties] :: Option[String] :: Option[Boolean] :: Option[UploadedImage] :: Option[Size] :: Option[String] :: Option[String] :: Option[VideoContent] :: Option[String] :: Option[String] :: Option[SingleVisualBlockWidth] :: HNil] = new Generic[VideoBlock] { | |
type Repr = Option[DisplayProperties] :: Option[String] :: Option[Boolean] :: Option[UploadedImage] :: Option[Size] :: Option[String] :: Option[String] :: Option[VideoContent] :: Option[String] :: Option[String] :: Option[SingleVisualBlockWidth] :: HNil | |
def to(t: VideoBlock): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: t._7 :: t._8 :: t._9 :: t._10 :: t._11 :: HNil | |
def from(r: Repr): VideoBlock = VideoBlock.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5)),r(Nat(6)),r(Nat(7)),r(Nat(8)),r(Nat(9)),r(Nat(10))) | |
} | |
implicit val HorizontalRuleGeneric: Generic.Aux[HorizontalRule, Option[DisplayProperties] :: Option[Rgb] :: HNil] = new Generic[HorizontalRule] { | |
type Repr = Option[DisplayProperties] :: Option[Rgb] :: HNil | |
def to(t: HorizontalRule): Repr = t._1 :: t._2 :: HNil | |
def from(r: Repr): HorizontalRule = HorizontalRule.apply(r(Nat(0)),r(Nat(1))) | |
} | |
implicit val ButtonGeneric: Generic.Aux[Button, Option[DisplayProperties] :: Option[String] :: Option[String] :: Option[String] :: Option[ButtonType] :: Option[String] :: HNil] = new Generic[Button] { | |
type Repr = Option[DisplayProperties] :: Option[String] :: Option[String] :: Option[String] :: Option[ButtonType] :: Option[String] :: HNil | |
def to(t: Button): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: HNil | |
def from(r: Repr): Button = Button.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5))) | |
} | |
implicit val TwitterBlockGeneric: Generic.Aux[TwitterBlock, Option[String] :: HNil] = new Generic[TwitterBlock] { | |
type Repr = Option[String] :: HNil | |
def to(t: TwitterBlock): Repr = t._1 :: HNil | |
def from(r: Repr): TwitterBlock = TwitterBlock.apply(r(Nat(0))) | |
} | |
implicit val InstagramBlockGeneric: Generic.Aux[InstagramBlock, Option[String] :: Option[String] :: HNil] = new Generic[InstagramBlock] { | |
type Repr = Option[String] :: Option[String] :: HNil | |
def to(t: InstagramBlock): Repr = t._1 :: t._2 :: HNil | |
def from(r: Repr): InstagramBlock = InstagramBlock.apply(r(Nat(0)),r(Nat(1))) | |
} | |
implicit val ShoppableBlockGeneric: Generic.Aux[ShoppableBlock, Option[String] :: HNil] = new Generic[ShoppableBlock] { | |
type Repr = Option[String] :: HNil | |
def to(t: ShoppableBlock): Repr = t._1 :: HNil | |
def from(r: Repr): ShoppableBlock = ShoppableBlock.apply(r(Nat(0))) | |
} | |
implicit val MapCoordinateGeneric: Generic.Aux[MapCoordinate, Option[Double] :: Option[Double] :: HNil] = new Generic[MapCoordinate] { | |
type Repr = Option[Double] :: Option[Double] :: HNil | |
def to(t: MapCoordinate): Repr = t._1 :: t._2 :: HNil | |
def from(r: Repr): MapCoordinate = MapCoordinate.apply(r(Nat(0)),r(Nat(1))) | |
} | |
implicit val MapPinGeneric: Generic.Aux[MapPin, Option[MapCoordinate] :: Option[String] :: Option[String] :: Option[String] :: HNil] = new Generic[MapPin] { | |
type Repr = Option[MapCoordinate] :: Option[String] :: Option[String] :: Option[String] :: HNil | |
def to(t: MapPin): Repr = t._1 :: t._2 :: t._3 :: t._4 :: HNil | |
def from(r: Repr): MapPin = MapPin.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3))) | |
} | |
implicit val MapBlockGeneric: Generic.Aux[MapBlock, Option[MapDisplayType] :: Option[MapCoordinate] :: Option[String] :: Option[Long] :: Option[Double] :: Option[Boolean] :: Option[Boolean] :: Option[Boolean] :: scala.collection.Seq[MapPin] :: HNil] = new Generic[MapBlock] { | |
type Repr = Option[MapDisplayType] :: Option[MapCoordinate] :: Option[String] :: Option[Long] :: Option[Double] :: Option[Boolean] :: Option[Boolean] :: Option[Boolean] :: scala.collection.Seq[MapPin] :: HNil | |
def to(t: MapBlock): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: t._7 :: t._8 :: t._9 :: HNil | |
def from(r: Repr): MapBlock = MapBlock.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5)),r(Nat(6)),r(Nat(7)),r(Nat(8))) | |
} | |
implicit val SharingBlockGeneric: Generic.Aux[SharingBlock, Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: HNil] = new Generic[SharingBlock] { | |
type Repr = Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: HNil | |
def to(t: SharingBlock): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: t._7 :: t._8 :: HNil | |
def from(r: Repr): SharingBlock = SharingBlock.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5)),r(Nat(6)),r(Nat(7))) | |
} | |
implicit val InlineLinkGeneric: Generic.Aux[InlineLink, Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[Boolean] :: HNil] = new Generic[InlineLink] { | |
type Repr = Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[Boolean] :: HNil | |
def to(t: InlineLink): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: HNil | |
def from(r: Repr): InlineLink = InlineLink.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5))) | |
} | |
implicit val WebRelatedItemGeneric: Generic.Aux[WebRelatedItem, Option[String] :: Option[String] :: Option[UploadedImage] :: Option[HostedImage] :: Option[Boolean] :: HNil] = new Generic[WebRelatedItem] { | |
type Repr = Option[String] :: Option[String] :: Option[UploadedImage] :: Option[HostedImage] :: Option[Boolean] :: HNil | |
def to(t: WebRelatedItem): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: HNil | |
def from(r: Repr): WebRelatedItem = WebRelatedItem.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4))) | |
} | |
implicit val ArticleRelatedItemGeneric: Generic.Aux[ArticleRelatedItem, Option[String] :: Option[String] :: Option[String] :: Option[HostedImage] :: Option[Boolean] :: scala.collection.Seq[String] :: HNil] = new Generic[ArticleRelatedItem] { | |
type Repr = Option[String] :: Option[String] :: Option[String] :: Option[HostedImage] :: Option[Boolean] :: scala.collection.Seq[String] :: HNil | |
def to(t: ArticleRelatedItem): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: HNil | |
def from(r: Repr): ArticleRelatedItem = ArticleRelatedItem.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5))) | |
} | |
implicit val ArticleStyleGeneric: Generic.Aux[ArticleStyle, Option[ArticleViewStyle] :: Option[ArticleHeadingStyle] :: HNil] = new Generic[ArticleStyle] { | |
type Repr = Option[ArticleViewStyle] :: Option[ArticleHeadingStyle] :: HNil | |
def to(t: ArticleStyle): Repr = t._1 :: t._2 :: HNil | |
def from(r: Repr): ArticleStyle = ArticleStyle.apply(r(Nat(0)),r(Nat(1))) | |
} | |
implicit val ArticleVariantGeneric: Generic.Aux[ArticleVariant, Option[String] :: Option[ScaledImage] :: HNil] = new Generic[ArticleVariant] { | |
type Repr = Option[String] :: Option[ScaledImage] :: HNil | |
def to(t: ArticleVariant): Repr = t._1 :: t._2 :: HNil | |
def from(r: Repr): ArticleVariant = ArticleVariant.apply(r(Nat(0)),r(Nat(1))) | |
} | |
implicit val ArticleMetadataGeneric: Generic.Aux[ArticleMetadata, Option[ArticleType] :: Option[String] :: Option[String] :: Option[DateTime] :: Option[DateTime] :: Option[DateTime] :: Option[String] :: Option[ArticleStyle] :: Option[UploadedImage] :: ScaledImage :: Option[String] :: Option[TocVideoType] :: Option[String] :: Option[Boolean] :: Option[Boolean] :: Option[String] :: scala.collection.Seq[String] :: scala.collection.Seq[String] :: Option[AppliedExperiments] :: scala.collection.Seq[ArticleVariant] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: HNil] = new Generic[ArticleMetadata] { | |
type Repr = Option[ArticleType] :: Option[String] :: Option[String] :: Option[DateTime] :: Option[DateTime] :: Option[DateTime] :: Option[String] :: Option[ArticleStyle] :: Option[UploadedImage] :: ScaledImage :: Option[String] :: Option[TocVideoType] :: Option[String] :: Option[Boolean] :: Option[Boolean] :: Option[String] :: scala.collection.Seq[String] :: scala.collection.Seq[String] :: Option[AppliedExperiments] :: scala.collection.Seq[ArticleVariant] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: Option[String] :: HNil | |
def to(t: ArticleMetadata): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: t._7 :: t._8 :: t._9 :: t._10 :: t._11 :: t._12 :: t._13 :: t._14 :: t._15 :: t._16 :: t._17 :: t._18 :: t._19 :: t._20 :: t._21 :: t._22 :: t._23 :: t._24 :: t._25 :: HNil | |
def from(r: Repr): ArticleMetadata = ArticleMetadata.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5)),r(Nat(6)),r(Nat(7)),r(Nat(8)),r(Nat(9)),r(Nat(10)),r(Nat(11)),r(Nat(12)),r(Nat(13)),r(Nat(14)),r(Nat(15)),r(Nat(16)),r(Nat(17)),r(Nat(18)),r(Nat(19)),r(Nat(20)),r(Nat(21)),r(Nat(22)),r(Nat(23)),r(Nat(24))) | |
} | |
implicit val ArticleGeneric: Generic.Aux[Article, Option[String] :: Option[String] :: Option[ArticleMetadata] :: scala.collection.Seq[String] :: scala.collection.Seq[ArticleBlock] :: scala.collection.Seq[RelatedItem] :: scala.collection.Seq[InlineLink] :: Option[SharingBlock] :: Option[String] :: Option[String] :: Option[DateTime] :: Option[String] :: Option[ArticleType] :: Option[UploadedImage] :: Option[ScaledImage] :: HNil] = new Generic[Article] { | |
type Repr = Option[String] :: Option[String] :: Option[ArticleMetadata] :: scala.collection.Seq[String] :: scala.collection.Seq[ArticleBlock] :: scala.collection.Seq[RelatedItem] :: scala.collection.Seq[InlineLink] :: Option[SharingBlock] :: Option[String] :: Option[String] :: Option[DateTime] :: Option[String] :: Option[ArticleType] :: Option[UploadedImage] :: Option[ScaledImage] :: HNil | |
def to(t: Article): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: t._7 :: t._8 :: t._9 :: t._10 :: t._11 :: t._12 :: t._13 :: t._14 :: t._15 :: HNil | |
def from(r: Repr): Article = Article.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5)),r(Nat(6)),r(Nat(7)),r(Nat(8)),r(Nat(9)),r(Nat(10)),r(Nat(11)),r(Nat(12)),r(Nat(13)),r(Nat(14))) | |
} | |
implicit val EncryptedArticleGeneric: Generic.Aux[EncryptedArticle, Option[ArticleMetadata] :: Option[ArticleCompression] :: Option[ArticleEncryption] :: Option[ArticleMarshalling] :: Option[String] :: Option[java.nio.ByteBuffer] :: Option[java.nio.ByteBuffer] :: HNil] = new Generic[EncryptedArticle] { | |
type Repr = Option[ArticleMetadata] :: Option[ArticleCompression] :: Option[ArticleEncryption] :: Option[ArticleMarshalling] :: Option[String] :: Option[java.nio.ByteBuffer] :: Option[java.nio.ByteBuffer] :: HNil | |
def to(t: EncryptedArticle): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: t._7 :: HNil | |
def from(r: Repr): EncryptedArticle = EncryptedArticle.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5)),r(Nat(6))) | |
} | |
implicit val ChannelArticleGeneric: Generic.Aux[ChannelArticle, Option[ArticleMetadata] :: Option[String] :: HNil] = new Generic[ChannelArticle] { | |
type Repr = Option[ArticleMetadata] :: Option[String] :: HNil | |
def to(t: ChannelArticle): Repr = t._1 :: t._2 :: HNil | |
def from(r: Repr): ChannelArticle = ChannelArticle.apply(r(Nat(0)),r(Nat(1))) | |
} | |
implicit val ChannelGeneric: Generic.Aux[Channel, Option[String] :: Option[ChannelType] :: scala.collection.Seq[ChannelArticle] :: Option[String] :: Option[String] :: scala.collection.Seq[String] :: Option[Int] :: Option[Int] :: Option[Int] :: HNil] = new Generic[Channel] { | |
type Repr = Option[String] :: Option[ChannelType] :: scala.collection.Seq[ChannelArticle] :: Option[String] :: Option[String] :: scala.collection.Seq[String] :: Option[Int] :: Option[Int] :: Option[Int] :: HNil | |
def to(t: Channel): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: t._7 :: t._8 :: t._9 :: HNil | |
def from(r: Repr): Channel = Channel.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5)),r(Nat(6)),r(Nat(7)),r(Nat(8))) | |
} | |
implicit val ShopifyGeneric: Generic.Aux[Shopify, Option[String] :: Option[String] :: Option[String] :: Option[Boolean] :: HNil] = new Generic[Shopify] { | |
type Repr = Option[String] :: Option[String] :: Option[String] :: Option[Boolean] :: HNil | |
def to(t: Shopify): Repr = t._1 :: t._2 :: t._3 :: t._4 :: HNil | |
def from(r: Repr): Shopify = Shopify.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3))) | |
} | |
implicit val CommerceGeneric: Generic.Aux[Commerce, Option[String] :: Option[Shopify] :: HNil] = new Generic[Commerce] { | |
type Repr = Option[String] :: Option[Shopify] :: HNil | |
def to(t: Commerce): Repr = t._1 :: t._2 :: HNil | |
def from(r: Repr): Commerce = Commerce.apply(r(Nat(0)),r(Nat(1))) | |
} | |
implicit val AppStoreUrlGeneric: Generic.Aux[AppStoreUrl, Option[String] :: Option[String] :: HNil] = new Generic[AppStoreUrl] { | |
type Repr = Option[String] :: Option[String] :: HNil | |
def to(t: AppStoreUrl): Repr = t._1 :: t._2 :: HNil | |
def from(r: Repr): AppStoreUrl = AppStoreUrl.apply(r(Nat(0)),r(Nat(1))) | |
} | |
implicit val SharingGeneric: Generic.Aux[Sharing, Option[AppStoreUrl] :: HNil] = new Generic[Sharing] { | |
type Repr = Option[AppStoreUrl] :: HNil | |
def to(t: Sharing): Repr = t._1 :: HNil | |
def from(r: Repr): Sharing = Sharing.apply(r(Nat(0))) | |
} | |
implicit val TableOfContentsGeneric: Generic.Aux[TableOfContents, scala.collection.Seq[Channel] :: Option[Channel] :: Option[Channel] :: Option[Channel] :: Option[String] :: Option[Int] :: Option[String] :: Option[Sharing] :: Option[Commerce] :: HNil] = new Generic[TableOfContents] { | |
type Repr = scala.collection.Seq[Channel] :: Option[Channel] :: Option[Channel] :: Option[Channel] :: Option[String] :: Option[Int] :: Option[String] :: Option[Sharing] :: Option[Commerce] :: HNil | |
def to(t: TableOfContents): Repr = t._1 :: t._2 :: t._3 :: t._4 :: t._5 :: t._6 :: t._7 :: t._8 :: t._9 :: HNil | |
def from(r: Repr): TableOfContents = TableOfContents.apply(r(Nat(0)),r(Nat(1)),r(Nat(2)),r(Nat(3)),r(Nat(4)),r(Nat(5)),r(Nat(6)),r(Nat(7)),r(Nat(8))) | |
} | |
implicit val ArticleRedirectGeneric: Generic.Aux[ArticleRedirect, Int :: HNil] = new Generic[ArticleRedirect] { | |
type Repr = Int :: HNil | |
def to(t: ArticleRedirect): Repr = t._1 :: HNil | |
def from(r: Repr): ArticleRedirect = ArticleRedirect.apply(r(Nat(0))) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment