diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..097f9f98
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,9 @@
+#
+# https://help.github.com/articles/dealing-with-line-endings/
+#
+# Linux start script should use lf
+/gradlew text eol=lf
+
+# These are Windows script files and should use crlf
+*.bat text eol=crlf
+
diff --git a/.gitignore b/.gitignore
index 9a983292..737666c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,13 @@ mongo.log
# IDE
.vscode
.idea
+.project
# OS
-.DS_Store
\ No newline at end of file
+.DS_Store
+
+# Ignore Gradle project-specific cache directory
+.gradle
+
+# Ignore Gradle build output directory
+build
diff --git a/Makefile b/Makefile
index 85816b5c..41e0b6de 100644
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,13 @@ compile:
kb-sdk compile $(SPEC_FILE) \
--out . \
- --html \
+ --html
+
+ kb-sdk compile $(SPEC_FILE) \
+ --out . \
+ --java \
+ --url https://ci.kbase.us/services/sampleservice \
+ --javasrc src/main/java
test: test-sdkless coverage-reports
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 5b518731..13694796 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,6 +1,8 @@
# SampleService release notes
-## Unreleased
+## 0.2.6
+
+* Added jitpack build for Java client
## 0.2.5
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 00000000..22ab2962
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,64 @@
+/*
+ * This file was generated by the Gradle 'init' task.
+ */
+
+plugins {
+ id 'java'
+ id 'maven-publish'
+}
+
+group = 'com.github.kbase'
+
+var VER_AUTH2_CLIENT = "0.5.0"
+var VER_JAVA_COMMON = "0.3.0"
+
+repositories {
+ mavenCentral()
+ maven {
+ name = "JitPack"
+ url = 'https://jitpack.io'
+ }
+}
+
+compileJava {
+ // TODO BUILD remove when we no longer support java 8, use `options.release = 11 if necessary`
+ java.sourceCompatibility = JavaVersion.VERSION_1_8
+ java.targetCompatibility = JavaVersion.VERSION_1_8
+}
+
+java {
+ withSourcesJar()
+ withJavadocJar()
+}
+
+javadoc {
+ /* TODO DOCS the current sdk documenation looks like invalid html to javadoc
+ * need to go through and remove
+ */
+ failOnError = false
+ options {
+ // I don't know why this isn't working, but it's not worth spending time on right now
+ links "https://docs.oracle.com/javase/8/docs/api/"
+ links "https://javadoc.jitpack.io/com/github/kbase/auth2_client_java/$VER_AUTH2_CLIENT/javadoc/"
+ links "https://javadoc.jitpack.io/com/github/kbase/java_common/$VER_JAVA_COMMON/javadoc/"
+ }
+}
+
+publishing {
+ publications {
+ maven(MavenPublication) {
+ from components.java
+ }
+ }
+}
+
+dependencies {
+
+ // using older dependencies to not force upgrades on services that might not be able to
+ // handle them. Need to upgrade the services and then upgrade here
+ implementation "com.github.kbase:java_common:$VER_JAVA_COMMON"
+ implementation "com.fasterxml.jackson.core:jackson-databind:2.5.4"
+ implementation "com.github.kbase:auth2_client_java:$VER_AUTH2_CLIENT"
+ implementation 'javax.annotation:javax.annotation-api:1.3.2'
+
+}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
new file mode 100644
index 00000000..4ac3234a
--- /dev/null
+++ b/gradle/libs.versions.toml
@@ -0,0 +1,2 @@
+# This file was generated by the Gradle 'init' task.
+# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..e6441136
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..b82aa23a
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,7 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+networkTimeout=10000
+validateDistributionUrl=true
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100755
index 00000000..1aa94a42
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,249 @@
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# Darwin, MinGW, and NonStop.
+#
+# (3) This script is generated from the Groovy template
+# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
+##############################################################################
+
+# Attempt to set APP_HOME
+
+# Resolve links: $0 may be a link
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+ [ -h "$app_path" ]
+do
+ ls=$( ls -ld "$app_path" )
+ link=${ls#*' -> '}
+ case $link in #(
+ /*) app_path=$link ;; #(
+ *) app_path=$APP_HOME$link ;;
+ esac
+done
+
+# This is normally unused
+# shellcheck disable=SC2034
+APP_BASE_NAME=${0##*/}
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD=maximum
+
+warn () {
+ echo "$*"
+} >&2
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+} >&2
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "$( uname )" in #(
+ CYGWIN* ) cygwin=true ;; #(
+ Darwin* ) darwin=true ;; #(
+ MSYS* | MINGW* ) msys=true ;; #(
+ NONSTOP* ) nonstop=true ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD=$JAVA_HOME/jre/sh/java
+ else
+ JAVACMD=$JAVA_HOME/bin/java
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD=java
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+fi
+
+# Increase the maximum file descriptors if we can.
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+ case $MAX_FD in #(
+ max*)
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC2039,SC3045
+ MAX_FD=$( ulimit -H -n ) ||
+ warn "Could not query maximum file descriptor limit"
+ esac
+ case $MAX_FD in #(
+ '' | soft) :;; #(
+ *)
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC2039,SC3045
+ ulimit -n "$MAX_FD" ||
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
+ esac
+fi
+
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
+
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ for arg do
+ if
+ case $arg in #(
+ -*) false ;; # don't mess with options #(
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+ [ -e "$t" ] ;; #(
+ *) false ;;
+ esac
+ then
+ arg=$( cygpath --path --ignore --mixed "$arg" )
+ fi
+ # Roll the args list around exactly as many times as the number of
+ # args, so each arg winds up back in the position where it started, but
+ # possibly modified.
+ #
+ # NB: a `for` loop captures its iteration list before it begins, so
+ # changing the positional parameters here affects neither the number of
+ # iterations, nor the values presented in `arg`.
+ shift # remove old arg
+ set -- "$@" "$arg" # push replacement arg
+ done
+fi
+
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# and any embedded shellness will be escaped.
+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+# treated as '${Hostname}' itself on the command line.
+
+set -- \
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
+ -classpath "$CLASSPATH" \
+ org.gradle.wrapper.GradleWrapperMain \
+ "$@"
+
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+ die "xargs is not available"
+fi
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+ xargs -n1 |
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+ tr '\n' ' '
+ )" '"$@"'
+
+exec "$JAVACMD" "$@"
diff --git a/kbase.yml b/kbase.yml
index f8546f9f..8b3ffd94 100644
--- a/kbase.yml
+++ b/kbase.yml
@@ -8,7 +8,7 @@ service-language:
python
module-version:
- 0.2.5
+ 0.2.6
owners:
[gaprice, slebras]
diff --git a/lib/SampleService/SampleServiceImpl.py b/lib/SampleService/SampleServiceImpl.py
index c27c9c54..497176f6 100644
--- a/lib/SampleService/SampleServiceImpl.py
+++ b/lib/SampleService/SampleServiceImpl.py
@@ -57,9 +57,9 @@ class SampleService:
# state. A method could easily clobber the state set by another while
# the latter method is running.
######################################### noqa
- VERSION = "0.2.5"
- GIT_URL = "git@github.com:kbase/sample_service.git"
- GIT_COMMIT_HASH = "b7e68b5768795d77287d8ea6d67d32b21ae34cf9"
+ VERSION = "0.2.6"
+ GIT_URL = "https://github.com/kbase/sample_service.git"
+ GIT_COMMIT_HASH = "0fb836e801f78a42aab2b3be7c00013946fb1038"
#BEGIN_CLASS_HEADER
#END_CLASS_HEADER
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 00000000..40aec444
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,8 @@
+/*
+ * This file was generated by the Gradle 'init' task.
+ *
+ * The settings file is used to specify which projects to include in your build.
+ * For more detailed information on multi-project builds, please refer to https://docs.gradle.org/8.7/userguide/multi_project_builds.html in the Gradle documentation.
+ */
+
+rootProject.name = 'sample_service'
diff --git a/src/main/java/us/kbase/sampleservice/CreateDataLinkParams.java b/src/main/java/us/kbase/sampleservice/CreateDataLinkParams.java
new file mode 100644
index 00000000..b228e6c3
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/CreateDataLinkParams.java
@@ -0,0 +1,203 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ *
Original spec-file type: CreateDataLinkParams
+ *
+ * create_data_link parameters.
+ * upa - the workspace UPA of the object to be linked.
+ * dataid - the dataid of the data to be linked, if any, within the object. If omitted the
+ * entire object is linked to the sample.
+ * id - the sample id.
+ * version - the sample version.
+ * node - the sample node.
+ * update - if false (the default), fail if a link already exists from the data unit (the
+ * combination of the UPA and dataid). if true, expire the old link and create the new
+ * link unless the link is already to the requested sample node, in which case the
+ * operation is a no-op.
+ * as_admin - run the method as a service administrator. The user must have full
+ * administration permissions.
+ * as_user - create the link as a different user. Ignored if as_admin is not true. Neither
+ * the administrator nor the impersonated user need have permissions to the data or
+ * sample.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "upa",
+ "dataid",
+ "id",
+ "version",
+ "node",
+ "update",
+ "as_admin",
+ "as_user"
+})
+public class CreateDataLinkParams {
+
+ @JsonProperty("upa")
+ private String upa;
+ @JsonProperty("dataid")
+ private String dataid;
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("version")
+ private Long version;
+ @JsonProperty("node")
+ private String node;
+ @JsonProperty("update")
+ private Long update;
+ @JsonProperty("as_admin")
+ private Long asAdmin;
+ @JsonProperty("as_user")
+ private String asUser;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("upa")
+ public String getUpa() {
+ return upa;
+ }
+
+ @JsonProperty("upa")
+ public void setUpa(String upa) {
+ this.upa = upa;
+ }
+
+ public CreateDataLinkParams withUpa(String upa) {
+ this.upa = upa;
+ return this;
+ }
+
+ @JsonProperty("dataid")
+ public String getDataid() {
+ return dataid;
+ }
+
+ @JsonProperty("dataid")
+ public void setDataid(String dataid) {
+ this.dataid = dataid;
+ }
+
+ public CreateDataLinkParams withDataid(String dataid) {
+ this.dataid = dataid;
+ return this;
+ }
+
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public CreateDataLinkParams withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ @JsonProperty("version")
+ public Long getVersion() {
+ return version;
+ }
+
+ @JsonProperty("version")
+ public void setVersion(Long version) {
+ this.version = version;
+ }
+
+ public CreateDataLinkParams withVersion(Long version) {
+ this.version = version;
+ return this;
+ }
+
+ @JsonProperty("node")
+ public String getNode() {
+ return node;
+ }
+
+ @JsonProperty("node")
+ public void setNode(String node) {
+ this.node = node;
+ }
+
+ public CreateDataLinkParams withNode(String node) {
+ this.node = node;
+ return this;
+ }
+
+ @JsonProperty("update")
+ public Long getUpdate() {
+ return update;
+ }
+
+ @JsonProperty("update")
+ public void setUpdate(Long update) {
+ this.update = update;
+ }
+
+ public CreateDataLinkParams withUpdate(Long update) {
+ this.update = update;
+ return this;
+ }
+
+ @JsonProperty("as_admin")
+ public Long getAsAdmin() {
+ return asAdmin;
+ }
+
+ @JsonProperty("as_admin")
+ public void setAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ }
+
+ public CreateDataLinkParams withAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ return this;
+ }
+
+ @JsonProperty("as_user")
+ public String getAsUser() {
+ return asUser;
+ }
+
+ @JsonProperty("as_user")
+ public void setAsUser(String asUser) {
+ this.asUser = asUser;
+ }
+
+ public CreateDataLinkParams withAsUser(String asUser) {
+ this.asUser = asUser;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((((((((((((((("CreateDataLinkParams"+" [upa=")+ upa)+", dataid=")+ dataid)+", id=")+ id)+", version=")+ version)+", node=")+ node)+", update=")+ update)+", asAdmin=")+ asAdmin)+", asUser=")+ asUser)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/CreateDataLinkResults.java b/src/main/java/us/kbase/sampleservice/CreateDataLinkResults.java
new file mode 100644
index 00000000..2ef5e0c1
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/CreateDataLinkResults.java
@@ -0,0 +1,114 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: CreateDataLinkResults
+ *
+ * create_data_link results.
+ * new_link - the new link.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "new_link"
+})
+public class CreateDataLinkResults {
+
+ /**
+ * Original spec-file type: DataLink
+ *
+ * A data link from a KBase workspace object to a sample.
+ * upa - the workspace UPA of the linked object.
+ * dataid - the dataid of the linked data, if any, within the object. If omitted the
+ * entire object is linked to the sample.
+ * id - the sample id.
+ * version - the sample version.
+ * node - the sample node.
+ * createdby - the user that created the link.
+ * created - the time the link was created.
+ * expiredby - the user that expired the link, if any.
+ * expired - the time the link was expired, if at all.
+ *
+ *
+ */
+ @JsonProperty("new_link")
+ private DataLink newLink;
+ private Map additionalProperties = new HashMap();
+
+ /**
+ * Original spec-file type: DataLink
+ *
+ * A data link from a KBase workspace object to a sample.
+ * upa - the workspace UPA of the linked object.
+ * dataid - the dataid of the linked data, if any, within the object. If omitted the
+ * entire object is linked to the sample.
+ * id - the sample id.
+ * version - the sample version.
+ * node - the sample node.
+ * createdby - the user that created the link.
+ * created - the time the link was created.
+ * expiredby - the user that expired the link, if any.
+ * expired - the time the link was expired, if at all.
+ *
+ *
+ */
+ @JsonProperty("new_link")
+ public DataLink getNewLink() {
+ return newLink;
+ }
+
+ /**
+ * Original spec-file type: DataLink
+ *
+ * A data link from a KBase workspace object to a sample.
+ * upa - the workspace UPA of the linked object.
+ * dataid - the dataid of the linked data, if any, within the object. If omitted the
+ * entire object is linked to the sample.
+ * id - the sample id.
+ * version - the sample version.
+ * node - the sample node.
+ * createdby - the user that created the link.
+ * created - the time the link was created.
+ * expiredby - the user that expired the link, if any.
+ * expired - the time the link was expired, if at all.
+ *
+ *
+ */
+ @JsonProperty("new_link")
+ public void setNewLink(DataLink newLink) {
+ this.newLink = newLink;
+ }
+
+ public CreateDataLinkResults withNewLink(DataLink newLink) {
+ this.newLink = newLink;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((("CreateDataLinkResults"+" [newLink=")+ newLink)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/CreateSampleParams.java b/src/main/java/us/kbase/sampleservice/CreateSampleParams.java
new file mode 100644
index 00000000..7036e337
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/CreateSampleParams.java
@@ -0,0 +1,174 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: CreateSampleParams
+ *
+ * Parameters for creating a sample.
+ * If Sample.id is null, a new Sample is created along with a new ID.
+ * Otherwise, a new version of Sample.id is created. If Sample.id does not exist, an error
+ * is returned.
+ * Any incoming user, version or timestamp in the incoming sample is ignored.
+ * sample - the sample to save.
+ * prior_version - if non-null, ensures that no other sample version is saved between
+ * prior_version and the version that is created by this save. If this is not the case,
+ * the sample will fail to save.
+ * as_admin - run the method as a service administrator. The user must have full
+ * administration permissions.
+ * as_user - create the sample as a different user. Ignored if as_admin is not true. Neither
+ * the administrator nor the impersonated user need have permissions to the sample if a
+ * new version is saved.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "sample",
+ "prior_version",
+ "as_admin",
+ "as_user"
+})
+public class CreateSampleParams {
+
+ /**
+ * Original spec-file type: Sample
+ *
+ * A Sample, consisting of a tree of subsamples and replicates.
+ * id - the ID of the sample.
+ * user - the user that saved the sample.
+ * node_tree - the tree(s) of sample nodes in the sample. The the roots of all trees must
+ * be BioReplicate nodes. All the BioReplicate nodes must be at the start of the list,
+ * and all child nodes must occur after their parents in the list.
+ * name - the name of the sample. Must be less than 255 characters.
+ * save_date - the date the sample version was saved.
+ * version - the version of the sample.
+ *
+ *
+ */
+ @JsonProperty("sample")
+ private Sample sample;
+ @JsonProperty("prior_version")
+ private Long priorVersion;
+ @JsonProperty("as_admin")
+ private Long asAdmin;
+ @JsonProperty("as_user")
+ private String asUser;
+ private Map additionalProperties = new HashMap();
+
+ /**
+ * Original spec-file type: Sample
+ *
+ * A Sample, consisting of a tree of subsamples and replicates.
+ * id - the ID of the sample.
+ * user - the user that saved the sample.
+ * node_tree - the tree(s) of sample nodes in the sample. The the roots of all trees must
+ * be BioReplicate nodes. All the BioReplicate nodes must be at the start of the list,
+ * and all child nodes must occur after their parents in the list.
+ * name - the name of the sample. Must be less than 255 characters.
+ * save_date - the date the sample version was saved.
+ * version - the version of the sample.
+ *
+ *
+ */
+ @JsonProperty("sample")
+ public Sample getSample() {
+ return sample;
+ }
+
+ /**
+ * Original spec-file type: Sample
+ *
+ * A Sample, consisting of a tree of subsamples and replicates.
+ * id - the ID of the sample.
+ * user - the user that saved the sample.
+ * node_tree - the tree(s) of sample nodes in the sample. The the roots of all trees must
+ * be BioReplicate nodes. All the BioReplicate nodes must be at the start of the list,
+ * and all child nodes must occur after their parents in the list.
+ * name - the name of the sample. Must be less than 255 characters.
+ * save_date - the date the sample version was saved.
+ * version - the version of the sample.
+ *
+ *
+ */
+ @JsonProperty("sample")
+ public void setSample(Sample sample) {
+ this.sample = sample;
+ }
+
+ public CreateSampleParams withSample(Sample sample) {
+ this.sample = sample;
+ return this;
+ }
+
+ @JsonProperty("prior_version")
+ public Long getPriorVersion() {
+ return priorVersion;
+ }
+
+ @JsonProperty("prior_version")
+ public void setPriorVersion(Long priorVersion) {
+ this.priorVersion = priorVersion;
+ }
+
+ public CreateSampleParams withPriorVersion(Long priorVersion) {
+ this.priorVersion = priorVersion;
+ return this;
+ }
+
+ @JsonProperty("as_admin")
+ public Long getAsAdmin() {
+ return asAdmin;
+ }
+
+ @JsonProperty("as_admin")
+ public void setAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ }
+
+ public CreateSampleParams withAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ return this;
+ }
+
+ @JsonProperty("as_user")
+ public String getAsUser() {
+ return asUser;
+ }
+
+ @JsonProperty("as_user")
+ public void setAsUser(String asUser) {
+ this.asUser = asUser;
+ }
+
+ public CreateSampleParams withAsUser(String asUser) {
+ this.asUser = asUser;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((((((("CreateSampleParams"+" [sample=")+ sample)+", priorVersion=")+ priorVersion)+", asAdmin=")+ asAdmin)+", asUser=")+ asUser)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/DataLink.java b/src/main/java/us/kbase/sampleservice/DataLink.java
new file mode 100644
index 00000000..2d0b1354
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/DataLink.java
@@ -0,0 +1,234 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: DataLink
+ *
+ * A data link from a KBase workspace object to a sample.
+ * upa - the workspace UPA of the linked object.
+ * dataid - the dataid of the linked data, if any, within the object. If omitted the
+ * entire object is linked to the sample.
+ * id - the sample id.
+ * version - the sample version.
+ * node - the sample node.
+ * createdby - the user that created the link.
+ * created - the time the link was created.
+ * expiredby - the user that expired the link, if any.
+ * expired - the time the link was expired, if at all.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "linkid",
+ "upa",
+ "dataid",
+ "id",
+ "version",
+ "node",
+ "createdby",
+ "created",
+ "expiredby",
+ "expired"
+})
+public class DataLink {
+
+ @JsonProperty("linkid")
+ private String linkid;
+ @JsonProperty("upa")
+ private String upa;
+ @JsonProperty("dataid")
+ private String dataid;
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("version")
+ private Long version;
+ @JsonProperty("node")
+ private String node;
+ @JsonProperty("createdby")
+ private String createdby;
+ @JsonProperty("created")
+ private Long created;
+ @JsonProperty("expiredby")
+ private String expiredby;
+ @JsonProperty("expired")
+ private Long expired;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("linkid")
+ public String getLinkid() {
+ return linkid;
+ }
+
+ @JsonProperty("linkid")
+ public void setLinkid(String linkid) {
+ this.linkid = linkid;
+ }
+
+ public DataLink withLinkid(String linkid) {
+ this.linkid = linkid;
+ return this;
+ }
+
+ @JsonProperty("upa")
+ public String getUpa() {
+ return upa;
+ }
+
+ @JsonProperty("upa")
+ public void setUpa(String upa) {
+ this.upa = upa;
+ }
+
+ public DataLink withUpa(String upa) {
+ this.upa = upa;
+ return this;
+ }
+
+ @JsonProperty("dataid")
+ public String getDataid() {
+ return dataid;
+ }
+
+ @JsonProperty("dataid")
+ public void setDataid(String dataid) {
+ this.dataid = dataid;
+ }
+
+ public DataLink withDataid(String dataid) {
+ this.dataid = dataid;
+ return this;
+ }
+
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public DataLink withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ @JsonProperty("version")
+ public Long getVersion() {
+ return version;
+ }
+
+ @JsonProperty("version")
+ public void setVersion(Long version) {
+ this.version = version;
+ }
+
+ public DataLink withVersion(Long version) {
+ this.version = version;
+ return this;
+ }
+
+ @JsonProperty("node")
+ public String getNode() {
+ return node;
+ }
+
+ @JsonProperty("node")
+ public void setNode(String node) {
+ this.node = node;
+ }
+
+ public DataLink withNode(String node) {
+ this.node = node;
+ return this;
+ }
+
+ @JsonProperty("createdby")
+ public String getCreatedby() {
+ return createdby;
+ }
+
+ @JsonProperty("createdby")
+ public void setCreatedby(String createdby) {
+ this.createdby = createdby;
+ }
+
+ public DataLink withCreatedby(String createdby) {
+ this.createdby = createdby;
+ return this;
+ }
+
+ @JsonProperty("created")
+ public Long getCreated() {
+ return created;
+ }
+
+ @JsonProperty("created")
+ public void setCreated(Long created) {
+ this.created = created;
+ }
+
+ public DataLink withCreated(Long created) {
+ this.created = created;
+ return this;
+ }
+
+ @JsonProperty("expiredby")
+ public String getExpiredby() {
+ return expiredby;
+ }
+
+ @JsonProperty("expiredby")
+ public void setExpiredby(String expiredby) {
+ this.expiredby = expiredby;
+ }
+
+ public DataLink withExpiredby(String expiredby) {
+ this.expiredby = expiredby;
+ return this;
+ }
+
+ @JsonProperty("expired")
+ public Long getExpired() {
+ return expired;
+ }
+
+ @JsonProperty("expired")
+ public void setExpired(Long expired) {
+ this.expired = expired;
+ }
+
+ public DataLink withExpired(Long expired) {
+ this.expired = expired;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((((((((((((((((((("DataLink"+" [linkid=")+ linkid)+", upa=")+ upa)+", dataid=")+ dataid)+", id=")+ id)+", version=")+ version)+", node=")+ node)+", createdby=")+ createdby)+", created=")+ created)+", expiredby=")+ expiredby)+", expired=")+ expired)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/ExpireDataLinkParams.java b/src/main/java/us/kbase/sampleservice/ExpireDataLinkParams.java
new file mode 100644
index 00000000..17f526fe
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/ExpireDataLinkParams.java
@@ -0,0 +1,124 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: ExpireDataLinkParams
+ *
+ * expire_data_link parameters.
+ * upa - the workspace upa of the object from which the link originates.
+ * dataid - the dataid, if any, of the data within the object from which the link originates.
+ * Omit for links where the link is from the entire object.
+ * as_admin - run the method as a service administrator. The user must have full
+ * administration permissions.
+ * as_user - expire the link as a different user. Ignored if as_admin is not true. Neither
+ * the administrator nor the impersonated user need have permissions to the link if a
+ * new version is saved.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "upa",
+ "dataid",
+ "as_admin",
+ "as_user"
+})
+public class ExpireDataLinkParams {
+
+ @JsonProperty("upa")
+ private String upa;
+ @JsonProperty("dataid")
+ private String dataid;
+ @JsonProperty("as_admin")
+ private Long asAdmin;
+ @JsonProperty("as_user")
+ private String asUser;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("upa")
+ public String getUpa() {
+ return upa;
+ }
+
+ @JsonProperty("upa")
+ public void setUpa(String upa) {
+ this.upa = upa;
+ }
+
+ public ExpireDataLinkParams withUpa(String upa) {
+ this.upa = upa;
+ return this;
+ }
+
+ @JsonProperty("dataid")
+ public String getDataid() {
+ return dataid;
+ }
+
+ @JsonProperty("dataid")
+ public void setDataid(String dataid) {
+ this.dataid = dataid;
+ }
+
+ public ExpireDataLinkParams withDataid(String dataid) {
+ this.dataid = dataid;
+ return this;
+ }
+
+ @JsonProperty("as_admin")
+ public Long getAsAdmin() {
+ return asAdmin;
+ }
+
+ @JsonProperty("as_admin")
+ public void setAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ }
+
+ public ExpireDataLinkParams withAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ return this;
+ }
+
+ @JsonProperty("as_user")
+ public String getAsUser() {
+ return asUser;
+ }
+
+ @JsonProperty("as_user")
+ public void setAsUser(String asUser) {
+ this.asUser = asUser;
+ }
+
+ public ExpireDataLinkParams withAsUser(String asUser) {
+ this.asUser = asUser;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((((((("ExpireDataLinkParams"+" [upa=")+ upa)+", dataid=")+ dataid)+", asAdmin=")+ asAdmin)+", asUser=")+ asUser)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/GetDataLinkParams.java b/src/main/java/us/kbase/sampleservice/GetDataLinkParams.java
new file mode 100644
index 00000000..b0ca7b30
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/GetDataLinkParams.java
@@ -0,0 +1,63 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: GetDataLinkParams
+ *
+ * get_data_link parameters.
+ * linkid - the link ID.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "linkid"
+})
+public class GetDataLinkParams {
+
+ @JsonProperty("linkid")
+ private String linkid;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("linkid")
+ public String getLinkid() {
+ return linkid;
+ }
+
+ @JsonProperty("linkid")
+ public void setLinkid(String linkid) {
+ this.linkid = linkid;
+ }
+
+ public GetDataLinkParams withLinkid(String linkid) {
+ this.linkid = linkid;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((("GetDataLinkParams"+" [linkid=")+ linkid)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/GetDataLinksFromDataParams.java b/src/main/java/us/kbase/sampleservice/GetDataLinksFromDataParams.java
new file mode 100644
index 00000000..e97d6d11
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/GetDataLinksFromDataParams.java
@@ -0,0 +1,103 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: GetDataLinksFromDataParams
+ *
+ * get_data_links_from_data parameters.
+ * upa - the data UPA.
+ * effective_time - the effective time at which the query should be run - the default is
+ * the current time. Providing a time allows for reproducibility of previous results.
+ * as_admin - run the method as a service administrator. The user must have read
+ * administration permissions.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "upa",
+ "effective_time",
+ "as_admin"
+})
+public class GetDataLinksFromDataParams {
+
+ @JsonProperty("upa")
+ private String upa;
+ @JsonProperty("effective_time")
+ private Long effectiveTime;
+ @JsonProperty("as_admin")
+ private Long asAdmin;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("upa")
+ public String getUpa() {
+ return upa;
+ }
+
+ @JsonProperty("upa")
+ public void setUpa(String upa) {
+ this.upa = upa;
+ }
+
+ public GetDataLinksFromDataParams withUpa(String upa) {
+ this.upa = upa;
+ return this;
+ }
+
+ @JsonProperty("effective_time")
+ public Long getEffectiveTime() {
+ return effectiveTime;
+ }
+
+ @JsonProperty("effective_time")
+ public void setEffectiveTime(Long effectiveTime) {
+ this.effectiveTime = effectiveTime;
+ }
+
+ public GetDataLinksFromDataParams withEffectiveTime(Long effectiveTime) {
+ this.effectiveTime = effectiveTime;
+ return this;
+ }
+
+ @JsonProperty("as_admin")
+ public Long getAsAdmin() {
+ return asAdmin;
+ }
+
+ @JsonProperty("as_admin")
+ public void setAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ }
+
+ public GetDataLinksFromDataParams withAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((((("GetDataLinksFromDataParams"+" [upa=")+ upa)+", effectiveTime=")+ effectiveTime)+", asAdmin=")+ asAdmin)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/GetDataLinksFromDataResults.java b/src/main/java/us/kbase/sampleservice/GetDataLinksFromDataResults.java
new file mode 100644
index 00000000..f9bf3f4f
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/GetDataLinksFromDataResults.java
@@ -0,0 +1,84 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: GetDataLinksFromDataResults
+ *
+ * get_data_links_from_data results.
+ * links - the links.
+ * effective_time - the time at which the query was run. This timestamp, if saved, can be
+ * used when running the method again to ensure reproducible results.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "links",
+ "effective_time"
+})
+public class GetDataLinksFromDataResults {
+
+ @JsonProperty("links")
+ private List links;
+ @JsonProperty("effective_time")
+ private Long effectiveTime;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("links")
+ public List getLinks() {
+ return links;
+ }
+
+ @JsonProperty("links")
+ public void setLinks(List links) {
+ this.links = links;
+ }
+
+ public GetDataLinksFromDataResults withLinks(List links) {
+ this.links = links;
+ return this;
+ }
+
+ @JsonProperty("effective_time")
+ public Long getEffectiveTime() {
+ return effectiveTime;
+ }
+
+ @JsonProperty("effective_time")
+ public void setEffectiveTime(Long effectiveTime) {
+ this.effectiveTime = effectiveTime;
+ }
+
+ public GetDataLinksFromDataResults withEffectiveTime(Long effectiveTime) {
+ this.effectiveTime = effectiveTime;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((("GetDataLinksFromDataResults"+" [links=")+ links)+", effectiveTime=")+ effectiveTime)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/GetDataLinksFromSampleParams.java b/src/main/java/us/kbase/sampleservice/GetDataLinksFromSampleParams.java
new file mode 100644
index 00000000..f89a1e03
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/GetDataLinksFromSampleParams.java
@@ -0,0 +1,122 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: GetDataLinksFromSampleParams
+ *
+ * get_data_links_from_sample parameters.
+ * id - the sample ID.
+ * version - the sample version.
+ * effective_time - the effective time at which the query should be run - the default is
+ * the current time. Providing a time allows for reproducibility of previous results.
+ * as_admin - run the method as a service administrator. The user must have read
+ * administration permissions.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "id",
+ "version",
+ "effective_time",
+ "as_admin"
+})
+public class GetDataLinksFromSampleParams {
+
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("version")
+ private Long version;
+ @JsonProperty("effective_time")
+ private Long effectiveTime;
+ @JsonProperty("as_admin")
+ private Long asAdmin;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public GetDataLinksFromSampleParams withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ @JsonProperty("version")
+ public Long getVersion() {
+ return version;
+ }
+
+ @JsonProperty("version")
+ public void setVersion(Long version) {
+ this.version = version;
+ }
+
+ public GetDataLinksFromSampleParams withVersion(Long version) {
+ this.version = version;
+ return this;
+ }
+
+ @JsonProperty("effective_time")
+ public Long getEffectiveTime() {
+ return effectiveTime;
+ }
+
+ @JsonProperty("effective_time")
+ public void setEffectiveTime(Long effectiveTime) {
+ this.effectiveTime = effectiveTime;
+ }
+
+ public GetDataLinksFromSampleParams withEffectiveTime(Long effectiveTime) {
+ this.effectiveTime = effectiveTime;
+ return this;
+ }
+
+ @JsonProperty("as_admin")
+ public Long getAsAdmin() {
+ return asAdmin;
+ }
+
+ @JsonProperty("as_admin")
+ public void setAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ }
+
+ public GetDataLinksFromSampleParams withAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((((((("GetDataLinksFromSampleParams"+" [id=")+ id)+", version=")+ version)+", effectiveTime=")+ effectiveTime)+", asAdmin=")+ asAdmin)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/GetDataLinksFromSampleResults.java b/src/main/java/us/kbase/sampleservice/GetDataLinksFromSampleResults.java
new file mode 100644
index 00000000..aea9f155
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/GetDataLinksFromSampleResults.java
@@ -0,0 +1,85 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: GetDataLinksFromSampleResults
+ *
+ * get_data_links_from_sample results.
+ * links - the links.
+ * effective_time - the time at which the query was run. This timestamp, if saved, can be
+ * used when running the method again to ensure reproducible results. Note that changes
+ * to workspace permissions may cause results to change over time.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "links",
+ "effective_time"
+})
+public class GetDataLinksFromSampleResults {
+
+ @JsonProperty("links")
+ private List links;
+ @JsonProperty("effective_time")
+ private Long effectiveTime;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("links")
+ public List getLinks() {
+ return links;
+ }
+
+ @JsonProperty("links")
+ public void setLinks(List links) {
+ this.links = links;
+ }
+
+ public GetDataLinksFromSampleResults withLinks(List links) {
+ this.links = links;
+ return this;
+ }
+
+ @JsonProperty("effective_time")
+ public Long getEffectiveTime() {
+ return effectiveTime;
+ }
+
+ @JsonProperty("effective_time")
+ public void setEffectiveTime(Long effectiveTime) {
+ this.effectiveTime = effectiveTime;
+ }
+
+ public GetDataLinksFromSampleResults withEffectiveTime(Long effectiveTime) {
+ this.effectiveTime = effectiveTime;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((("GetDataLinksFromSampleResults"+" [links=")+ links)+", effectiveTime=")+ effectiveTime)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/GetDataLinksFromSampleSetParams.java b/src/main/java/us/kbase/sampleservice/GetDataLinksFromSampleSetParams.java
new file mode 100644
index 00000000..94ab6cf0
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/GetDataLinksFromSampleSetParams.java
@@ -0,0 +1,105 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: GetDataLinksFromSampleSetParams
+ *
+ * get_data_links_from_sample_set parameters.
+ * sample_ids - a list of sample ids and versions
+ * effective_time - the time at which the query was run. This timestamp, if saved, can be
+ * used when running the method again to enqure reproducible results. Note that changes
+ * to workspace permissions may cause results to change over time.
+ * as_admin - run the method as a service administrator. The user must have read
+ * administration permissions.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "sample_ids",
+ "effective_time",
+ "as_admin"
+})
+public class GetDataLinksFromSampleSetParams {
+
+ @JsonProperty("sample_ids")
+ private List sampleIds;
+ @JsonProperty("effective_time")
+ private Long effectiveTime;
+ @JsonProperty("as_admin")
+ private Long asAdmin;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("sample_ids")
+ public List getSampleIds() {
+ return sampleIds;
+ }
+
+ @JsonProperty("sample_ids")
+ public void setSampleIds(List sampleIds) {
+ this.sampleIds = sampleIds;
+ }
+
+ public GetDataLinksFromSampleSetParams withSampleIds(List sampleIds) {
+ this.sampleIds = sampleIds;
+ return this;
+ }
+
+ @JsonProperty("effective_time")
+ public Long getEffectiveTime() {
+ return effectiveTime;
+ }
+
+ @JsonProperty("effective_time")
+ public void setEffectiveTime(Long effectiveTime) {
+ this.effectiveTime = effectiveTime;
+ }
+
+ public GetDataLinksFromSampleSetParams withEffectiveTime(Long effectiveTime) {
+ this.effectiveTime = effectiveTime;
+ return this;
+ }
+
+ @JsonProperty("as_admin")
+ public Long getAsAdmin() {
+ return asAdmin;
+ }
+
+ @JsonProperty("as_admin")
+ public void setAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ }
+
+ public GetDataLinksFromSampleSetParams withAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((((("GetDataLinksFromSampleSetParams"+" [sampleIds=")+ sampleIds)+", effectiveTime=")+ effectiveTime)+", asAdmin=")+ asAdmin)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/GetMetadataKeyStaticMetadataParams.java b/src/main/java/us/kbase/sampleservice/GetMetadataKeyStaticMetadataParams.java
new file mode 100644
index 00000000..316c8342
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/GetMetadataKeyStaticMetadataParams.java
@@ -0,0 +1,87 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: GetMetadataKeyStaticMetadataParams
+ *
+ * get_metadata_key_static_metadata parameters.
+ * keys - the list of metadata keys to interrogate.
+ * prefix -
+ * 0 (the default) to interrogate standard metadata keys.
+ * 1 to interrogate prefix metadata keys, but require an exact match to the prefix key.
+ * 2 to interrogate prefix metadata keys, but any keys which are a prefix of the
+ * provided keys will be included in the results.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "keys",
+ "prefix"
+})
+public class GetMetadataKeyStaticMetadataParams {
+
+ @JsonProperty("keys")
+ private List keys;
+ @JsonProperty("prefix")
+ private Long prefix;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("keys")
+ public List getKeys() {
+ return keys;
+ }
+
+ @JsonProperty("keys")
+ public void setKeys(List keys) {
+ this.keys = keys;
+ }
+
+ public GetMetadataKeyStaticMetadataParams withKeys(List keys) {
+ this.keys = keys;
+ return this;
+ }
+
+ @JsonProperty("prefix")
+ public Long getPrefix() {
+ return prefix;
+ }
+
+ @JsonProperty("prefix")
+ public void setPrefix(Long prefix) {
+ this.prefix = prefix;
+ }
+
+ public GetMetadataKeyStaticMetadataParams withPrefix(Long prefix) {
+ this.prefix = prefix;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(java.lang.String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ return ((((((("GetMetadataKeyStaticMetadataParams"+" [keys=")+ keys)+", prefix=")+ prefix)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/GetMetadataKeyStaticMetadataResults.java b/src/main/java/us/kbase/sampleservice/GetMetadataKeyStaticMetadataResults.java
new file mode 100644
index 00000000..0d031437
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/GetMetadataKeyStaticMetadataResults.java
@@ -0,0 +1,64 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import us.kbase.common.service.UObject;
+
+
+/**
+ * Original spec-file type: GetMetadataKeyStaticMetadataResults
+ *
+ * get_metadata_key_static_metadata results.
+ * static_metadata - the static metadata for the requested keys.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "static_metadata"
+})
+public class GetMetadataKeyStaticMetadataResults {
+
+ @JsonProperty("static_metadata")
+ private Map> staticMetadata;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("static_metadata")
+ public Map> getStaticMetadata() {
+ return staticMetadata;
+ }
+
+ @JsonProperty("static_metadata")
+ public void setStaticMetadata(Map> staticMetadata) {
+ this.staticMetadata = staticMetadata;
+ }
+
+ public GetMetadataKeyStaticMetadataResults withStaticMetadata(Map> staticMetadata) {
+ this.staticMetadata = staticMetadata;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(java.lang.String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ return ((((("GetMetadataKeyStaticMetadataResults"+" [staticMetadata=")+ staticMetadata)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/GetSampleACLsParams.java b/src/main/java/us/kbase/sampleservice/GetSampleACLsParams.java
new file mode 100644
index 00000000..ab89106d
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/GetSampleACLsParams.java
@@ -0,0 +1,83 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: GetSampleACLsParams
+ *
+ * get_sample_acls parameters.
+ * id - the ID of the sample to retrieve.
+ * as_admin - get the sample acls regardless of ACL contents as long as the user has
+ * administration read permissions.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "id",
+ "as_admin"
+})
+public class GetSampleACLsParams {
+
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("as_admin")
+ private Long asAdmin;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public GetSampleACLsParams withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ @JsonProperty("as_admin")
+ public Long getAsAdmin() {
+ return asAdmin;
+ }
+
+ @JsonProperty("as_admin")
+ public void setAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ }
+
+ public GetSampleACLsParams withAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((("GetSampleACLsParams"+" [id=")+ id)+", asAdmin=")+ asAdmin)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/GetSampleParams.java b/src/main/java/us/kbase/sampleservice/GetSampleParams.java
new file mode 100644
index 00000000..43ba49e8
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/GetSampleParams.java
@@ -0,0 +1,102 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: GetSampleParams
+ *
+ * get_sample parameters.
+ * id - the ID of the sample to retrieve.
+ * version - the version of the sample to retrieve, or the most recent sample if omitted.
+ * as_admin - get the sample regardless of ACLs as long as the user has administration read
+ * permissions.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "id",
+ "version",
+ "as_admin"
+})
+public class GetSampleParams {
+
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("version")
+ private Long version;
+ @JsonProperty("as_admin")
+ private Long asAdmin;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public GetSampleParams withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ @JsonProperty("version")
+ public Long getVersion() {
+ return version;
+ }
+
+ @JsonProperty("version")
+ public void setVersion(Long version) {
+ this.version = version;
+ }
+
+ public GetSampleParams withVersion(Long version) {
+ this.version = version;
+ return this;
+ }
+
+ @JsonProperty("as_admin")
+ public Long getAsAdmin() {
+ return asAdmin;
+ }
+
+ @JsonProperty("as_admin")
+ public void setAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ }
+
+ public GetSampleParams withAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((((("GetSampleParams"+" [id=")+ id)+", version=")+ version)+", asAdmin=")+ asAdmin)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/GetSampleViaDataParams.java b/src/main/java/us/kbase/sampleservice/GetSampleViaDataParams.java
new file mode 100644
index 00000000..dabbfb58
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/GetSampleViaDataParams.java
@@ -0,0 +1,101 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: GetSampleViaDataParams
+ *
+ * get_sample_via_data parameters.
+ * upa - the workspace UPA of the target object.
+ * id - the target sample id.
+ * version - the target sample version.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "upa",
+ "id",
+ "version"
+})
+public class GetSampleViaDataParams {
+
+ @JsonProperty("upa")
+ private String upa;
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("version")
+ private Long version;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("upa")
+ public String getUpa() {
+ return upa;
+ }
+
+ @JsonProperty("upa")
+ public void setUpa(String upa) {
+ this.upa = upa;
+ }
+
+ public GetSampleViaDataParams withUpa(String upa) {
+ this.upa = upa;
+ return this;
+ }
+
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public GetSampleViaDataParams withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ @JsonProperty("version")
+ public Long getVersion() {
+ return version;
+ }
+
+ @JsonProperty("version")
+ public void setVersion(Long version) {
+ this.version = version;
+ }
+
+ public GetSampleViaDataParams withVersion(Long version) {
+ this.version = version;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((((("GetSampleViaDataParams"+" [upa=")+ upa)+", id=")+ id)+", version=")+ version)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/GetSamplesParams.java b/src/main/java/us/kbase/sampleservice/GetSamplesParams.java
new file mode 100644
index 00000000..a3cd6deb
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/GetSamplesParams.java
@@ -0,0 +1,79 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: GetSamplesParams
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "samples",
+ "as_admin"
+})
+public class GetSamplesParams {
+
+ @JsonProperty("samples")
+ private List samples;
+ @JsonProperty("as_admin")
+ private Long asAdmin;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("samples")
+ public List getSamples() {
+ return samples;
+ }
+
+ @JsonProperty("samples")
+ public void setSamples(List samples) {
+ this.samples = samples;
+ }
+
+ public GetSamplesParams withSamples(List samples) {
+ this.samples = samples;
+ return this;
+ }
+
+ @JsonProperty("as_admin")
+ public Long getAsAdmin() {
+ return asAdmin;
+ }
+
+ @JsonProperty("as_admin")
+ public void setAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ }
+
+ public GetSamplesParams withAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((("GetSamplesParams"+" [samples=")+ samples)+", asAdmin=")+ asAdmin)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/PropagateDataLinkParams.java b/src/main/java/us/kbase/sampleservice/PropagateDataLinkParams.java
new file mode 100644
index 00000000..570bcdb8
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/PropagateDataLinkParams.java
@@ -0,0 +1,204 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: PropagateDataLinkParams
+ *
+ * propagate_data_links parameters.
+ * id - the sample id.
+ * version - the sample version. (data links are propagated to)
+ * previous_version - the previouse sample version. (data links are propagated from)
+ * ignore_types - the workspace data type ignored from propagating. default empty.
+ * update - if false (the default), fail if a link already exists from the data unit (the
+ * combination of the UPA and dataid). if true, expire the old link and create the new
+ * link unless the link is already to the requested sample node, in which case the
+ * operation is a no-op.
+ * effective_time - the effective time at which the query should be run - the default is
+ * the current time. Providing a time allows for reproducibility of previous results.
+ * as_admin - run the method as a service administrator. The user must have full
+ * administration permissions.
+ * as_user - create the link as a different user. Ignored if as_admin is not true. Neither
+ * the administrator nor the impersonated user need have permissions to the data or
+ * sample.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "id",
+ "version",
+ "previous_version",
+ "ignore_types",
+ "update",
+ "effective_time",
+ "as_admin",
+ "as_user"
+})
+public class PropagateDataLinkParams {
+
+ @JsonProperty("id")
+ private java.lang.String id;
+ @JsonProperty("version")
+ private Long version;
+ @JsonProperty("previous_version")
+ private Long previousVersion;
+ @JsonProperty("ignore_types")
+ private List ignoreTypes;
+ @JsonProperty("update")
+ private Long update;
+ @JsonProperty("effective_time")
+ private Long effectiveTime;
+ @JsonProperty("as_admin")
+ private Long asAdmin;
+ @JsonProperty("as_user")
+ private java.lang.String asUser;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("id")
+ public java.lang.String getId() {
+ return id;
+ }
+
+ @JsonProperty("id")
+ public void setId(java.lang.String id) {
+ this.id = id;
+ }
+
+ public PropagateDataLinkParams withId(java.lang.String id) {
+ this.id = id;
+ return this;
+ }
+
+ @JsonProperty("version")
+ public Long getVersion() {
+ return version;
+ }
+
+ @JsonProperty("version")
+ public void setVersion(Long version) {
+ this.version = version;
+ }
+
+ public PropagateDataLinkParams withVersion(Long version) {
+ this.version = version;
+ return this;
+ }
+
+ @JsonProperty("previous_version")
+ public Long getPreviousVersion() {
+ return previousVersion;
+ }
+
+ @JsonProperty("previous_version")
+ public void setPreviousVersion(Long previousVersion) {
+ this.previousVersion = previousVersion;
+ }
+
+ public PropagateDataLinkParams withPreviousVersion(Long previousVersion) {
+ this.previousVersion = previousVersion;
+ return this;
+ }
+
+ @JsonProperty("ignore_types")
+ public List getIgnoreTypes() {
+ return ignoreTypes;
+ }
+
+ @JsonProperty("ignore_types")
+ public void setIgnoreTypes(List ignoreTypes) {
+ this.ignoreTypes = ignoreTypes;
+ }
+
+ public PropagateDataLinkParams withIgnoreTypes(List ignoreTypes) {
+ this.ignoreTypes = ignoreTypes;
+ return this;
+ }
+
+ @JsonProperty("update")
+ public Long getUpdate() {
+ return update;
+ }
+
+ @JsonProperty("update")
+ public void setUpdate(Long update) {
+ this.update = update;
+ }
+
+ public PropagateDataLinkParams withUpdate(Long update) {
+ this.update = update;
+ return this;
+ }
+
+ @JsonProperty("effective_time")
+ public Long getEffectiveTime() {
+ return effectiveTime;
+ }
+
+ @JsonProperty("effective_time")
+ public void setEffectiveTime(Long effectiveTime) {
+ this.effectiveTime = effectiveTime;
+ }
+
+ public PropagateDataLinkParams withEffectiveTime(Long effectiveTime) {
+ this.effectiveTime = effectiveTime;
+ return this;
+ }
+
+ @JsonProperty("as_admin")
+ public Long getAsAdmin() {
+ return asAdmin;
+ }
+
+ @JsonProperty("as_admin")
+ public void setAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ }
+
+ public PropagateDataLinkParams withAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ return this;
+ }
+
+ @JsonProperty("as_user")
+ public java.lang.String getAsUser() {
+ return asUser;
+ }
+
+ @JsonProperty("as_user")
+ public void setAsUser(java.lang.String asUser) {
+ this.asUser = asUser;
+ }
+
+ public PropagateDataLinkParams withAsUser(java.lang.String asUser) {
+ this.asUser = asUser;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(java.lang.String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ return ((((((((((((((((((("PropagateDataLinkParams"+" [id=")+ id)+", version=")+ version)+", previousVersion=")+ previousVersion)+", ignoreTypes=")+ ignoreTypes)+", update=")+ update)+", effectiveTime=")+ effectiveTime)+", asAdmin=")+ asAdmin)+", asUser=")+ asUser)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/PropagateDataLinkResults.java b/src/main/java/us/kbase/sampleservice/PropagateDataLinkResults.java
new file mode 100644
index 00000000..49bdc917
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/PropagateDataLinkResults.java
@@ -0,0 +1,64 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: PropagateDataLinkResults
+ *
+ * propagate_data_links results.
+ * links - the links.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "links"
+})
+public class PropagateDataLinkResults {
+
+ @JsonProperty("links")
+ private List links;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("links")
+ public List getLinks() {
+ return links;
+ }
+
+ @JsonProperty("links")
+ public void setLinks(List links) {
+ this.links = links;
+ }
+
+ public PropagateDataLinkResults withLinks(List links) {
+ this.links = links;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((("PropagateDataLinkResults"+" [links=")+ links)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/ReplaceSampleACLsParams.java b/src/main/java/us/kbase/sampleservice/ReplaceSampleACLsParams.java
new file mode 100644
index 00000000..6f7eb2cd
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/ReplaceSampleACLsParams.java
@@ -0,0 +1,141 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: ReplaceSampleACLsParams
+ *
+ * replace_sample_acls parameters.
+ * id - the ID of the sample to modify.
+ * acls - the ACLs to set on the sample.
+ * as_admin - replace the sample acls regardless of sample ACL contents as long as the user
+ * has full service administration permissions.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "id",
+ "acls",
+ "as_admin"
+})
+public class ReplaceSampleACLsParams {
+
+ @JsonProperty("id")
+ private String id;
+ /**
+ * Original spec-file type: SampleACLs
+ *
+ * Access control lists for a sample. Access levels include the privileges of the lower
+ * access levels.
+ * owner - the user that created and owns the sample.
+ * admin - users that can administrate (e.g. alter ACLs) the sample.
+ * write - users that can write (e.g. create a new version) to the sample.
+ * read - users that can view the sample.
+ * public_read - whether any user can read the sample, regardless of permissions.
+ *
+ *
+ */
+ @JsonProperty("acls")
+ private SampleACLs acls;
+ @JsonProperty("as_admin")
+ private Long asAdmin;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public ReplaceSampleACLsParams withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Original spec-file type: SampleACLs
+ *
+ * Access control lists for a sample. Access levels include the privileges of the lower
+ * access levels.
+ * owner - the user that created and owns the sample.
+ * admin - users that can administrate (e.g. alter ACLs) the sample.
+ * write - users that can write (e.g. create a new version) to the sample.
+ * read - users that can view the sample.
+ * public_read - whether any user can read the sample, regardless of permissions.
+ *
+ *
+ */
+ @JsonProperty("acls")
+ public SampleACLs getAcls() {
+ return acls;
+ }
+
+ /**
+ * Original spec-file type: SampleACLs
+ *
+ * Access control lists for a sample. Access levels include the privileges of the lower
+ * access levels.
+ * owner - the user that created and owns the sample.
+ * admin - users that can administrate (e.g. alter ACLs) the sample.
+ * write - users that can write (e.g. create a new version) to the sample.
+ * read - users that can view the sample.
+ * public_read - whether any user can read the sample, regardless of permissions.
+ *
+ *
+ */
+ @JsonProperty("acls")
+ public void setAcls(SampleACLs acls) {
+ this.acls = acls;
+ }
+
+ public ReplaceSampleACLsParams withAcls(SampleACLs acls) {
+ this.acls = acls;
+ return this;
+ }
+
+ @JsonProperty("as_admin")
+ public Long getAsAdmin() {
+ return asAdmin;
+ }
+
+ @JsonProperty("as_admin")
+ public void setAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ }
+
+ public ReplaceSampleACLsParams withAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((((("ReplaceSampleACLsParams"+" [id=")+ id)+", acls=")+ acls)+", asAdmin=")+ asAdmin)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/Sample.java b/src/main/java/us/kbase/sampleservice/Sample.java
new file mode 100644
index 00000000..79ac3685
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/Sample.java
@@ -0,0 +1,161 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: Sample
+ *
+ * A Sample, consisting of a tree of subsamples and replicates.
+ * id - the ID of the sample.
+ * user - the user that saved the sample.
+ * node_tree - the tree(s) of sample nodes in the sample. The the roots of all trees must
+ * be BioReplicate nodes. All the BioReplicate nodes must be at the start of the list,
+ * and all child nodes must occur after their parents in the list.
+ * name - the name of the sample. Must be less than 255 characters.
+ * save_date - the date the sample version was saved.
+ * version - the version of the sample.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "id",
+ "user",
+ "node_tree",
+ "name",
+ "save_date",
+ "version"
+})
+public class Sample {
+
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("user")
+ private String user;
+ @JsonProperty("node_tree")
+ private List nodeTree;
+ @JsonProperty("name")
+ private String name;
+ @JsonProperty("save_date")
+ private Long saveDate;
+ @JsonProperty("version")
+ private Long version;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Sample withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ @JsonProperty("user")
+ public String getUser() {
+ return user;
+ }
+
+ @JsonProperty("user")
+ public void setUser(String user) {
+ this.user = user;
+ }
+
+ public Sample withUser(String user) {
+ this.user = user;
+ return this;
+ }
+
+ @JsonProperty("node_tree")
+ public List getNodeTree() {
+ return nodeTree;
+ }
+
+ @JsonProperty("node_tree")
+ public void setNodeTree(List nodeTree) {
+ this.nodeTree = nodeTree;
+ }
+
+ public Sample withNodeTree(List nodeTree) {
+ this.nodeTree = nodeTree;
+ return this;
+ }
+
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ @JsonProperty("name")
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Sample withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ @JsonProperty("save_date")
+ public Long getSaveDate() {
+ return saveDate;
+ }
+
+ @JsonProperty("save_date")
+ public void setSaveDate(Long saveDate) {
+ this.saveDate = saveDate;
+ }
+
+ public Sample withSaveDate(Long saveDate) {
+ this.saveDate = saveDate;
+ return this;
+ }
+
+ @JsonProperty("version")
+ public Long getVersion() {
+ return version;
+ }
+
+ @JsonProperty("version")
+ public void setVersion(Long version) {
+ this.version = version;
+ }
+
+ public Sample withVersion(Long version) {
+ this.version = version;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((((((((((("Sample"+" [id=")+ id)+", user=")+ user)+", nodeTree=")+ nodeTree)+", name=")+ name)+", saveDate=")+ saveDate)+", version=")+ version)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/SampleACLs.java b/src/main/java/us/kbase/sampleservice/SampleACLs.java
new file mode 100644
index 00000000..875e24f9
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/SampleACLs.java
@@ -0,0 +1,141 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: SampleACLs
+ *
+ * Access control lists for a sample. Access levels include the privileges of the lower
+ * access levels.
+ * owner - the user that created and owns the sample.
+ * admin - users that can administrate (e.g. alter ACLs) the sample.
+ * write - users that can write (e.g. create a new version) to the sample.
+ * read - users that can view the sample.
+ * public_read - whether any user can read the sample, regardless of permissions.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "owner",
+ "admin",
+ "write",
+ "read",
+ "public_read"
+})
+public class SampleACLs {
+
+ @JsonProperty("owner")
+ private java.lang.String owner;
+ @JsonProperty("admin")
+ private List admin;
+ @JsonProperty("write")
+ private List write;
+ @JsonProperty("read")
+ private List read;
+ @JsonProperty("public_read")
+ private Long publicRead;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("owner")
+ public java.lang.String getOwner() {
+ return owner;
+ }
+
+ @JsonProperty("owner")
+ public void setOwner(java.lang.String owner) {
+ this.owner = owner;
+ }
+
+ public SampleACLs withOwner(java.lang.String owner) {
+ this.owner = owner;
+ return this;
+ }
+
+ @JsonProperty("admin")
+ public List getAdmin() {
+ return admin;
+ }
+
+ @JsonProperty("admin")
+ public void setAdmin(List admin) {
+ this.admin = admin;
+ }
+
+ public SampleACLs withAdmin(List admin) {
+ this.admin = admin;
+ return this;
+ }
+
+ @JsonProperty("write")
+ public List getWrite() {
+ return write;
+ }
+
+ @JsonProperty("write")
+ public void setWrite(List write) {
+ this.write = write;
+ }
+
+ public SampleACLs withWrite(List write) {
+ this.write = write;
+ return this;
+ }
+
+ @JsonProperty("read")
+ public List getRead() {
+ return read;
+ }
+
+ @JsonProperty("read")
+ public void setRead(List read) {
+ this.read = read;
+ }
+
+ public SampleACLs withRead(List read) {
+ this.read = read;
+ return this;
+ }
+
+ @JsonProperty("public_read")
+ public Long getPublicRead() {
+ return publicRead;
+ }
+
+ @JsonProperty("public_read")
+ public void setPublicRead(Long publicRead) {
+ this.publicRead = publicRead;
+ }
+
+ public SampleACLs withPublicRead(Long publicRead) {
+ this.publicRead = publicRead;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(java.lang.String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ return ((((((((((((("SampleACLs"+" [owner=")+ owner)+", admin=")+ admin)+", write=")+ write)+", read=")+ read)+", publicRead=")+ publicRead)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/SampleAddress.java b/src/main/java/us/kbase/sampleservice/SampleAddress.java
new file mode 100644
index 00000000..44418112
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/SampleAddress.java
@@ -0,0 +1,82 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: SampleAddress
+ *
+ * A Sample ID and version.
+ * id - the ID of the sample.
+ * version - the version of the sample.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "id",
+ "version"
+})
+public class SampleAddress {
+
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("version")
+ private Long version;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public SampleAddress withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ @JsonProperty("version")
+ public Long getVersion() {
+ return version;
+ }
+
+ @JsonProperty("version")
+ public void setVersion(Long version) {
+ this.version = version;
+ }
+
+ public SampleAddress withVersion(Long version) {
+ this.version = version;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((("SampleAddress"+" [id=")+ id)+", version=")+ version)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/SampleIdentifier.java b/src/main/java/us/kbase/sampleservice/SampleIdentifier.java
new file mode 100644
index 00000000..a4eab121
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/SampleIdentifier.java
@@ -0,0 +1,78 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: SampleIdentifier
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "id",
+ "version"
+})
+public class SampleIdentifier {
+
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("version")
+ private Long version;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public SampleIdentifier withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ @JsonProperty("version")
+ public Long getVersion() {
+ return version;
+ }
+
+ @JsonProperty("version")
+ public void setVersion(Long version) {
+ this.version = version;
+ }
+
+ public SampleIdentifier withVersion(Long version) {
+ this.version = version;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public String toString() {
+ return ((((((("SampleIdentifier"+" [id=")+ id)+", version=")+ version)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/SampleNode.java b/src/main/java/us/kbase/sampleservice/SampleNode.java
new file mode 100644
index 00000000..5f56e5ef
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/SampleNode.java
@@ -0,0 +1,167 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import us.kbase.common.service.UObject;
+
+
+/**
+ * Original spec-file type: SampleNode
+ *
+ * A node in a sample tree.
+ * id - the ID of the node.
+ * parent - the id of the parent node for the current node. BioReplicate nodes, and only
+ * BioReplicate nodes, do not have a parent.
+ * type - the type of the node.
+ * meta_controlled - metadata restricted by the sample controlled vocabulary and validators.
+ * source_meta - the pre-transformation keys and values of the controlled metadata at the
+ * data source for controlled metadata keys. In some cases the source metadata
+ * may be transformed prior to ingestion by the Sample Service; the contents of this
+ * data structure allows for reconstructing the original representation. The metadata
+ * here is not validated other than basic size checks and is provided on an
+ * informational basis only. The metadata keys in the SourceMetadata data structure
+ * must be a subset of the meta_controlled mapping keys.
+ * meta_user - unrestricted metadata.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "id",
+ "parent",
+ "type",
+ "meta_controlled",
+ "source_meta",
+ "meta_user"
+})
+public class SampleNode {
+
+ @JsonProperty("id")
+ private java.lang.String id;
+ @JsonProperty("parent")
+ private java.lang.String parent;
+ @JsonProperty("type")
+ private java.lang.String type;
+ @JsonProperty("meta_controlled")
+ private Map> metaControlled;
+ @JsonProperty("source_meta")
+ private List sourceMeta;
+ @JsonProperty("meta_user")
+ private Map> metaUser;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("id")
+ public java.lang.String getId() {
+ return id;
+ }
+
+ @JsonProperty("id")
+ public void setId(java.lang.String id) {
+ this.id = id;
+ }
+
+ public SampleNode withId(java.lang.String id) {
+ this.id = id;
+ return this;
+ }
+
+ @JsonProperty("parent")
+ public java.lang.String getParent() {
+ return parent;
+ }
+
+ @JsonProperty("parent")
+ public void setParent(java.lang.String parent) {
+ this.parent = parent;
+ }
+
+ public SampleNode withParent(java.lang.String parent) {
+ this.parent = parent;
+ return this;
+ }
+
+ @JsonProperty("type")
+ public java.lang.String getType() {
+ return type;
+ }
+
+ @JsonProperty("type")
+ public void setType(java.lang.String type) {
+ this.type = type;
+ }
+
+ public SampleNode withType(java.lang.String type) {
+ this.type = type;
+ return this;
+ }
+
+ @JsonProperty("meta_controlled")
+ public Map> getMetaControlled() {
+ return metaControlled;
+ }
+
+ @JsonProperty("meta_controlled")
+ public void setMetaControlled(Map> metaControlled) {
+ this.metaControlled = metaControlled;
+ }
+
+ public SampleNode withMetaControlled(Map> metaControlled) {
+ this.metaControlled = metaControlled;
+ return this;
+ }
+
+ @JsonProperty("source_meta")
+ public List getSourceMeta() {
+ return sourceMeta;
+ }
+
+ @JsonProperty("source_meta")
+ public void setSourceMeta(List sourceMeta) {
+ this.sourceMeta = sourceMeta;
+ }
+
+ public SampleNode withSourceMeta(List sourceMeta) {
+ this.sourceMeta = sourceMeta;
+ return this;
+ }
+
+ @JsonProperty("meta_user")
+ public Map> getMetaUser() {
+ return metaUser;
+ }
+
+ @JsonProperty("meta_user")
+ public void setMetaUser(Map> metaUser) {
+ this.metaUser = metaUser;
+ }
+
+ public SampleNode withMetaUser(Map> metaUser) {
+ this.metaUser = metaUser;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(java.lang.String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ return ((((((((((((((("SampleNode"+" [id=")+ id)+", parent=")+ parent)+", type=")+ type)+", metaControlled=")+ metaControlled)+", sourceMeta=")+ sourceMeta)+", metaUser=")+ metaUser)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/SampleServiceClient.java b/src/main/java/us/kbase/sampleservice/SampleServiceClient.java
new file mode 100644
index 00000000..877011d3
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/SampleServiceClient.java
@@ -0,0 +1,527 @@
+package us.kbase.sampleservice;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import us.kbase.auth.AuthToken;
+import us.kbase.common.service.JsonClientCaller;
+import us.kbase.common.service.JsonClientException;
+import us.kbase.common.service.RpcContext;
+import us.kbase.common.service.UnauthorizedException;
+
+/**
+ * Original spec-file module name: SampleService
+ *
+ * A KBase module: SampleService
+ * Handles creating, updating, retriving samples and linking data to samples.
+ * Note that usage of the administration flags will be logged by the service.
+ *
+ */
+public class SampleServiceClient {
+ private JsonClientCaller caller;
+ private String serviceVersion = null;
+ private static URL DEFAULT_URL = null;
+ static {
+ try {
+ DEFAULT_URL = new URL("https://ci.kbase.us/services/sampleservice");
+ } catch (MalformedURLException mue) {
+ throw new RuntimeException("Compile error in client - bad url compiled");
+ }
+ }
+
+ /** Constructs a client with the default url and no user credentials.*/
+ public SampleServiceClient() {
+ caller = new JsonClientCaller(DEFAULT_URL);
+ }
+
+
+ /** Constructs a client with a custom URL and no user credentials.
+ * @param url the URL of the service.
+ */
+ public SampleServiceClient(URL url) {
+ caller = new JsonClientCaller(url);
+ }
+ /** Constructs a client with a custom URL.
+ * @param url the URL of the service.
+ * @param token the user's authorization token.
+ * @throws UnauthorizedException if the token is not valid.
+ * @throws IOException if an IOException occurs when checking the token's
+ * validity.
+ */
+ public SampleServiceClient(URL url, AuthToken token) throws UnauthorizedException, IOException {
+ caller = new JsonClientCaller(url, token);
+ }
+
+ /** Constructs a client with a custom URL.
+ * @param url the URL of the service.
+ * @param user the user name.
+ * @param password the password for the user name.
+ * @throws UnauthorizedException if the credentials are not valid.
+ * @throws IOException if an IOException occurs when checking the user's
+ * credentials.
+ */
+ public SampleServiceClient(URL url, String user, String password) throws UnauthorizedException, IOException {
+ caller = new JsonClientCaller(url, user, password);
+ }
+
+ /** Constructs a client with a custom URL
+ * and a custom authorization service URL.
+ * @param url the URL of the service.
+ * @param user the user name.
+ * @param password the password for the user name.
+ * @param auth the URL of the authorization server.
+ * @throws UnauthorizedException if the credentials are not valid.
+ * @throws IOException if an IOException occurs when checking the user's
+ * credentials.
+ */
+ public SampleServiceClient(URL url, String user, String password, URL auth) throws UnauthorizedException, IOException {
+ caller = new JsonClientCaller(url, user, password, auth);
+ }
+
+ /** Constructs a client with the default URL.
+ * @param token the user's authorization token.
+ * @throws UnauthorizedException if the token is not valid.
+ * @throws IOException if an IOException occurs when checking the token's
+ * validity.
+ */
+ public SampleServiceClient(AuthToken token) throws UnauthorizedException, IOException {
+ caller = new JsonClientCaller(DEFAULT_URL, token);
+ }
+
+ /** Constructs a client with the default URL.
+ * @param user the user name.
+ * @param password the password for the user name.
+ * @throws UnauthorizedException if the credentials are not valid.
+ * @throws IOException if an IOException occurs when checking the user's
+ * credentials.
+ */
+ public SampleServiceClient(String user, String password) throws UnauthorizedException, IOException {
+ caller = new JsonClientCaller(DEFAULT_URL, user, password);
+ }
+
+ /** Get the token this client uses to communicate with the server.
+ * @return the authorization token.
+ */
+ public AuthToken getToken() {
+ return caller.getToken();
+ }
+
+ /** Get the URL of the service with which this client communicates.
+ * @return the service URL.
+ */
+ public URL getURL() {
+ return caller.getURL();
+ }
+
+ /** Set the timeout between establishing a connection to a server and
+ * receiving a response. A value of zero or null implies no timeout.
+ * @param milliseconds the milliseconds to wait before timing out when
+ * attempting to read from a server.
+ */
+ public void setConnectionReadTimeOut(Integer milliseconds) {
+ this.caller.setConnectionReadTimeOut(milliseconds);
+ }
+
+ /** Check if this client allows insecure http (vs https) connections.
+ * @return true if insecure connections are allowed.
+ */
+ public boolean isInsecureHttpConnectionAllowed() {
+ return caller.isInsecureHttpConnectionAllowed();
+ }
+
+ /** Deprecated. Use isInsecureHttpConnectionAllowed().
+ * @deprecated
+ */
+ public boolean isAuthAllowedForHttp() {
+ return caller.isAuthAllowedForHttp();
+ }
+
+ /** Set whether insecure http (vs https) connections should be allowed by
+ * this client.
+ * @param allowed true to allow insecure connections. Default false
+ */
+ public void setIsInsecureHttpConnectionAllowed(boolean allowed) {
+ caller.setInsecureHttpConnectionAllowed(allowed);
+ }
+
+ /** Deprecated. Use setIsInsecureHttpConnectionAllowed().
+ * @deprecated
+ */
+ public void setAuthAllowedForHttp(boolean isAuthAllowedForHttp) {
+ caller.setAuthAllowedForHttp(isAuthAllowedForHttp);
+ }
+
+ /** Set whether all SSL certificates, including self-signed certificates,
+ * should be trusted.
+ * @param trustAll true to trust all certificates. Default false.
+ */
+ public void setAllSSLCertificatesTrusted(final boolean trustAll) {
+ caller.setAllSSLCertificatesTrusted(trustAll);
+ }
+
+ /** Check if this client trusts all SSL certificates, including
+ * self-signed certificates.
+ * @return true if all certificates are trusted.
+ */
+ public boolean isAllSSLCertificatesTrusted() {
+ return caller.isAllSSLCertificatesTrusted();
+ }
+ /** Sets streaming mode on. In this case, the data will be streamed to
+ * the server in chunks as it is read from disk rather than buffered in
+ * memory. Many servers are not compatible with this feature.
+ * @param streamRequest true to set streaming mode on, false otherwise.
+ */
+ public void setStreamingModeOn(boolean streamRequest) {
+ caller.setStreamingModeOn(streamRequest);
+ }
+
+ /** Returns true if streaming mode is on.
+ * @return true if streaming mode is on.
+ */
+ public boolean isStreamingModeOn() {
+ return caller.isStreamingModeOn();
+ }
+
+ public void _setFileForNextRpcResponse(File f) {
+ caller.setFileForNextRpcResponse(f);
+ }
+
+ public String getServiceVersion() {
+ return this.serviceVersion;
+ }
+
+ public void setServiceVersion(String newValue) {
+ this.serviceVersion = newValue;
+ }
+
+ /**
+ * Original spec-file function name: create_sample
+ *
+ * Create a new sample or a sample version.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.CreateSampleParams CreateSampleParams}
+ * @return parameter "address" of type {@link us.kbase.sampleservice.SampleAddress SampleAddress}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public SampleAddress createSample(CreateSampleParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference> retType = new TypeReference>() {};
+ List res = caller.jsonrpcCall("SampleService.create_sample", args, retType, true, true, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+
+ /**
+ * Original spec-file function name: get_sample
+ *
+ * Get a sample. If the version is omitted the most recent sample is returned.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.GetSampleParams GetSampleParams}
+ * @return parameter "sample" of type {@link us.kbase.sampleservice.Sample Sample}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public Sample getSample(GetSampleParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference> retType = new TypeReference>() {};
+ List res = caller.jsonrpcCall("SampleService.get_sample", args, retType, true, false, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+
+ /**
+ * Original spec-file function name: get_samples
+ *
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.GetSamplesParams GetSamplesParams}
+ * @return parameter "samples" of list of type {@link us.kbase.sampleservice.Sample Sample}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public List getSamples(GetSamplesParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference>> retType = new TypeReference>>() {};
+ List> res = caller.jsonrpcCall("SampleService.get_samples", args, retType, true, false, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+
+ /**
+ * Original spec-file function name: get_sample_acls
+ *
+ * Get a sample's ACLs.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.GetSampleACLsParams GetSampleACLsParams}
+ * @return parameter "acls" of type {@link us.kbase.sampleservice.SampleACLs SampleACLs}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public SampleACLs getSampleAcls(GetSampleACLsParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference> retType = new TypeReference>() {};
+ List res = caller.jsonrpcCall("SampleService.get_sample_acls", args, retType, true, false, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+
+ /**
+ * Original spec-file function name: update_sample_acls
+ *
+ * Update a sample's ACLs.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.UpdateSampleACLsParams UpdateSampleACLsParams}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public void updateSampleAcls(UpdateSampleACLsParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference retType = new TypeReference() {};
+ caller.jsonrpcCall("SampleService.update_sample_acls", args, retType, false, true, jsonRpcContext, this.serviceVersion);
+ }
+
+ /**
+ * Original spec-file function name: update_samples_acls
+ *
+ * Update the ACLs of many samples.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.UpdateSamplesACLsParams UpdateSamplesACLsParams}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public void updateSamplesAcls(UpdateSamplesACLsParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference retType = new TypeReference() {};
+ caller.jsonrpcCall("SampleService.update_samples_acls", args, retType, false, true, jsonRpcContext, this.serviceVersion);
+ }
+
+ /**
+ * Original spec-file function name: replace_sample_acls
+ *
+ * Completely overwrite a sample's ACLs. Any current ACLs are replaced by the provided
+ * ACLs, even if empty, and gone forever.
+ * The sample owner cannot be changed via this method.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.ReplaceSampleACLsParams ReplaceSampleACLsParams}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public void replaceSampleAcls(ReplaceSampleACLsParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference retType = new TypeReference() {};
+ caller.jsonrpcCall("SampleService.replace_sample_acls", args, retType, false, true, jsonRpcContext, this.serviceVersion);
+ }
+
+ /**
+ * Original spec-file function name: get_metadata_key_static_metadata
+ *
+ * Get static metadata for one or more metadata keys.
+ * The static metadata for a metadata key is metadata *about* the key - e.g. it may
+ * define the key's semantics or denote that the key is linked to an ontological ID.
+ * The static metadata does not change without the service being restarted. Client caching is
+ * recommended to improve performance.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.GetMetadataKeyStaticMetadataParams GetMetadataKeyStaticMetadataParams}
+ * @return parameter "results" of type {@link us.kbase.sampleservice.GetMetadataKeyStaticMetadataResults GetMetadataKeyStaticMetadataResults}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public GetMetadataKeyStaticMetadataResults getMetadataKeyStaticMetadata(GetMetadataKeyStaticMetadataParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference> retType = new TypeReference>() {};
+ List res = caller.jsonrpcCall("SampleService.get_metadata_key_static_metadata", args, retType, true, false, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+
+ /**
+ * Original spec-file function name: create_data_link
+ *
+ * Create a link from a KBase Workspace object to a sample.
+ * The user must have admin permissions for the sample and write permissions for the
+ * Workspace object.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.CreateDataLinkParams CreateDataLinkParams}
+ * @return parameter "results" of type {@link us.kbase.sampleservice.CreateDataLinkResults CreateDataLinkResults}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public CreateDataLinkResults createDataLink(CreateDataLinkParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference> retType = new TypeReference>() {};
+ List res = caller.jsonrpcCall("SampleService.create_data_link", args, retType, true, true, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+
+ /**
+ * Original spec-file function name: propagate_data_links
+ *
+ * Propagates data links from a previous sample to the current (latest) version
+ * The user must have admin permissions for the sample and write permissions for the
+ * Workspace object.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.PropagateDataLinkParams PropagateDataLinkParams}
+ * @return parameter "results" of type {@link us.kbase.sampleservice.PropagateDataLinkResults PropagateDataLinkResults}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public PropagateDataLinkResults propagateDataLinks(PropagateDataLinkParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference> retType = new TypeReference>() {};
+ List res = caller.jsonrpcCall("SampleService.propagate_data_links", args, retType, true, true, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+
+ /**
+ * Original spec-file function name: expire_data_link
+ *
+ * Expire a link from a KBase Workspace object.
+ * The user must have admin permissions for the sample and write permissions for the
+ * Workspace object.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.ExpireDataLinkParams ExpireDataLinkParams}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public void expireDataLink(ExpireDataLinkParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference retType = new TypeReference() {};
+ caller.jsonrpcCall("SampleService.expire_data_link", args, retType, false, true, jsonRpcContext, this.serviceVersion);
+ }
+
+ /**
+ * Original spec-file function name: get_data_links_from_sample
+ *
+ * Get data links to Workspace objects originating from a sample.
+ * The user must have read permissions to the sample. Only Workspace objects the user
+ * can read are returned.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.GetDataLinksFromSampleParams GetDataLinksFromSampleParams}
+ * @return parameter "results" of type {@link us.kbase.sampleservice.GetDataLinksFromSampleResults GetDataLinksFromSampleResults}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public GetDataLinksFromSampleResults getDataLinksFromSample(GetDataLinksFromSampleParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference> retType = new TypeReference>() {};
+ List res = caller.jsonrpcCall("SampleService.get_data_links_from_sample", args, retType, true, false, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+
+ /**
+ * Original spec-file function name: get_data_links_from_sample_set
+ *
+ * Get all workspace object metadata linked to samples in a list of samples or sample set
+ * refs. Returns metadata about links to data objects. A batch version of
+ * get_data_links_from_sample.
+ * The user must have read permissions to the sample. A permissions error is thrown when a
+ * sample is found that the user has no access to.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.GetDataLinksFromSampleSetParams GetDataLinksFromSampleSetParams}
+ * @return parameter "results" of type {@link us.kbase.sampleservice.GetDataLinksFromSampleResults GetDataLinksFromSampleResults}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public GetDataLinksFromSampleResults getDataLinksFromSampleSet(GetDataLinksFromSampleSetParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference> retType = new TypeReference>() {};
+ List res = caller.jsonrpcCall("SampleService.get_data_links_from_sample_set", args, retType, true, false, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+
+ /**
+ * Original spec-file function name: get_data_links_from_data
+ *
+ * Get data links to samples originating from Workspace data.
+ * The user must have read permissions to the workspace data.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.GetDataLinksFromDataParams GetDataLinksFromDataParams}
+ * @return parameter "results" of type {@link us.kbase.sampleservice.GetDataLinksFromDataResults GetDataLinksFromDataResults}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public GetDataLinksFromDataResults getDataLinksFromData(GetDataLinksFromDataParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference> retType = new TypeReference>() {};
+ List res = caller.jsonrpcCall("SampleService.get_data_links_from_data", args, retType, true, false, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+
+ /**
+ * Original spec-file function name: get_sample_via_data
+ *
+ * Get a sample via a workspace object. Read permissions to a workspace object grants
+ * read permissions to all versions of any linked samples, whether the links are expired or
+ * not. This method allows for fetching samples when the user does not have explicit
+ * read access to the sample.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.GetSampleViaDataParams GetSampleViaDataParams}
+ * @return parameter "sample" of type {@link us.kbase.sampleservice.Sample Sample}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public Sample getSampleViaData(GetSampleViaDataParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference> retType = new TypeReference>() {};
+ List res = caller.jsonrpcCall("SampleService.get_sample_via_data", args, retType, true, false, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+
+ /**
+ * Original spec-file function name: get_data_link
+ *
+ * Get a link, expired or not, by its ID. This method requires read administration privileges
+ * for the service.
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.GetDataLinkParams GetDataLinkParams}
+ * @return parameter "link" of type {@link us.kbase.sampleservice.DataLink DataLink}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public DataLink getDataLink(GetDataLinkParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference> retType = new TypeReference>() {};
+ List res = caller.jsonrpcCall("SampleService.get_data_link", args, retType, true, true, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+
+ /**
+ * Original spec-file function name: validate_samples
+ *
+ *
+ * @param params instance of type {@link us.kbase.sampleservice.ValidateSamplesParams ValidateSamplesParams}
+ * @return parameter "results" of type {@link us.kbase.sampleservice.ValidateSamplesResults ValidateSamplesResults}
+ * @throws IOException if an IO exception occurs
+ * @throws JsonClientException if a JSON RPC exception occurs
+ */
+ public ValidateSamplesResults validateSamples(ValidateSamplesParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ args.add(params);
+ TypeReference> retType = new TypeReference>() {};
+ List res = caller.jsonrpcCall("SampleService.validate_samples", args, retType, true, true, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+
+ public Map status(RpcContext... jsonRpcContext) throws IOException, JsonClientException {
+ List args = new ArrayList();
+ TypeReference>> retType = new TypeReference>>() {};
+ List> res = caller.jsonrpcCall("SampleService.status", args, retType, true, false, jsonRpcContext, this.serviceVersion);
+ return res.get(0);
+ }
+}
diff --git a/src/main/java/us/kbase/sampleservice/SourceMetadata.java b/src/main/java/us/kbase/sampleservice/SourceMetadata.java
new file mode 100644
index 00000000..a0670c45
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/SourceMetadata.java
@@ -0,0 +1,104 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import us.kbase.common.service.UObject;
+
+
+/**
+ * Original spec-file type: SourceMetadata
+ *
+ * Information about a metadata key as it appeared at the data source.
+ * The source key and value represents the original state of the metadata before it was
+ * tranformed for ingestion by the sample service.
+ * key - the metadata key.
+ * skey - the key as it appeared at the data source.
+ * svalue - the value as it appeared at the data source.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "key",
+ "skey",
+ "svalue"
+})
+public class SourceMetadata {
+
+ @JsonProperty("key")
+ private java.lang.String key;
+ @JsonProperty("skey")
+ private java.lang.String skey;
+ @JsonProperty("svalue")
+ private Map svalue;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("key")
+ public java.lang.String getKey() {
+ return key;
+ }
+
+ @JsonProperty("key")
+ public void setKey(java.lang.String key) {
+ this.key = key;
+ }
+
+ public SourceMetadata withKey(java.lang.String key) {
+ this.key = key;
+ return this;
+ }
+
+ @JsonProperty("skey")
+ public java.lang.String getSkey() {
+ return skey;
+ }
+
+ @JsonProperty("skey")
+ public void setSkey(java.lang.String skey) {
+ this.skey = skey;
+ }
+
+ public SourceMetadata withSkey(java.lang.String skey) {
+ this.skey = skey;
+ return this;
+ }
+
+ @JsonProperty("svalue")
+ public Map getSvalue() {
+ return svalue;
+ }
+
+ @JsonProperty("svalue")
+ public void setSvalue(Map svalue) {
+ this.svalue = svalue;
+ }
+
+ public SourceMetadata withSvalue(Map svalue) {
+ this.svalue = svalue;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(java.lang.String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ return ((((((((("SourceMetadata"+" [key=")+ key)+", skey=")+ skey)+", svalue=")+ svalue)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/UpdateSampleACLsParams.java b/src/main/java/us/kbase/sampleservice/UpdateSampleACLsParams.java
new file mode 100644
index 00000000..ca515532
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/UpdateSampleACLsParams.java
@@ -0,0 +1,207 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: UpdateSampleACLsParams
+ *
+ * update_sample_acls parameters.
+ * id - the ID of the sample to modify.
+ * admin - a list of users that will receive admin privileges. Default none.
+ * write - a list of users that will receive write privileges. Default none.
+ * read - a list of users that will receive read privileges. Default none.
+ * remove - a list of users that will have all privileges removed. Default none.
+ * public_read - an integer that determines whether the sample will be set to publicly
+ * readable:
+ * > 0: public read.
+ * 0: No change (the default).
+ * < 0: private.
+ * at_least - false, the default, indicates that the users should get the exact permissions
+ * as specified in the user lists, which may mean a reduction in permissions. If true,
+ * users that already exist in the sample ACLs will not have their permissions reduced
+ * as part of the ACL update unless they are in the remove list. E.g. if a user has
+ * write permissions and read permissions are specified in the update, no changes will
+ * be made to the user's permission.
+ * as_admin - update the sample acls regardless of sample ACL contents as long as the user has
+ * full service administration permissions.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "id",
+ "admin",
+ "write",
+ "read",
+ "remove",
+ "public_read",
+ "at_least",
+ "as_admin"
+})
+public class UpdateSampleACLsParams {
+
+ @JsonProperty("id")
+ private java.lang.String id;
+ @JsonProperty("admin")
+ private List admin;
+ @JsonProperty("write")
+ private List write;
+ @JsonProperty("read")
+ private List read;
+ @JsonProperty("remove")
+ private List remove;
+ @JsonProperty("public_read")
+ private Long publicRead;
+ @JsonProperty("at_least")
+ private Long atLeast;
+ @JsonProperty("as_admin")
+ private Long asAdmin;
+ private Map additionalProperties = new HashMap();
+
+ @JsonProperty("id")
+ public java.lang.String getId() {
+ return id;
+ }
+
+ @JsonProperty("id")
+ public void setId(java.lang.String id) {
+ this.id = id;
+ }
+
+ public UpdateSampleACLsParams withId(java.lang.String id) {
+ this.id = id;
+ return this;
+ }
+
+ @JsonProperty("admin")
+ public List getAdmin() {
+ return admin;
+ }
+
+ @JsonProperty("admin")
+ public void setAdmin(List admin) {
+ this.admin = admin;
+ }
+
+ public UpdateSampleACLsParams withAdmin(List admin) {
+ this.admin = admin;
+ return this;
+ }
+
+ @JsonProperty("write")
+ public List getWrite() {
+ return write;
+ }
+
+ @JsonProperty("write")
+ public void setWrite(List write) {
+ this.write = write;
+ }
+
+ public UpdateSampleACLsParams withWrite(List write) {
+ this.write = write;
+ return this;
+ }
+
+ @JsonProperty("read")
+ public List getRead() {
+ return read;
+ }
+
+ @JsonProperty("read")
+ public void setRead(List read) {
+ this.read = read;
+ }
+
+ public UpdateSampleACLsParams withRead(List read) {
+ this.read = read;
+ return this;
+ }
+
+ @JsonProperty("remove")
+ public List getRemove() {
+ return remove;
+ }
+
+ @JsonProperty("remove")
+ public void setRemove(List remove) {
+ this.remove = remove;
+ }
+
+ public UpdateSampleACLsParams withRemove(List remove) {
+ this.remove = remove;
+ return this;
+ }
+
+ @JsonProperty("public_read")
+ public Long getPublicRead() {
+ return publicRead;
+ }
+
+ @JsonProperty("public_read")
+ public void setPublicRead(Long publicRead) {
+ this.publicRead = publicRead;
+ }
+
+ public UpdateSampleACLsParams withPublicRead(Long publicRead) {
+ this.publicRead = publicRead;
+ return this;
+ }
+
+ @JsonProperty("at_least")
+ public Long getAtLeast() {
+ return atLeast;
+ }
+
+ @JsonProperty("at_least")
+ public void setAtLeast(Long atLeast) {
+ this.atLeast = atLeast;
+ }
+
+ public UpdateSampleACLsParams withAtLeast(Long atLeast) {
+ this.atLeast = atLeast;
+ return this;
+ }
+
+ @JsonProperty("as_admin")
+ public Long getAsAdmin() {
+ return asAdmin;
+ }
+
+ @JsonProperty("as_admin")
+ public void setAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ }
+
+ public UpdateSampleACLsParams withAsAdmin(Long asAdmin) {
+ this.asAdmin = asAdmin;
+ return this;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperties(java.lang.String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ return ((((((((((((((((((("UpdateSampleACLsParams"+" [id=")+ id)+", admin=")+ admin)+", write=")+ write)+", read=")+ read)+", remove=")+ remove)+", publicRead=")+ publicRead)+", atLeast=")+ atLeast)+", asAdmin=")+ asAdmin)+", additionalProperties=")+ additionalProperties)+"]");
+ }
+
+}
diff --git a/src/main/java/us/kbase/sampleservice/UpdateSamplesACLsParams.java b/src/main/java/us/kbase/sampleservice/UpdateSamplesACLsParams.java
new file mode 100644
index 00000000..17190332
--- /dev/null
+++ b/src/main/java/us/kbase/sampleservice/UpdateSamplesACLsParams.java
@@ -0,0 +1,191 @@
+
+package us.kbase.sampleservice;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+/**
+ * Original spec-file type: UpdateSamplesACLsParams
+ *
+ * update_samples_acls parameters.
+ * These parameters are the same as update_sample_acls, except:
+ * ids - a list of IDs of samples to modify.
+ *
+ *
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("com.googlecode.jsonschema2pojo")
+@JsonPropertyOrder({
+ "ids",
+ "admin",
+ "write",
+ "read",
+ "remove",
+ "public_read",
+ "at_least",
+ "as_admin"
+})
+public class UpdateSamplesACLsParams {
+
+ @JsonProperty("ids")
+ private List ids;
+ @JsonProperty("admin")
+ private List admin;
+ @JsonProperty("write")
+ private List write;
+ @JsonProperty("read")
+ private List read;
+ @JsonProperty("remove")
+ private List