All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.apollographql.apollo3.api.Input.kt Maven / Gradle / Ivy

There is a newer version: 4.0.0-beta.7
Show newest version
package com.apollographql.apollo3.api

import com.apollographql.apollo3.annotations.ApolloDeprecatedSince
import com.apollographql.apollo3.annotations.ApolloDeprecatedSince.Version.v3_0_0
import kotlin.jvm.JvmName
import kotlin.jvm.JvmStatic

@Deprecated("Input is a helper class to help migrating to 3.x " +
    "and will be removed in a future version")
@ApolloDeprecatedSince(v3_0_0)
class Input {
  companion object {
    @JvmStatic
    @Deprecated("optional() is a helper function to help migrating to 3.x " +
        "and will be removed in a future version", ReplaceWith("Optional.presentIfNotNull(value)"))
    @ApolloDeprecatedSince(v3_0_0)
    fun  optional(value: V): Optional {
      return Optional.presentIfNotNull(value)
    }

    @JvmStatic
    @Deprecated("fromNullable() is a helper function to help migrating to 3.x " +
        "and will be removed in a future version", ReplaceWith("Optional.Present(value)"))
    @ApolloDeprecatedSince(v3_0_0)
    fun  fromNullable(value: V): Optional {
      return Optional.Present(value)
    }

    @JvmStatic
    @Deprecated("absent() is a helper function to help migrating to 3.x " +
        "and will be removed in a future version", ReplaceWith("Optional.Absent"))
    @ApolloDeprecatedSince(v3_0_0)
    fun  absent(): Optional.Absent {
      return Optional.Absent
    }
  }
}

@Deprecated("toInput() is a helper function to help migrating to 3.x " +
    "and will be removed in a future version", ReplaceWith("Optional.presentIfNotNull(this)"))
@ApolloDeprecatedSince(v3_0_0)
@JvmName("-toInputOrAbsent")
fun  T.toInput(): Optional = Optional.presentIfNotNull(this)

@Deprecated("toInput() is a helper function to help migrating to 3.x " +
    "and will be removed in a future version", ReplaceWith("Optional.Present(this)"))
@ApolloDeprecatedSince(v3_0_0)
@JvmName("-toInput")
fun  T.toInput(): Optional = Optional.Present(this)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy