/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.8.18 * User agent: apibuilder app.apibuilder.io/flow/dependency/0.8.18/http4s_0_20 */ package io.flow.dependency.v0.models { sealed trait Credentials extends _root_.scala.Product with _root_.scala.Serializable { def credentialsDiscriminator: CredentialsDiscriminator } /** * Defines the valid discriminator values for the type Credentials */ sealed trait CredentialsDiscriminator extends _root_.scala.Product with _root_.scala.Serializable object CredentialsDiscriminator { case object UsernamePassword extends CredentialsDiscriminator { override def toString = "username_password" } final case class UNDEFINED(override val toString: String) extends CredentialsDiscriminator val all: scala.List[CredentialsDiscriminator] = scala.List(UsernamePassword) private val byName: Map[String, CredentialsDiscriminator] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): CredentialsDiscriminator = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[CredentialsDiscriminator] = byName.get(value.toLowerCase) } sealed trait ItemSummary extends _root_.scala.Product with _root_.scala.Serializable { def itemSummaryDiscriminator: ItemSummaryDiscriminator } /** * Defines the valid discriminator values for the type ItemSummary */ sealed trait ItemSummaryDiscriminator extends _root_.scala.Product with _root_.scala.Serializable object ItemSummaryDiscriminator { case object BinarySummary extends ItemSummaryDiscriminator { override def toString = "binary_summary" } case object LibrarySummary extends ItemSummaryDiscriminator { override def toString = "library_summary" } case object ProjectSummary extends ItemSummaryDiscriminator { override def toString = "project_summary" } final case class UNDEFINED(override val toString: String) extends ItemSummaryDiscriminator val all: scala.List[ItemSummaryDiscriminator] = scala.List(BinarySummary, LibrarySummary, ProjectSummary) private val byName: Map[String, ItemSummaryDiscriminator] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): ItemSummaryDiscriminator = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[ItemSummaryDiscriminator] = byName.get(value.toLowerCase) } sealed trait TaskData extends _root_.scala.Product with _root_.scala.Serializable { def taskDataDiscriminator: TaskDataDiscriminator } /** * Defines the valid discriminator values for the type TaskData */ sealed trait TaskDataDiscriminator extends _root_.scala.Product with _root_.scala.Serializable object TaskDataDiscriminator { case object TaskDataUpserted extends TaskDataDiscriminator { override def toString = "task_data_upserted" } case object TaskDataSync extends TaskDataDiscriminator { override def toString = "task_data_sync" } case object TaskDataSyncOne extends TaskDataDiscriminator { override def toString = "task_data_sync_one" } case object TaskDataSyncLibrariesByPrefix extends TaskDataDiscriminator { override def toString = "task_data_sync_libraries_by_prefix" } case object TaskDataSyncOrganizationLibraries extends TaskDataDiscriminator { override def toString = "task_data_sync_organization_libraries" } final case class UNDEFINED(override val toString: String) extends TaskDataDiscriminator val all: scala.List[TaskDataDiscriminator] = scala.List(TaskDataUpserted, TaskDataSync, TaskDataSyncOne, TaskDataSyncLibrariesByPrefix, TaskDataSyncOrganizationLibraries) private val byName: Map[String, TaskDataDiscriminator] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): TaskDataDiscriminator = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[TaskDataDiscriminator] = byName.get(value.toLowerCase) } final case class Binary( id: String, organization: io.flow.dependency.v0.models.OrganizationSummary, name: io.flow.dependency.v0.models.BinaryType ) final case class BinaryForm( organizationId: String, name: io.flow.dependency.v0.models.BinaryType ) final case class BinarySummary( id: String, organization: io.flow.dependency.v0.models.OrganizationSummary, name: io.flow.dependency.v0.models.BinaryType ) extends ItemSummary { override val itemSummaryDiscriminator: ItemSummaryDiscriminator = ItemSummaryDiscriminator.BinarySummary } final case class BinaryVersion( id: String, binary: io.flow.dependency.v0.models.Binary, version: String ) /** * Used to authenticate user based on the oauth code we receive from github */ final case class GithubAuthenticationForm( code: String ) final case class GithubUser( id: String, user: io.flow.common.v0.models.UserReference, githubUserId: Long, login: String ) final case class GithubUserForm( userId: String, githubUserId: Long, login: String ) /** * Defines a github hook */ final case class GithubWebhook( id: Long ) /** * A denormalization of item content for search * * @param id Unique identifier for this item. */ final case class Item( id: String, organization: io.flow.dependency.v0.models.OrganizationSummary, visibility: io.flow.dependency.v0.models.Visibility, summary: io.flow.dependency.v0.models.ItemSummary, label: String, description: _root_.scala.Option[String] = None ) /** * @param resolver The resolver where we found this library */ final case class Library( id: String, organization: io.flow.dependency.v0.models.OrganizationSummary, groupId: String, artifactId: String, resolver: io.flow.dependency.v0.models.ResolverSummary ) /** * @param version If provided, we automatically record this version of this library. */ final case class LibraryForm( organizationId: String, groupId: String, artifactId: String, resolverId: String, version: _root_.scala.Option[io.flow.dependency.v0.models.VersionForm] = None ) final case class LibrarySummary( id: String, organization: io.flow.dependency.v0.models.OrganizationSummary, groupId: String, artifactId: String ) extends ItemSummary { override val itemSummaryDiscriminator: ItemSummaryDiscriminator = ItemSummaryDiscriminator.LibrarySummary } final case class LibraryVersion( id: String, library: io.flow.dependency.v0.models.Library, version: String, crossBuildVersion: _root_.scala.Option[String] = None ) /** * A user can belong to one or more organizations via memberships. * * @param id Unique identifier for this membership */ final case class Membership( id: String, user: io.flow.dependency.v0.models.UserSummary, organization: io.flow.dependency.v0.models.OrganizationSummary, role: io.flow.dependency.v0.models.Role ) final case class MembershipForm( userId: String, organization: String, role: io.flow.dependency.v0.models.Role = io.flow.dependency.v0.models.Role.Member ) /** * @param user The user that created this organization */ final case class Organization( id: String, user: io.flow.common.v0.models.UserReference, key: String ) final case class OrganizationForm( key: String ) final case class OrganizationSummary( id: String, key: String ) /** * @param user The user that created this project */ final case class Project( id: String, organization: io.flow.dependency.v0.models.OrganizationSummary, user: io.flow.common.v0.models.UserReference, visibility: io.flow.dependency.v0.models.Visibility, scms: io.flow.dependency.v0.models.Scms, name: String, uri: String, branch: String ) final case class ProjectBinary( id: String, project: io.flow.dependency.v0.models.ProjectDetail, name: String, version: String, path: String, binary: _root_.scala.Option[io.flow.dependency.v0.models.Reference] = None ) /** * Provides an ordered set of projects such that each set of projects is sure to * have its dependencies resolved. ie. when upgrading projects, you can efficiently * upgrade each set of projects in resolved togther. * * @param unresolved A list of projects that could not be resolved due to circular dependencies */ final case class ProjectDependencyResolution( resolved: Seq[io.flow.dependency.v0.models.ProjectDependencyResolutionResolved], unresolved: Seq[io.flow.dependency.v0.models.ProjectUnresolvedSummary], steps: Map[String, String] ) final case class ProjectDependencyResolutionResolved( projects: Seq[io.flow.dependency.v0.models.ProjectSummary] ) final case class ProjectDetail( id: String, organization: io.flow.dependency.v0.models.OrganizationSummary, name: String ) final case class ProjectForm( organization: String, name: String, visibility: io.flow.dependency.v0.models.Visibility, scms: io.flow.dependency.v0.models.Scms, uri: String, branch: String ) final case class ProjectLibrary( id: String, project: io.flow.dependency.v0.models.ProjectDetail, groupId: String, artifactId: String, version: String, crossBuildVersion: _root_.scala.Option[String] = None, path: String, library: _root_.scala.Option[io.flow.dependency.v0.models.Reference] = None ) final case class ProjectPatchForm( name: _root_.scala.Option[String] = None, visibility: _root_.scala.Option[io.flow.dependency.v0.models.Visibility] = None, scms: _root_.scala.Option[io.flow.dependency.v0.models.Scms] = None, uri: _root_.scala.Option[String] = None, branch: _root_.scala.Option[String] = None ) final case class ProjectSummary( id: String, organization: io.flow.dependency.v0.models.OrganizationSummary, name: String ) extends ItemSummary { override val itemSummaryDiscriminator: ItemSummaryDiscriminator = ItemSummaryDiscriminator.ProjectSummary } final case class ProjectUnresolvedSummary( project: io.flow.dependency.v0.models.ProjectSummary, resolvedLibraries: Seq[String], unresolvedLibraries: Seq[String] ) /** * Summary of a specific recommendations for a project. Designed for display in the * project dashboard * * @param name The name of the library or binary to upgrade * @param from The current version * @param to The version to which we recommend upgrading */ final case class Recommendation( id: String, project: io.flow.dependency.v0.models.ProjectDetail, `type`: io.flow.dependency.v0.models.RecommendationType, `object`: io.flow.dependency.v0.models.Reference, name: String, from: String, to: String, createdAt: _root_.java.time.Instant ) final case class Reference( id: String ) final case class Repository( name: String, visibility: io.flow.dependency.v0.models.Visibility, uri: String ) /** * @param organization The organization that created the resolver. If empty, indicates a globally * public resolver */ final case class Resolver( id: String, visibility: io.flow.dependency.v0.models.Visibility, organization: _root_.scala.Option[io.flow.dependency.v0.models.OrganizationSummary] = None, uri: String, credentials: _root_.scala.Option[io.flow.dependency.v0.models.Credentials] = None ) final case class ResolverForm( visibility: io.flow.dependency.v0.models.Visibility, organization: String, uri: String, credentials: _root_.scala.Option[io.flow.dependency.v0.models.Credentials] = None ) final case class ResolverSummary( id: String, organization: _root_.scala.Option[io.flow.dependency.v0.models.OrganizationSummary] = None, visibility: io.flow.dependency.v0.models.Visibility, uri: String ) /** * Represents a user that is currently subscribed to a publication * * @param id Internal unique identifier for this subscription record */ final case class Subscription( id: String, user: io.flow.common.v0.models.UserReference, publication: io.flow.dependency.v0.models.Publication ) final case class SubscriptionForm( userId: String, publication: io.flow.dependency.v0.models.Publication ) /** * Records when we start and complete each sync of a module (e.g. project) * * @param id Unique identifier for this item. */ final case class Sync( id: String, objectId: String, event: io.flow.dependency.v0.models.SyncEvent, createdAt: _root_.java.time.Instant ) /** * @param `type` If not specified, we sync all types */ final case class TaskDataSync( `type`: _root_.scala.Option[io.flow.dependency.v0.models.SyncType] = None ) extends TaskData { override val taskDataDiscriminator: TaskDataDiscriminator = TaskDataDiscriminator.TaskDataSync } final case class TaskDataSyncLibrariesByPrefix( userId: String, prefix: String ) extends TaskData { override val taskDataDiscriminator: TaskDataDiscriminator = TaskDataDiscriminator.TaskDataSyncLibrariesByPrefix } final case class TaskDataSyncOne( id: String, `type`: io.flow.dependency.v0.models.SyncType ) extends TaskData { override val taskDataDiscriminator: TaskDataDiscriminator = TaskDataDiscriminator.TaskDataSyncOne } final case class TaskDataSyncOrganizationLibraries( organizationId: String ) extends TaskData { override val taskDataDiscriminator: TaskDataDiscriminator = TaskDataDiscriminator.TaskDataSyncOrganizationLibraries } /** * Represents that a new, for example, project was created or updated */ final case class TaskDataUpserted( id: String, `type`: io.flow.dependency.v0.models.SyncType ) extends TaskData { override val taskDataDiscriminator: TaskDataDiscriminator = TaskDataDiscriminator.TaskDataUpserted } /** * @param cleartext The cleartext token. Only available when the token is initially created */ final case class Token( id: String, user: io.flow.common.v0.models.UserReference, masked: String, cleartext: _root_.scala.Option[String] = None, description: _root_.scala.Option[String] = None ) final case class TokenForm( userId: String, description: _root_.scala.Option[String] = None ) final case class UserForm( email: _root_.scala.Option[String] = None, name: _root_.scala.Option[io.flow.common.v0.models.Name] = None ) final case class UserIdentifier( id: String, user: io.flow.common.v0.models.UserReference, value: String ) final case class UserSummary( id: String, email: _root_.scala.Option[String] = None, name: io.flow.common.v0.models.Name ) final case class UsernamePassword( username: String, password: _root_.scala.Option[String] = None ) extends Credentials { override val credentialsDiscriminator: CredentialsDiscriminator = CredentialsDiscriminator.UsernamePassword } final case class VersionForm( version: String, crossBuildVersion: _root_.scala.Option[String] = None ) /** * Provides future compatibility in clients - in the future, when a type is added * to the union Credentials, it will need to be handled in the client code. This * implementation will deserialize these future types as an instance of this class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class CredentialsUndefinedType( description: String ) extends Credentials { override val credentialsDiscriminator: CredentialsDiscriminator = CredentialsDiscriminator.UNDEFINED(description) } /** * Provides future compatibility in clients - in the future, when a type is added * to the union ItemSummary, it will need to be handled in the client code. This * implementation will deserialize these future types as an instance of this class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class ItemSummaryUndefinedType( description: String ) extends ItemSummary { override val itemSummaryDiscriminator: ItemSummaryDiscriminator = ItemSummaryDiscriminator.UNDEFINED(description) } /** * Provides future compatibility in clients - in the future, when a type is added * to the union TaskData, it will need to be handled in the client code. This * implementation will deserialize these future types as an instance of this class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class TaskDataUndefinedType( description: String ) extends TaskData { override val taskDataDiscriminator: TaskDataDiscriminator = TaskDataDiscriminator.UNDEFINED(description) } sealed trait BinaryType extends _root_.scala.Product with _root_.scala.Serializable object BinaryType { /** * See http://www.scala-lang.org/ */ case object Scala extends BinaryType { override def toString = "scala" } /** * See http://www.scala-sbt.org/ */ case object Sbt extends BinaryType { override def toString = "sbt" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious for users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends BinaryType /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[BinaryType] = scala.List(Scala, Sbt) private val byName: Map[String, BinaryType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): BinaryType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[BinaryType] = byName.get(value.toLowerCase) } /** * A publication represents something that a user can subscribe to. */ sealed trait Publication extends _root_.scala.Product with _root_.scala.Serializable object Publication { /** * A daily summary of dependencies that can be upgraded */ case object DailySummary extends Publication { override def toString = "daily_summary" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious for users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends Publication /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[Publication] = scala.List(DailySummary) private val byName: Map[String, Publication] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): Publication = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[Publication] = byName.get(value.toLowerCase) } sealed trait RecommendationType extends _root_.scala.Product with _root_.scala.Serializable object RecommendationType { case object Library extends RecommendationType { override def toString = "library" } case object Binary extends RecommendationType { override def toString = "binary" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious for users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends RecommendationType /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[RecommendationType] = scala.List(Library, Binary) private val byName: Map[String, RecommendationType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): RecommendationType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[RecommendationType] = byName.get(value.toLowerCase) } sealed trait Role extends _root_.scala.Product with _root_.scala.Serializable object Role { case object Member extends Role { override def toString = "member" } case object Admin extends Role { override def toString = "admin" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious for users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends Role /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[Role] = scala.List(Member, Admin) private val byName: Map[String, Role] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): Role = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[Role] = byName.get(value.toLowerCase) } sealed trait Scms extends _root_.scala.Product with _root_.scala.Serializable object Scms { case object Github extends Scms { override def toString = "github" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious for users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends Scms /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[Scms] = scala.List(Github) private val byName: Map[String, Scms] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): Scms = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[Scms] = byName.get(value.toLowerCase) } sealed trait SyncEvent extends _root_.scala.Product with _root_.scala.Serializable object SyncEvent { case object Started extends SyncEvent { override def toString = "started" } case object Completed extends SyncEvent { override def toString = "completed" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious for users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends SyncEvent /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[SyncEvent] = scala.List(Started, Completed) private val byName: Map[String, SyncEvent] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): SyncEvent = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[SyncEvent] = byName.get(value.toLowerCase) } sealed trait SyncType extends _root_.scala.Product with _root_.scala.Serializable object SyncType { case object Project extends SyncType { override def toString = "project" } case object Library extends SyncType { override def toString = "library" } case object Binary extends SyncType { override def toString = "binary" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious for users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends SyncType /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[SyncType] = scala.List(Project, Library, Binary) private val byName: Map[String, SyncType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): SyncType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[SyncType] = byName.get(value.toLowerCase) } sealed trait Visibility extends _root_.scala.Product with _root_.scala.Serializable object Visibility { case object Public extends Visibility { override def toString = "public" } case object Private extends Visibility { override def toString = "private" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious for users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends Visibility /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[Visibility] = scala.List(Public, Private) private val byName: Map[String, Visibility] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): Visibility = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[Visibility] = byName.get(value.toLowerCase) } }