Advertisement
leinardi

Untitled

Jan 3rd, 2023
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 14.42 KB | None | 0 0
  1. //
  2. // AUTO-GENERATED FILE. DO NOT MODIFY.
  3. //
  4. // This class was automatically generated by Apollo GraphQL version '3.7.2'.
  5. //
  6. package com.example.library.network.api.graphql
  7.  
  8. import com.apollographql.apollo3.annotations.ApolloAdaptableWith
  9. import com.apollographql.apollo3.api.Adapter
  10. import com.apollographql.apollo3.api.CompiledField
  11. import com.apollographql.apollo3.api.CustomScalarAdapters
  12. import com.apollographql.apollo3.api.DefaultFakeResolver
  13. import com.apollographql.apollo3.api.FakeResolver
  14. import com.apollographql.apollo3.api.GlobalBuilder
  15. import com.apollographql.apollo3.api.Query
  16. import com.apollographql.apollo3.api.buildData
  17. import com.apollographql.apollo3.api.json.JsonWriter
  18. import com.apollographql.apollo3.api.obj
  19. import com.example.library.network.api.graphql.adapter.ActivityQuery_ResponseAdapter
  20. import com.example.library.network.api.graphql.adapter.ActivityQuery_VariablesAdapter
  21. import com.example.library.network.api.graphql.fragment.ClinicalTrialFragment
  22. import com.example.library.network.api.graphql.fragment.EventFragment
  23. import com.example.library.network.api.graphql.fragment.GuidelineFragment
  24. import com.example.library.network.api.graphql.fragment.MediaMentionFragment
  25. import com.example.library.network.api.graphql.fragment.PublicationFragment
  26. import com.example.library.network.api.graphql.selections.ActivityQuerySelections
  27. import com.example.library.network.api.graphql.type.QueryBuilder
  28. import com.example.library.network.api.graphql.type.__CustomScalarAdapters
  29. import com.example.library.network.api.graphql.type.__Schema
  30. import com.example.library.network.api.graphql.type.buildQuery
  31. import kotlin.String
  32. import kotlin.Unit
  33. import kotlin.collections.List
  34.  
  35. public data class ActivityQuery(
  36.   public val docId: String,
  37.   public val expertId: String,
  38. ) : Query<ActivityQuery.Data> {
  39.   public override fun id(): String = OPERATION_ID
  40.  
  41.   public override fun document(): String = OPERATION_DOCUMENT
  42.  
  43.   public override fun name(): String = OPERATION_NAME
  44.  
  45.   public override fun serializeVariables(writer: JsonWriter,
  46.       customScalarAdapters: CustomScalarAdapters): Unit {
  47.     ActivityQuery_VariablesAdapter.toJson(writer, customScalarAdapters, this)
  48.   }
  49.  
  50.   public override fun adapter(): Adapter<Data> = ActivityQuery_ResponseAdapter.Data.obj()
  51.  
  52.   public override fun rootField(): CompiledField = CompiledField.Builder(
  53.     name = "data",
  54.     type = com.example.library.network.api.graphql.type.Query.type
  55.   )
  56.   .selections(selections = ActivityQuerySelections.__root)
  57.   .build()
  58.  
  59.   @ApolloAdaptableWith(ActivityQuery_ResponseAdapter.Data::class)
  60.   public data class Data(
  61.     public val activity: Activity?,
  62.   ) : Query.Data
  63.  
  64.   public sealed interface Activity {
  65.     public val __typename: String
  66.  
  67.     /**
  68.      * internal id
  69.      */
  70.     public val docId: String
  71.  
  72.     public val webSource: String?
  73.  
  74.     /**
  75.      * Synthetic field for inline fragment on Event
  76.      */
  77.     public val onEvent: OnEvent?
  78.  
  79.     /**
  80.      * Synthetic field for inline fragment on MediaMention
  81.      */
  82.     public val onMediaMention: OnMediaMention?
  83.  
  84.     /**
  85.      * Synthetic field for 'eventFragment'
  86.      */
  87.     public val eventFragment: EventFragment?
  88.  
  89.     /**
  90.      * Synthetic field for 'publicationFragment'
  91.      */
  92.     public val publicationFragment: PublicationFragment?
  93.  
  94.     /**
  95.      * Synthetic field for 'mediaMentionFragment'
  96.      */
  97.     public val mediaMentionFragment: MediaMentionFragment?
  98.  
  99.     /**
  100.      * Synthetic field for 'guidelineFragment'
  101.      */
  102.     public val guidelineFragment: GuidelineFragment?
  103.  
  104.     /**
  105.      * Synthetic field for 'clinicalTrialFragment'
  106.      */
  107.     public val clinicalTrialFragment: ClinicalTrialFragment?
  108.   }
  109.  
  110.   public data class EventActivity(
  111.     public override val __typename: String,
  112.     /**
  113.      * internal id
  114.      */
  115.     public override val docId: String,
  116.     public override val webSource: String?,
  117.     /**
  118.      * Synthetic field for inline fragment on Event
  119.      */
  120.     public override val onEvent: OnEvent,
  121.     /**
  122.      * Synthetic field for inline fragment on MediaMention
  123.      */
  124.     public override val onMediaMention: OnMediaMention?,
  125.     /**
  126.      * Synthetic field for 'eventFragment'
  127.      */
  128.     public override val eventFragment: EventFragment,
  129.     /**
  130.      * Synthetic field for 'publicationFragment'
  131.      */
  132.     public override val publicationFragment: PublicationFragment?,
  133.     /**
  134.      * Synthetic field for 'mediaMentionFragment'
  135.      */
  136.     public override val mediaMentionFragment: MediaMentionFragment?,
  137.     /**
  138.      * Synthetic field for 'guidelineFragment'
  139.      */
  140.     public override val guidelineFragment: GuidelineFragment?,
  141.     /**
  142.      * Synthetic field for 'clinicalTrialFragment'
  143.      */
  144.     public override val clinicalTrialFragment: ClinicalTrialFragment?,
  145.   ) : Activity
  146.  
  147.   public data class MediaMentionActivity(
  148.     public override val __typename: String,
  149.     /**
  150.      * internal id
  151.      */
  152.     public override val docId: String,
  153.     public override val webSource: String?,
  154.     /**
  155.      * Synthetic field for inline fragment on Event
  156.      */
  157.     public override val onEvent: OnEvent?,
  158.     /**
  159.      * Synthetic field for inline fragment on MediaMention
  160.      */
  161.     public override val onMediaMention: OnMediaMention,
  162.     /**
  163.      * Synthetic field for 'eventFragment'
  164.      */
  165.     public override val eventFragment: EventFragment?,
  166.     /**
  167.      * Synthetic field for 'publicationFragment'
  168.      */
  169.     public override val publicationFragment: PublicationFragment?,
  170.     /**
  171.      * Synthetic field for 'mediaMentionFragment'
  172.      */
  173.     public override val mediaMentionFragment: MediaMentionFragment,
  174.     /**
  175.      * Synthetic field for 'guidelineFragment'
  176.      */
  177.     public override val guidelineFragment: GuidelineFragment?,
  178.     /**
  179.      * Synthetic field for 'clinicalTrialFragment'
  180.      */
  181.     public override val clinicalTrialFragment: ClinicalTrialFragment?,
  182.   ) : Activity
  183.  
  184.   public data class PublicationActivity(
  185.     public override val __typename: String,
  186.     /**
  187.      * internal id
  188.      */
  189.     public override val docId: String,
  190.     public override val webSource: String?,
  191.     /**
  192.      * Synthetic field for inline fragment on Event
  193.      */
  194.     public override val onEvent: OnEvent?,
  195.     /**
  196.      * Synthetic field for inline fragment on MediaMention
  197.      */
  198.     public override val onMediaMention: OnMediaMention?,
  199.     /**
  200.      * Synthetic field for 'eventFragment'
  201.      */
  202.     public override val eventFragment: EventFragment?,
  203.     /**
  204.      * Synthetic field for 'publicationFragment'
  205.      */
  206.     public override val publicationFragment: PublicationFragment,
  207.     /**
  208.      * Synthetic field for 'mediaMentionFragment'
  209.      */
  210.     public override val mediaMentionFragment: MediaMentionFragment?,
  211.     /**
  212.      * Synthetic field for 'guidelineFragment'
  213.      */
  214.     public override val guidelineFragment: GuidelineFragment?,
  215.     /**
  216.      * Synthetic field for 'clinicalTrialFragment'
  217.      */
  218.     public override val clinicalTrialFragment: ClinicalTrialFragment?,
  219.   ) : Activity
  220.  
  221.   public data class GuidelineActivity(
  222.     public override val __typename: String,
  223.     /**
  224.      * internal id
  225.      */
  226.     public override val docId: String,
  227.     public override val webSource: String?,
  228.     /**
  229.      * Synthetic field for inline fragment on Event
  230.      */
  231.     public override val onEvent: OnEvent?,
  232.     /**
  233.      * Synthetic field for inline fragment on MediaMention
  234.      */
  235.     public override val onMediaMention: OnMediaMention?,
  236.     /**
  237.      * Synthetic field for 'eventFragment'
  238.      */
  239.     public override val eventFragment: EventFragment?,
  240.     /**
  241.      * Synthetic field for 'publicationFragment'
  242.      */
  243.     public override val publicationFragment: PublicationFragment?,
  244.     /**
  245.      * Synthetic field for 'mediaMentionFragment'
  246.      */
  247.     public override val mediaMentionFragment: MediaMentionFragment?,
  248.     /**
  249.      * Synthetic field for 'guidelineFragment'
  250.      */
  251.     public override val guidelineFragment: GuidelineFragment,
  252.     /**
  253.      * Synthetic field for 'clinicalTrialFragment'
  254.      */
  255.     public override val clinicalTrialFragment: ClinicalTrialFragment?,
  256.   ) : Activity
  257.  
  258.   public data class ClinicalTrialActivity(
  259.     public override val __typename: String,
  260.     /**
  261.      * internal id
  262.      */
  263.     public override val docId: String,
  264.     public override val webSource: String?,
  265.     /**
  266.      * Synthetic field for inline fragment on Event
  267.      */
  268.     public override val onEvent: OnEvent?,
  269.     /**
  270.      * Synthetic field for inline fragment on MediaMention
  271.      */
  272.     public override val onMediaMention: OnMediaMention?,
  273.     /**
  274.      * Synthetic field for 'eventFragment'
  275.      */
  276.     public override val eventFragment: EventFragment?,
  277.     /**
  278.      * Synthetic field for 'publicationFragment'
  279.      */
  280.     public override val publicationFragment: PublicationFragment?,
  281.     /**
  282.      * Synthetic field for 'mediaMentionFragment'
  283.      */
  284.     public override val mediaMentionFragment: MediaMentionFragment?,
  285.     /**
  286.      * Synthetic field for 'guidelineFragment'
  287.      */
  288.     public override val guidelineFragment: GuidelineFragment?,
  289.     /**
  290.      * Synthetic field for 'clinicalTrialFragment'
  291.      */
  292.     public override val clinicalTrialFragment: ClinicalTrialFragment,
  293.   ) : Activity
  294.  
  295.   public data class OtherActivity(
  296.     public override val __typename: String,
  297.     /**
  298.      * internal id
  299.      */
  300.     public override val docId: String,
  301.     public override val webSource: String?,
  302.     /**
  303.      * Synthetic field for inline fragment on Event
  304.      */
  305.     public override val onEvent: OnEvent?,
  306.     /**
  307.      * Synthetic field for inline fragment on MediaMention
  308.      */
  309.     public override val onMediaMention: OnMediaMention?,
  310.     /**
  311.      * Synthetic field for 'eventFragment'
  312.      */
  313.     public override val eventFragment: EventFragment?,
  314.     /**
  315.      * Synthetic field for 'publicationFragment'
  316.      */
  317.     public override val publicationFragment: PublicationFragment?,
  318.     /**
  319.      * Synthetic field for 'mediaMentionFragment'
  320.      */
  321.     public override val mediaMentionFragment: MediaMentionFragment?,
  322.     /**
  323.      * Synthetic field for 'guidelineFragment'
  324.      */
  325.     public override val guidelineFragment: GuidelineFragment?,
  326.     /**
  327.      * Synthetic field for 'clinicalTrialFragment'
  328.      */
  329.     public override val clinicalTrialFragment: ClinicalTrialFragment?,
  330.   ) : Activity
  331.  
  332.   public data class OnEvent(
  333.     public val expertContributions: List<ExpertContribution?>,
  334.   )
  335.  
  336.   public data class ExpertContribution(
  337.     /**
  338.      * internal id
  339.      */
  340.     public val docId: String,
  341.     public val position: String,
  342.     public val title: String?,
  343.     public val session: Session?,
  344.   )
  345.  
  346.   public data class Session(
  347.     public val sessionId: String,
  348.     public val sessionTitle: String,
  349.     public val sessionWebSource: String?,
  350.   )
  351.  
  352.   public data class OnMediaMention(
  353.     public val latestExpertPublication: LatestExpertPublication?,
  354.   )
  355.  
  356.   public data class LatestExpertPublication(
  357.     public val activity: Activity1,
  358.   )
  359.  
  360.   public data class Activity1(
  361.     /**
  362.      * internal id
  363.      */
  364.     public val docId: String,
  365.     public val title: String?,
  366.   )
  367.  
  368.   public companion object {
  369.     public const val OPERATION_ID: String =
  370.         "8197dab9a5ec297c961cfb65512b906abd45b6f1970804156ac056c1191ec16c"
  371.  
  372.     /**
  373.      * The minimized GraphQL document being sent to the server to save a few bytes.
  374.      * The un-minimized version is:
  375.      *
  376.      * query Activity($docId: ID!, $expertId: ID!) {
  377.      *   activity(docId: $docId) {
  378.      *     __typename
  379.      *     docId
  380.      *     webSource
  381.      *     ...eventFragment
  382.      *     ... on Event {
  383.      *       expertContributions(expertId: $expertId) {
  384.      *         docId
  385.      *         position
  386.      *         title
  387.      *         session {
  388.      *           sessionId
  389.      *           sessionTitle
  390.      *           sessionWebSource
  391.      *         }
  392.      *       }
  393.      *     }
  394.      *     ...publicationFragment
  395.      *     ...mediaMentionFragment
  396.      *     ... on MediaMention {
  397.      *       latestExpertPublication(expertId: $expertId) {
  398.      *         activity {
  399.      *           docId
  400.      *           title
  401.      *         }
  402.      *       }
  403.      *     }
  404.      *     ...guidelineFragment
  405.      *     ...clinicalTrialFragment
  406.      *   }
  407.      * }
  408.      *
  409.      * fragment eventFragment on Event {
  410.      *   title
  411.      *   startDate
  412.      *   address {
  413.      *     city
  414.      *     country
  415.      *   }
  416.      * }
  417.      *
  418.      * fragment publicationFragment on Publication {
  419.      *   title
  420.      *   startDate
  421.      *   journalName
  422.      *   maCitationCount
  423.      *   abstract
  424.      *   webSource
  425.      * }
  426.      *
  427.      * fragment mediaMentionFragment on MediaMention {
  428.      *   title
  429.      *   startDate
  430.      * }
  431.      *
  432.      * fragment guidelineFragment on Guideline {
  433.      *   title
  434.      *   startDate
  435.      *   journalName
  436.      *   webSource
  437.      * }
  438.      *
  439.      * fragment clinicalTrialFragment on ClinicalTrial {
  440.      *   title
  441.      *   startDate
  442.      *   studyPhase
  443.      *   purpose
  444.      * }
  445.      */
  446.     public val OPERATION_DOCUMENT: String
  447.       get() =
  448.           "query Activity(${'$'}docId: ID!, ${'$'}expertId: ID!) { activity(docId: ${'$'}docId) { __typename docId webSource ...eventFragment ... on Event { expertContributions(expertId: ${'$'}expertId) { docId position title session { sessionId sessionTitle sessionWebSource } } } ...publicationFragment ...mediaMentionFragment ... on MediaMention { latestExpertPublication(expertId: ${'$'}expertId) { activity { docId title } } } ...guidelineFragment ...clinicalTrialFragment } }  fragment eventFragment on Event { title startDate address { city country } }  fragment publicationFragment on Publication { title startDate journalName maCitationCount abstract webSource }  fragment mediaMentionFragment on MediaMention { title startDate }  fragment guidelineFragment on Guideline { title startDate journalName webSource }  fragment clinicalTrialFragment on ClinicalTrial { title startDate studyPhase purpose }"
  449.  
  450.     public const val OPERATION_NAME: String = "Activity"
  451.  
  452.     public fun Data(resolver: FakeResolver = DefaultFakeResolver(__Schema.all),
  453.         block: QueryBuilder.() -> Unit = {}): Data = buildData(
  454.       ActivityQuery_ResponseAdapter.Data,
  455.       ActivityQuerySelections.__root,
  456.       "Query",
  457.       GlobalBuilder.buildQuery(block),
  458.       resolver,
  459.       __CustomScalarAdapters,
  460.     )
  461.   }
  462. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement