cookieParams) {
50 | if(bearerToken == null) {
51 | return;
52 | }
53 |
54 | headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
55 | }
56 |
57 | private static String upperCaseBearer(String scheme) {
58 | return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/StringUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml;
15 |
16 |
17 | public class StringUtil {
18 | /**
19 | * Check if the given array contains the given value (with case-insensitive comparison).
20 | *
21 | * @param array The array
22 | * @param value The value to search
23 | * @return true if the array contains the value
24 | */
25 | public static boolean containsIgnoreCase(String[] array, String value) {
26 | for (String str : array) {
27 | if (value == null && str == null) {
28 | return true;
29 | }
30 | if (value != null && value.equalsIgnoreCase(str)) {
31 | return true;
32 | }
33 | }
34 | return false;
35 | }
36 |
37 | /**
38 | * Join an array of strings with the given separator.
39 | *
40 | * Note: This might be replaced by utility method from commons-lang or guava someday
41 | * if one of those libraries is added as dependency.
42 | *
43 | *
44 | * @param array The array of strings
45 | * @param separator The separator
46 | * @return the resulting string
47 | */
48 | public static String join(String[] array, String separator) {
49 | int len = array.length;
50 | if (len == 0) {
51 | return "";
52 | }
53 |
54 | StringBuilder out = new StringBuilder();
55 | out.append(array[0]);
56 | for (int i = 1; i < len; i++) {
57 | out.append(separator).append(array[i]);
58 | }
59 | return out.toString();
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/model/CompositeConstraintTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import com.google.gson.TypeAdapter;
17 | import com.google.gson.annotations.JsonAdapter;
18 | import com.google.gson.annotations.SerializedName;
19 | import com.google.gson.stream.JsonReader;
20 | import com.google.gson.stream.JsonWriter;
21 | import io.swagger.annotations.ApiModel;
22 | import io.swagger.annotations.ApiModelProperty;
23 | import java.io.IOException;
24 | import java.util.ArrayList;
25 | import java.util.List;
26 | import org.omg.sysml.model.Constraint;
27 | import org.junit.Assert;
28 | import org.junit.Ignore;
29 | import org.junit.Test;
30 |
31 |
32 | /**
33 | * Model tests for CompositeConstraint
34 | */
35 | public class CompositeConstraintTest {
36 | private final CompositeConstraint model = new CompositeConstraint();
37 |
38 | /**
39 | * Model tests for CompositeConstraint
40 | */
41 | @Test
42 | public void testCompositeConstraint() {
43 | // TODO: test CompositeConstraint
44 | }
45 |
46 | /**
47 | * Test the property 'atType'
48 | */
49 | @Test
50 | public void atTypeTest() {
51 | // TODO: test atType
52 | }
53 |
54 | /**
55 | * Test the property 'constraint'
56 | */
57 | @Test
58 | public void constraintTest() {
59 | // TODO: test constraint
60 | }
61 |
62 | /**
63 | * Test the property 'operator'
64 | */
65 | @Test
66 | public void operatorTest() {
67 | // TODO: test operator
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/model/DataVersionTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import com.google.gson.TypeAdapter;
17 | import com.google.gson.annotations.JsonAdapter;
18 | import com.google.gson.annotations.SerializedName;
19 | import com.google.gson.stream.JsonReader;
20 | import com.google.gson.stream.JsonWriter;
21 | import io.swagger.annotations.ApiModel;
22 | import io.swagger.annotations.ApiModelProperty;
23 | import java.io.IOException;
24 | import java.util.UUID;
25 | import org.omg.sysml.model.Data;
26 | import org.omg.sysml.model.DataIdentity;
27 | import org.junit.Assert;
28 | import org.junit.Ignore;
29 | import org.junit.Test;
30 |
31 |
32 | /**
33 | * Model tests for DataVersion
34 | */
35 | public class DataVersionTest {
36 | private final DataVersion model = new DataVersion();
37 |
38 | /**
39 | * Model tests for DataVersion
40 | */
41 | @Test
42 | public void testDataVersion() {
43 | // TODO: test DataVersion
44 | }
45 |
46 | /**
47 | * Test the property 'atId'
48 | */
49 | @Test
50 | public void atIdTest() {
51 | // TODO: test atId
52 | }
53 |
54 | /**
55 | * Test the property 'atType'
56 | */
57 | @Test
58 | public void atTypeTest() {
59 | // TODO: test atType
60 | }
61 |
62 | /**
63 | * Test the property 'payload'
64 | */
65 | @Test
66 | public void payloadTest() {
67 | // TODO: test payload
68 | }
69 |
70 | /**
71 | * Test the property 'identity'
72 | */
73 | @Test
74 | public void identityTest() {
75 | // TODO: test identity
76 | }
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/git_push.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3 | #
4 | # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
5 |
6 | git_user_id=$1
7 | git_repo_id=$2
8 | release_note=$3
9 | git_host=$4
10 |
11 | if [ "$git_host" = "" ]; then
12 | git_host="github.com"
13 | echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14 | fi
15 |
16 | if [ "$git_user_id" = "" ]; then
17 | git_user_id="GIT_USER_ID"
18 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19 | fi
20 |
21 | if [ "$git_repo_id" = "" ]; then
22 | git_repo_id="GIT_REPO_ID"
23 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24 | fi
25 |
26 | if [ "$release_note" = "" ]; then
27 | release_note="Minor update"
28 | echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29 | fi
30 |
31 | # Initialize the local directory as a Git repository
32 | git init
33 |
34 | # Adds the files in the local repository and stages them for commit.
35 | git add .
36 |
37 | # Commits the tracked changes and prepares them to be pushed to a remote repository.
38 | git commit -m "$release_note"
39 |
40 | # Sets the new remote
41 | git_remote=`git remote`
42 | if [ "$git_remote" = "" ]; then # git remote not defined
43 |
44 | if [ "$GIT_TOKEN" = "" ]; then
45 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46 | git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47 | else
48 | git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
49 | fi
50 |
51 | fi
52 |
53 | git pull origin master
54 |
55 | # Pushes (Forces) the changes in the local repository up to the remote repository
56 | echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57 | git push origin master 2>&1 | grep -v 'To https'
58 |
59 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/auth/ApiKeyAuth.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.auth;
15 |
16 | import org.omg.sysml.Pair;
17 |
18 | import java.util.Map;
19 | import java.util.List;
20 |
21 |
22 | public class ApiKeyAuth implements Authentication {
23 | private final String location;
24 | private final String paramName;
25 |
26 | private String apiKey;
27 | private String apiKeyPrefix;
28 |
29 | public ApiKeyAuth(String location, String paramName) {
30 | this.location = location;
31 | this.paramName = paramName;
32 | }
33 |
34 | public String getLocation() {
35 | return location;
36 | }
37 |
38 | public String getParamName() {
39 | return paramName;
40 | }
41 |
42 | public String getApiKey() {
43 | return apiKey;
44 | }
45 |
46 | public void setApiKey(String apiKey) {
47 | this.apiKey = apiKey;
48 | }
49 |
50 | public String getApiKeyPrefix() {
51 | return apiKeyPrefix;
52 | }
53 |
54 | public void setApiKeyPrefix(String apiKeyPrefix) {
55 | this.apiKeyPrefix = apiKeyPrefix;
56 | }
57 |
58 | @Override
59 | public void applyToParams(List queryParams, Map headerParams, Map cookieParams) {
60 | if (apiKey == null) {
61 | return;
62 | }
63 | String value;
64 | if (apiKeyPrefix != null) {
65 | value = apiKeyPrefix + " " + apiKey;
66 | } else {
67 | value = apiKey;
68 | }
69 | if ("query".equals(location)) {
70 | queryParams.add(new Pair(paramName, value));
71 | } else if ("header".equals(location)) {
72 | headerParams.put(paramName, value);
73 | } else if ("cookie".equals(location)) {
74 | cookieParams.put(paramName, value);
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/ApiCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml;
15 |
16 | import java.io.IOException;
17 |
18 | import java.util.Map;
19 | import java.util.List;
20 |
21 | /**
22 | * Callback for asynchronous API call.
23 | *
24 | * @param The return type
25 | */
26 | public interface ApiCallback {
27 | /**
28 | * This is called when the API call fails.
29 | *
30 | * @param e The exception causing the failure
31 | * @param statusCode Status code of the response if available, otherwise it would be 0
32 | * @param responseHeaders Headers of the response if available, otherwise it would be null
33 | */
34 | void onFailure(ApiException e, int statusCode, Map> responseHeaders);
35 |
36 | /**
37 | * This is called when the API call succeeded.
38 | *
39 | * @param result The result deserialized from response
40 | * @param statusCode Status code of the response
41 | * @param responseHeaders Headers of the response
42 | */
43 | void onSuccess(T result, int statusCode, Map> responseHeaders);
44 |
45 | /**
46 | * This is called when the API upload processing.
47 | *
48 | * @param bytesWritten bytes Written
49 | * @param contentLength content length of request body
50 | * @param done write end
51 | */
52 | void onUploadProgress(long bytesWritten, long contentLength, boolean done);
53 |
54 | /**
55 | * This is called when the API downlond processing.
56 | *
57 | * @param bytesRead bytes Read
58 | * @param contentLength content lenngth of the response
59 | * @param done Read end
60 | */
61 | void onDownloadProgress(long bytesRead, long contentLength, boolean done);
62 | }
63 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/model/PrimitiveConstraintTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import com.google.gson.TypeAdapter;
17 | import com.google.gson.annotations.JsonAdapter;
18 | import com.google.gson.annotations.SerializedName;
19 | import com.google.gson.stream.JsonReader;
20 | import com.google.gson.stream.JsonWriter;
21 | import io.swagger.annotations.ApiModel;
22 | import io.swagger.annotations.ApiModelProperty;
23 | import java.io.IOException;
24 | import org.junit.Assert;
25 | import org.junit.Ignore;
26 | import org.junit.Test;
27 |
28 |
29 | /**
30 | * Model tests for PrimitiveConstraint
31 | */
32 | public class PrimitiveConstraintTest {
33 | private final PrimitiveConstraint model = new PrimitiveConstraint();
34 |
35 | /**
36 | * Model tests for PrimitiveConstraint
37 | */
38 | @Test
39 | public void testPrimitiveConstraint() {
40 | // TODO: test PrimitiveConstraint
41 | }
42 |
43 | /**
44 | * Test the property 'atType'
45 | */
46 | @Test
47 | public void atTypeTest() {
48 | // TODO: test atType
49 | }
50 |
51 | /**
52 | * Test the property 'inverse'
53 | */
54 | @Test
55 | public void inverseTest() {
56 | // TODO: test inverse
57 | }
58 |
59 | /**
60 | * Test the property 'property'
61 | */
62 | @Test
63 | public void propertyTest() {
64 | // TODO: test property
65 | }
66 |
67 | /**
68 | * Test the property 'value'
69 | */
70 | @Test
71 | public void valueTest() {
72 | // TODO: test value
73 | }
74 |
75 | /**
76 | * Test the property 'operator'
77 | */
78 | @Test
79 | public void operatorTest() {
80 | // TODO: test operator
81 | }
82 |
83 | }
84 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/model/ProjectTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import com.google.gson.TypeAdapter;
17 | import com.google.gson.annotations.JsonAdapter;
18 | import com.google.gson.annotations.SerializedName;
19 | import com.google.gson.stream.JsonReader;
20 | import com.google.gson.stream.JsonWriter;
21 | import io.swagger.annotations.ApiModel;
22 | import io.swagger.annotations.ApiModelProperty;
23 | import java.io.IOException;
24 | import java.util.UUID;
25 | import org.omg.sysml.model.ProjectDefaultBranch;
26 | import org.junit.Assert;
27 | import org.junit.Ignore;
28 | import org.junit.Test;
29 |
30 |
31 | /**
32 | * Model tests for Project
33 | */
34 | public class ProjectTest {
35 | private final Project model = new Project();
36 |
37 | /**
38 | * Model tests for Project
39 | */
40 | @Test
41 | public void testProject() {
42 | // TODO: test Project
43 | }
44 |
45 | /**
46 | * Test the property 'atId'
47 | */
48 | @Test
49 | public void atIdTest() {
50 | // TODO: test atId
51 | }
52 |
53 | /**
54 | * Test the property 'atType'
55 | */
56 | @Test
57 | public void atTypeTest() {
58 | // TODO: test atType
59 | }
60 |
61 | /**
62 | * Test the property 'defaultBranch'
63 | */
64 | @Test
65 | public void defaultBranchTest() {
66 | // TODO: test defaultBranch
67 | }
68 |
69 | /**
70 | * Test the property 'description'
71 | */
72 | @Test
73 | public void descriptionTest() {
74 | // TODO: test description
75 | }
76 |
77 | /**
78 | * Test the property 'name'
79 | */
80 | @Test
81 | public void nameTest() {
82 | // TODO: test name
83 | }
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/ServerConfiguration.java:
--------------------------------------------------------------------------------
1 | package org.omg.sysml;
2 |
3 | import java.util.Map;
4 |
5 | /**
6 | * Representing a Server configuration.
7 | */
8 | public class ServerConfiguration {
9 | public String URL;
10 | public String description;
11 | public Map variables;
12 |
13 | /**
14 | * @param URL A URL to the target host.
15 | * @param description A describtion of the host designated by the URL.
16 | * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
17 | */
18 | public ServerConfiguration(String URL, String description, Map variables) {
19 | this.URL = URL;
20 | this.description = description;
21 | this.variables = variables;
22 | }
23 |
24 | /**
25 | * Format URL template using given variables.
26 | *
27 | * @param variables A map between a variable name and its value.
28 | * @return Formatted URL.
29 | */
30 | public String URL(Map variables) {
31 | String url = this.URL;
32 |
33 | // go through variables and replace placeholders
34 | for (Map.Entry variable: this.variables.entrySet()) {
35 | String name = variable.getKey();
36 | ServerVariable serverVariable = variable.getValue();
37 | String value = serverVariable.defaultValue;
38 |
39 | if (variables != null && variables.containsKey(name)) {
40 | value = variables.get(name);
41 | if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
42 | throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + ".");
43 | }
44 | }
45 | url = url.replaceAll("\\{" + name + "\\}", value);
46 | }
47 | return url;
48 | }
49 |
50 | /**
51 | * Format URL template using default server variables.
52 | *
53 | * @return Formatted URL.
54 | */
55 | public String URL() {
56 | return URL(null);
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/model/RelationshipTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import com.google.gson.TypeAdapter;
17 | import com.google.gson.annotations.JsonAdapter;
18 | import com.google.gson.annotations.SerializedName;
19 | import com.google.gson.stream.JsonReader;
20 | import com.google.gson.stream.JsonWriter;
21 | import io.swagger.annotations.ApiModel;
22 | import io.swagger.annotations.ApiModelProperty;
23 | import java.io.IOException;
24 | import java.util.ArrayList;
25 | import java.util.List;
26 | import java.util.UUID;
27 | import org.omg.sysml.model.Identified;
28 | import org.junit.Assert;
29 | import org.junit.Ignore;
30 | import org.junit.Test;
31 |
32 |
33 | /**
34 | * Model tests for Relationship
35 | */
36 | public class RelationshipTest {
37 | private final Relationship model = new Relationship();
38 |
39 | /**
40 | * Model tests for Relationship
41 | */
42 | @Test
43 | public void testRelationship() {
44 | // TODO: test Relationship
45 | }
46 |
47 | /**
48 | * Test the property 'atId'
49 | */
50 | @Test
51 | public void atIdTest() {
52 | // TODO: test atId
53 | }
54 |
55 | /**
56 | * Test the property 'atType'
57 | */
58 | @Test
59 | public void atTypeTest() {
60 | // TODO: test atType
61 | }
62 |
63 | /**
64 | * Test the property 'identifier'
65 | */
66 | @Test
67 | public void identifierTest() {
68 | // TODO: test identifier
69 | }
70 |
71 | /**
72 | * Test the property 'source'
73 | */
74 | @Test
75 | public void sourceTest() {
76 | // TODO: test source
77 | }
78 |
79 | /**
80 | * Test the property 'target'
81 | */
82 | @Test
83 | public void targetTest() {
84 | // TODO: test target
85 | }
86 |
87 | }
88 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/ProgressRequestBody.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml;
15 |
16 | import okhttp3.MediaType;
17 | import okhttp3.RequestBody;
18 |
19 | import java.io.IOException;
20 |
21 | import okio.Buffer;
22 | import okio.BufferedSink;
23 | import okio.ForwardingSink;
24 | import okio.Okio;
25 | import okio.Sink;
26 |
27 | public class ProgressRequestBody extends RequestBody {
28 |
29 | private final RequestBody requestBody;
30 |
31 | private final ApiCallback callback;
32 |
33 | public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) {
34 | this.requestBody = requestBody;
35 | this.callback = callback;
36 | }
37 |
38 | @Override
39 | public MediaType contentType() {
40 | return requestBody.contentType();
41 | }
42 |
43 | @Override
44 | public long contentLength() throws IOException {
45 | return requestBody.contentLength();
46 | }
47 |
48 | @Override
49 | public void writeTo(BufferedSink sink) throws IOException {
50 | BufferedSink bufferedSink = Okio.buffer(sink(sink));
51 | requestBody.writeTo(bufferedSink);
52 | bufferedSink.flush();
53 | }
54 |
55 | private Sink sink(Sink sink) {
56 | return new ForwardingSink(sink) {
57 |
58 | long bytesWritten = 0L;
59 | long contentLength = 0L;
60 |
61 | @Override
62 | public void write(Buffer source, long byteCount) throws IOException {
63 | super.write(source, byteCount);
64 | if (contentLength == 0) {
65 | contentLength = contentLength();
66 | }
67 |
68 | bytesWritten += byteCount;
69 | callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength);
70 | }
71 | };
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/ProgressResponseBody.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml;
15 |
16 | import okhttp3.MediaType;
17 | import okhttp3.ResponseBody;
18 |
19 | import java.io.IOException;
20 |
21 | import okio.Buffer;
22 | import okio.BufferedSource;
23 | import okio.ForwardingSource;
24 | import okio.Okio;
25 | import okio.Source;
26 |
27 | public class ProgressResponseBody extends ResponseBody {
28 |
29 | private final ResponseBody responseBody;
30 | private final ApiCallback callback;
31 | private BufferedSource bufferedSource;
32 |
33 | public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) {
34 | this.responseBody = responseBody;
35 | this.callback = callback;
36 | }
37 |
38 | @Override
39 | public MediaType contentType() {
40 | return responseBody.contentType();
41 | }
42 |
43 | @Override
44 | public long contentLength() {
45 | return responseBody.contentLength();
46 | }
47 |
48 | @Override
49 | public BufferedSource source() {
50 | if (bufferedSource == null) {
51 | bufferedSource = Okio.buffer(source(responseBody.source()));
52 | }
53 | return bufferedSource;
54 | }
55 |
56 | private Source source(Source source) {
57 | return new ForwardingSource(source) {
58 | long totalBytesRead = 0L;
59 |
60 | @Override
61 | public long read(Buffer sink, long byteCount) throws IOException {
62 | long bytesRead = super.read(sink, byteCount);
63 | // read() returns the number of bytes read, or -1 if this source is exhausted.
64 | totalBytesRead += bytesRead != -1 ? bytesRead : 0;
65 | callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
66 | return bytesRead;
67 | }
68 | };
69 | }
70 | }
71 |
72 |
73 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/model/CommitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import com.google.gson.TypeAdapter;
17 | import com.google.gson.annotations.JsonAdapter;
18 | import com.google.gson.annotations.SerializedName;
19 | import com.google.gson.stream.JsonReader;
20 | import com.google.gson.stream.JsonWriter;
21 | import io.swagger.annotations.ApiModel;
22 | import io.swagger.annotations.ApiModelProperty;
23 | import java.io.IOException;
24 | import java.util.ArrayList;
25 | import java.util.List;
26 | import java.util.UUID;
27 | import org.omg.sysml.model.BranchHead;
28 | import org.omg.sysml.model.BranchOwningProject;
29 | import org.omg.sysml.model.DataVersion;
30 | import org.junit.Assert;
31 | import org.junit.Ignore;
32 | import org.junit.Test;
33 |
34 |
35 | /**
36 | * Model tests for Commit
37 | */
38 | public class CommitTest {
39 | private final Commit model = new Commit();
40 |
41 | /**
42 | * Model tests for Commit
43 | */
44 | @Test
45 | public void testCommit() {
46 | // TODO: test Commit
47 | }
48 |
49 | /**
50 | * Test the property 'atId'
51 | */
52 | @Test
53 | public void atIdTest() {
54 | // TODO: test atId
55 | }
56 |
57 | /**
58 | * Test the property 'atType'
59 | */
60 | @Test
61 | public void atTypeTest() {
62 | // TODO: test atType
63 | }
64 |
65 | /**
66 | * Test the property 'change'
67 | */
68 | @Test
69 | public void changeTest() {
70 | // TODO: test change
71 | }
72 |
73 | /**
74 | * Test the property 'owningProject'
75 | */
76 | @Test
77 | public void owningProjectTest() {
78 | // TODO: test owningProject
79 | }
80 |
81 | /**
82 | * Test the property 'previousCommit'
83 | */
84 | @Test
85 | public void previousCommitTest() {
86 | // TODO: test previousCommit
87 | }
88 |
89 | }
90 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/model/QueryTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import com.google.gson.TypeAdapter;
17 | import com.google.gson.annotations.JsonAdapter;
18 | import com.google.gson.annotations.SerializedName;
19 | import com.google.gson.stream.JsonReader;
20 | import com.google.gson.stream.JsonWriter;
21 | import io.swagger.annotations.ApiModel;
22 | import io.swagger.annotations.ApiModelProperty;
23 | import java.io.IOException;
24 | import java.util.ArrayList;
25 | import java.util.List;
26 | import java.util.UUID;
27 | import org.omg.sysml.model.BranchOwningProject;
28 | import org.omg.sysml.model.Constraint;
29 | import org.omg.sysml.model.DataIdentity;
30 | import org.junit.Assert;
31 | import org.junit.Ignore;
32 | import org.junit.Test;
33 |
34 |
35 | /**
36 | * Model tests for Query
37 | */
38 | public class QueryTest {
39 | private final Query model = new Query();
40 |
41 | /**
42 | * Model tests for Query
43 | */
44 | @Test
45 | public void testQuery() {
46 | // TODO: test Query
47 | }
48 |
49 | /**
50 | * Test the property 'atId'
51 | */
52 | @Test
53 | public void atIdTest() {
54 | // TODO: test atId
55 | }
56 |
57 | /**
58 | * Test the property 'atType'
59 | */
60 | @Test
61 | public void atTypeTest() {
62 | // TODO: test atType
63 | }
64 |
65 | /**
66 | * Test the property 'owningProject'
67 | */
68 | @Test
69 | public void owningProjectTest() {
70 | // TODO: test owningProject
71 | }
72 |
73 | /**
74 | * Test the property 'scope'
75 | */
76 | @Test
77 | public void scopeTest() {
78 | // TODO: test scope
79 | }
80 |
81 | /**
82 | * Test the property 'select'
83 | */
84 | @Test
85 | public void selectTest() {
86 | // TODO: test select
87 | }
88 |
89 | /**
90 | * Test the property 'where'
91 | */
92 | @Test
93 | public void whereTest() {
94 | // TODO: test where
95 | }
96 |
97 | }
98 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/api/CommitApiTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.api;
15 |
16 | import org.omg.sysml.ApiException;
17 | import org.omg.sysml.model.Commit;
18 | import org.omg.sysml.model.Error;
19 | import java.util.UUID;
20 | import org.junit.Test;
21 | import org.junit.Ignore;
22 |
23 | import java.util.ArrayList;
24 | import java.util.HashMap;
25 | import java.util.List;
26 | import java.util.Map;
27 |
28 | /**
29 | * API tests for CommitApi
30 | */
31 | @Ignore
32 | public class CommitApiTest {
33 |
34 | private final CommitApi api = new CommitApi();
35 |
36 |
37 | /**
38 | * Get commit by project and ID
39 | *
40 | *
41 | *
42 | * @throws ApiException
43 | * if the Api call fails
44 | */
45 | @Test
46 | public void getCommitByProjectAndIdTest() throws ApiException {
47 | UUID projectId = null;
48 | UUID commitId = null;
49 | Commit response = api.getCommitByProjectAndId(projectId, commitId);
50 |
51 | // TODO: test validations
52 | }
53 |
54 | /**
55 | * Get commits by project
56 | *
57 | *
58 | *
59 | * @throws ApiException
60 | * if the Api call fails
61 | */
62 | @Test
63 | public void getCommitsByProjectTest() throws ApiException {
64 | UUID projectId = null;
65 | String pageAfter = null;
66 | String pageBefore = null;
67 | Integer pageSize = null;
68 | List response = api.getCommitsByProject(projectId, pageAfter, pageBefore, pageSize);
69 |
70 | // TODO: test validations
71 | }
72 |
73 | /**
74 | * Create commit by project
75 | *
76 | *
77 | *
78 | * @throws ApiException
79 | * if the Api call fails
80 | */
81 | @Test
82 | public void postCommitByProjectTest() throws ApiException {
83 | UUID projectId = null;
84 | Commit body = null;
85 | UUID branchId = null;
86 | Commit response = api.postCommitByProject(projectId, body, branchId);
87 |
88 | // TODO: test validations
89 | }
90 |
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/Error.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * Error
29 | */
30 |
31 | public class Error {
32 | public static final String SERIALIZED_NAME_ERROR = "error";
33 | @SerializedName(SERIALIZED_NAME_ERROR)
34 | private String error;
35 |
36 |
37 | public Error error(String error) {
38 |
39 | this.error = error;
40 | return this;
41 | }
42 |
43 | /**
44 | * Get error
45 | * @return error
46 | **/
47 | @javax.annotation.Nullable
48 | @ApiModelProperty(value = "")
49 |
50 | public String getError() {
51 | return error;
52 | }
53 |
54 |
55 | public void setError(String error) {
56 | this.error = error;
57 | }
58 |
59 |
60 | @Override
61 | public boolean equals(java.lang.Object o) {
62 | if (this == o) {
63 | return true;
64 | }
65 | if (o == null || getClass() != o.getClass()) {
66 | return false;
67 | }
68 | Error error = (Error) o;
69 | return Objects.equals(this.error, error.error);
70 | }
71 |
72 | @Override
73 | public int hashCode() {
74 | return Objects.hash(error);
75 | }
76 |
77 |
78 | @Override
79 | public String toString() {
80 | StringBuilder sb = new StringBuilder();
81 | sb.append("class Error {\n");
82 | sb.append(" error: ").append(toIndentedString(error)).append("\n");
83 | sb.append("}");
84 | return sb.toString();
85 | }
86 |
87 | /**
88 | * Convert the given object to string with each line indented by 4 spaces
89 | * (except the first line).
90 | */
91 | private String toIndentedString(java.lang.Object o) {
92 | if (o == null) {
93 | return "null";
94 | }
95 | return o.toString().replace("\n", "\n ");
96 | }
97 |
98 | }
99 |
100 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/model/BranchTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import com.google.gson.TypeAdapter;
17 | import com.google.gson.annotations.JsonAdapter;
18 | import com.google.gson.annotations.SerializedName;
19 | import com.google.gson.stream.JsonReader;
20 | import com.google.gson.stream.JsonWriter;
21 | import io.swagger.annotations.ApiModel;
22 | import io.swagger.annotations.ApiModelProperty;
23 | import java.io.IOException;
24 | import java.util.UUID;
25 | import org.omg.sysml.model.BranchHead;
26 | import org.omg.sysml.model.BranchOwningProject;
27 | import org.threeten.bp.OffsetDateTime;
28 | import org.junit.Assert;
29 | import org.junit.Ignore;
30 | import org.junit.Test;
31 |
32 |
33 | /**
34 | * Model tests for Branch
35 | */
36 | public class BranchTest {
37 | private final Branch model = new Branch();
38 |
39 | /**
40 | * Model tests for Branch
41 | */
42 | @Test
43 | public void testBranch() {
44 | // TODO: test Branch
45 | }
46 |
47 | /**
48 | * Test the property 'atId'
49 | */
50 | @Test
51 | public void atIdTest() {
52 | // TODO: test atId
53 | }
54 |
55 | /**
56 | * Test the property 'atType'
57 | */
58 | @Test
59 | public void atTypeTest() {
60 | // TODO: test atType
61 | }
62 |
63 | /**
64 | * Test the property 'head'
65 | */
66 | @Test
67 | public void headTest() {
68 | // TODO: test head
69 | }
70 |
71 | /**
72 | * Test the property 'name'
73 | */
74 | @Test
75 | public void nameTest() {
76 | // TODO: test name
77 | }
78 |
79 | /**
80 | * Test the property 'owningProject'
81 | */
82 | @Test
83 | public void owningProjectTest() {
84 | // TODO: test owningProject
85 | }
86 |
87 | /**
88 | * Test the property 'referencedCommit'
89 | */
90 | @Test
91 | public void referencedCommitTest() {
92 | // TODO: test referencedCommit
93 | }
94 |
95 | /**
96 | * Test the property 'timestamp'
97 | */
98 | @Test
99 | public void timestampTest() {
100 | // TODO: test timestamp
101 | }
102 |
103 | }
104 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/model/TagTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import com.google.gson.TypeAdapter;
17 | import com.google.gson.annotations.JsonAdapter;
18 | import com.google.gson.annotations.SerializedName;
19 | import com.google.gson.stream.JsonReader;
20 | import com.google.gson.stream.JsonWriter;
21 | import io.swagger.annotations.ApiModel;
22 | import io.swagger.annotations.ApiModelProperty;
23 | import java.io.IOException;
24 | import java.util.UUID;
25 | import org.omg.sysml.model.BranchHead;
26 | import org.omg.sysml.model.BranchOwningProject;
27 | import org.threeten.bp.OffsetDateTime;
28 | import org.junit.Assert;
29 | import org.junit.Ignore;
30 | import org.junit.Test;
31 |
32 |
33 | /**
34 | * Model tests for Tag
35 | */
36 | public class TagTest {
37 | private final Tag model = new Tag();
38 |
39 | /**
40 | * Model tests for Tag
41 | */
42 | @Test
43 | public void testTag() {
44 | // TODO: test Tag
45 | }
46 |
47 | /**
48 | * Test the property 'atId'
49 | */
50 | @Test
51 | public void atIdTest() {
52 | // TODO: test atId
53 | }
54 |
55 | /**
56 | * Test the property 'atType'
57 | */
58 | @Test
59 | public void atTypeTest() {
60 | // TODO: test atType
61 | }
62 |
63 | /**
64 | * Test the property 'name'
65 | */
66 | @Test
67 | public void nameTest() {
68 | // TODO: test name
69 | }
70 |
71 | /**
72 | * Test the property 'owningProject'
73 | */
74 | @Test
75 | public void owningProjectTest() {
76 | // TODO: test owningProject
77 | }
78 |
79 | /**
80 | * Test the property 'referencedCommit'
81 | */
82 | @Test
83 | public void referencedCommitTest() {
84 | // TODO: test referencedCommit
85 | }
86 |
87 | /**
88 | * Test the property 'taggedCommit'
89 | */
90 | @Test
91 | public void taggedCommitTest() {
92 | // TODO: test taggedCommit
93 | }
94 |
95 | /**
96 | * Test the property 'timestamp'
97 | */
98 | @Test
99 | public void timestampTest() {
100 | // TODO: test timestamp
101 | }
102 |
103 | }
104 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/Identified.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.UUID;
27 |
28 | /**
29 | * Identified
30 | */
31 |
32 | public class Identified {
33 | public static final String SERIALIZED_NAME_AT_ID = "@id";
34 | @SerializedName(SERIALIZED_NAME_AT_ID)
35 | private UUID atId;
36 |
37 |
38 | public Identified atId(UUID atId) {
39 |
40 | this.atId = atId;
41 | return this;
42 | }
43 |
44 | /**
45 | * Get atId
46 | * @return atId
47 | **/
48 | @javax.annotation.Nullable
49 | @ApiModelProperty(value = "")
50 |
51 | public UUID getAtId() {
52 | return atId;
53 | }
54 |
55 |
56 | public void setAtId(UUID atId) {
57 | this.atId = atId;
58 | }
59 |
60 |
61 | @Override
62 | public boolean equals(java.lang.Object o) {
63 | if (this == o) {
64 | return true;
65 | }
66 | if (o == null || getClass() != o.getClass()) {
67 | return false;
68 | }
69 | Identified identified = (Identified) o;
70 | return Objects.equals(this.atId, identified.atId);
71 | }
72 |
73 | @Override
74 | public int hashCode() {
75 | return Objects.hash(atId);
76 | }
77 |
78 |
79 | @Override
80 | public String toString() {
81 | StringBuilder sb = new StringBuilder();
82 | sb.append("class Identified {\n");
83 | sb.append(" atId: ").append(toIndentedString(atId)).append("\n");
84 | sb.append("}");
85 | return sb.toString();
86 | }
87 |
88 | /**
89 | * Convert the given object to string with each line indented by 4 spaces
90 | * (except the first line).
91 | */
92 | private String toIndentedString(java.lang.Object o) {
93 | if (o == null) {
94 | return "null";
95 | }
96 | return o.toString().replace("\n", "\n ");
97 | }
98 |
99 | }
100 |
101 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/BranchHead.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.UUID;
27 |
28 | /**
29 | * Commit
30 | */
31 | @ApiModel(description = "Commit")
32 |
33 | public class BranchHead {
34 | public static final String SERIALIZED_NAME_AT_ID = "@id";
35 | @SerializedName(SERIALIZED_NAME_AT_ID)
36 | private UUID atId;
37 |
38 |
39 | public BranchHead atId(UUID atId) {
40 |
41 | this.atId = atId;
42 | return this;
43 | }
44 |
45 | /**
46 | * Get atId
47 | * @return atId
48 | **/
49 | @javax.annotation.Nullable
50 | @ApiModelProperty(value = "")
51 |
52 | public UUID getAtId() {
53 | return atId;
54 | }
55 |
56 |
57 | public void setAtId(UUID atId) {
58 | this.atId = atId;
59 | }
60 |
61 |
62 | @Override
63 | public boolean equals(java.lang.Object o) {
64 | if (this == o) {
65 | return true;
66 | }
67 | if (o == null || getClass() != o.getClass()) {
68 | return false;
69 | }
70 | BranchHead branchHead = (BranchHead) o;
71 | return Objects.equals(this.atId, branchHead.atId);
72 | }
73 |
74 | @Override
75 | public int hashCode() {
76 | return Objects.hash(atId);
77 | }
78 |
79 |
80 | @Override
81 | public String toString() {
82 | StringBuilder sb = new StringBuilder();
83 | sb.append("class BranchHead {\n");
84 | sb.append(" atId: ").append(toIndentedString(atId)).append("\n");
85 | sb.append("}");
86 | return sb.toString();
87 | }
88 |
89 | /**
90 | * Convert the given object to string with each line indented by 4 spaces
91 | * (except the first line).
92 | */
93 | private String toIndentedString(java.lang.Object o) {
94 | if (o == null) {
95 | return "null";
96 | }
97 | return o.toString().replace("\n", "\n ");
98 | }
99 |
100 | }
101 |
102 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/api/ElementApiTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.api;
15 |
16 | import org.omg.sysml.ApiException;
17 | import org.omg.sysml.model.Element;
18 | import org.omg.sysml.model.Error;
19 | import java.util.UUID;
20 | import org.junit.Test;
21 | import org.junit.Ignore;
22 |
23 | import java.util.ArrayList;
24 | import java.util.HashMap;
25 | import java.util.List;
26 | import java.util.Map;
27 |
28 | /**
29 | * API tests for ElementApi
30 | */
31 | @Ignore
32 | public class ElementApiTest {
33 |
34 | private final ElementApi api = new ElementApi();
35 |
36 |
37 | /**
38 | * Get element by project, commit and ID
39 | *
40 | *
41 | *
42 | * @throws ApiException
43 | * if the Api call fails
44 | */
45 | @Test
46 | public void getElementByProjectCommitIdTest() throws ApiException {
47 | UUID projectId = null;
48 | UUID commitId = null;
49 | UUID elementId = null;
50 | Element response = api.getElementByProjectCommitId(projectId, commitId, elementId);
51 |
52 | // TODO: test validations
53 | }
54 |
55 | /**
56 | * Get elements by project and commit
57 | *
58 | *
59 | *
60 | * @throws ApiException
61 | * if the Api call fails
62 | */
63 | @Test
64 | public void getElementsByProjectCommitTest() throws ApiException {
65 | UUID projectId = null;
66 | UUID commitId = null;
67 | String pageAfter = null;
68 | String pageBefore = null;
69 | Integer pageSize = null;
70 | List response = api.getElementsByProjectCommit(projectId, commitId, pageAfter, pageBefore, pageSize);
71 |
72 | // TODO: test validations
73 | }
74 |
75 | /**
76 | * Get root elements by project and commit
77 | *
78 | *
79 | *
80 | * @throws ApiException
81 | * if the Api call fails
82 | */
83 | @Test
84 | public void getRootsByProjectCommitTest() throws ApiException {
85 | UUID projectId = null;
86 | UUID commitId = null;
87 | String pageAfter = null;
88 | String pageBefore = null;
89 | Integer pageSize = null;
90 | List response = api.getRootsByProjectCommit(projectId, commitId, pageAfter, pageBefore, pageSize);
91 |
92 | // TODO: test validations
93 | }
94 |
95 | }
96 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/BranchOwningProject.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.UUID;
27 |
28 | /**
29 | * Project
30 | */
31 | @ApiModel(description = "Project")
32 |
33 | public class BranchOwningProject {
34 | public static final String SERIALIZED_NAME_AT_ID = "@id";
35 | @SerializedName(SERIALIZED_NAME_AT_ID)
36 | private UUID atId;
37 |
38 |
39 | public BranchOwningProject atId(UUID atId) {
40 |
41 | this.atId = atId;
42 | return this;
43 | }
44 |
45 | /**
46 | * Get atId
47 | * @return atId
48 | **/
49 | @javax.annotation.Nullable
50 | @ApiModelProperty(value = "")
51 |
52 | public UUID getAtId() {
53 | return atId;
54 | }
55 |
56 |
57 | public void setAtId(UUID atId) {
58 | this.atId = atId;
59 | }
60 |
61 |
62 | @Override
63 | public boolean equals(java.lang.Object o) {
64 | if (this == o) {
65 | return true;
66 | }
67 | if (o == null || getClass() != o.getClass()) {
68 | return false;
69 | }
70 | BranchOwningProject branchOwningProject = (BranchOwningProject) o;
71 | return Objects.equals(this.atId, branchOwningProject.atId);
72 | }
73 |
74 | @Override
75 | public int hashCode() {
76 | return Objects.hash(atId);
77 | }
78 |
79 |
80 | @Override
81 | public String toString() {
82 | StringBuilder sb = new StringBuilder();
83 | sb.append("class BranchOwningProject {\n");
84 | sb.append(" atId: ").append(toIndentedString(atId)).append("\n");
85 | sb.append("}");
86 | return sb.toString();
87 | }
88 |
89 | /**
90 | * Convert the given object to string with each line indented by 4 spaces
91 | * (except the first line).
92 | */
93 | private String toIndentedString(java.lang.Object o) {
94 | if (o == null) {
95 | return "null";
96 | }
97 | return o.toString().replace("\n", "\n ");
98 | }
99 |
100 | }
101 |
102 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/ProjectDefaultBranch.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.UUID;
27 |
28 | /**
29 | * Branch
30 | */
31 | @ApiModel(description = "Branch")
32 |
33 | public class ProjectDefaultBranch {
34 | public static final String SERIALIZED_NAME_AT_ID = "@id";
35 | @SerializedName(SERIALIZED_NAME_AT_ID)
36 | private UUID atId;
37 |
38 |
39 | public ProjectDefaultBranch atId(UUID atId) {
40 |
41 | this.atId = atId;
42 | return this;
43 | }
44 |
45 | /**
46 | * Get atId
47 | * @return atId
48 | **/
49 | @javax.annotation.Nullable
50 | @ApiModelProperty(value = "")
51 |
52 | public UUID getAtId() {
53 | return atId;
54 | }
55 |
56 |
57 | public void setAtId(UUID atId) {
58 | this.atId = atId;
59 | }
60 |
61 |
62 | @Override
63 | public boolean equals(java.lang.Object o) {
64 | if (this == o) {
65 | return true;
66 | }
67 | if (o == null || getClass() != o.getClass()) {
68 | return false;
69 | }
70 | ProjectDefaultBranch projectDefaultBranch = (ProjectDefaultBranch) o;
71 | return Objects.equals(this.atId, projectDefaultBranch.atId);
72 | }
73 |
74 | @Override
75 | public int hashCode() {
76 | return Objects.hash(atId);
77 | }
78 |
79 |
80 | @Override
81 | public String toString() {
82 | StringBuilder sb = new StringBuilder();
83 | sb.append("class ProjectDefaultBranch {\n");
84 | sb.append(" atId: ").append(toIndentedString(atId)).append("\n");
85 | sb.append("}");
86 | return sb.toString();
87 | }
88 |
89 | /**
90 | * Convert the given object to string with each line indented by 4 spaces
91 | * (except the first line).
92 | */
93 | private String toIndentedString(java.lang.Object o) {
94 | if (o == null) {
95 | return "null";
96 | }
97 | return o.toString().replace("\n", "\n ");
98 | }
99 |
100 | }
101 |
102 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/ApiException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml;
15 |
16 | import java.util.Map;
17 | import java.util.List;
18 |
19 |
20 | public class ApiException extends Exception {
21 | private int code = 0;
22 | private Map> responseHeaders = null;
23 | private String responseBody = null;
24 |
25 | public ApiException() {}
26 |
27 | public ApiException(Throwable throwable) {
28 | super(throwable);
29 | }
30 |
31 | public ApiException(String message) {
32 | super(message);
33 | }
34 |
35 | public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) {
36 | super(message, throwable);
37 | this.code = code;
38 | this.responseHeaders = responseHeaders;
39 | this.responseBody = responseBody;
40 | }
41 |
42 | public ApiException(String message, int code, Map> responseHeaders, String responseBody) {
43 | this(message, (Throwable) null, code, responseHeaders, responseBody);
44 | }
45 |
46 | public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) {
47 | this(message, throwable, code, responseHeaders, null);
48 | }
49 |
50 | public ApiException(int code, Map> responseHeaders, String responseBody) {
51 | this((String) null, (Throwable) null, code, responseHeaders, responseBody);
52 | }
53 |
54 | public ApiException(int code, String message) {
55 | super(message);
56 | this.code = code;
57 | }
58 |
59 | public ApiException(int code, String message, Map> responseHeaders, String responseBody) {
60 | this(code, message);
61 | this.responseHeaders = responseHeaders;
62 | this.responseBody = responseBody;
63 | }
64 |
65 | /**
66 | * Get the HTTP status code.
67 | *
68 | * @return HTTP status code
69 | */
70 | public int getCode() {
71 | return code;
72 | }
73 |
74 | /**
75 | * Get the HTTP response headers.
76 | *
77 | * @return A map of list of string
78 | */
79 | public Map> getResponseHeaders() {
80 | return responseHeaders;
81 | }
82 |
83 | /**
84 | * Get the HTTP response body.
85 | *
86 | * @return Response body in the form of string
87 | */
88 | public String getResponseBody() {
89 | return responseBody;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/GzipRequestInterceptor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml;
15 |
16 | import okhttp3.*;
17 | import okio.Buffer;
18 | import okio.BufferedSink;
19 | import okio.GzipSink;
20 | import okio.Okio;
21 |
22 | import java.io.IOException;
23 |
24 | /**
25 | * Encodes request bodies using gzip.
26 | *
27 | * Taken from https://github.com/square/okhttp/issues/350
28 | */
29 | class GzipRequestInterceptor implements Interceptor {
30 | @Override
31 | public Response intercept(Chain chain) throws IOException {
32 | Request originalRequest = chain.request();
33 | if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) {
34 | return chain.proceed(originalRequest);
35 | }
36 |
37 | Request compressedRequest = originalRequest.newBuilder()
38 | .header("Content-Encoding", "gzip")
39 | .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body())))
40 | .build();
41 | return chain.proceed(compressedRequest);
42 | }
43 |
44 | private RequestBody forceContentLength(final RequestBody requestBody) throws IOException {
45 | final Buffer buffer = new Buffer();
46 | requestBody.writeTo(buffer);
47 | return new RequestBody() {
48 | @Override
49 | public MediaType contentType() {
50 | return requestBody.contentType();
51 | }
52 |
53 | @Override
54 | public long contentLength() {
55 | return buffer.size();
56 | }
57 |
58 | @Override
59 | public void writeTo(BufferedSink sink) throws IOException {
60 | sink.write(buffer.snapshot());
61 | }
62 | };
63 | }
64 |
65 | private RequestBody gzip(final RequestBody body) {
66 | return new RequestBody() {
67 | @Override
68 | public MediaType contentType() {
69 | return body.contentType();
70 | }
71 |
72 | @Override
73 | public long contentLength() {
74 | return -1; // We don't know the compressed length in advance!
75 | }
76 |
77 | @Override
78 | public void writeTo(BufferedSink sink) throws IOException {
79 | BufferedSink gzipSink = Okio.buffer(new GzipSink(sink));
80 | body.writeTo(gzipSink);
81 | gzipSink.close();
82 | }
83 | };
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/api/TagApiTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.api;
15 |
16 | import org.omg.sysml.ApiException;
17 | import org.omg.sysml.model.Branch;
18 | import org.omg.sysml.model.Error;
19 | import org.omg.sysml.model.Tag;
20 | import java.util.UUID;
21 | import org.junit.Test;
22 | import org.junit.Ignore;
23 |
24 | import java.util.ArrayList;
25 | import java.util.HashMap;
26 | import java.util.List;
27 | import java.util.Map;
28 |
29 | /**
30 | * API tests for TagApi
31 | */
32 | @Ignore
33 | public class TagApiTest {
34 |
35 | private final TagApi api = new TagApi();
36 |
37 |
38 | /**
39 | * Delete tag by project and ID
40 | *
41 | *
42 | *
43 | * @throws ApiException
44 | * if the Api call fails
45 | */
46 | @Test
47 | public void deleteTagByProjectAndIdTest() throws ApiException {
48 | UUID projectId = null;
49 | UUID tagId = null;
50 | Tag response = api.deleteTagByProjectAndId(projectId, tagId);
51 |
52 | // TODO: test validations
53 | }
54 |
55 | /**
56 | * Get tag by project and ID
57 | *
58 | *
59 | *
60 | * @throws ApiException
61 | * if the Api call fails
62 | */
63 | @Test
64 | public void getTagByProjectAndIdTest() throws ApiException {
65 | UUID projectId = null;
66 | UUID tagId = null;
67 | Tag response = api.getTagByProjectAndId(projectId, tagId);
68 |
69 | // TODO: test validations
70 | }
71 |
72 | /**
73 | * Get tags by project
74 | *
75 | *
76 | *
77 | * @throws ApiException
78 | * if the Api call fails
79 | */
80 | @Test
81 | public void getTagsByProjectTest() throws ApiException {
82 | UUID projectId = null;
83 | String pageAfter = null;
84 | String pageBefore = null;
85 | Integer pageSize = null;
86 | List response = api.getTagsByProject(projectId, pageAfter, pageBefore, pageSize);
87 |
88 | // TODO: test validations
89 | }
90 |
91 | /**
92 | * Create tag by project
93 | *
94 | *
95 | *
96 | * @throws ApiException
97 | * if the Api call fails
98 | */
99 | @Test
100 | public void postTagByProjectTest() throws ApiException {
101 | UUID projectId = null;
102 | Tag body = null;
103 | Branch response = api.postTagByProject(projectId, body);
104 |
105 | // TODO: test validations
106 | }
107 |
108 | }
109 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/api/BranchApiTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.api;
15 |
16 | import org.omg.sysml.ApiException;
17 | import org.omg.sysml.model.Branch;
18 | import org.omg.sysml.model.Error;
19 | import java.util.UUID;
20 | import org.junit.Test;
21 | import org.junit.Ignore;
22 |
23 | import java.util.ArrayList;
24 | import java.util.HashMap;
25 | import java.util.List;
26 | import java.util.Map;
27 |
28 | /**
29 | * API tests for BranchApi
30 | */
31 | @Ignore
32 | public class BranchApiTest {
33 |
34 | private final BranchApi api = new BranchApi();
35 |
36 |
37 | /**
38 | * Delete branch by project and ID
39 | *
40 | *
41 | *
42 | * @throws ApiException
43 | * if the Api call fails
44 | */
45 | @Test
46 | public void deleteBranchByProjectAndIdTest() throws ApiException {
47 | UUID projectId = null;
48 | UUID branchId = null;
49 | Branch response = api.deleteBranchByProjectAndId(projectId, branchId);
50 |
51 | // TODO: test validations
52 | }
53 |
54 | /**
55 | * Get branches by project
56 | *
57 | *
58 | *
59 | * @throws ApiException
60 | * if the Api call fails
61 | */
62 | @Test
63 | public void getBranchesByProjectTest() throws ApiException {
64 | UUID projectId = null;
65 | String pageAfter = null;
66 | String pageBefore = null;
67 | Integer pageSize = null;
68 | List response = api.getBranchesByProject(projectId, pageAfter, pageBefore, pageSize);
69 |
70 | // TODO: test validations
71 | }
72 |
73 | /**
74 | * Get branch by project and ID
75 | *
76 | *
77 | *
78 | * @throws ApiException
79 | * if the Api call fails
80 | */
81 | @Test
82 | public void getBranchesByProjectAndIdTest() throws ApiException {
83 | UUID projectId = null;
84 | UUID branchId = null;
85 | Branch response = api.getBranchesByProjectAndId(projectId, branchId);
86 |
87 | // TODO: test validations
88 | }
89 |
90 | /**
91 | * Create branch by project
92 | *
93 | *
94 | *
95 | * @throws ApiException
96 | * if the Api call fails
97 | */
98 | @Test
99 | public void postBranchByProjectTest() throws ApiException {
100 | UUID projectId = null;
101 | Branch body = null;
102 | Branch response = api.postBranchByProject(projectId, body);
103 |
104 | // TODO: test validations
105 | }
106 |
107 | }
108 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/api/ProjectApiTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.api;
15 |
16 | import org.omg.sysml.ApiException;
17 | import org.omg.sysml.model.Error;
18 | import org.omg.sysml.model.Project;
19 | import java.util.UUID;
20 | import org.junit.Test;
21 | import org.junit.Ignore;
22 |
23 | import java.util.ArrayList;
24 | import java.util.HashMap;
25 | import java.util.List;
26 | import java.util.Map;
27 |
28 | /**
29 | * API tests for ProjectApi
30 | */
31 | @Ignore
32 | public class ProjectApiTest {
33 |
34 | private final ProjectApi api = new ProjectApi();
35 |
36 |
37 | /**
38 | * Delete project by ID
39 | *
40 | *
41 | *
42 | * @throws ApiException
43 | * if the Api call fails
44 | */
45 | @Test
46 | public void deleteProjectByIdTest() throws ApiException {
47 | UUID projectId = null;
48 | Project response = api.deleteProjectById(projectId);
49 |
50 | // TODO: test validations
51 | }
52 |
53 | /**
54 | * Get project by ID
55 | *
56 | *
57 | *
58 | * @throws ApiException
59 | * if the Api call fails
60 | */
61 | @Test
62 | public void getProjectByIdTest() throws ApiException {
63 | UUID projectId = null;
64 | Project response = api.getProjectById(projectId);
65 |
66 | // TODO: test validations
67 | }
68 |
69 | /**
70 | * Get projects
71 | *
72 | *
73 | *
74 | * @throws ApiException
75 | * if the Api call fails
76 | */
77 | @Test
78 | public void getProjectsTest() throws ApiException {
79 | String pageAfter = null;
80 | String pageBefore = null;
81 | Integer pageSize = null;
82 | List response = api.getProjects(pageAfter, pageBefore, pageSize);
83 |
84 | // TODO: test validations
85 | }
86 |
87 | /**
88 | * Create project
89 | *
90 | *
91 | *
92 | * @throws ApiException
93 | * if the Api call fails
94 | */
95 | @Test
96 | public void postProjectTest() throws ApiException {
97 | Project body = null;
98 | Project response = api.postProject(body);
99 |
100 | // TODO: test validations
101 | }
102 |
103 | /**
104 | * Update project by ID
105 | *
106 | *
107 | *
108 | * @throws ApiException
109 | * if the Api call fails
110 | */
111 | @Test
112 | public void putProjectByIdTest() throws ApiException {
113 | UUID projectId = null;
114 | Project body = null;
115 | Project response = api.putProjectById(projectId, body);
116 |
117 | // TODO: test validations
118 | }
119 |
120 | }
121 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34 |
35 | @rem Find java.exe
36 | if defined JAVA_HOME goto findJavaFromJavaHome
37 |
38 | set JAVA_EXE=java.exe
39 | %JAVA_EXE% -version >NUL 2>&1
40 | if "%ERRORLEVEL%" == "0" goto init
41 |
42 | echo.
43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44 | echo.
45 | echo Please set the JAVA_HOME variable in your environment to match the
46 | echo location of your Java installation.
47 |
48 | goto fail
49 |
50 | :findJavaFromJavaHome
51 | set JAVA_HOME=%JAVA_HOME:"=%
52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53 |
54 | if exist "%JAVA_EXE%" goto init
55 |
56 | echo.
57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58 | echo.
59 | echo Please set the JAVA_HOME variable in your environment to match the
60 | echo location of your Java installation.
61 |
62 | goto fail
63 |
64 | :init
65 | @rem Get command-line arguments, handling Windows variants
66 |
67 | if not "%OS%" == "Windows_NT" goto win9xME_args
68 |
69 | :win9xME_args
70 | @rem Slurp the command line arguments.
71 | set CMD_LINE_ARGS=
72 | set _SKIP=2
73 |
74 | :win9xME_args_slurp
75 | if "x%~1" == "x" goto execute
76 |
77 | set CMD_LINE_ARGS=%*
78 |
79 | :execute
80 | @rem Setup the command line
81 |
82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83 |
84 | @rem Execute Gradle
85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86 |
87 | :end
88 | @rem End local scope for the variables with windows NT shell
89 | if "%ERRORLEVEL%"=="0" goto mainEnd
90 |
91 | :fail
92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93 | rem the _cmd.exe /c_ return code!
94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95 | exit /b 1
96 |
97 | :mainEnd
98 | if "%OS%"=="Windows_NT" endlocal
99 |
100 | :omega
101 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/Data.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.HashMap;
27 | import java.util.Map;
28 | import java.util.UUID;
29 |
30 | /**
31 | * Data
32 | */
33 |
34 |
35 | public class Data extends HashMap {
36 | public static final String SERIALIZED_NAME_AT_ID = "@id";
37 | @SerializedName(SERIALIZED_NAME_AT_ID)
38 | private UUID atId;
39 |
40 | public static final String SERIALIZED_NAME_AT_TYPE = "@type";
41 | @SerializedName(SERIALIZED_NAME_AT_TYPE)
42 | protected String atType;
43 |
44 | public Data() {
45 | this.atType = this.getClass().getSimpleName();
46 | }
47 |
48 | public Data atId(UUID atId) {
49 |
50 | this.atId = atId;
51 | return this;
52 | }
53 |
54 | /**
55 | * Get atId
56 | * @return atId
57 | **/
58 | @javax.annotation.Nullable
59 | @ApiModelProperty(value = "")
60 |
61 | public UUID getAtId() {
62 | return atId;
63 | }
64 |
65 |
66 | public void setAtId(UUID atId) {
67 | this.atId = atId;
68 | }
69 |
70 |
71 | public Data atType(String atType) {
72 |
73 | this.atType = atType;
74 | return this;
75 | }
76 |
77 | /**
78 | * Get atType
79 | * @return atType
80 | **/
81 | @ApiModelProperty(required = true, value = "")
82 |
83 | public String getAtType() {
84 | return atType;
85 | }
86 |
87 |
88 | public void setAtType(String atType) {
89 | this.atType = atType;
90 | }
91 |
92 |
93 | @Override
94 | public boolean equals(java.lang.Object o) {
95 | if (this == o) {
96 | return true;
97 | }
98 | if (o == null || getClass() != o.getClass()) {
99 | return false;
100 | }
101 | Data data = (Data) o;
102 | return Objects.equals(this.atId, data.atId) &&
103 | Objects.equals(this.atType, data.atType) &&
104 | super.equals(o);
105 | }
106 |
107 | @Override
108 | public int hashCode() {
109 | return Objects.hash(atId, atType, super.hashCode());
110 | }
111 |
112 |
113 | @Override
114 | public String toString() {
115 | StringBuilder sb = new StringBuilder();
116 | sb.append("class Data {\n");
117 | sb.append(" ").append(toIndentedString(super.toString())).append("\n");
118 | sb.append(" atId: ").append(toIndentedString(atId)).append("\n");
119 | sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
120 | sb.append("}");
121 | return sb.toString();
122 | }
123 |
124 | /**
125 | * Convert the given object to string with each line indented by 4 spaces
126 | * (except the first line).
127 | */
128 | private String toIndentedString(java.lang.Object o) {
129 | if (o == null) {
130 | return "null";
131 | }
132 | return o.toString().replace("\n", "\n ");
133 | }
134 |
135 | }
136 |
137 |
--------------------------------------------------------------------------------
/docs/RelationshipApi.md:
--------------------------------------------------------------------------------
1 | # RelationshipApi
2 |
3 | All URIs are relative to *http://localhost*
4 |
5 | Method | HTTP request | Description
6 | ------------- | ------------- | -------------
7 | [**getRelationshipsByProjectCommitRelatedElement**](RelationshipApi.md#getRelationshipsByProjectCommitRelatedElement) | **GET** /projects/{projectId}/commits/{commitId}/elements/{relatedElementId}/relationships | Get relationships by project, commit, and related element
8 |
9 |
10 |
11 | # **getRelationshipsByProjectCommitRelatedElement**
12 | > List<Relationship> getRelationshipsByProjectCommitRelatedElement(projectId, commitId, relatedElementId, direction, pageAfter, pageBefore, pageSize)
13 |
14 | Get relationships by project, commit, and related element
15 |
16 | ### Example
17 | ```java
18 | // Import classes:
19 | import org.omg.sysml.ApiClient;
20 | import org.omg.sysml.ApiException;
21 | import org.omg.sysml.Configuration;
22 | import org.omg.sysml.models.*;
23 | import org.omg.sysml.api.RelationshipApi;
24 |
25 | public class Example {
26 | public static void main(String[] args) {
27 | ApiClient defaultClient = Configuration.getDefaultApiClient();
28 | defaultClient.setBasePath("http://localhost");
29 |
30 | RelationshipApi apiInstance = new RelationshipApi(defaultClient);
31 | UUID projectId = new UUID(); // UUID | ID of the project
32 | UUID commitId = new UUID(); // UUID | ID of the commit
33 | UUID relatedElementId = new UUID(); // UUID | ID of the related element
34 | String direction = "both"; // String | Filter for relationships that are incoming (in), outgoing (out), or both relative to the related element
35 | String pageAfter = "pageAfter_example"; // String | Page after
36 | String pageBefore = "pageBefore_example"; // String | Page before
37 | Integer pageSize = 56; // Integer | Page size
38 | try {
39 | List result = apiInstance.getRelationshipsByProjectCommitRelatedElement(projectId, commitId, relatedElementId, direction, pageAfter, pageBefore, pageSize);
40 | System.out.println(result);
41 | } catch (ApiException e) {
42 | System.err.println("Exception when calling RelationshipApi#getRelationshipsByProjectCommitRelatedElement");
43 | System.err.println("Status code: " + e.getCode());
44 | System.err.println("Reason: " + e.getResponseBody());
45 | System.err.println("Response headers: " + e.getResponseHeaders());
46 | e.printStackTrace();
47 | }
48 | }
49 | }
50 | ```
51 |
52 | ### Parameters
53 |
54 | Name | Type | Description | Notes
55 | ------------- | ------------- | ------------- | -------------
56 | **projectId** | [**UUID**](.md)| ID of the project |
57 | **commitId** | [**UUID**](.md)| ID of the commit |
58 | **relatedElementId** | [**UUID**](.md)| ID of the related element |
59 | **direction** | **String**| Filter for relationships that are incoming (in), outgoing (out), or both relative to the related element | [optional] [default to both] [enum: in, out, both]
60 | **pageAfter** | **String**| Page after | [optional]
61 | **pageBefore** | **String**| Page before | [optional]
62 | **pageSize** | **Integer**| Page size | [optional]
63 |
64 | ### Return type
65 |
66 | [**List<Relationship>**](Relationship.md)
67 |
68 | ### Authorization
69 |
70 | No authorization required
71 |
72 | ### HTTP request headers
73 |
74 | - **Content-Type**: Not defined
75 | - **Accept**: application/json, application/ld+json
76 |
77 | ### HTTP response details
78 | | Status code | Description | Response headers |
79 | |-------------|-------------|------------------|
80 | **200** | Ok | - |
81 | **415** | The requested content type is not acceptable. | - |
82 | **500** | Internal server error. | - |
83 | **0** | Unexpected response. | - |
84 |
85 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/Constraint.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.HashMap;
27 | import java.util.Map;
28 |
29 | /**
30 | * Constraint
31 | */
32 |
33 |
34 | public class Constraint extends HashMap {
35 | /**
36 | * Gets or Sets atType
37 | */
38 | @JsonAdapter(AtTypeEnum.Adapter.class)
39 | public enum AtTypeEnum {
40 | PRIMITIVECONSTRAINT("PrimitiveConstraint"),
41 |
42 | COMPOSITECONSTRAINT("CompositeConstraint");
43 |
44 | private String value;
45 |
46 | AtTypeEnum(String value) {
47 | this.value = value;
48 | }
49 |
50 | public String getValue() {
51 | return value;
52 | }
53 |
54 | @Override
55 | public String toString() {
56 | return String.valueOf(value);
57 | }
58 |
59 | public static AtTypeEnum fromValue(String value) {
60 | for (AtTypeEnum b : AtTypeEnum.values()) {
61 | if (b.value.equals(value)) {
62 | return b;
63 | }
64 | }
65 | throw new IllegalArgumentException("Unexpected value '" + value + "'");
66 | }
67 |
68 | public static class Adapter extends TypeAdapter {
69 | @Override
70 | public void write(final JsonWriter jsonWriter, final AtTypeEnum enumeration) throws IOException {
71 | jsonWriter.value(enumeration.getValue());
72 | }
73 |
74 | @Override
75 | public AtTypeEnum read(final JsonReader jsonReader) throws IOException {
76 | String value = jsonReader.nextString();
77 | return AtTypeEnum.fromValue(value);
78 | }
79 | }
80 | }
81 |
82 | public static final String SERIALIZED_NAME_AT_TYPE = "@type";
83 | @SerializedName(SERIALIZED_NAME_AT_TYPE)
84 | protected AtTypeEnum atType;
85 |
86 | public Constraint() {
87 | }
88 |
89 | public Constraint atType(AtTypeEnum atType) {
90 |
91 | this.atType = atType;
92 | return this;
93 | }
94 |
95 | /**
96 | * Get atType
97 | * @return atType
98 | **/
99 | @ApiModelProperty(required = true, value = "")
100 |
101 | public AtTypeEnum getAtType() {
102 | return atType;
103 | }
104 |
105 |
106 | public void setAtType(AtTypeEnum atType) {
107 | this.atType = atType;
108 | }
109 |
110 |
111 | @Override
112 | public boolean equals(java.lang.Object o) {
113 | if (this == o) {
114 | return true;
115 | }
116 | if (o == null || getClass() != o.getClass()) {
117 | return false;
118 | }
119 | Constraint constraint = (Constraint) o;
120 | return Objects.equals(this.atType, constraint.atType) &&
121 | super.equals(o);
122 | }
123 |
124 | @Override
125 | public int hashCode() {
126 | return Objects.hash(atType, super.hashCode());
127 | }
128 |
129 |
130 | @Override
131 | public String toString() {
132 | StringBuilder sb = new StringBuilder();
133 | sb.append("class Constraint {\n");
134 | sb.append(" ").append(toIndentedString(super.toString())).append("\n");
135 | sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
136 | sb.append("}");
137 | return sb.toString();
138 | }
139 |
140 | /**
141 | * Convert the given object to string with each line indented by 4 spaces
142 | * (except the first line).
143 | */
144 | private String toIndentedString(java.lang.Object o) {
145 | if (o == null) {
146 | return "null";
147 | }
148 | return o.toString().replace("\n", "\n ");
149 | }
150 |
151 | }
152 |
153 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/Element.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.HashMap;
27 | import java.util.Map;
28 | import java.util.UUID;
29 |
30 | /**
31 | * Element
32 | */
33 |
34 | public class Element extends HashMap {
35 | public static final String SERIALIZED_NAME_AT_ID = "@id";
36 | @SerializedName(SERIALIZED_NAME_AT_ID)
37 | private UUID atId;
38 |
39 | public static final String SERIALIZED_NAME_AT_TYPE = "@type";
40 | @SerializedName(SERIALIZED_NAME_AT_TYPE)
41 | private String atType;
42 |
43 | public static final String SERIALIZED_NAME_IDENTIFIER = "identifier";
44 | @SerializedName(SERIALIZED_NAME_IDENTIFIER)
45 | private UUID identifier;
46 |
47 |
48 | public Element atId(UUID atId) {
49 |
50 | this.atId = atId;
51 | return this;
52 | }
53 |
54 | /**
55 | * Get atId
56 | * @return atId
57 | **/
58 | @javax.annotation.Nullable
59 | @ApiModelProperty(value = "")
60 |
61 | public UUID getAtId() {
62 | return atId;
63 | }
64 |
65 |
66 | public void setAtId(UUID atId) {
67 | this.atId = atId;
68 | }
69 |
70 |
71 | public Element atType(String atType) {
72 |
73 | this.atType = atType;
74 | return this;
75 | }
76 |
77 | /**
78 | * Get atType
79 | * @return atType
80 | **/
81 | @javax.annotation.Nullable
82 | @ApiModelProperty(value = "")
83 |
84 | public String getAtType() {
85 | return atType;
86 | }
87 |
88 |
89 | public void setAtType(String atType) {
90 | this.atType = atType;
91 | }
92 |
93 |
94 | public Element identifier(UUID identifier) {
95 |
96 | this.identifier = identifier;
97 | return this;
98 | }
99 |
100 | /**
101 | * Get identifier
102 | * @return identifier
103 | **/
104 | @javax.annotation.Nullable
105 | @ApiModelProperty(value = "")
106 |
107 | public UUID getIdentifier() {
108 | return identifier;
109 | }
110 |
111 |
112 | public void setIdentifier(UUID identifier) {
113 | this.identifier = identifier;
114 | }
115 |
116 |
117 | @Override
118 | public boolean equals(java.lang.Object o) {
119 | if (this == o) {
120 | return true;
121 | }
122 | if (o == null || getClass() != o.getClass()) {
123 | return false;
124 | }
125 | Element element = (Element) o;
126 | return Objects.equals(this.atId, element.atId) &&
127 | Objects.equals(this.atType, element.atType) &&
128 | Objects.equals(this.identifier, element.identifier) &&
129 | super.equals(o);
130 | }
131 |
132 | @Override
133 | public int hashCode() {
134 | return Objects.hash(atId, atType, identifier, super.hashCode());
135 | }
136 |
137 |
138 | @Override
139 | public String toString() {
140 | StringBuilder sb = new StringBuilder();
141 | sb.append("class Element {\n");
142 | sb.append(" ").append(toIndentedString(super.toString())).append("\n");
143 | sb.append(" atId: ").append(toIndentedString(atId)).append("\n");
144 | sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
145 | sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n");
146 | sb.append("}");
147 | return sb.toString();
148 | }
149 |
150 | /**
151 | * Convert the given object to string with each line indented by 4 spaces
152 | * (except the first line).
153 | */
154 | private String toIndentedString(java.lang.Object o) {
155 | if (o == null) {
156 | return "null";
157 | }
158 | return o.toString().replace("\n", "\n ");
159 | }
160 |
161 | }
162 |
163 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/DataIdentity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.UUID;
27 |
28 | /**
29 | * DataIdentity
30 | */
31 |
32 | public class DataIdentity {
33 | public static final String SERIALIZED_NAME_AT_ID = "@id";
34 | @SerializedName(SERIALIZED_NAME_AT_ID)
35 | private UUID atId;
36 |
37 | /**
38 | * Gets or Sets atType
39 | */
40 | @JsonAdapter(AtTypeEnum.Adapter.class)
41 | public enum AtTypeEnum {
42 | DATAIDENTITY("DataIdentity");
43 |
44 | private String value;
45 |
46 | AtTypeEnum(String value) {
47 | this.value = value;
48 | }
49 |
50 | public String getValue() {
51 | return value;
52 | }
53 |
54 | @Override
55 | public String toString() {
56 | return String.valueOf(value);
57 | }
58 |
59 | public static AtTypeEnum fromValue(String value) {
60 | for (AtTypeEnum b : AtTypeEnum.values()) {
61 | if (b.value.equals(value)) {
62 | return b;
63 | }
64 | }
65 | throw new IllegalArgumentException("Unexpected value '" + value + "'");
66 | }
67 |
68 | public static class Adapter extends TypeAdapter {
69 | @Override
70 | public void write(final JsonWriter jsonWriter, final AtTypeEnum enumeration) throws IOException {
71 | jsonWriter.value(enumeration.getValue());
72 | }
73 |
74 | @Override
75 | public AtTypeEnum read(final JsonReader jsonReader) throws IOException {
76 | String value = jsonReader.nextString();
77 | return AtTypeEnum.fromValue(value);
78 | }
79 | }
80 | }
81 |
82 | public static final String SERIALIZED_NAME_AT_TYPE = "@type";
83 | @SerializedName(SERIALIZED_NAME_AT_TYPE)
84 | private AtTypeEnum atType;
85 |
86 |
87 | public DataIdentity atId(UUID atId) {
88 |
89 | this.atId = atId;
90 | return this;
91 | }
92 |
93 | /**
94 | * Get atId
95 | * @return atId
96 | **/
97 | @javax.annotation.Nullable
98 | @ApiModelProperty(value = "")
99 |
100 | public UUID getAtId() {
101 | return atId;
102 | }
103 |
104 |
105 | public void setAtId(UUID atId) {
106 | this.atId = atId;
107 | }
108 |
109 |
110 | public DataIdentity atType(AtTypeEnum atType) {
111 |
112 | this.atType = atType;
113 | return this;
114 | }
115 |
116 | /**
117 | * Get atType
118 | * @return atType
119 | **/
120 | @javax.annotation.Nullable
121 | @ApiModelProperty(value = "")
122 |
123 | public AtTypeEnum getAtType() {
124 | return atType;
125 | }
126 |
127 |
128 | public void setAtType(AtTypeEnum atType) {
129 | this.atType = atType;
130 | }
131 |
132 |
133 | @Override
134 | public boolean equals(java.lang.Object o) {
135 | if (this == o) {
136 | return true;
137 | }
138 | if (o == null || getClass() != o.getClass()) {
139 | return false;
140 | }
141 | DataIdentity dataIdentity = (DataIdentity) o;
142 | return Objects.equals(this.atId, dataIdentity.atId) &&
143 | Objects.equals(this.atType, dataIdentity.atType);
144 | }
145 |
146 | @Override
147 | public int hashCode() {
148 | return Objects.hash(atId, atType);
149 | }
150 |
151 |
152 | @Override
153 | public String toString() {
154 | StringBuilder sb = new StringBuilder();
155 | sb.append("class DataIdentity {\n");
156 | sb.append(" atId: ").append(toIndentedString(atId)).append("\n");
157 | sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
158 | sb.append("}");
159 | return sb.toString();
160 | }
161 |
162 | /**
163 | * Convert the given object to string with each line indented by 4 spaces
164 | * (except the first line).
165 | */
166 | private String toIndentedString(java.lang.Object o) {
167 | if (o == null) {
168 | return "null";
169 | }
170 | return o.toString().replace("\n", "\n ");
171 | }
172 |
173 | }
174 |
175 |
--------------------------------------------------------------------------------
/src/test/java/org/omg/sysml/api/QueryApiTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.api;
15 |
16 | import org.omg.sysml.ApiException;
17 | import org.omg.sysml.model.Element;
18 | import org.omg.sysml.model.Error;
19 | import org.omg.sysml.model.Query;
20 | import java.util.UUID;
21 | import org.junit.Test;
22 | import org.junit.Ignore;
23 |
24 | import java.util.ArrayList;
25 | import java.util.HashMap;
26 | import java.util.List;
27 | import java.util.Map;
28 |
29 | /**
30 | * API tests for QueryApi
31 | */
32 | @Ignore
33 | public class QueryApiTest {
34 |
35 | private final QueryApi api = new QueryApi();
36 |
37 |
38 | /**
39 | * Delete query by project and ID
40 | *
41 | *
42 | *
43 | * @throws ApiException
44 | * if the Api call fails
45 | */
46 | @Test
47 | public void deleteQueryByProjectAndIdTest() throws ApiException {
48 | UUID projectId = null;
49 | UUID queryId = null;
50 | Query response = api.deleteQueryByProjectAndId(projectId, queryId);
51 |
52 | // TODO: test validations
53 | }
54 |
55 | /**
56 | * Get queries by project
57 | *
58 | *
59 | *
60 | * @throws ApiException
61 | * if the Api call fails
62 | */
63 | @Test
64 | public void getQueriesByProjectTest() throws ApiException {
65 | UUID projectId = null;
66 | String pageAfter = null;
67 | String pageBefore = null;
68 | Integer pageSize = null;
69 | List response = api.getQueriesByProject(projectId, pageAfter, pageBefore, pageSize);
70 |
71 | // TODO: test validations
72 | }
73 |
74 | /**
75 | * Get query by project and ID
76 | *
77 | *
78 | *
79 | * @throws ApiException
80 | * if the Api call fails
81 | */
82 | @Test
83 | public void getQueryByProjectAndIdTest() throws ApiException {
84 | UUID projectId = null;
85 | UUID queryId = null;
86 | Query response = api.getQueryByProjectAndId(projectId, queryId);
87 |
88 | // TODO: test validations
89 | }
90 |
91 | /**
92 | * Get query results by project and query definition
93 | *
94 | *
95 | *
96 | * @throws ApiException
97 | * if the Api call fails
98 | */
99 | @Test
100 | public void getQueryResultsByProjectIdQueryTest() throws ApiException {
101 | UUID projectId = null;
102 | Query body = null;
103 | UUID commitId = null;
104 | List response = api.getQueryResultsByProjectIdQuery(projectId, body, commitId);
105 |
106 | // TODO: test validations
107 | }
108 |
109 | /**
110 | * Get query results by project and query
111 | *
112 | *
113 | *
114 | * @throws ApiException
115 | * if the Api call fails
116 | */
117 | @Test
118 | public void getQueryResultsByProjectIdQueryIdTest() throws ApiException {
119 | UUID projectId = null;
120 | UUID queryId = null;
121 | UUID commitId = null;
122 | List response = api.getQueryResultsByProjectIdQueryId(projectId, queryId, commitId);
123 |
124 | // TODO: test validations
125 | }
126 |
127 | /**
128 | * Get query results by project and query definition via POST
129 | *
130 | * For compatibility with clients that don't support GET requests with a body
131 | *
132 | * @throws ApiException
133 | * if the Api call fails
134 | */
135 | @Test
136 | public void getQueryResultsByProjectIdQueryPostTest() throws ApiException {
137 | UUID projectId = null;
138 | Query body = null;
139 | UUID commitId = null;
140 | List response = api.getQueryResultsByProjectIdQueryPost(projectId, body, commitId);
141 |
142 | // TODO: test validations
143 | }
144 |
145 | /**
146 | * Create query by project
147 | *
148 | *
149 | *
150 | * @throws ApiException
151 | * if the Api call fails
152 | */
153 | @Test
154 | public void postQueryByProjectTest() throws ApiException {
155 | UUID projectId = null;
156 | Query body = null;
157 | Query response = api.postQueryByProject(projectId, body);
158 |
159 | // TODO: test validations
160 | }
161 |
162 | }
163 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/DataVersion.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.UUID;
27 | import org.omg.sysml.model.Data;
28 | import org.omg.sysml.model.DataIdentity;
29 |
30 | /**
31 | * DataVersion
32 | */
33 |
34 | public class DataVersion {
35 | public static final String SERIALIZED_NAME_AT_ID = "@id";
36 | @SerializedName(SERIALIZED_NAME_AT_ID)
37 | private UUID atId;
38 |
39 | /**
40 | * Gets or Sets atType
41 | */
42 | @JsonAdapter(AtTypeEnum.Adapter.class)
43 | public enum AtTypeEnum {
44 | DATAVERSION("DataVersion");
45 |
46 | private String value;
47 |
48 | AtTypeEnum(String value) {
49 | this.value = value;
50 | }
51 |
52 | public String getValue() {
53 | return value;
54 | }
55 |
56 | @Override
57 | public String toString() {
58 | return String.valueOf(value);
59 | }
60 |
61 | public static AtTypeEnum fromValue(String value) {
62 | for (AtTypeEnum b : AtTypeEnum.values()) {
63 | if (b.value.equals(value)) {
64 | return b;
65 | }
66 | }
67 | throw new IllegalArgumentException("Unexpected value '" + value + "'");
68 | }
69 |
70 | public static class Adapter extends TypeAdapter {
71 | @Override
72 | public void write(final JsonWriter jsonWriter, final AtTypeEnum enumeration) throws IOException {
73 | jsonWriter.value(enumeration.getValue());
74 | }
75 |
76 | @Override
77 | public AtTypeEnum read(final JsonReader jsonReader) throws IOException {
78 | String value = jsonReader.nextString();
79 | return AtTypeEnum.fromValue(value);
80 | }
81 | }
82 | }
83 |
84 | public static final String SERIALIZED_NAME_AT_TYPE = "@type";
85 | @SerializedName(SERIALIZED_NAME_AT_TYPE)
86 | private AtTypeEnum atType;
87 |
88 | public static final String SERIALIZED_NAME_PAYLOAD = "payload";
89 | @SerializedName(SERIALIZED_NAME_PAYLOAD)
90 | private Data payload;
91 |
92 | public static final String SERIALIZED_NAME_IDENTITY = "identity";
93 | @SerializedName(SERIALIZED_NAME_IDENTITY)
94 | private DataIdentity identity;
95 |
96 |
97 | public DataVersion atId(UUID atId) {
98 |
99 | this.atId = atId;
100 | return this;
101 | }
102 |
103 | /**
104 | * Get atId
105 | * @return atId
106 | **/
107 | @javax.annotation.Nullable
108 | @ApiModelProperty(value = "")
109 |
110 | public UUID getAtId() {
111 | return atId;
112 | }
113 |
114 |
115 | public void setAtId(UUID atId) {
116 | this.atId = atId;
117 | }
118 |
119 |
120 | public DataVersion atType(AtTypeEnum atType) {
121 |
122 | this.atType = atType;
123 | return this;
124 | }
125 |
126 | /**
127 | * Get atType
128 | * @return atType
129 | **/
130 | @javax.annotation.Nullable
131 | @ApiModelProperty(value = "")
132 |
133 | public AtTypeEnum getAtType() {
134 | return atType;
135 | }
136 |
137 |
138 | public void setAtType(AtTypeEnum atType) {
139 | this.atType = atType;
140 | }
141 |
142 |
143 | public DataVersion payload(Data payload) {
144 |
145 | this.payload = payload;
146 | return this;
147 | }
148 |
149 | /**
150 | * Get payload
151 | * @return payload
152 | **/
153 | @javax.annotation.Nullable
154 | @ApiModelProperty(value = "")
155 |
156 | public Data getPayload() {
157 | return payload;
158 | }
159 |
160 |
161 | public void setPayload(Data payload) {
162 | this.payload = payload;
163 | }
164 |
165 |
166 | public DataVersion identity(DataIdentity identity) {
167 |
168 | this.identity = identity;
169 | return this;
170 | }
171 |
172 | /**
173 | * Get identity
174 | * @return identity
175 | **/
176 | @javax.annotation.Nullable
177 | @ApiModelProperty(value = "")
178 |
179 | public DataIdentity getIdentity() {
180 | return identity;
181 | }
182 |
183 |
184 | public void setIdentity(DataIdentity identity) {
185 | this.identity = identity;
186 | }
187 |
188 |
189 | @Override
190 | public boolean equals(java.lang.Object o) {
191 | if (this == o) {
192 | return true;
193 | }
194 | if (o == null || getClass() != o.getClass()) {
195 | return false;
196 | }
197 | DataVersion dataVersion = (DataVersion) o;
198 | return Objects.equals(this.atId, dataVersion.atId) &&
199 | Objects.equals(this.atType, dataVersion.atType) &&
200 | Objects.equals(this.payload, dataVersion.payload) &&
201 | Objects.equals(this.identity, dataVersion.identity);
202 | }
203 |
204 | @Override
205 | public int hashCode() {
206 | return Objects.hash(atId, atType, payload, identity);
207 | }
208 |
209 |
210 | @Override
211 | public String toString() {
212 | StringBuilder sb = new StringBuilder();
213 | sb.append("class DataVersion {\n");
214 | sb.append(" atId: ").append(toIndentedString(atId)).append("\n");
215 | sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
216 | sb.append(" payload: ").append(toIndentedString(payload)).append("\n");
217 | sb.append(" identity: ").append(toIndentedString(identity)).append("\n");
218 | sb.append("}");
219 | return sb.toString();
220 | }
221 |
222 | /**
223 | * Convert the given object to string with each line indented by 4 spaces
224 | * (except the first line).
225 | */
226 | private String toIndentedString(java.lang.Object o) {
227 | if (o == null) {
228 | return "null";
229 | }
230 | return o.toString().replace("\n", "\n ");
231 | }
232 |
233 | }
234 |
235 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/Relationship.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.ArrayList;
27 | import java.util.List;
28 | import java.util.UUID;
29 | import org.omg.sysml.model.Identified;
30 |
31 | /**
32 | * Relationship
33 | */
34 |
35 | public class Relationship {
36 | public static final String SERIALIZED_NAME_AT_ID = "@id";
37 | @SerializedName(SERIALIZED_NAME_AT_ID)
38 | private UUID atId;
39 |
40 | public static final String SERIALIZED_NAME_AT_TYPE = "@type";
41 | @SerializedName(SERIALIZED_NAME_AT_TYPE)
42 | private String atType;
43 |
44 | public static final String SERIALIZED_NAME_IDENTIFIER = "identifier";
45 | @SerializedName(SERIALIZED_NAME_IDENTIFIER)
46 | private UUID identifier;
47 |
48 | public static final String SERIALIZED_NAME_SOURCE = "source";
49 | @SerializedName(SERIALIZED_NAME_SOURCE)
50 | private List source = null;
51 |
52 | public static final String SERIALIZED_NAME_TARGET = "target";
53 | @SerializedName(SERIALIZED_NAME_TARGET)
54 | private List target = null;
55 |
56 |
57 | public Relationship atId(UUID atId) {
58 |
59 | this.atId = atId;
60 | return this;
61 | }
62 |
63 | /**
64 | * Get atId
65 | * @return atId
66 | **/
67 | @javax.annotation.Nullable
68 | @ApiModelProperty(value = "")
69 |
70 | public UUID getAtId() {
71 | return atId;
72 | }
73 |
74 |
75 | public void setAtId(UUID atId) {
76 | this.atId = atId;
77 | }
78 |
79 |
80 | public Relationship atType(String atType) {
81 |
82 | this.atType = atType;
83 | return this;
84 | }
85 |
86 | /**
87 | * Get atType
88 | * @return atType
89 | **/
90 | @javax.annotation.Nullable
91 | @ApiModelProperty(value = "")
92 |
93 | public String getAtType() {
94 | return atType;
95 | }
96 |
97 |
98 | public void setAtType(String atType) {
99 | this.atType = atType;
100 | }
101 |
102 |
103 | public Relationship identifier(UUID identifier) {
104 |
105 | this.identifier = identifier;
106 | return this;
107 | }
108 |
109 | /**
110 | * Get identifier
111 | * @return identifier
112 | **/
113 | @javax.annotation.Nullable
114 | @ApiModelProperty(value = "")
115 |
116 | public UUID getIdentifier() {
117 | return identifier;
118 | }
119 |
120 |
121 | public void setIdentifier(UUID identifier) {
122 | this.identifier = identifier;
123 | }
124 |
125 |
126 | public Relationship source(List source) {
127 |
128 | this.source = source;
129 | return this;
130 | }
131 |
132 | public Relationship addSourceItem(Identified sourceItem) {
133 | if (this.source == null) {
134 | this.source = new ArrayList();
135 | }
136 | this.source.add(sourceItem);
137 | return this;
138 | }
139 |
140 | /**
141 | * Get source
142 | * @return source
143 | **/
144 | @javax.annotation.Nullable
145 | @ApiModelProperty(value = "")
146 |
147 | public List getSource() {
148 | return source;
149 | }
150 |
151 |
152 | public void setSource(List source) {
153 | this.source = source;
154 | }
155 |
156 |
157 | public Relationship target(List target) {
158 |
159 | this.target = target;
160 | return this;
161 | }
162 |
163 | public Relationship addTargetItem(Identified targetItem) {
164 | if (this.target == null) {
165 | this.target = new ArrayList();
166 | }
167 | this.target.add(targetItem);
168 | return this;
169 | }
170 |
171 | /**
172 | * Get target
173 | * @return target
174 | **/
175 | @javax.annotation.Nullable
176 | @ApiModelProperty(value = "")
177 |
178 | public List getTarget() {
179 | return target;
180 | }
181 |
182 |
183 | public void setTarget(List target) {
184 | this.target = target;
185 | }
186 |
187 |
188 | @Override
189 | public boolean equals(java.lang.Object o) {
190 | if (this == o) {
191 | return true;
192 | }
193 | if (o == null || getClass() != o.getClass()) {
194 | return false;
195 | }
196 | Relationship relationship = (Relationship) o;
197 | return Objects.equals(this.atId, relationship.atId) &&
198 | Objects.equals(this.atType, relationship.atType) &&
199 | Objects.equals(this.identifier, relationship.identifier) &&
200 | Objects.equals(this.source, relationship.source) &&
201 | Objects.equals(this.target, relationship.target);
202 | }
203 |
204 | @Override
205 | public int hashCode() {
206 | return Objects.hash(atId, atType, identifier, source, target);
207 | }
208 |
209 |
210 | @Override
211 | public String toString() {
212 | StringBuilder sb = new StringBuilder();
213 | sb.append("class Relationship {\n");
214 | sb.append(" atId: ").append(toIndentedString(atId)).append("\n");
215 | sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
216 | sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n");
217 | sb.append(" source: ").append(toIndentedString(source)).append("\n");
218 | sb.append(" target: ").append(toIndentedString(target)).append("\n");
219 | sb.append("}");
220 | return sb.toString();
221 | }
222 |
223 | /**
224 | * Convert the given object to string with each line indented by 4 spaces
225 | * (except the first line).
226 | */
227 | private String toIndentedString(java.lang.Object o) {
228 | if (o == null) {
229 | return "null";
230 | }
231 | return o.toString().replace("\n", "\n ");
232 | }
233 |
234 | }
235 |
236 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin or MSYS, switch paths to Windows format before running java
129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=`expr $i + 1`
158 | done
159 | case $i in
160 | 0) set -- ;;
161 | 1) set -- "$args0" ;;
162 | 2) set -- "$args0" "$args1" ;;
163 | 3) set -- "$args0" "$args1" "$args2" ;;
164 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=`save "$@"`
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | exec "$JAVACMD" "$@"
184 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # sysml-v2-api-client
2 |
3 | SysML v2 API and Services
4 | - API version: 1.0.0
5 |
6 | REST/HTTP binding (PSM) for the SysML v2 standard API.
7 |
8 |
9 | *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
10 |
11 |
12 | ## Requirements
13 |
14 | Building the API client library requires:
15 | 1. Java 1.7+
16 | 2. Maven/Gradle
17 |
18 | ## Installation
19 |
20 | To install the API client library to your local Maven repository, simply execute:
21 |
22 | ```shell
23 | mvn clean install
24 | ```
25 |
26 | To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
27 |
28 | ```shell
29 | mvn clean deploy
30 | ```
31 |
32 | Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
33 |
34 | ### Maven users
35 |
36 | Add this dependency to your project's POM:
37 |
38 | ```xml
39 |
40 | org.omg.sysml
41 | sysml-v2-api-client
42 | 2020-09
43 | compile
44 |
45 | ```
46 |
47 | ### Gradle users
48 |
49 | Add this dependency to your project's build file:
50 |
51 | ```groovy
52 | compile "org.omg.sysml:sysml-v2-api-client:2020-09"
53 | ```
54 |
55 | ### Others
56 |
57 | At first generate the JAR by executing:
58 |
59 | ```shell
60 | mvn clean package
61 | ```
62 |
63 | Then manually install the following JARs:
64 |
65 | * `target/sysml-v2-api-client-2020-09.jar`
66 | * `target/lib/*.jar`
67 |
68 | ## Getting Started
69 |
70 | Please follow the [installation](#installation) instruction and execute the following Java code:
71 |
72 | ```java
73 |
74 | // Import classes:
75 | import org.omg.sysml.ApiClient;
76 | import org.omg.sysml.ApiException;
77 | import org.omg.sysml.Configuration;
78 | import org.omg.sysml.models.*;
79 | import org.omg.sysml.api.CommitApi;
80 |
81 | public class Example {
82 | public static void main(String[] args) {
83 | ApiClient defaultClient = Configuration.getDefaultApiClient();
84 | defaultClient.setBasePath("http://localhost");
85 |
86 | CommitApi apiInstance = new CommitApi(defaultClient);
87 | UUID projectId = new UUID(); // UUID | ID of the project
88 | UUID commitId = new UUID(); // UUID | ID of the commit
89 | try {
90 | Commit result = apiInstance.getCommitByProjectAndId(projectId, commitId);
91 | System.out.println(result);
92 | } catch (ApiException e) {
93 | System.err.println("Exception when calling CommitApi#getCommitByProjectAndId");
94 | System.err.println("Status code: " + e.getCode());
95 | System.err.println("Reason: " + e.getResponseBody());
96 | System.err.println("Response headers: " + e.getResponseHeaders());
97 | e.printStackTrace();
98 | }
99 | }
100 | }
101 |
102 | ```
103 |
104 | ## Documentation for API Endpoints
105 |
106 | All URIs are relative to *http://localhost*
107 |
108 | Class | Method | HTTP request | Description
109 | ------------ | ------------- | ------------- | -------------
110 | *CommitApi* | [**getCommitByProjectAndId**](docs/CommitApi.md#getCommitByProjectAndId) | **GET** /projects/{projectId}/commits/{commitId} | Get commit by project and ID
111 | *CommitApi* | [**getCommitsByProject**](docs/CommitApi.md#getCommitsByProject) | **GET** /projects/{projectId}/commits | Get commits by project
112 | *CommitApi* | [**getHeadCommitByProject**](docs/CommitApi.md#getHeadCommitByProject) | **GET** /projects/{projectId}/head | Get head commit by project
113 | *CommitApi* | [**postCommitByProject**](docs/CommitApi.md#postCommitByProject) | **POST** /projects/{projectId}/commits | Create commit by project
114 | *ElementApi* | [**getElementByProjectCommitId**](docs/ElementApi.md#getElementByProjectCommitId) | **GET** /projects/{projectId}/commits/{commitId}/elements/{elementId} | Get element by project, commit and ID
115 | *ElementApi* | [**getElementsByProjectCommit**](docs/ElementApi.md#getElementsByProjectCommit) | **GET** /projects/{projectId}/commits/{commitId}/elements | Get elements by project and commit
116 | *ElementApi* | [**getRootsByProjectCommit**](docs/ElementApi.md#getRootsByProjectCommit) | **GET** /projects/{projectId}/commits/{commitId}/roots | Get root elements by project and commit
117 | *ProjectApi* | [**getProjectById**](docs/ProjectApi.md#getProjectById) | **GET** /projects/{projectId} | Get project by ID
118 | *ProjectApi* | [**getProjects**](docs/ProjectApi.md#getProjects) | **GET** /projects | Get projects
119 | *ProjectApi* | [**postProject**](docs/ProjectApi.md#postProject) | **POST** /projects | Create project
120 | *QueryApi* | [**getQueriesByProject**](docs/QueryApi.md#getQueriesByProject) | **GET** /projects/{projectId}/queries | Get queries by project
121 | *QueryApi* | [**getQueryByProjectAndId**](docs/QueryApi.md#getQueryByProjectAndId) | **GET** /projects/{projectId}/queries/{queryId} | Get query by project and ID
122 | *QueryApi* | [**getQueryResultsByProjectIdQuery**](docs/QueryApi.md#getQueryResultsByProjectIdQuery) | **GET** /projects/{projectId}/query-results | Get query results by project and query definition
123 | *QueryApi* | [**getQueryResultsByProjectIdQueryId**](docs/QueryApi.md#getQueryResultsByProjectIdQueryId) | **GET** /projects/{projectId}/queries/{queryId}/results | Get query results by project and query
124 | *QueryApi* | [**getQueryResultsByProjectIdQueryPost**](docs/QueryApi.md#getQueryResultsByProjectIdQueryPost) | **POST** /projects/{projectId}/query-results | Get query results by project and query definition via POST
125 | *QueryApi* | [**postQueryByProject**](docs/QueryApi.md#postQueryByProject) | **POST** /projects/{projectId}/queries | Create query by project
126 | *RelationshipApi* | [**getRelationshipsByProjectCommitRelatedElement**](docs/RelationshipApi.md#getRelationshipsByProjectCommitRelatedElement) | **GET** /projects/{projectId}/commits/{commitId}/elements/{relatedElementId}/relationships | Get relationships by project, commit, and related element
127 |
128 |
129 | ## Documentation for Models
130 |
131 | - [Commit](docs/Commit.md)
132 | - [CommitContainingProject](docs/CommitContainingProject.md)
133 | - [CompositeConstraint](docs/CompositeConstraint.md)
134 | - [Constraint](docs/Constraint.md)
135 | - [Element](docs/Element.md)
136 | - [ElementIdentity](docs/ElementIdentity.md)
137 | - [ElementVersion](docs/ElementVersion.md)
138 | - [Error](docs/Error.md)
139 | - [Identified](docs/Identified.md)
140 | - [PrimitiveConstraint](docs/PrimitiveConstraint.md)
141 | - [Project](docs/Project.md)
142 | - [Query](docs/Query.md)
143 | - [Record](docs/Record.md)
144 | - [Relationship](docs/Relationship.md)
145 |
146 |
147 | ## Documentation for Authorization
148 |
149 | All endpoints do not require authorization.
150 | Authentication schemes defined for the API:
151 |
152 | ## Recommendation
153 |
154 | It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
155 |
156 | ## Author
157 |
158 |
159 |
160 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/Project.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.UUID;
27 | import org.omg.sysml.model.ProjectDefaultBranch;
28 |
29 | /**
30 | * Project
31 | */
32 |
33 | public class Project {
34 | public static final String SERIALIZED_NAME_AT_ID = "@id";
35 | @SerializedName(SERIALIZED_NAME_AT_ID)
36 | private UUID atId;
37 |
38 | /**
39 | * Gets or Sets atType
40 | */
41 | @JsonAdapter(AtTypeEnum.Adapter.class)
42 | public enum AtTypeEnum {
43 | PROJECT("Project");
44 |
45 | private String value;
46 |
47 | AtTypeEnum(String value) {
48 | this.value = value;
49 | }
50 |
51 | public String getValue() {
52 | return value;
53 | }
54 |
55 | @Override
56 | public String toString() {
57 | return String.valueOf(value);
58 | }
59 |
60 | public static AtTypeEnum fromValue(String value) {
61 | for (AtTypeEnum b : AtTypeEnum.values()) {
62 | if (b.value.equals(value)) {
63 | return b;
64 | }
65 | }
66 | throw new IllegalArgumentException("Unexpected value '" + value + "'");
67 | }
68 |
69 | public static class Adapter extends TypeAdapter {
70 | @Override
71 | public void write(final JsonWriter jsonWriter, final AtTypeEnum enumeration) throws IOException {
72 | jsonWriter.value(enumeration.getValue());
73 | }
74 |
75 | @Override
76 | public AtTypeEnum read(final JsonReader jsonReader) throws IOException {
77 | String value = jsonReader.nextString();
78 | return AtTypeEnum.fromValue(value);
79 | }
80 | }
81 | }
82 |
83 | public static final String SERIALIZED_NAME_AT_TYPE = "@type";
84 | @SerializedName(SERIALIZED_NAME_AT_TYPE)
85 | private AtTypeEnum atType;
86 |
87 | public static final String SERIALIZED_NAME_DEFAULT_BRANCH = "defaultBranch";
88 | @SerializedName(SERIALIZED_NAME_DEFAULT_BRANCH)
89 | private ProjectDefaultBranch defaultBranch;
90 |
91 | public static final String SERIALIZED_NAME_DESCRIPTION = "description";
92 | @SerializedName(SERIALIZED_NAME_DESCRIPTION)
93 | private String description;
94 |
95 | public static final String SERIALIZED_NAME_NAME = "name";
96 | @SerializedName(SERIALIZED_NAME_NAME)
97 | private String name;
98 |
99 |
100 | public Project atId(UUID atId) {
101 |
102 | this.atId = atId;
103 | return this;
104 | }
105 |
106 | /**
107 | * Get atId
108 | * @return atId
109 | **/
110 | @javax.annotation.Nullable
111 | @ApiModelProperty(value = "")
112 |
113 | public UUID getAtId() {
114 | return atId;
115 | }
116 |
117 |
118 | public void setAtId(UUID atId) {
119 | this.atId = atId;
120 | }
121 |
122 |
123 | public Project atType(AtTypeEnum atType) {
124 |
125 | this.atType = atType;
126 | return this;
127 | }
128 |
129 | /**
130 | * Get atType
131 | * @return atType
132 | **/
133 | @javax.annotation.Nullable
134 | @ApiModelProperty(value = "")
135 |
136 | public AtTypeEnum getAtType() {
137 | return atType;
138 | }
139 |
140 |
141 | public void setAtType(AtTypeEnum atType) {
142 | this.atType = atType;
143 | }
144 |
145 |
146 | public Project defaultBranch(ProjectDefaultBranch defaultBranch) {
147 |
148 | this.defaultBranch = defaultBranch;
149 | return this;
150 | }
151 |
152 | /**
153 | * Get defaultBranch
154 | * @return defaultBranch
155 | **/
156 | @javax.annotation.Nullable
157 | @ApiModelProperty(value = "")
158 |
159 | public ProjectDefaultBranch getDefaultBranch() {
160 | return defaultBranch;
161 | }
162 |
163 |
164 | public void setDefaultBranch(ProjectDefaultBranch defaultBranch) {
165 | this.defaultBranch = defaultBranch;
166 | }
167 |
168 |
169 | public Project description(String description) {
170 |
171 | this.description = description;
172 | return this;
173 | }
174 |
175 | /**
176 | * Get description
177 | * @return description
178 | **/
179 | @javax.annotation.Nullable
180 | @ApiModelProperty(value = "")
181 |
182 | public String getDescription() {
183 | return description;
184 | }
185 |
186 |
187 | public void setDescription(String description) {
188 | this.description = description;
189 | }
190 |
191 |
192 | public Project name(String name) {
193 |
194 | this.name = name;
195 | return this;
196 | }
197 |
198 | /**
199 | * Get name
200 | * @return name
201 | **/
202 | @javax.annotation.Nullable
203 | @ApiModelProperty(value = "")
204 |
205 | public String getName() {
206 | return name;
207 | }
208 |
209 |
210 | public void setName(String name) {
211 | this.name = name;
212 | }
213 |
214 |
215 | @Override
216 | public boolean equals(java.lang.Object o) {
217 | if (this == o) {
218 | return true;
219 | }
220 | if (o == null || getClass() != o.getClass()) {
221 | return false;
222 | }
223 | Project project = (Project) o;
224 | return Objects.equals(this.atId, project.atId) &&
225 | Objects.equals(this.atType, project.atType) &&
226 | Objects.equals(this.defaultBranch, project.defaultBranch) &&
227 | Objects.equals(this.description, project.description) &&
228 | Objects.equals(this.name, project.name);
229 | }
230 |
231 | @Override
232 | public int hashCode() {
233 | return Objects.hash(atId, atType, defaultBranch, description, name);
234 | }
235 |
236 |
237 | @Override
238 | public String toString() {
239 | StringBuilder sb = new StringBuilder();
240 | sb.append("class Project {\n");
241 | sb.append(" atId: ").append(toIndentedString(atId)).append("\n");
242 | sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
243 | sb.append(" defaultBranch: ").append(toIndentedString(defaultBranch)).append("\n");
244 | sb.append(" description: ").append(toIndentedString(description)).append("\n");
245 | sb.append(" name: ").append(toIndentedString(name)).append("\n");
246 | sb.append("}");
247 | return sb.toString();
248 | }
249 |
250 | /**
251 | * Convert the given object to string with each line indented by 4 spaces
252 | * (except the first line).
253 | */
254 | private String toIndentedString(java.lang.Object o) {
255 | if (o == null) {
256 | return "null";
257 | }
258 | return o.toString().replace("\n", "\n ");
259 | }
260 |
261 | }
262 |
263 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/CompositeConstraint.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.ArrayList;
27 | import java.util.List;
28 | import org.omg.sysml.model.Constraint;
29 |
30 | /**
31 | * CompositeConstraint
32 | */
33 |
34 | public class CompositeConstraint {
35 | /**
36 | * Gets or Sets atType
37 | */
38 | @JsonAdapter(AtTypeEnum.Adapter.class)
39 | public enum AtTypeEnum {
40 | COMPOSITECONSTRAINT("CompositeConstraint");
41 |
42 | private String value;
43 |
44 | AtTypeEnum(String value) {
45 | this.value = value;
46 | }
47 |
48 | public String getValue() {
49 | return value;
50 | }
51 |
52 | @Override
53 | public String toString() {
54 | return String.valueOf(value);
55 | }
56 |
57 | public static AtTypeEnum fromValue(String value) {
58 | for (AtTypeEnum b : AtTypeEnum.values()) {
59 | if (b.value.equals(value)) {
60 | return b;
61 | }
62 | }
63 | throw new IllegalArgumentException("Unexpected value '" + value + "'");
64 | }
65 |
66 | public static class Adapter extends TypeAdapter {
67 | @Override
68 | public void write(final JsonWriter jsonWriter, final AtTypeEnum enumeration) throws IOException {
69 | jsonWriter.value(enumeration.getValue());
70 | }
71 |
72 | @Override
73 | public AtTypeEnum read(final JsonReader jsonReader) throws IOException {
74 | String value = jsonReader.nextString();
75 | return AtTypeEnum.fromValue(value);
76 | }
77 | }
78 | }
79 |
80 | public static final String SERIALIZED_NAME_AT_TYPE = "@type";
81 | @SerializedName(SERIALIZED_NAME_AT_TYPE)
82 | private AtTypeEnum atType;
83 |
84 | public static final String SERIALIZED_NAME_CONSTRAINT = "constraint";
85 | @SerializedName(SERIALIZED_NAME_CONSTRAINT)
86 | private List constraint = null;
87 |
88 | /**
89 | * Gets or Sets operator
90 | */
91 | @JsonAdapter(OperatorEnum.Adapter.class)
92 | public enum OperatorEnum {
93 | AND("and"),
94 |
95 | OR("or");
96 |
97 | private String value;
98 |
99 | OperatorEnum(String value) {
100 | this.value = value;
101 | }
102 |
103 | public String getValue() {
104 | return value;
105 | }
106 |
107 | @Override
108 | public String toString() {
109 | return String.valueOf(value);
110 | }
111 |
112 | public static OperatorEnum fromValue(String value) {
113 | for (OperatorEnum b : OperatorEnum.values()) {
114 | if (b.value.equals(value)) {
115 | return b;
116 | }
117 | }
118 | throw new IllegalArgumentException("Unexpected value '" + value + "'");
119 | }
120 |
121 | public static class Adapter extends TypeAdapter {
122 | @Override
123 | public void write(final JsonWriter jsonWriter, final OperatorEnum enumeration) throws IOException {
124 | jsonWriter.value(enumeration.getValue());
125 | }
126 |
127 | @Override
128 | public OperatorEnum read(final JsonReader jsonReader) throws IOException {
129 | String value = jsonReader.nextString();
130 | return OperatorEnum.fromValue(value);
131 | }
132 | }
133 | }
134 |
135 | public static final String SERIALIZED_NAME_OPERATOR = "operator";
136 | @SerializedName(SERIALIZED_NAME_OPERATOR)
137 | private OperatorEnum operator;
138 |
139 |
140 | public CompositeConstraint atType(AtTypeEnum atType) {
141 |
142 | this.atType = atType;
143 | return this;
144 | }
145 |
146 | /**
147 | * Get atType
148 | * @return atType
149 | **/
150 | @javax.annotation.Nullable
151 | @ApiModelProperty(value = "")
152 |
153 | public AtTypeEnum getAtType() {
154 | return atType;
155 | }
156 |
157 |
158 | public void setAtType(AtTypeEnum atType) {
159 | this.atType = atType;
160 | }
161 |
162 |
163 | public CompositeConstraint constraint(List constraint) {
164 |
165 | this.constraint = constraint;
166 | return this;
167 | }
168 |
169 | public CompositeConstraint addConstraintItem(Constraint constraintItem) {
170 | if (this.constraint == null) {
171 | this.constraint = new ArrayList();
172 | }
173 | this.constraint.add(constraintItem);
174 | return this;
175 | }
176 |
177 | /**
178 | * Get constraint
179 | * @return constraint
180 | **/
181 | @javax.annotation.Nullable
182 | @ApiModelProperty(value = "")
183 |
184 | public List getConstraint() {
185 | return constraint;
186 | }
187 |
188 |
189 | public void setConstraint(List constraint) {
190 | this.constraint = constraint;
191 | }
192 |
193 |
194 | public CompositeConstraint operator(OperatorEnum operator) {
195 |
196 | this.operator = operator;
197 | return this;
198 | }
199 |
200 | /**
201 | * Get operator
202 | * @return operator
203 | **/
204 | @javax.annotation.Nullable
205 | @ApiModelProperty(value = "")
206 |
207 | public OperatorEnum getOperator() {
208 | return operator;
209 | }
210 |
211 |
212 | public void setOperator(OperatorEnum operator) {
213 | this.operator = operator;
214 | }
215 |
216 |
217 | @Override
218 | public boolean equals(java.lang.Object o) {
219 | if (this == o) {
220 | return true;
221 | }
222 | if (o == null || getClass() != o.getClass()) {
223 | return false;
224 | }
225 | CompositeConstraint compositeConstraint = (CompositeConstraint) o;
226 | return Objects.equals(this.atType, compositeConstraint.atType) &&
227 | Objects.equals(this.constraint, compositeConstraint.constraint) &&
228 | Objects.equals(this.operator, compositeConstraint.operator);
229 | }
230 |
231 | @Override
232 | public int hashCode() {
233 | return Objects.hash(atType, constraint, operator);
234 | }
235 |
236 |
237 | @Override
238 | public String toString() {
239 | StringBuilder sb = new StringBuilder();
240 | sb.append("class CompositeConstraint {\n");
241 | sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
242 | sb.append(" constraint: ").append(toIndentedString(constraint)).append("\n");
243 | sb.append(" operator: ").append(toIndentedString(operator)).append("\n");
244 | sb.append("}");
245 | return sb.toString();
246 | }
247 |
248 | /**
249 | * Convert the given object to string with each line indented by 4 spaces
250 | * (except the first line).
251 | */
252 | private String toIndentedString(java.lang.Object o) {
253 | if (o == null) {
254 | return "null";
255 | }
256 | return o.toString().replace("\n", "\n ");
257 | }
258 |
259 | }
260 |
261 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/Commit.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.ArrayList;
27 | import java.util.List;
28 | import java.util.UUID;
29 | import org.omg.sysml.model.BranchHead;
30 | import org.omg.sysml.model.BranchOwningProject;
31 | import org.omg.sysml.model.DataVersion;
32 |
33 | /**
34 | * Commit
35 | */
36 |
37 | public class Commit {
38 | public static final String SERIALIZED_NAME_AT_ID = "@id";
39 | @SerializedName(SERIALIZED_NAME_AT_ID)
40 | private UUID atId;
41 |
42 | /**
43 | * Gets or Sets atType
44 | */
45 | @JsonAdapter(AtTypeEnum.Adapter.class)
46 | public enum AtTypeEnum {
47 | COMMIT("Commit");
48 |
49 | private String value;
50 |
51 | AtTypeEnum(String value) {
52 | this.value = value;
53 | }
54 |
55 | public String getValue() {
56 | return value;
57 | }
58 |
59 | @Override
60 | public String toString() {
61 | return String.valueOf(value);
62 | }
63 |
64 | public static AtTypeEnum fromValue(String value) {
65 | for (AtTypeEnum b : AtTypeEnum.values()) {
66 | if (b.value.equals(value)) {
67 | return b;
68 | }
69 | }
70 | throw new IllegalArgumentException("Unexpected value '" + value + "'");
71 | }
72 |
73 | public static class Adapter extends TypeAdapter {
74 | @Override
75 | public void write(final JsonWriter jsonWriter, final AtTypeEnum enumeration) throws IOException {
76 | jsonWriter.value(enumeration.getValue());
77 | }
78 |
79 | @Override
80 | public AtTypeEnum read(final JsonReader jsonReader) throws IOException {
81 | String value = jsonReader.nextString();
82 | return AtTypeEnum.fromValue(value);
83 | }
84 | }
85 | }
86 |
87 | public static final String SERIALIZED_NAME_AT_TYPE = "@type";
88 | @SerializedName(SERIALIZED_NAME_AT_TYPE)
89 | private AtTypeEnum atType;
90 |
91 | public static final String SERIALIZED_NAME_CHANGE = "change";
92 | @SerializedName(SERIALIZED_NAME_CHANGE)
93 | private List change = null;
94 |
95 | public static final String SERIALIZED_NAME_OWNING_PROJECT = "owningProject";
96 | @SerializedName(SERIALIZED_NAME_OWNING_PROJECT)
97 | private BranchOwningProject owningProject;
98 |
99 | public static final String SERIALIZED_NAME_PREVIOUS_COMMIT = "previousCommit";
100 | @SerializedName(SERIALIZED_NAME_PREVIOUS_COMMIT)
101 | private BranchHead previousCommit;
102 |
103 |
104 | public Commit atId(UUID atId) {
105 |
106 | this.atId = atId;
107 | return this;
108 | }
109 |
110 | /**
111 | * Get atId
112 | * @return atId
113 | **/
114 | @javax.annotation.Nullable
115 | @ApiModelProperty(value = "")
116 |
117 | public UUID getAtId() {
118 | return atId;
119 | }
120 |
121 |
122 | public void setAtId(UUID atId) {
123 | this.atId = atId;
124 | }
125 |
126 |
127 | public Commit atType(AtTypeEnum atType) {
128 |
129 | this.atType = atType;
130 | return this;
131 | }
132 |
133 | /**
134 | * Get atType
135 | * @return atType
136 | **/
137 | @javax.annotation.Nullable
138 | @ApiModelProperty(value = "")
139 |
140 | public AtTypeEnum getAtType() {
141 | return atType;
142 | }
143 |
144 |
145 | public void setAtType(AtTypeEnum atType) {
146 | this.atType = atType;
147 | }
148 |
149 |
150 | public Commit change(List change) {
151 |
152 | this.change = change;
153 | return this;
154 | }
155 |
156 | public Commit addChangeItem(DataVersion changeItem) {
157 | if (this.change == null) {
158 | this.change = new ArrayList();
159 | }
160 | this.change.add(changeItem);
161 | return this;
162 | }
163 |
164 | /**
165 | * Get change
166 | * @return change
167 | **/
168 | @javax.annotation.Nullable
169 | @ApiModelProperty(value = "")
170 |
171 | public List getChange() {
172 | return change;
173 | }
174 |
175 |
176 | public void setChange(List change) {
177 | this.change = change;
178 | }
179 |
180 |
181 | public Commit owningProject(BranchOwningProject owningProject) {
182 |
183 | this.owningProject = owningProject;
184 | return this;
185 | }
186 |
187 | /**
188 | * Get owningProject
189 | * @return owningProject
190 | **/
191 | @javax.annotation.Nullable
192 | @ApiModelProperty(value = "")
193 |
194 | public BranchOwningProject getOwningProject() {
195 | return owningProject;
196 | }
197 |
198 |
199 | public void setOwningProject(BranchOwningProject owningProject) {
200 | this.owningProject = owningProject;
201 | }
202 |
203 |
204 | public Commit previousCommit(BranchHead previousCommit) {
205 |
206 | this.previousCommit = previousCommit;
207 | return this;
208 | }
209 |
210 | /**
211 | * Get previousCommit
212 | * @return previousCommit
213 | **/
214 | @javax.annotation.Nullable
215 | @ApiModelProperty(value = "")
216 |
217 | public BranchHead getPreviousCommit() {
218 | return previousCommit;
219 | }
220 |
221 |
222 | public void setPreviousCommit(BranchHead previousCommit) {
223 | this.previousCommit = previousCommit;
224 | }
225 |
226 |
227 | @Override
228 | public boolean equals(java.lang.Object o) {
229 | if (this == o) {
230 | return true;
231 | }
232 | if (o == null || getClass() != o.getClass()) {
233 | return false;
234 | }
235 | Commit commit = (Commit) o;
236 | return Objects.equals(this.atId, commit.atId) &&
237 | Objects.equals(this.atType, commit.atType) &&
238 | Objects.equals(this.change, commit.change) &&
239 | Objects.equals(this.owningProject, commit.owningProject) &&
240 | Objects.equals(this.previousCommit, commit.previousCommit);
241 | }
242 |
243 | @Override
244 | public int hashCode() {
245 | return Objects.hash(atId, atType, change, owningProject, previousCommit);
246 | }
247 |
248 |
249 | @Override
250 | public String toString() {
251 | StringBuilder sb = new StringBuilder();
252 | sb.append("class Commit {\n");
253 | sb.append(" atId: ").append(toIndentedString(atId)).append("\n");
254 | sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
255 | sb.append(" change: ").append(toIndentedString(change)).append("\n");
256 | sb.append(" owningProject: ").append(toIndentedString(owningProject)).append("\n");
257 | sb.append(" previousCommit: ").append(toIndentedString(previousCommit)).append("\n");
258 | sb.append("}");
259 | return sb.toString();
260 | }
261 |
262 | /**
263 | * Convert the given object to string with each line indented by 4 spaces
264 | * (except the first line).
265 | */
266 | private String toIndentedString(java.lang.Object o) {
267 | if (o == null) {
268 | return "null";
269 | }
270 | return o.toString().replace("\n", "\n ");
271 | }
272 |
273 | }
274 |
275 |
--------------------------------------------------------------------------------
/docs/CommitApi.md:
--------------------------------------------------------------------------------
1 | # CommitApi
2 |
3 | All URIs are relative to *http://localhost*
4 |
5 | Method | HTTP request | Description
6 | ------------- | ------------- | -------------
7 | [**getCommitByProjectAndId**](CommitApi.md#getCommitByProjectAndId) | **GET** /projects/{projectId}/commits/{commitId} | Get commit by project and ID
8 | [**getCommitsByProject**](CommitApi.md#getCommitsByProject) | **GET** /projects/{projectId}/commits | Get commits by project
9 | [**postCommitByProject**](CommitApi.md#postCommitByProject) | **POST** /projects/{projectId}/commits | Create commit by project
10 |
11 |
12 |
13 | # **getCommitByProjectAndId**
14 | > Commit getCommitByProjectAndId(projectId, commitId)
15 |
16 | Get commit by project and ID
17 |
18 | ### Example
19 | ```java
20 | // Import classes:
21 | import org.omg.sysml.ApiClient;
22 | import org.omg.sysml.ApiException;
23 | import org.omg.sysml.Configuration;
24 | import org.omg.sysml.models.*;
25 | import org.omg.sysml.api.CommitApi;
26 |
27 | public class Example {
28 | public static void main(String[] args) {
29 | ApiClient defaultClient = Configuration.getDefaultApiClient();
30 | defaultClient.setBasePath("http://localhost");
31 |
32 | CommitApi apiInstance = new CommitApi(defaultClient);
33 | UUID projectId = new UUID(); // UUID | ID of the project
34 | UUID commitId = new UUID(); // UUID | ID of the commit
35 | try {
36 | Commit result = apiInstance.getCommitByProjectAndId(projectId, commitId);
37 | System.out.println(result);
38 | } catch (ApiException e) {
39 | System.err.println("Exception when calling CommitApi#getCommitByProjectAndId");
40 | System.err.println("Status code: " + e.getCode());
41 | System.err.println("Reason: " + e.getResponseBody());
42 | System.err.println("Response headers: " + e.getResponseHeaders());
43 | e.printStackTrace();
44 | }
45 | }
46 | }
47 | ```
48 |
49 | ### Parameters
50 |
51 | Name | Type | Description | Notes
52 | ------------- | ------------- | ------------- | -------------
53 | **projectId** | [**UUID**](.md)| ID of the project |
54 | **commitId** | [**UUID**](.md)| ID of the commit |
55 |
56 | ### Return type
57 |
58 | [**Commit**](Commit.md)
59 |
60 | ### Authorization
61 |
62 | No authorization required
63 |
64 | ### HTTP request headers
65 |
66 | - **Content-Type**: Not defined
67 | - **Accept**: application/json, application/ld+json
68 |
69 | ### HTTP response details
70 | | Status code | Description | Response headers |
71 | |-------------|-------------|------------------|
72 | **200** | Ok | - |
73 | **404** | Not found. | - |
74 | **415** | The requested content type is not acceptable. | - |
75 | **500** | Internal server error. | - |
76 | **0** | Unexpected response. | - |
77 |
78 |
79 | # **getCommitsByProject**
80 | > List<Commit> getCommitsByProject(projectId, pageAfter, pageBefore, pageSize)
81 |
82 | Get commits by project
83 |
84 | ### Example
85 | ```java
86 | // Import classes:
87 | import org.omg.sysml.ApiClient;
88 | import org.omg.sysml.ApiException;
89 | import org.omg.sysml.Configuration;
90 | import org.omg.sysml.models.*;
91 | import org.omg.sysml.api.CommitApi;
92 |
93 | public class Example {
94 | public static void main(String[] args) {
95 | ApiClient defaultClient = Configuration.getDefaultApiClient();
96 | defaultClient.setBasePath("http://localhost");
97 |
98 | CommitApi apiInstance = new CommitApi(defaultClient);
99 | UUID projectId = new UUID(); // UUID | ID of the project
100 | String pageAfter = "pageAfter_example"; // String | Page after
101 | String pageBefore = "pageBefore_example"; // String | Page before
102 | Integer pageSize = 56; // Integer | Page size
103 | try {
104 | List result = apiInstance.getCommitsByProject(projectId, pageAfter, pageBefore, pageSize);
105 | System.out.println(result);
106 | } catch (ApiException e) {
107 | System.err.println("Exception when calling CommitApi#getCommitsByProject");
108 | System.err.println("Status code: " + e.getCode());
109 | System.err.println("Reason: " + e.getResponseBody());
110 | System.err.println("Response headers: " + e.getResponseHeaders());
111 | e.printStackTrace();
112 | }
113 | }
114 | }
115 | ```
116 |
117 | ### Parameters
118 |
119 | Name | Type | Description | Notes
120 | ------------- | ------------- | ------------- | -------------
121 | **projectId** | [**UUID**](.md)| ID of the project |
122 | **pageAfter** | **String**| Page after | [optional]
123 | **pageBefore** | **String**| Page before | [optional]
124 | **pageSize** | **Integer**| Page size | [optional]
125 |
126 | ### Return type
127 |
128 | [**List<Commit>**](Commit.md)
129 |
130 | ### Authorization
131 |
132 | No authorization required
133 |
134 | ### HTTP request headers
135 |
136 | - **Content-Type**: Not defined
137 | - **Accept**: application/json, application/ld+json
138 |
139 | ### HTTP response details
140 | | Status code | Description | Response headers |
141 | |-------------|-------------|------------------|
142 | **200** | Ok | - |
143 | **404** | Not found. | - |
144 | **415** | The requested content type is not acceptable. | - |
145 | **500** | Internal server error. | - |
146 | **0** | Unexpected response. | - |
147 |
148 |
149 | # **postCommitByProject**
150 | > Commit postCommitByProject(projectId, body, branchId)
151 |
152 | Create commit by project
153 |
154 | ### Example
155 | ```java
156 | // Import classes:
157 | import org.omg.sysml.ApiClient;
158 | import org.omg.sysml.ApiException;
159 | import org.omg.sysml.Configuration;
160 | import org.omg.sysml.models.*;
161 | import org.omg.sysml.api.CommitApi;
162 |
163 | public class Example {
164 | public static void main(String[] args) {
165 | ApiClient defaultClient = Configuration.getDefaultApiClient();
166 | defaultClient.setBasePath("http://localhost");
167 |
168 | CommitApi apiInstance = new CommitApi(defaultClient);
169 | UUID projectId = new UUID(); // UUID | ID of the project
170 | Commit body = new Commit(); // Commit |
171 | UUID branchId = new UUID(); // UUID | ID of the branch - project's default branch if unspecified
172 | try {
173 | Commit result = apiInstance.postCommitByProject(projectId, body, branchId);
174 | System.out.println(result);
175 | } catch (ApiException e) {
176 | System.err.println("Exception when calling CommitApi#postCommitByProject");
177 | System.err.println("Status code: " + e.getCode());
178 | System.err.println("Reason: " + e.getResponseBody());
179 | System.err.println("Response headers: " + e.getResponseHeaders());
180 | e.printStackTrace();
181 | }
182 | }
183 | }
184 | ```
185 |
186 | ### Parameters
187 |
188 | Name | Type | Description | Notes
189 | ------------- | ------------- | ------------- | -------------
190 | **projectId** | [**UUID**](.md)| ID of the project |
191 | **body** | [**Commit**](Commit.md)| |
192 | **branchId** | [**UUID**](.md)| ID of the branch - project's default branch if unspecified | [optional]
193 |
194 | ### Return type
195 |
196 | [**Commit**](Commit.md)
197 |
198 | ### Authorization
199 |
200 | No authorization required
201 |
202 | ### HTTP request headers
203 |
204 | - **Content-Type**: application/json
205 | - **Accept**: application/json, application/ld+json
206 |
207 | ### HTTP response details
208 | | Status code | Description | Response headers |
209 | |-------------|-------------|------------------|
210 | **201** | Created | - |
211 | **415** | The requested content type is not acceptable. | - |
212 | **500** | Internal server error. | - |
213 | **0** | Unexpected response. | - |
214 |
215 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
166 |
--------------------------------------------------------------------------------
/src/main/java/org/omg/sysml/model/Query.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SysML v2 API and Services
3 | * REST/HTTP binding (PSM) for the SysML v2 standard API.
4 | *
5 | * The version of the OpenAPI document: 1.0.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package org.omg.sysml.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.ArrayList;
27 | import java.util.List;
28 | import java.util.UUID;
29 | import org.omg.sysml.model.BranchOwningProject;
30 | import org.omg.sysml.model.Constraint;
31 | import org.omg.sysml.model.DataIdentity;
32 |
33 | /**
34 | * Query
35 | */
36 |
37 | public class Query {
38 | public static final String SERIALIZED_NAME_AT_ID = "@id";
39 | @SerializedName(SERIALIZED_NAME_AT_ID)
40 | private UUID atId;
41 |
42 | /**
43 | * Gets or Sets atType
44 | */
45 | @JsonAdapter(AtTypeEnum.Adapter.class)
46 | public enum AtTypeEnum {
47 | QUERY("Query");
48 |
49 | private String value;
50 |
51 | AtTypeEnum(String value) {
52 | this.value = value;
53 | }
54 |
55 | public String getValue() {
56 | return value;
57 | }
58 |
59 | @Override
60 | public String toString() {
61 | return String.valueOf(value);
62 | }
63 |
64 | public static AtTypeEnum fromValue(String value) {
65 | for (AtTypeEnum b : AtTypeEnum.values()) {
66 | if (b.value.equals(value)) {
67 | return b;
68 | }
69 | }
70 | throw new IllegalArgumentException("Unexpected value '" + value + "'");
71 | }
72 |
73 | public static class Adapter extends TypeAdapter {
74 | @Override
75 | public void write(final JsonWriter jsonWriter, final AtTypeEnum enumeration) throws IOException {
76 | jsonWriter.value(enumeration.getValue());
77 | }
78 |
79 | @Override
80 | public AtTypeEnum read(final JsonReader jsonReader) throws IOException {
81 | String value = jsonReader.nextString();
82 | return AtTypeEnum.fromValue(value);
83 | }
84 | }
85 | }
86 |
87 | public static final String SERIALIZED_NAME_AT_TYPE = "@type";
88 | @SerializedName(SERIALIZED_NAME_AT_TYPE)
89 | private AtTypeEnum atType;
90 |
91 | public static final String SERIALIZED_NAME_OWNING_PROJECT = "owningProject";
92 | @SerializedName(SERIALIZED_NAME_OWNING_PROJECT)
93 | private BranchOwningProject owningProject;
94 |
95 | public static final String SERIALIZED_NAME_SCOPE = "scope";
96 | @SerializedName(SERIALIZED_NAME_SCOPE)
97 | private List scope = null;
98 |
99 | public static final String SERIALIZED_NAME_SELECT = "select";
100 | @SerializedName(SERIALIZED_NAME_SELECT)
101 | private List select = null;
102 |
103 | public static final String SERIALIZED_NAME_WHERE = "where";
104 | @SerializedName(SERIALIZED_NAME_WHERE)
105 | private Constraint where;
106 |
107 |
108 | public Query atId(UUID atId) {
109 |
110 | this.atId = atId;
111 | return this;
112 | }
113 |
114 | /**
115 | * Get atId
116 | * @return atId
117 | **/
118 | @javax.annotation.Nullable
119 | @ApiModelProperty(value = "")
120 |
121 | public UUID getAtId() {
122 | return atId;
123 | }
124 |
125 |
126 | public void setAtId(UUID atId) {
127 | this.atId = atId;
128 | }
129 |
130 |
131 | public Query atType(AtTypeEnum atType) {
132 |
133 | this.atType = atType;
134 | return this;
135 | }
136 |
137 | /**
138 | * Get atType
139 | * @return atType
140 | **/
141 | @javax.annotation.Nullable
142 | @ApiModelProperty(value = "")
143 |
144 | public AtTypeEnum getAtType() {
145 | return atType;
146 | }
147 |
148 |
149 | public void setAtType(AtTypeEnum atType) {
150 | this.atType = atType;
151 | }
152 |
153 |
154 | public Query owningProject(BranchOwningProject owningProject) {
155 |
156 | this.owningProject = owningProject;
157 | return this;
158 | }
159 |
160 | /**
161 | * Get owningProject
162 | * @return owningProject
163 | **/
164 | @javax.annotation.Nullable
165 | @ApiModelProperty(value = "")
166 |
167 | public BranchOwningProject getOwningProject() {
168 | return owningProject;
169 | }
170 |
171 |
172 | public void setOwningProject(BranchOwningProject owningProject) {
173 | this.owningProject = owningProject;
174 | }
175 |
176 |
177 | public Query scope(List scope) {
178 |
179 | this.scope = scope;
180 | return this;
181 | }
182 |
183 | public Query addScopeItem(DataIdentity scopeItem) {
184 | if (this.scope == null) {
185 | this.scope = new ArrayList();
186 | }
187 | this.scope.add(scopeItem);
188 | return this;
189 | }
190 |
191 | /**
192 | * Get scope
193 | * @return scope
194 | **/
195 | @javax.annotation.Nullable
196 | @ApiModelProperty(value = "")
197 |
198 | public List getScope() {
199 | return scope;
200 | }
201 |
202 |
203 | public void setScope(List scope) {
204 | this.scope = scope;
205 | }
206 |
207 |
208 | public Query select(List select) {
209 |
210 | this.select = select;
211 | return this;
212 | }
213 |
214 | public Query addSelectItem(String selectItem) {
215 | if (this.select == null) {
216 | this.select = new ArrayList();
217 | }
218 | this.select.add(selectItem);
219 | return this;
220 | }
221 |
222 | /**
223 | * Get select
224 | * @return select
225 | **/
226 | @javax.annotation.Nullable
227 | @ApiModelProperty(value = "")
228 |
229 | public List getSelect() {
230 | return select;
231 | }
232 |
233 |
234 | public void setSelect(List select) {
235 | this.select = select;
236 | }
237 |
238 |
239 | public Query where(Constraint where) {
240 |
241 | this.where = where;
242 | return this;
243 | }
244 |
245 | /**
246 | * Get where
247 | * @return where
248 | **/
249 | @javax.annotation.Nullable
250 | @ApiModelProperty(value = "")
251 |
252 | public Constraint getWhere() {
253 | return where;
254 | }
255 |
256 |
257 | public void setWhere(Constraint where) {
258 | this.where = where;
259 | }
260 |
261 |
262 | @Override
263 | public boolean equals(java.lang.Object o) {
264 | if (this == o) {
265 | return true;
266 | }
267 | if (o == null || getClass() != o.getClass()) {
268 | return false;
269 | }
270 | Query query = (Query) o;
271 | return Objects.equals(this.atId, query.atId) &&
272 | Objects.equals(this.atType, query.atType) &&
273 | Objects.equals(this.owningProject, query.owningProject) &&
274 | Objects.equals(this.scope, query.scope) &&
275 | Objects.equals(this.select, query.select) &&
276 | Objects.equals(this.where, query.where);
277 | }
278 |
279 | @Override
280 | public int hashCode() {
281 | return Objects.hash(atId, atType, owningProject, scope, select, where);
282 | }
283 |
284 |
285 | @Override
286 | public String toString() {
287 | StringBuilder sb = new StringBuilder();
288 | sb.append("class Query {\n");
289 | sb.append(" atId: ").append(toIndentedString(atId)).append("\n");
290 | sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
291 | sb.append(" owningProject: ").append(toIndentedString(owningProject)).append("\n");
292 | sb.append(" scope: ").append(toIndentedString(scope)).append("\n");
293 | sb.append(" select: ").append(toIndentedString(select)).append("\n");
294 | sb.append(" where: ").append(toIndentedString(where)).append("\n");
295 | sb.append("}");
296 | return sb.toString();
297 | }
298 |
299 | /**
300 | * Convert the given object to string with each line indented by 4 spaces
301 | * (except the first line).
302 | */
303 | private String toIndentedString(java.lang.Object o) {
304 | if (o == null) {
305 | return "null";
306 | }
307 | return o.toString().replace("\n", "\n ");
308 | }
309 |
310 | }
311 |
312 |
--------------------------------------------------------------------------------
/docs/ElementApi.md:
--------------------------------------------------------------------------------
1 | # ElementApi
2 |
3 | All URIs are relative to *http://localhost*
4 |
5 | Method | HTTP request | Description
6 | ------------- | ------------- | -------------
7 | [**getElementByProjectCommitId**](ElementApi.md#getElementByProjectCommitId) | **GET** /projects/{projectId}/commits/{commitId}/elements/{elementId} | Get element by project, commit and ID
8 | [**getElementsByProjectCommit**](ElementApi.md#getElementsByProjectCommit) | **GET** /projects/{projectId}/commits/{commitId}/elements | Get elements by project and commit
9 | [**getRootsByProjectCommit**](ElementApi.md#getRootsByProjectCommit) | **GET** /projects/{projectId}/commits/{commitId}/roots | Get root elements by project and commit
10 |
11 |
12 |
13 | # **getElementByProjectCommitId**
14 | > Element getElementByProjectCommitId(projectId, commitId, elementId)
15 |
16 | Get element by project, commit and ID
17 |
18 | ### Example
19 | ```java
20 | // Import classes:
21 | import org.omg.sysml.ApiClient;
22 | import org.omg.sysml.ApiException;
23 | import org.omg.sysml.Configuration;
24 | import org.omg.sysml.models.*;
25 | import org.omg.sysml.api.ElementApi;
26 |
27 | public class Example {
28 | public static void main(String[] args) {
29 | ApiClient defaultClient = Configuration.getDefaultApiClient();
30 | defaultClient.setBasePath("http://localhost");
31 |
32 | ElementApi apiInstance = new ElementApi(defaultClient);
33 | UUID projectId = new UUID(); // UUID | ID of the project
34 | UUID commitId = new UUID(); // UUID | ID of the commit
35 | UUID elementId = new UUID(); // UUID | ID of the element
36 | try {
37 | Element result = apiInstance.getElementByProjectCommitId(projectId, commitId, elementId);
38 | System.out.println(result);
39 | } catch (ApiException e) {
40 | System.err.println("Exception when calling ElementApi#getElementByProjectCommitId");
41 | System.err.println("Status code: " + e.getCode());
42 | System.err.println("Reason: " + e.getResponseBody());
43 | System.err.println("Response headers: " + e.getResponseHeaders());
44 | e.printStackTrace();
45 | }
46 | }
47 | }
48 | ```
49 |
50 | ### Parameters
51 |
52 | Name | Type | Description | Notes
53 | ------------- | ------------- | ------------- | -------------
54 | **projectId** | [**UUID**](.md)| ID of the project |
55 | **commitId** | [**UUID**](.md)| ID of the commit |
56 | **elementId** | [**UUID**](.md)| ID of the element |
57 |
58 | ### Return type
59 |
60 | [**Element**](Element.md)
61 |
62 | ### Authorization
63 |
64 | No authorization required
65 |
66 | ### HTTP request headers
67 |
68 | - **Content-Type**: Not defined
69 | - **Accept**: application/json, application/ld+json
70 |
71 | ### HTTP response details
72 | | Status code | Description | Response headers |
73 | |-------------|-------------|------------------|
74 | **200** | Ok | - |
75 | **404** | Not found. | - |
76 | **415** | The requested content type is not acceptable. | - |
77 | **500** | Internal server error. | - |
78 | **0** | Unexpected response. | - |
79 |
80 |
81 | # **getElementsByProjectCommit**
82 | > List<Element> getElementsByProjectCommit(projectId, commitId, pageAfter, pageBefore, pageSize)
83 |
84 | Get elements by project and commit
85 |
86 | ### Example
87 | ```java
88 | // Import classes:
89 | import org.omg.sysml.ApiClient;
90 | import org.omg.sysml.ApiException;
91 | import org.omg.sysml.Configuration;
92 | import org.omg.sysml.models.*;
93 | import org.omg.sysml.api.ElementApi;
94 |
95 | public class Example {
96 | public static void main(String[] args) {
97 | ApiClient defaultClient = Configuration.getDefaultApiClient();
98 | defaultClient.setBasePath("http://localhost");
99 |
100 | ElementApi apiInstance = new ElementApi(defaultClient);
101 | UUID projectId = new UUID(); // UUID | ID of the project
102 | UUID commitId = new UUID(); // UUID | ID of the commit
103 | String pageAfter = "pageAfter_example"; // String | Page after
104 | String pageBefore = "pageBefore_example"; // String | Page before
105 | Integer pageSize = 56; // Integer | Page size
106 | try {
107 | List result = apiInstance.getElementsByProjectCommit(projectId, commitId, pageAfter, pageBefore, pageSize);
108 | System.out.println(result);
109 | } catch (ApiException e) {
110 | System.err.println("Exception when calling ElementApi#getElementsByProjectCommit");
111 | System.err.println("Status code: " + e.getCode());
112 | System.err.println("Reason: " + e.getResponseBody());
113 | System.err.println("Response headers: " + e.getResponseHeaders());
114 | e.printStackTrace();
115 | }
116 | }
117 | }
118 | ```
119 |
120 | ### Parameters
121 |
122 | Name | Type | Description | Notes
123 | ------------- | ------------- | ------------- | -------------
124 | **projectId** | [**UUID**](.md)| ID of the project |
125 | **commitId** | [**UUID**](.md)| ID of the commit |
126 | **pageAfter** | **String**| Page after | [optional]
127 | **pageBefore** | **String**| Page before | [optional]
128 | **pageSize** | **Integer**| Page size | [optional]
129 |
130 | ### Return type
131 |
132 | [**List<Element>**](Element.md)
133 |
134 | ### Authorization
135 |
136 | No authorization required
137 |
138 | ### HTTP request headers
139 |
140 | - **Content-Type**: Not defined
141 | - **Accept**: application/json, application/ld+json
142 |
143 | ### HTTP response details
144 | | Status code | Description | Response headers |
145 | |-------------|-------------|------------------|
146 | **200** | Ok | - |
147 | **404** | Not found. | - |
148 | **415** | The requested content type is not acceptable. | - |
149 | **500** | Internal server error. | - |
150 | **0** | Unexpected response. | - |
151 |
152 |
153 | # **getRootsByProjectCommit**
154 | > List<Element> getRootsByProjectCommit(projectId, commitId, pageAfter, pageBefore, pageSize)
155 |
156 | Get root elements by project and commit
157 |
158 | ### Example
159 | ```java
160 | // Import classes:
161 | import org.omg.sysml.ApiClient;
162 | import org.omg.sysml.ApiException;
163 | import org.omg.sysml.Configuration;
164 | import org.omg.sysml.models.*;
165 | import org.omg.sysml.api.ElementApi;
166 |
167 | public class Example {
168 | public static void main(String[] args) {
169 | ApiClient defaultClient = Configuration.getDefaultApiClient();
170 | defaultClient.setBasePath("http://localhost");
171 |
172 | ElementApi apiInstance = new ElementApi(defaultClient);
173 | UUID projectId = new UUID(); // UUID | ID of the project
174 | UUID commitId = new UUID(); // UUID | ID of the commit
175 | String pageAfter = "pageAfter_example"; // String | Page after
176 | String pageBefore = "pageBefore_example"; // String | Page before
177 | Integer pageSize = 56; // Integer | Page size
178 | try {
179 | List result = apiInstance.getRootsByProjectCommit(projectId, commitId, pageAfter, pageBefore, pageSize);
180 | System.out.println(result);
181 | } catch (ApiException e) {
182 | System.err.println("Exception when calling ElementApi#getRootsByProjectCommit");
183 | System.err.println("Status code: " + e.getCode());
184 | System.err.println("Reason: " + e.getResponseBody());
185 | System.err.println("Response headers: " + e.getResponseHeaders());
186 | e.printStackTrace();
187 | }
188 | }
189 | }
190 | ```
191 |
192 | ### Parameters
193 |
194 | Name | Type | Description | Notes
195 | ------------- | ------------- | ------------- | -------------
196 | **projectId** | [**UUID**](.md)| ID of the project |
197 | **commitId** | [**UUID**](.md)| ID of the commit |
198 | **pageAfter** | **String**| Page after | [optional]
199 | **pageBefore** | **String**| Page before | [optional]
200 | **pageSize** | **Integer**| Page size | [optional]
201 |
202 | ### Return type
203 |
204 | [**List<Element>**](Element.md)
205 |
206 | ### Authorization
207 |
208 | No authorization required
209 |
210 | ### HTTP request headers
211 |
212 | - **Content-Type**: Not defined
213 | - **Accept**: application/json, application/ld+json
214 |
215 | ### HTTP response details
216 | | Status code | Description | Response headers |
217 | |-------------|-------------|------------------|
218 | **200** | Ok | - |
219 | **404** | Not found. | - |
220 | **415** | The requested content type is not acceptable. | - |
221 | **500** | Internal server error. | - |
222 | **0** | Unexpected response. | - |
223 |
224 |
--------------------------------------------------------------------------------