diff options
author | jonmv <venstad@gmail.com> | 2022-04-27 13:48:20 +0200 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2022-04-27 13:48:20 +0200 |
commit | b0fbdb9759b687c8b7928da922a1e78cbbd579cd (patch) | |
tree | 6bcc8b7a376f2524349674e5a518e45a86251ec1 /controller-api | |
parent | 9eddf6d78a3544843842f34a7b711a5565e7fd03 (diff) |
Put submission stuff in a separate class
Diffstat (limited to 'controller-api')
2 files changed, 0 insertions, 92 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/SubmitOptions.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/SubmitOptions.java deleted file mode 100644 index c1144d5f18d..00000000000 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/SubmitOptions.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.hosted.controller.api.application.v4.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.yahoo.vespa.hosted.controller.api.identifiers.GitBranch; -import com.yahoo.vespa.hosted.controller.api.identifiers.GitCommit; -import com.yahoo.vespa.hosted.controller.api.identifiers.GitRepository; - -import java.util.Objects; - -/** - * Additional options to be sent along the application package and the application test package - * when submitting an application to the controller - * - * @author freva - */ -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubmitOptions { - - public GitRepository repository; - public GitBranch branch; - public GitCommit commit; - - public static SubmitOptions from(String repository, String branch, String commit) { - SubmitOptions options = new SubmitOptions(); - options.repository = new GitRepository(repository); - options.branch = new GitBranch(branch); - options.commit = new GitCommit(commit); - return options; - } - - @Override - public String toString() { - return "SubmitOptions{" + - "repository=" + repository + - ", branch=" + branch + - ", commit=" + commit + - '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - SubmitOptions that = (SubmitOptions) o; - return Objects.equals(repository, that.repository) && - Objects.equals(branch, that.branch) && - Objects.equals(commit, that.commit); - } - - @Override - public int hashCode() { - return Objects.hash(repository, branch, commit); - } -} diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/SubmitResult.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/SubmitResult.java deleted file mode 100644 index f575464e84b..00000000000 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/SubmitResult.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.hosted.controller.api.application.v4.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.util.Objects; - -/** - * Represents the response from application submit request - * - * @author freva - */ -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubmitResult { - - public String version; - - @Override - public String toString() { - return "SubmitResult{" + - "version='" + version + '\'' + - '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - SubmitResult that = (SubmitResult) o; - return Objects.equals(version, that.version); - } - - @Override - public int hashCode() { - return Objects.hash(version); - } -} |