diff options
Diffstat (limited to 'plugins/sonatype-release/src/sonatype/models.scala')
-rw-r--r-- | plugins/sonatype-release/src/sonatype/models.scala | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/sonatype-release/src/sonatype/models.scala b/plugins/sonatype-release/src/sonatype/models.scala new file mode 100644 index 0000000..4446c53 --- /dev/null +++ b/plugins/sonatype-release/src/sonatype/models.scala @@ -0,0 +1,31 @@ +package cbt.sonatype + +case class StagingProfile( + id: String, + name: String, + repositoryTargetId: String, + resourceURI: String + ) + +case class StagingRepositoryId(repositoryId: String) + +object RepositoryState { + val fromString: String => RepositoryState = { + case "open" => Open + case "closed" => Closed + case "released" => Released + case other => Unknown(other) + } +} +sealed trait RepositoryState +case object Open extends RepositoryState +case object Closed extends RepositoryState +case object Released extends RepositoryState +case class Unknown(state: String) extends RepositoryState + +case class StagingRepository( + profileId: String, + profileName: String, + repositoryId: String, + state: RepositoryState // stands as `type` in XML response + ) |