From c6dd5b5d58dcc09070e43eb23a95051b0bc1ce9b Mon Sep 17 00:00:00 2001 From: Daniel Seybold Date: Wed, 24 Jan 2018 12:58:54 +0100 Subject: [PATCH] added client codegen and client sources --- client/.gitignore | 21 + client/.swagger-codegen/VERSION | 1 + client/.travis.yml | 17 + client/README.md | 151 +++ client/build.gradle | 103 ++ client/build.sbt | 20 + client/docs/ApplicationApi.md | 56 + client/docs/BigDataApi.md | 104 ++ client/docs/Cloud.md | 12 + client/docs/CloudiatorApplicationInstance.md | 10 + client/docs/Cluster.md | 11 + client/docs/ClusterConfiguration.md | 10 + client/docs/Component.md | 11 + client/docs/CrossClusterConfiguration.md | 10 + client/docs/CrossDatabaseDataComponent.md | 14 + client/docs/CrossDatabaseSeedComponent.md | 22 + client/docs/CustomConfiguration.md | 9 + client/docs/CustomConfigurationItem.md | 11 + client/docs/DataMemory.md | 18 + client/docs/DatabaseApi.md | 196 +++ client/docs/DatabaseCluster.md | 12 + client/docs/DatabaseConfiguration.md | 12 + client/docs/DatabaseCrossCluster.md | 14 + client/docs/DatabaseDataComponent.md | 21 + client/docs/DatabaseManagementComponent.md | 22 + client/docs/DatabaseSeedComponent.md | 21 + client/docs/DatabaseSingle.md | 11 + client/docs/Error.md | 12 + client/docs/IndexMemory.md | 18 + client/docs/ManagementConfiguration.md | 10 + client/docs/Node.md | 11 + client/docs/NodeConfiguration.md | 12 + client/docs/ReplicationFactor.md | 18 + client/docs/Requirement.md | 10 + client/docs/Resource.md | 19 + client/docs/ScriptsApi.md | 100 ++ client/docs/SparkJob.md | 13 + client/docs/SparkMasterComponent.md | 15 + client/docs/SparkWorkerComponent.md | 15 + client/docs/VM.md | 13 + client/git_push.sh | 52 + client/gradle.properties | 2 + client/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53639 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + client/gradlew | 160 +++ client/gradlew.bat | 90 ++ client/pom.xml | 236 ++++ client/settings.gradle | 1 + client/src/main/AndroidManifest.xml | 3 + .../catalogue/client/ApiCallback.java | 62 + .../catalogue/client/ApiClient.java | 1205 +++++++++++++++++ .../catalogue/client/ApiException.java | 91 ++ .../catalogue/client/ApiResponse.java | 59 + .../catalogue/client/Configuration.java | 39 + .../client/GzipRequestInterceptor.java | 81 ++ .../omi/cloudiator/catalogue/client/JSON.java | 375 +++++ .../omi/cloudiator/catalogue/client/Pair.java | 52 + .../catalogue/client/ProgressRequestBody.java | 77 ++ .../client/ProgressResponseBody.java | 76 ++ .../catalogue/client/StringUtil.java | 55 + .../catalogue/client/api/ApplicationApi.java | 188 +++ .../catalogue/client/api/BigDataApi.java | 322 +++++ .../catalogue/client/api/DatabaseApi.java | 579 ++++++++ .../catalogue/client/api/ScriptsApi.java | 323 +++++ .../catalogue/client/auth/ApiKeyAuth.java | 75 + .../catalogue/client/auth/Authentication.java | 29 + .../catalogue/client/auth/HttpBasicAuth.java | 54 + .../catalogue/client/auth/OAuth.java | 39 + .../catalogue/client/auth/OAuthFlow.java | 18 + .../catalogue/client/model/Cloud.java | 139 ++ .../model/CloudiatorApplicationInstance.java | 94 ++ .../catalogue/client/model/Cluster.java | 126 ++ .../client/model/ClusterConfiguration.java | 93 ++ .../catalogue/client/model/Component.java | 117 ++ .../model/CrossClusterConfiguration.java | 93 ++ .../model/CrossDatabaseDataComponent.java | 190 +++ .../model/CrossDatabaseSeedComponent.java | 259 ++++ .../client/model/CustomConfiguration.java | 65 + .../client/model/CustomConfigurationItem.java | 116 ++ .../catalogue/client/model/DataMemory.java | 161 +++ .../client/model/DatabaseCluster.java | 167 +++ .../client/model/DatabaseConfiguration.java | 139 ++ .../client/model/DatabaseCrossCluster.java | 231 ++++ .../client/model/DatabaseDataComponent.java | 235 ++++ .../model/DatabaseManagementComponent.java | 259 ++++ .../client/model/DatabaseSeedComponent.java | 235 ++++ .../client/model/DatabaseSingle.java | 127 ++ .../catalogue/client/model/Error.java | 139 ++ .../catalogue/client/model/IndexMemory.java | 161 +++ .../client/model/ManagementConfiguration.java | 93 ++ .../catalogue/client/model/Node.java | 119 ++ .../client/model/NodeConfiguration.java | 143 ++ .../client/model/ReplicationFactor.java | 161 +++ .../catalogue/client/model/Requirement.java | 96 ++ .../catalogue/client/model/Resource.java | 143 ++ .../catalogue/client/model/SparkJob.java | 162 +++ .../client/model/SparkMasterComponent.java | 208 +++ .../client/model/SparkWorkerComponent.java | 208 +++ .../cloudiator/catalogue/client/model/VM.java | 165 +++ .../client/api/ApplicationApiTest.java | 50 + .../catalogue/client/api/BigDataApiTest.java | 68 + .../catalogue/client/api/DatabaseApiTest.java | 103 ++ .../catalogue/client/api/ScriptsApiTest.java | 65 + .../database/couchbase_single.app | 5 +- utils/java-client-config.json | 9 + utils/runCodegenClient.sh | 3 + utils/{runCodegen.sh => runCodegenServer.sh} | 0 107 files changed, 10481 insertions(+), 1 deletion(-) create mode 100644 client/.gitignore create mode 100644 client/.swagger-codegen/VERSION create mode 100644 client/.travis.yml create mode 100644 client/README.md create mode 100644 client/build.gradle create mode 100644 client/build.sbt create mode 100644 client/docs/ApplicationApi.md create mode 100644 client/docs/BigDataApi.md create mode 100644 client/docs/Cloud.md create mode 100644 client/docs/CloudiatorApplicationInstance.md create mode 100644 client/docs/Cluster.md create mode 100644 client/docs/ClusterConfiguration.md create mode 100644 client/docs/Component.md create mode 100644 client/docs/CrossClusterConfiguration.md create mode 100644 client/docs/CrossDatabaseDataComponent.md create mode 100644 client/docs/CrossDatabaseSeedComponent.md create mode 100644 client/docs/CustomConfiguration.md create mode 100644 client/docs/CustomConfigurationItem.md create mode 100644 client/docs/DataMemory.md create mode 100644 client/docs/DatabaseApi.md create mode 100644 client/docs/DatabaseCluster.md create mode 100644 client/docs/DatabaseConfiguration.md create mode 100644 client/docs/DatabaseCrossCluster.md create mode 100644 client/docs/DatabaseDataComponent.md create mode 100644 client/docs/DatabaseManagementComponent.md create mode 100644 client/docs/DatabaseSeedComponent.md create mode 100644 client/docs/DatabaseSingle.md create mode 100644 client/docs/Error.md create mode 100644 client/docs/IndexMemory.md create mode 100644 client/docs/ManagementConfiguration.md create mode 100644 client/docs/Node.md create mode 100644 client/docs/NodeConfiguration.md create mode 100644 client/docs/ReplicationFactor.md create mode 100644 client/docs/Requirement.md create mode 100644 client/docs/Resource.md create mode 100644 client/docs/ScriptsApi.md create mode 100644 client/docs/SparkJob.md create mode 100644 client/docs/SparkMasterComponent.md create mode 100644 client/docs/SparkWorkerComponent.md create mode 100644 client/docs/VM.md create mode 100644 client/git_push.sh create mode 100644 client/gradle.properties create mode 100644 client/gradle/wrapper/gradle-wrapper.jar create mode 100644 client/gradle/wrapper/gradle-wrapper.properties create mode 100644 client/gradlew create mode 100644 client/gradlew.bat create mode 100644 client/pom.xml create mode 100644 client/settings.gradle create mode 100644 client/src/main/AndroidManifest.xml create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiCallback.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiClient.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiException.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiResponse.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/Configuration.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/GzipRequestInterceptor.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/JSON.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/Pair.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ProgressRequestBody.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ProgressResponseBody.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/StringUtil.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/ApplicationApi.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/BigDataApi.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/DatabaseApi.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/ScriptsApi.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/ApiKeyAuth.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/Authentication.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/HttpBasicAuth.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/OAuth.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/OAuthFlow.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Cloud.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CloudiatorApplicationInstance.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Cluster.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/ClusterConfiguration.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Component.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CrossClusterConfiguration.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CrossDatabaseDataComponent.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CrossDatabaseSeedComponent.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CustomConfiguration.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CustomConfigurationItem.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DataMemory.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseCluster.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseConfiguration.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseCrossCluster.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseDataComponent.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseManagementComponent.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseSeedComponent.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseSingle.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Error.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/IndexMemory.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/ManagementConfiguration.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Node.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/NodeConfiguration.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/ReplicationFactor.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Requirement.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Resource.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/SparkJob.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/SparkMasterComponent.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/SparkWorkerComponent.java create mode 100644 client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/VM.java create mode 100644 client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/ApplicationApiTest.java create mode 100644 client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/BigDataApiTest.java create mode 100644 client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/DatabaseApiTest.java create mode 100644 client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/ScriptsApiTest.java create mode 100644 utils/java-client-config.json create mode 100644 utils/runCodegenClient.sh rename utils/{runCodegen.sh => runCodegenServer.sh} (100%) diff --git a/client/.gitignore b/client/.gitignore new file mode 100644 index 0000000..a530464 --- /dev/null +++ b/client/.gitignore @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/client/.swagger-codegen/VERSION b/client/.swagger-codegen/VERSION new file mode 100644 index 0000000..cc6612c --- /dev/null +++ b/client/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.3.0 \ No newline at end of file diff --git a/client/.travis.yml b/client/.travis.yml new file mode 100644 index 0000000..70cb81a --- /dev/null +++ b/client/.travis.yml @@ -0,0 +1,17 @@ +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +language: java +jdk: + - oraclejdk8 + - oraclejdk7 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + - mvn test + # uncomment below to test using gradle + # - gradle test + # uncomment below to test using sbt + # - sbt test diff --git a/client/README.md b/client/README.md new file mode 100644 index 0000000..197648e --- /dev/null +++ b/client/README.md @@ -0,0 +1,151 @@ +# client + +## Requirements + +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn deploy +``` + +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + de.uulm.omi.cloudiator.catalogue + client + 1.0.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "de.uulm.omi.cloudiator.catalogue:client:1.0.0" +``` + +### Others + +At first generate the JAR by executing: + + mvn package + +Then manually install the following JARs: + +* target/client-1.0.0.jar +* target/lib/*.jar + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +import de.uulm.omi.cloudiator.catalogue.client.*; +import de.uulm.omi.cloudiator.catalogue.client.auth.*; +import de.uulm.omi.cloudiator.catalogue.client.model.*; +import de.uulm.omi.cloudiator.catalogue.client.api.ApplicationApi; + +import java.io.File; +import java.util.*; + +public class ApplicationApiExample { + + public static void main(String[] args) { + + ApplicationApi apiInstance = new ApplicationApi(); + String applicationName = "applicationName_example"; // String | maps to the parent application description to identify its application components + java.util.List components = Arrays.asList(new Component()); // java.util.List | a list of application components + try { + CloudiatorApplicationInstance result = apiInstance.genericPost(applicationName, components); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationApi#genericPost"); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ApplicationApi* | [**genericPost**](docs/ApplicationApi.md#genericPost) | **POST** /generic | Generic application deployment +*BigDataApi* | [**sparkJobPost**](docs/BigDataApi.md#sparkJobPost) | **POST** /sparkJob | submit an Apache Spark job to a Spark Master +*BigDataApi* | [**sparkPost**](docs/BigDataApi.md#sparkPost) | **POST** /spark | deploys an Apache Spark cluster +*DatabaseApi* | [**databaseClusterPost**](docs/DatabaseApi.md#databaseClusterPost) | **POST** /database/cluster | DDBMS cluster deployment +*DatabaseApi* | [**databaseCrossClusterPost**](docs/DatabaseApi.md#databaseCrossClusterPost) | **POST** /database/crossCluster | DDBMS cluster deployment +*DatabaseApi* | [**databaseSinglePost**](docs/DatabaseApi.md#databaseSinglePost) | **POST** /database/single | DDBMS cluster deployment +*DatabaseApi* | [**utilsRegisterCloudPost**](docs/DatabaseApi.md#utilsRegisterCloudPost) | **POST** /utils/registerCloud | Register a new cloud as deployment target +*ScriptsApi* | [**scriptsBigdataGet**](docs/ScriptsApi.md#scriptsBigdataGet) | **GET** /scripts/bigdata | Get custom database installation scripts +*ScriptsApi* | [**scriptsDatabaseGet**](docs/ScriptsApi.md#scriptsDatabaseGet) | **GET** /scripts/database | Get custom database installation scripts + + +## Documentation for Models + + - [Cloud](docs/Cloud.md) + - [CloudiatorApplicationInstance](docs/CloudiatorApplicationInstance.md) + - [Cluster](docs/Cluster.md) + - [ClusterConfiguration](docs/ClusterConfiguration.md) + - [Component](docs/Component.md) + - [CrossClusterConfiguration](docs/CrossClusterConfiguration.md) + - [CustomConfiguration](docs/CustomConfiguration.md) + - [CustomConfigurationItem](docs/CustomConfigurationItem.md) + - [DataMemory](docs/DataMemory.md) + - [DatabaseCluster](docs/DatabaseCluster.md) + - [DatabaseConfiguration](docs/DatabaseConfiguration.md) + - [DatabaseCrossCluster](docs/DatabaseCrossCluster.md) + - [DatabaseSingle](docs/DatabaseSingle.md) + - [Error](docs/Error.md) + - [IndexMemory](docs/IndexMemory.md) + - [ManagementConfiguration](docs/ManagementConfiguration.md) + - [NodeConfiguration](docs/NodeConfiguration.md) + - [ReplicationFactor](docs/ReplicationFactor.md) + - [Resource](docs/Resource.md) + - [SparkJob](docs/SparkJob.md) + - [SparkMasterComponent](docs/SparkMasterComponent.md) + - [SparkWorkerComponent](docs/SparkWorkerComponent.md) + - [DatabaseDataComponent](docs/DatabaseDataComponent.md) + - [DatabaseSeedComponent](docs/DatabaseSeedComponent.md) + - [Node](docs/Node.md) + - [Requirement](docs/Requirement.md) + - [VM](docs/VM.md) + - [CrossDatabaseDataComponent](docs/CrossDatabaseDataComponent.md) + - [CrossDatabaseSeedComponent](docs/CrossDatabaseSeedComponent.md) + - [DatabaseManagementComponent](docs/DatabaseManagementComponent.md) + + +## Documentation for Authorization + +All endpoints do not require authorization. +Authentication schemes defined for the API: + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + + + diff --git a/client/build.gradle b/client/build.gradle new file mode 100644 index 0000000..691908d --- /dev/null +++ b/client/build.gradle @@ -0,0 +1,103 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = 'de.uulm.omi.cloudiator.catalogue' +version = '1.0.0' + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + } +} + +repositories { + jcenter() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided 'javax.annotation:jsr250-api:1.0' + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDir + task.destinationDir = project.file("${project.buildDir}/outputs/jar") + task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + install { + repositories.mavenInstaller { + pom.artifactId = 'client' + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +dependencies { + compile 'io.swagger:swagger-annotations:1.5.15' + compile 'com.squareup.okhttp:okhttp:2.7.5' + compile 'com.squareup.okhttp:logging-interceptor:2.7.5' + compile 'com.google.code.gson:gson:2.8.1' + compile 'io.gsonfire:gson-fire:1.8.0' + testCompile 'junit:junit:4.12' +} diff --git a/client/build.sbt b/client/build.sbt new file mode 100644 index 0000000..b784eec --- /dev/null +++ b/client/build.sbt @@ -0,0 +1,20 @@ +lazy val root = (project in file(".")). + settings( + organization := "de.uulm.omi.cloudiator.catalogue", + name := "client", + version := "1.0.0", + scalaVersion := "2.11.4", + scalacOptions ++= Seq("-feature"), + javacOptions in compile ++= Seq("-Xlint:deprecation"), + publishArtifact in (Compile, packageDoc) := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.5.15", + "com.squareup.okhttp" % "okhttp" % "2.7.5", + "com.squareup.okhttp" % "logging-interceptor" % "2.7.5", + "com.google.code.gson" % "gson" % "2.8.1", + "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", + "junit" % "junit" % "4.12" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test" + ) + ) diff --git a/client/docs/ApplicationApi.md b/client/docs/ApplicationApi.md new file mode 100644 index 0000000..7350d18 --- /dev/null +++ b/client/docs/ApplicationApi.md @@ -0,0 +1,56 @@ +# ApplicationApi + +All URIs are relative to *http://localhost/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**genericPost**](ApplicationApi.md#genericPost) | **POST** /generic | Generic application deployment + + + +# **genericPost** +> CloudiatorApplicationInstance genericPost(applicationName, components) + +Generic application deployment + +Deploy a generic application in a multi-cloud setup + +### Example +```java +// Import classes: +//import de.uulm.omi.cloudiator.catalogue.client.ApiException; +//import de.uulm.omi.cloudiator.catalogue.client.api.ApplicationApi; + + +ApplicationApi apiInstance = new ApplicationApi(); +String applicationName = "applicationName_example"; // String | maps to the parent application description to identify its application components +java.util.List components = Arrays.asList(new Component()); // java.util.List | a list of application components +try { + CloudiatorApplicationInstance result = apiInstance.genericPost(applicationName, components); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ApplicationApi#genericPost"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationName** | **String**| maps to the parent application description to identify its application components | + **components** | [**java.util.List<Component>**](Component.md)| a list of application components | + +### Return type + +[**CloudiatorApplicationInstance**](CloudiatorApplicationInstance.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/client/docs/BigDataApi.md b/client/docs/BigDataApi.md new file mode 100644 index 0000000..4ff72f1 --- /dev/null +++ b/client/docs/BigDataApi.md @@ -0,0 +1,104 @@ +# BigDataApi + +All URIs are relative to *http://localhost/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sparkJobPost**](BigDataApi.md#sparkJobPost) | **POST** /sparkJob | submit an Apache Spark job to a Spark Master +[**sparkPost**](BigDataApi.md#sparkPost) | **POST** /spark | deploys an Apache Spark cluster + + + +# **sparkJobPost** +> java.util.List<CloudiatorApplicationInstance> sparkJobPost(job) + +submit an Apache Spark job to a Spark Master + +Submitting Spark jobs to an existing Apache Spark Cluster + +### Example +```java +// Import classes: +//import de.uulm.omi.cloudiator.catalogue.client.ApiException; +//import de.uulm.omi.cloudiator.catalogue.client.api.BigDataApi; + + +BigDataApi apiInstance = new BigDataApi(); +SparkJob job = new SparkJob(); // SparkJob | the Spark job to submit +try { + java.util.List result = apiInstance.sparkJobPost(job); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling BigDataApi#sparkJobPost"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **job** | [**SparkJob**](SparkJob.md)| the Spark job to submit | + +### Return type + +[**java.util.List<CloudiatorApplicationInstance>**](CloudiatorApplicationInstance.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **sparkPost** +> CloudiatorApplicationInstance sparkPost(name, applicationType, cluster) + +deploys an Apache Spark cluster + +Deploy a Spark cluster with 1 master and n workers the multi-cloud + +### Example +```java +// Import classes: +//import de.uulm.omi.cloudiator.catalogue.client.ApiException; +//import de.uulm.omi.cloudiator.catalogue.client.api.BigDataApi; + + +BigDataApi apiInstance = new BigDataApi(); +String name = "name_example"; // String | the application name, needs to map an existing application description +String applicationType = "applicationType_example"; // String | the application type +Cluster cluster = new Cluster(); // Cluster | the Spark cluster, including one master and n workers +try { + CloudiatorApplicationInstance result = apiInstance.sparkPost(name, applicationType, cluster); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling BigDataApi#sparkPost"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| the application name, needs to map an existing application description | [enum: Spark] + **applicationType** | **String**| the application type | [enum: bigdata] + **cluster** | [**Cluster**](Cluster.md)| the Spark cluster, including one master and n workers | + +### Return type + +[**CloudiatorApplicationInstance**](CloudiatorApplicationInstance.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/client/docs/Cloud.md b/client/docs/Cloud.md new file mode 100644 index 0000000..79089c8 --- /dev/null +++ b/client/docs/Cloud.md @@ -0,0 +1,12 @@ + +# Cloud + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endpoint** | **String** | | [optional] +**user** | **String** | | [optional] +**password** | **String** | | [optional] + + + diff --git a/client/docs/CloudiatorApplicationInstance.md b/client/docs/CloudiatorApplicationInstance.md new file mode 100644 index 0000000..22f7017 --- /dev/null +++ b/client/docs/CloudiatorApplicationInstance.md @@ -0,0 +1,10 @@ + +# CloudiatorApplicationInstance + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**applicationInstanceId** | **String** | Unique identifier representing a specific applicationInstance in Cloudiator | [optional] + + + diff --git a/client/docs/Cluster.md b/client/docs/Cluster.md new file mode 100644 index 0000000..9312fd8 --- /dev/null +++ b/client/docs/Cluster.md @@ -0,0 +1,11 @@ + +# Cluster + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sparkMasterComponent** | [**SparkMasterComponent**](SparkMasterComponent.md) | | [optional] +**sparkWorkerComponents** | [**java.util.List<SparkWorkerComponent>**](SparkWorkerComponent.md) | | [optional] + + + diff --git a/client/docs/ClusterConfiguration.md b/client/docs/ClusterConfiguration.md new file mode 100644 index 0000000..6a0fb5f --- /dev/null +++ b/client/docs/ClusterConfiguration.md @@ -0,0 +1,10 @@ + +# ClusterConfiguration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**clusterPort** | **Integer** | port to connect to a cluster | [optional] + + + diff --git a/client/docs/Component.md b/client/docs/Component.md new file mode 100644 index 0000000..3b45b4f --- /dev/null +++ b/client/docs/Component.md @@ -0,0 +1,11 @@ + +# Component + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instances** | **Integer** | number of component instances | [optional] +**resource** | [**VM**](VM.md) | | [optional] + + + diff --git a/client/docs/CrossClusterConfiguration.md b/client/docs/CrossClusterConfiguration.md new file mode 100644 index 0000000..ab59e9e --- /dev/null +++ b/client/docs/CrossClusterConfiguration.md @@ -0,0 +1,10 @@ + +# CrossClusterConfiguration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**crossClusterPort** | **Integer** | port to connect across multiple clusters | [optional] + + + diff --git a/client/docs/CrossDatabaseDataComponent.md b/client/docs/CrossDatabaseDataComponent.md new file mode 100644 index 0000000..954d986 --- /dev/null +++ b/client/docs/CrossDatabaseDataComponent.md @@ -0,0 +1,14 @@ + +# CrossDatabaseDataComponent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instances** | **Integer** | number of component instances | [optional] +**resource** | [**VM**](VM.md) | | [optional] +**name** | **String** | | [optional] +**nodeConfiguration** | [**NodeConfiguration**](NodeConfiguration.md) | | [optional] +**customConfiguration** | [**CustomConfiguration**](CustomConfiguration.md) | | [optional] + + + diff --git a/client/docs/CrossDatabaseSeedComponent.md b/client/docs/CrossDatabaseSeedComponent.md new file mode 100644 index 0000000..3e7e781 --- /dev/null +++ b/client/docs/CrossDatabaseSeedComponent.md @@ -0,0 +1,22 @@ + +# CrossDatabaseSeedComponent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instances** | **Integer** | number of component instances | [optional] +**resource** | [**VM**](VM.md) | | [optional] +**name** | [**NameEnum**](#NameEnum) | | [optional] +**nodeConfiguration** | [**NodeConfiguration**](NodeConfiguration.md) | | [optional] +**customConfiguration** | [**CustomConfiguration**](CustomConfiguration.md) | | [optional] +**crossClusterConfiguration** | [**CrossClusterConfiguration**](CrossClusterConfiguration.md) | | [optional] + + + +## Enum: NameEnum +Name | Value +---- | ----- +SEED | "SEED" + + + diff --git a/client/docs/CustomConfiguration.md b/client/docs/CustomConfiguration.md new file mode 100644 index 0000000..4fb4910 --- /dev/null +++ b/client/docs/CustomConfiguration.md @@ -0,0 +1,9 @@ + +# CustomConfiguration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + + diff --git a/client/docs/CustomConfigurationItem.md b/client/docs/CustomConfigurationItem.md new file mode 100644 index 0000000..49548fe --- /dev/null +++ b/client/docs/CustomConfigurationItem.md @@ -0,0 +1,11 @@ + +# CustomConfigurationItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envName** | **String** | environment variable name | [optional] +**envValue** | **String** | environment variable value | [optional] + + + diff --git a/client/docs/DataMemory.md b/client/docs/DataMemory.md new file mode 100644 index 0000000..3a80d0e --- /dev/null +++ b/client/docs/DataMemory.md @@ -0,0 +1,18 @@ + +# DataMemory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envName** | [**EnvNameEnum**](#EnvNameEnum) | environment variable name | [optional] +**envValue** | **String** | amount of RAM to allocate for data caching | [optional] + + + +## Enum: EnvNameEnum +Name | Value +---- | ----- +DATAMEMORY | "DATAMEMORY" + + + diff --git a/client/docs/DatabaseApi.md b/client/docs/DatabaseApi.md new file mode 100644 index 0000000..209b5f3 --- /dev/null +++ b/client/docs/DatabaseApi.md @@ -0,0 +1,196 @@ +# DatabaseApi + +All URIs are relative to *http://localhost/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**databaseClusterPost**](DatabaseApi.md#databaseClusterPost) | **POST** /database/cluster | DDBMS cluster deployment +[**databaseCrossClusterPost**](DatabaseApi.md#databaseCrossClusterPost) | **POST** /database/crossCluster | DDBMS cluster deployment +[**databaseSinglePost**](DatabaseApi.md#databaseSinglePost) | **POST** /database/single | DDBMS cluster deployment +[**utilsRegisterCloudPost**](DatabaseApi.md#utilsRegisterCloudPost) | **POST** /utils/registerCloud | Register a new cloud as deployment target + + + +# **databaseClusterPost** +> CloudiatorApplicationInstance databaseClusterPost(name, databaseComponents) + +DDBMS cluster deployment + +Deploy a database cluster in the multi-cloud + +### Example +```java +// Import classes: +//import de.uulm.omi.cloudiator.catalogue.client.ApiException; +//import de.uulm.omi.cloudiator.catalogue.client.api.DatabaseApi; + + +DatabaseApi apiInstance = new DatabaseApi(); +String name = "name_example"; // String | database name, needs to map an existing database application description +DatabaseCluster databaseComponents = new DatabaseCluster(); // DatabaseCluster | a set of database components +try { + CloudiatorApplicationInstance result = apiInstance.databaseClusterPost(name, databaseComponents); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DatabaseApi#databaseClusterPost"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| database name, needs to map an existing database application description | [enum: Couchbase] + **databaseComponents** | [**DatabaseCluster**](DatabaseCluster.md)| a set of database components | + +### Return type + +[**CloudiatorApplicationInstance**](CloudiatorApplicationInstance.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **databaseCrossClusterPost** +> CloudiatorApplicationInstance databaseCrossClusterPost(name, databaseComponents) + +DDBMS cluster deployment + +Deploy a database cluster in the multi-cloud + +### Example +```java +// Import classes: +//import de.uulm.omi.cloudiator.catalogue.client.ApiException; +//import de.uulm.omi.cloudiator.catalogue.client.api.DatabaseApi; + + +DatabaseApi apiInstance = new DatabaseApi(); +String name = "name_example"; // String | database name, needs to map an existing database application description +DatabaseCrossCluster databaseComponents = new DatabaseCrossCluster(); // DatabaseCrossCluster | a set of database components +try { + CloudiatorApplicationInstance result = apiInstance.databaseCrossClusterPost(name, databaseComponents); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DatabaseApi#databaseCrossClusterPost"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| database name, needs to map an existing database application description | + **databaseComponents** | [**DatabaseCrossCluster**](DatabaseCrossCluster.md)| a set of database components | + +### Return type + +[**CloudiatorApplicationInstance**](CloudiatorApplicationInstance.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **databaseSinglePost** +> CloudiatorApplicationInstance databaseSinglePost(name, databaseComponents) + +DDBMS cluster deployment + +Deploy a database cluster in the multi-cloud + +### Example +```java +// Import classes: +//import de.uulm.omi.cloudiator.catalogue.client.ApiException; +//import de.uulm.omi.cloudiator.catalogue.client.api.DatabaseApi; + + +DatabaseApi apiInstance = new DatabaseApi(); +String name = "name_example"; // String | database name, needs to map an existing database application description +DatabaseSingle databaseComponents = new DatabaseSingle(); // DatabaseSingle | a set of database components +try { + CloudiatorApplicationInstance result = apiInstance.databaseSinglePost(name, databaseComponents); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DatabaseApi#databaseSinglePost"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| database name, needs to map an existing database application description | [enum: Couchbase] + **databaseComponents** | [**DatabaseSingle**](DatabaseSingle.md)| a set of database components | + +### Return type + +[**CloudiatorApplicationInstance**](CloudiatorApplicationInstance.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **utilsRegisterCloudPost** +> java.util.List<CloudiatorApplicationInstance> utilsRegisterCloudPost(cloud) + +Register a new cloud as deployment target + +### Example +```java +// Import classes: +//import de.uulm.omi.cloudiator.catalogue.client.ApiException; +//import de.uulm.omi.cloudiator.catalogue.client.api.DatabaseApi; + + +DatabaseApi apiInstance = new DatabaseApi(); +Cloud cloud = new Cloud(); // Cloud | cloud data required to enable it in cloudiator +try { + java.util.List result = apiInstance.utilsRegisterCloudPost(cloud); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DatabaseApi#utilsRegisterCloudPost"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cloud** | [**Cloud**](Cloud.md)| cloud data required to enable it in cloudiator | + +### Return type + +[**java.util.List<CloudiatorApplicationInstance>**](CloudiatorApplicationInstance.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/client/docs/DatabaseCluster.md b/client/docs/DatabaseCluster.md new file mode 100644 index 0000000..f7d9c29 --- /dev/null +++ b/client/docs/DatabaseCluster.md @@ -0,0 +1,12 @@ + +# DatabaseCluster + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**databaseDataComponent** | [**java.util.List<DatabaseDataComponent>**](DatabaseDataComponent.md) | | [optional] +**databaseSeedComponent** | [**java.util.List<DatabaseSeedComponent>**](DatabaseSeedComponent.md) | | [optional] +**databaseManagementComponent** | [**java.util.List<DatabaseManagementComponent>**](DatabaseManagementComponent.md) | | [optional] + + + diff --git a/client/docs/DatabaseConfiguration.md b/client/docs/DatabaseConfiguration.md new file mode 100644 index 0000000..94d5b22 --- /dev/null +++ b/client/docs/DatabaseConfiguration.md @@ -0,0 +1,12 @@ + +# DatabaseConfiguration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**databaseName** | **String** | database name | [optional] +**databaseUser** | **String** | database user name | [optional] +**databasePassword** | **String** | database password | [optional] + + + diff --git a/client/docs/DatabaseCrossCluster.md b/client/docs/DatabaseCrossCluster.md new file mode 100644 index 0000000..222084f --- /dev/null +++ b/client/docs/DatabaseCrossCluster.md @@ -0,0 +1,14 @@ + +# DatabaseCrossCluster + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**databaseDataComponent** | [**java.util.List<DatabaseDataComponent>**](DatabaseDataComponent.md) | | [optional] +**databaseSeedComponent** | [**java.util.List<DatabaseSeedComponent>**](DatabaseSeedComponent.md) | | [optional] +**databaseManagementComponent** | [**java.util.List<DatabaseManagementComponent>**](DatabaseManagementComponent.md) | | [optional] +**crossDatabaseDataComponent** | [**java.util.List<CrossDatabaseDataComponent>**](CrossDatabaseDataComponent.md) | | [optional] +**crossDatabaseSeedComponent** | [**java.util.List<CrossDatabaseSeedComponent>**](CrossDatabaseSeedComponent.md) | | [optional] + + + diff --git a/client/docs/DatabaseDataComponent.md b/client/docs/DatabaseDataComponent.md new file mode 100644 index 0000000..1bb78f5 --- /dev/null +++ b/client/docs/DatabaseDataComponent.md @@ -0,0 +1,21 @@ + +# DatabaseDataComponent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instances** | **Integer** | number of component instances | [optional] +**resource** | [**VM**](VM.md) | | [optional] +**name** | [**NameEnum**](#NameEnum) | | [optional] +**nodeConfiguration** | [**NodeConfiguration**](NodeConfiguration.md) | | [optional] +**customConfiguration** | [**CustomConfiguration**](CustomConfiguration.md) | | [optional] + + + +## Enum: NameEnum +Name | Value +---- | ----- +DATA | "DATA" + + + diff --git a/client/docs/DatabaseManagementComponent.md b/client/docs/DatabaseManagementComponent.md new file mode 100644 index 0000000..bf924d1 --- /dev/null +++ b/client/docs/DatabaseManagementComponent.md @@ -0,0 +1,22 @@ + +# DatabaseManagementComponent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instances** | **Integer** | number of component instances | [optional] +**resource** | [**VM**](VM.md) | | [optional] +**name** | [**NameEnum**](#NameEnum) | | [optional] +**nodeConfiguration** | [**NodeConfiguration**](NodeConfiguration.md) | | [optional] +**customConfiguration** | [**CustomConfiguration**](CustomConfiguration.md) | | [optional] +**managementConfiguration** | [**ManagementConfiguration**](ManagementConfiguration.md) | | [optional] + + + +## Enum: NameEnum +Name | Value +---- | ----- +DATA | "DATA" + + + diff --git a/client/docs/DatabaseSeedComponent.md b/client/docs/DatabaseSeedComponent.md new file mode 100644 index 0000000..2ad7367 --- /dev/null +++ b/client/docs/DatabaseSeedComponent.md @@ -0,0 +1,21 @@ + +# DatabaseSeedComponent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instances** | **Integer** | number of component instances | [optional] +**resource** | [**VM**](VM.md) | | [optional] +**name** | [**NameEnum**](#NameEnum) | | [optional] +**nodeConfiguration** | [**NodeConfiguration**](NodeConfiguration.md) | | [optional] +**customConfiguration** | [**CustomConfiguration**](CustomConfiguration.md) | | [optional] + + + +## Enum: NameEnum +Name | Value +---- | ----- +SEED | "SEED" + + + diff --git a/client/docs/DatabaseSingle.md b/client/docs/DatabaseSingle.md new file mode 100644 index 0000000..caee84c --- /dev/null +++ b/client/docs/DatabaseSingle.md @@ -0,0 +1,11 @@ + +# DatabaseSingle + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**databaseSeedComponent** | [**DatabaseSeedComponent**](DatabaseSeedComponent.md) | | [optional] +**databaseManagementComponent** | [**java.util.List<DatabaseManagementComponent>**](DatabaseManagementComponent.md) | | [optional] + + + diff --git a/client/docs/Error.md b/client/docs/Error.md new file mode 100644 index 0000000..a5930dc --- /dev/null +++ b/client/docs/Error.md @@ -0,0 +1,12 @@ + +# Error + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | | [optional] +**message** | **String** | | [optional] +**fields** | **String** | | [optional] + + + diff --git a/client/docs/IndexMemory.md b/client/docs/IndexMemory.md new file mode 100644 index 0000000..ae5fdc5 --- /dev/null +++ b/client/docs/IndexMemory.md @@ -0,0 +1,18 @@ + +# IndexMemory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envName** | [**EnvNameEnum**](#EnvNameEnum) | environment variable name | [optional] +**envValue** | **String** | amount of RAM to allocato for index caching | [optional] + + + +## Enum: EnvNameEnum +Name | Value +---- | ----- +INDEXMEMORY | "INDEXMEMORY" + + + diff --git a/client/docs/ManagementConfiguration.md b/client/docs/ManagementConfiguration.md new file mode 100644 index 0000000..5a50ec0 --- /dev/null +++ b/client/docs/ManagementConfiguration.md @@ -0,0 +1,10 @@ + +# ManagementConfiguration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**crossClusterPort** | **Integer** | port to connect across multiple clusters | [optional] + + + diff --git a/client/docs/Node.md b/client/docs/Node.md new file mode 100644 index 0000000..8fd19ee --- /dev/null +++ b/client/docs/Node.md @@ -0,0 +1,11 @@ + +# Node + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endpoint** | **Integer** | TODO | [optional] +**credentials** | **Integer** | TODO | [optional] + + + diff --git a/client/docs/NodeConfiguration.md b/client/docs/NodeConfiguration.md new file mode 100644 index 0000000..4c794a1 --- /dev/null +++ b/client/docs/NodeConfiguration.md @@ -0,0 +1,12 @@ + +# NodeConfiguration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dataMemory** | [**DataMemory**](DataMemory.md) | | [optional] +**indexMemory** | [**IndexMemory**](IndexMemory.md) | | [optional] +**replicationFactor** | [**ReplicationFactor**](ReplicationFactor.md) | | [optional] + + + diff --git a/client/docs/ReplicationFactor.md b/client/docs/ReplicationFactor.md new file mode 100644 index 0000000..a39f90d --- /dev/null +++ b/client/docs/ReplicationFactor.md @@ -0,0 +1,18 @@ + +# ReplicationFactor + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envName** | [**EnvNameEnum**](#EnvNameEnum) | environment variable name | [optional] +**envValue** | **String** | replication factor, 0 = repliation disabled | [optional] + + + +## Enum: EnvNameEnum +Name | Value +---- | ----- +REPLICATIONFACTOR | "REPLICATIONFACTOR" + + + diff --git a/client/docs/Requirement.md b/client/docs/Requirement.md new file mode 100644 index 0000000..9f6dd3d --- /dev/null +++ b/client/docs/Requirement.md @@ -0,0 +1,10 @@ + +# Requirement + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item** | **Integer** | TODO | [optional] + + + diff --git a/client/docs/Resource.md b/client/docs/Resource.md new file mode 100644 index 0000000..a554bde --- /dev/null +++ b/client/docs/Resource.md @@ -0,0 +1,19 @@ + +# Resource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resourceType** | [**ResourceTypeEnum**](#ResourceTypeEnum) | | + + + +## Enum: ResourceTypeEnum +Name | Value +---- | ----- +VM | "VM" +NODE | "NODE" +REQUIREMENT | "REQUIREMENT" + + + diff --git a/client/docs/ScriptsApi.md b/client/docs/ScriptsApi.md new file mode 100644 index 0000000..5b45d12 --- /dev/null +++ b/client/docs/ScriptsApi.md @@ -0,0 +1,100 @@ +# ScriptsApi + +All URIs are relative to *http://localhost/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**scriptsBigdataGet**](ScriptsApi.md#scriptsBigdataGet) | **GET** /scripts/bigdata | Get custom database installation scripts +[**scriptsDatabaseGet**](ScriptsApi.md#scriptsDatabaseGet) | **GET** /scripts/database | Get custom database installation scripts + + + +# **scriptsBigdataGet** +> File scriptsBigdataGet(frameworkName, scriptType) + +Get custom database installation scripts + +### Example +```java +// Import classes: +//import de.uulm.omi.cloudiator.catalogue.client.ApiException; +//import de.uulm.omi.cloudiator.catalogue.client.api.ScriptsApi; + + +ScriptsApi apiInstance = new ScriptsApi(); +String frameworkName = "frameworkName_example"; // String | the Big Data Framework name, e.g. Spark +String scriptType = "scriptType_example"; // String | setup script type +try { + File result = apiInstance.scriptsBigdataGet(frameworkName, scriptType); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ScriptsApi#scriptsBigdataGet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **frameworkName** | **String**| the Big Data Framework name, e.g. Spark | [enum: spark] + **scriptType** | **String**| setup script type | [enum: install, init, master, worker] + +### Return type + +[**File**](File.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/x-sh + + +# **scriptsDatabaseGet** +> File scriptsDatabaseGet(dbName, scriptType) + +Get custom database installation scripts + +### Example +```java +// Import classes: +//import de.uulm.omi.cloudiator.catalogue.client.ApiException; +//import de.uulm.omi.cloudiator.catalogue.client.api.ScriptsApi; + + +ScriptsApi apiInstance = new ScriptsApi(); +String dbName = "dbName_example"; // String | database name +String scriptType = "scriptType_example"; // String | setup script type +try { + File result = apiInstance.scriptsDatabaseGet(dbName, scriptType); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ScriptsApi#scriptsDatabaseGet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dbName** | **String**| database name | [enum: couchbase, riak] + **scriptType** | **String**| setup script type | [enum: install, init, seed, data, management] + +### Return type + +[**File**](File.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/x-sh + diff --git a/client/docs/SparkJob.md b/client/docs/SparkJob.md new file mode 100644 index 0000000..66ebc6e --- /dev/null +++ b/client/docs/SparkJob.md @@ -0,0 +1,13 @@ + +# SparkJob + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | processing job name | [optional] +**masterUrl** | **String** | Spark Master URL, e.g. spark://IP:7077 | [optional] +**appplicationUrl** | **String** | location of the application artifact, need to be accessible via http (to be verified) | [optional] +**mainClass** | **String** | the main class of the application, e.g. \"com.some.job\" | [optional] + + + diff --git a/client/docs/SparkMasterComponent.md b/client/docs/SparkMasterComponent.md new file mode 100644 index 0000000..f99b233 --- /dev/null +++ b/client/docs/SparkMasterComponent.md @@ -0,0 +1,15 @@ + +# SparkMasterComponent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Spark master description identifier, needs to map an existing application description | [optional] +**instances** | **Integer** | number of database nodes in the cluster | [optional] +**idCloud** | **Integer** | idCloud in Colosseum | [optional] +**idImage** | **Integer** | idImage in Colosseum | [optional] +**idLocation** | **Integer** | idLocation in Colosseum | [optional] +**idHardware** | **Integer** | idHardware in Colosseum | [optional] + + + diff --git a/client/docs/SparkWorkerComponent.md b/client/docs/SparkWorkerComponent.md new file mode 100644 index 0000000..f72dea8 --- /dev/null +++ b/client/docs/SparkWorkerComponent.md @@ -0,0 +1,15 @@ + +# SparkWorkerComponent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Spark worker description identifier, needs to map an existing application description | [optional] +**instances** | **Integer** | number of database nodes in the cluster | [optional] +**idCloud** | **Integer** | idCloud in Colosseum | [optional] +**idImage** | **Integer** | idImage in Colosseum | [optional] +**idLocation** | **Integer** | idLocation in Colosseum | [optional] +**idHardware** | **Integer** | idHardware in Colosseum | [optional] + + + diff --git a/client/docs/VM.md b/client/docs/VM.md new file mode 100644 index 0000000..154fe81 --- /dev/null +++ b/client/docs/VM.md @@ -0,0 +1,13 @@ + +# VM + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**idCloud** | **Integer** | idCloud in Colosseum | +**idImage** | **Integer** | idImage in Colosseum | +**idHardware** | **Integer** | idHardware in Colosseum | +**idLocation** | **Integer** | idLocation in Colosseum | + + + diff --git a/client/git_push.sh b/client/git_push.sh new file mode 100644 index 0000000..ae01b18 --- /dev/null +++ b/client/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/client/gradle.properties b/client/gradle.properties new file mode 100644 index 0000000..05644f0 --- /dev/null +++ b/client/gradle.properties @@ -0,0 +1,2 @@ +# Uncomment to build for Android +#target = android \ No newline at end of file diff --git a/client/gradle/wrapper/gradle-wrapper.jar b/client/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..2c6137b87896c8f70315ae454e00a969ef5f6019 GIT binary patch literal 53639 zcmafaW0a=B^559DjdyI@wr$%scWm3Xy<^+Pj_sKpY&N+!|K#4>Bz;ajPk*RBjZ;RV75EK*;qpZCo(BB5~-#>pF^k0$_Qx&3rs}{XFZ)$uJU-ZpbB>L3?|knJ{J+ge{%=bI`#Yn9v&Fxx>fd=_|H)(FY-DO{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8;Nxrof4$!mSne@*(7j@&*7g7gZzZ2H25WNe}Vn+a>?{-Z~R_w z&m}m1qM{o93)FuQ46!nEyV!!gHSIhx~u?BuD(h^XuU8ua5jb=X`!t`zNPZ^#A7k{c!c% zr}ii2dCvdF{Edh0^GrW?VEjq2llLzO{yIwiz68(R$9@tF6#hc+=PdDW48PAy^4#6y zCy{UIFGRm|*MEB4o^PT5L=LX_1^L&`^au3sH`JdO;`!F)Pb#&ybLsOPyPvR& zHU9+rW5D=_{k!J{cy8DK$wbij3)A!WhriU_|0vLNTk}tv^QK>D{sQ}>K!4o+VeETu zbo_}g(fTj&|GNqDd3`;%qx>XV1sDeYcrynq2!C%?c_j@FcnkclF2e+b1PDE++xh+1 F{{tUq7iIte literal 0 HcmV?d00001 diff --git a/client/gradle/wrapper/gradle-wrapper.properties b/client/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..b7a3647 --- /dev/null +++ b/client/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Tue May 17 23:08:05 CST 2016 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip diff --git a/client/gradlew b/client/gradlew new file mode 100644 index 0000000..9d82f78 --- /dev/null +++ b/client/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/client/gradlew.bat b/client/gradlew.bat new file mode 100644 index 0000000..5f19212 --- /dev/null +++ b/client/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/client/pom.xml b/client/pom.xml new file mode 100644 index 0000000..ab3737a --- /dev/null +++ b/client/pom.xml @@ -0,0 +1,236 @@ + + 4.0.0 + de.uulm.omi.cloudiator.catalogue + client + jar + client + 1.0.0 + https://github.com/swagger-api/swagger-codegen + Swagger Java + + scm:git:git@github.com:swagger-api/swagger-codegen.git + scm:git:git@github.com:swagger-api/swagger-codegen.git + https://github.com/swagger-api/swagger-codegen + + + + + Unlicense + http://unlicense.org + repo + + + + + + Swagger + apiteam@swagger.io + Swagger + http://swagger.io + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + io.swagger + swagger-annotations + ${swagger-core-version} + + + com.squareup.okhttp + okhttp + ${okhttp-version} + + + com.squareup.okhttp + logging-interceptor + ${okhttp-version} + + + com.google.code.gson + gson + ${gson-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + + + junit + junit + ${junit-version} + test + + + + 1.8 + ${java.version} + ${java.version} + 1.8.0 + 1.5.15 + 2.7.5 + 2.8.1 + 1.0.0 + 4.12 + UTF-8 + + diff --git a/client/settings.gradle b/client/settings.gradle new file mode 100644 index 0000000..a368696 --- /dev/null +++ b/client/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "client" \ No newline at end of file diff --git a/client/src/main/AndroidManifest.xml b/client/src/main/AndroidManifest.xml new file mode 100644 index 0000000..2d5bb70 --- /dev/null +++ b/client/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiCallback.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiCallback.java new file mode 100644 index 0000000..1b1f19d --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiCallback.java @@ -0,0 +1,62 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client; + +import java.io.IOException; + +import java.util.Map; +import java.util.List; + +/** + * Callback for asynchronous API call. + * + * @param The return type + */ +public interface ApiCallback { + /** + * This is called when the API call fails. + * + * @param e The exception causing the failure + * @param statusCode Status code of the response if available, otherwise it would be 0 + * @param responseHeaders Headers of the response if available, otherwise it would be null + */ + void onFailure(ApiException e, int statusCode, Map> responseHeaders); + + /** + * This is called when the API call succeeded. + * + * @param result The result deserialized from response + * @param statusCode Status code of the response + * @param responseHeaders Headers of the response + */ + void onSuccess(T result, int statusCode, Map> responseHeaders); + + /** + * This is called when the API upload processing. + * + * @param bytesWritten bytes Written + * @param contentLength content length of request body + * @param done write end + */ + void onUploadProgress(long bytesWritten, long contentLength, boolean done); + + /** + * This is called when the API downlond processing. + * + * @param bytesRead bytes Read + * @param contentLength content lenngth of the response + * @param done Read end + */ + void onDownloadProgress(long bytesRead, long contentLength, boolean done); +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiClient.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiClient.java new file mode 100644 index 0000000..7ba2221 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiClient.java @@ -0,0 +1,1205 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client; + +import com.squareup.okhttp.*; +import com.squareup.okhttp.internal.http.HttpMethod; +import com.squareup.okhttp.logging.HttpLoggingInterceptor; +import com.squareup.okhttp.logging.HttpLoggingInterceptor.Level; +import okio.BufferedSink; +import okio.Okio; + +import javax.net.ssl.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Type; +import java.net.URLConnection; +import java.net.URLEncoder; +import java.security.GeneralSecurityException; +import java.security.KeyStore; +import java.security.SecureRandom; +import java.security.cert.Certificate; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.text.DateFormat; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import de.uulm.omi.cloudiator.catalogue.client.auth.Authentication; +import de.uulm.omi.cloudiator.catalogue.client.auth.HttpBasicAuth; +import de.uulm.omi.cloudiator.catalogue.client.auth.ApiKeyAuth; +import de.uulm.omi.cloudiator.catalogue.client.auth.OAuth; + +public class ApiClient { + + private String basePath = "http://localhost/v1"; + private boolean debugging = false; + private Map defaultHeaderMap = new HashMap(); + private String tempFolderPath = null; + + private Map authentications; + + private DateFormat dateFormat; + private DateFormat datetimeFormat; + private boolean lenientDatetimeFormat; + private int dateLength; + + private InputStream sslCaCert; + private boolean verifyingSsl; + private KeyManager[] keyManagers; + + private OkHttpClient httpClient; + private JSON json; + + private HttpLoggingInterceptor loggingInterceptor; + + /* + * Constructor for ApiClient + */ + public ApiClient() { + httpClient = new OkHttpClient(); + + + verifyingSsl = true; + + json = new JSON(); + + // Set default User-Agent. + setUserAgent("Swagger-Codegen/1.0.0/java"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap(); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Get base path + * + * @return Baes path + */ + public String getBasePath() { + return basePath; + } + + /** + * Set base path + * + * @param basePath Base path of the URL (e.g http://localhost/v1 + * @return An instance of OkHttpClient + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get HTTP client + * + * @return An instance of OkHttpClient + */ + public OkHttpClient getHttpClient() { + return httpClient; + } + + /** + * Set HTTP client + * + * @param httpClient An instance of OkHttpClient + * @return Api Client + */ + public ApiClient setHttpClient(OkHttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /** + * Get JSON + * + * @return JSON object + */ + public JSON getJSON() { + return json; + } + + /** + * Set JSON + * + * @param json JSON object + * @return Api client + */ + public ApiClient setJSON(JSON json) { + this.json = json; + return this; + } + + /** + * True if isVerifyingSsl flag is on + * + * @return True if isVerifySsl flag is on + */ + public boolean isVerifyingSsl() { + return verifyingSsl; + } + + /** + * Configure whether to verify certificate and hostname when making https requests. + * Default to true. + * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. + * + * @param verifyingSsl True to verify TLS/SSL connection + * @return ApiClient + */ + public ApiClient setVerifyingSsl(boolean verifyingSsl) { + this.verifyingSsl = verifyingSsl; + applySslSettings(); + return this; + } + + /** + * Get SSL CA cert. + * + * @return Input stream to the SSL CA cert + */ + public InputStream getSslCaCert() { + return sslCaCert; + } + + /** + * Configure the CA certificate to be trusted when making https requests. + * Use null to reset to default. + * + * @param sslCaCert input stream for SSL CA cert + * @return ApiClient + */ + public ApiClient setSslCaCert(InputStream sslCaCert) { + this.sslCaCert = sslCaCert; + applySslSettings(); + return this; + } + + public KeyManager[] getKeyManagers() { + return keyManagers; + } + + /** + * Configure client keys to use for authorization in an SSL session. + * Use null to reset to default. + * + * @param managers The KeyManagers to use + * @return ApiClient + */ + public ApiClient setKeyManagers(KeyManager[] managers) { + this.keyManagers = managers; + applySslSettings(); + return this; + } + + public DateFormat getDateFormat() { + return dateFormat; + } + + public ApiClient setDateFormat(DateFormat dateFormat) { + this.json.setDateFormat(dateFormat); + return this; + } + + public ApiClient setSqlDateFormat(DateFormat dateFormat) { + this.json.setSqlDateFormat(dateFormat); + return this; + } + + public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + this.json.setOffsetDateTimeFormat(dateFormat); + return this; + } + + public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { + this.json.setLocalDateFormat(dateFormat); + return this; + } + + public ApiClient setLenientOnJson(boolean lenientOnJson) { + this.json.setLenientOnJson(lenientOnJson); + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication objects + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + */ + public void setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent HTTP request's user agent + * @return ApiClient + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return ApiClient + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * + * @return True if debugging is enabled, false otherwise. + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return ApiClient + */ + public ApiClient setDebugging(boolean debugging) { + if (debugging != this.debugging) { + if (debugging) { + loggingInterceptor = new HttpLoggingInterceptor(); + loggingInterceptor.setLevel(Level.BODY); + httpClient.interceptors().add(loggingInterceptor); + } else { + httpClient.interceptors().remove(loggingInterceptor); + loggingInterceptor = null; + } + } + this.debugging = debugging; + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default tempopary folder. + * + * @see createTempFile + * @return Temporary folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set the temporary folder path (for downloading files) + * + * @param tempFolderPath Temporary folder path + * @return ApiClient + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getConnectTimeout() { + return httpClient.getConnectTimeout(); + } + + /** + * Sets the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param connectionTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + httpClient.setConnectTimeout(connectionTimeout, TimeUnit.MILLISECONDS); + return this; + } + + /** + * Get read timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getReadTimeout() { + return httpClient.getReadTimeout(); + } + + /** + * Sets the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param readTimeout read timeout in milliseconds + * @return Api client + */ + public ApiClient setReadTimeout(int readTimeout) { + httpClient.setReadTimeout(readTimeout, TimeUnit.MILLISECONDS); + return this; + } + + /** + * Get write timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getWriteTimeout() { + return httpClient.getWriteTimeout(); + } + + /** + * Sets the write timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param writeTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setWriteTimeout(int writeTimeout) { + httpClient.setWriteTimeout(writeTimeout, TimeUnit.MILLISECONDS); + return this; + } + + /** + * Format the given parameter object into string. + * + * @param param Parameter + * @return String representation of the parameter + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { + //Serialize to json string and remove the " enclosing characters + String jsonStr = json.serialize(param); + return jsonStr.substring(1, jsonStr.length() - 1); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for (Object o : (Collection)param) { + if (b.length() > 0) { + b.append(","); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Formats the specified query parameter to a list containing a single {@code Pair} object. + * + * Note that {@code value} must not be a collection. + * + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list containing a single {@code Pair} object. + */ + public List parameterToPair(String name, Object value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value instanceof Collection) return params; + + params.add(new Pair(name, parameterToString(value))); + return params; + } + + /** + * Formats the specified collection query parameters to a list of {@code Pair} objects. + * + * Note that the values of each of the returned Pair objects are percent-encoded. + * + * @param collectionFormat The collection format of the parameter. + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list of {@code Pair} objects. + */ + public List parameterToPairs(String collectionFormat, String name, Collection value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value.isEmpty()) { + return params; + } + + // create the params based on the collection format + if ("multi".equals(collectionFormat)) { + for (Object item : value) { + params.add(new Pair(name, escapeString(parameterToString(item)))); + } + return params; + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + // escape all delimiters except commas, which are URI reserved + // characters + if ("ssv".equals(collectionFormat)) { + delimiter = escapeString(" "); + } else if ("tsv".equals(collectionFormat)) { + delimiter = escapeString("\t"); + } else if ("pipes".equals(collectionFormat)) { + delimiter = escapeString("|"); + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : value) { + sb.append(delimiter); + sb.append(escapeString(parameterToString(item))); + } + + params.add(new Pair(name, sb.substring(delimiter.length()))); + + return params; + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param filename The filename to be sanitized + * @return The sanitized filename + */ + public String sanitizeFilename(String filename) { + return filename.replaceAll(".*[/\\\\]", ""); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "* / *" is also default to JSON + * @param mime MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * or matches "any", JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * + * @param str String to be escaped + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Deserialize response body to Java object, according to the return type and + * the Content-Type response header. + * + * @param Type + * @param response HTTP response + * @param returnType The type of the Java object + * @return The deserialized Java object + * @throws ApiException If fail to deserialize response body, i.e. cannot read response body + * or the Content-Type of the response is not supported. + */ + @SuppressWarnings("unchecked") + public T deserialize(Response response, Type returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + try { + return (T) response.body().bytes(); + } catch (IOException e) { + throw new ApiException(e); + } + } else if (returnType.equals(File.class)) { + // Handle file downloading. + return (T) downloadFileFromResponse(response); + } + + String respBody; + try { + if (response.body() != null) + respBody = response.body().string(); + else + respBody = null; + } catch (IOException e) { + throw new ApiException(e); + } + + if (respBody == null || "".equals(respBody)) { + return null; + } + + String contentType = response.headers().get("Content-Type"); + if (contentType == null) { + // ensuring a default content type + contentType = "application/json"; + } + if (isJsonMime(contentType)) { + return json.deserialize(respBody, returnType); + } else if (returnType.equals(String.class)) { + // Expecting string, return the raw response body. + return (T) respBody; + } else { + throw new ApiException( + "Content type \"" + contentType + "\" is not supported for type: " + returnType, + response.code(), + response.headers().toMultimap(), + respBody); + } + } + + /** + * Serialize the given Java object into request body according to the object's + * class and the request Content-Type. + * + * @param obj The Java object + * @param contentType The request Content-Type + * @return The serialized request body + * @throws ApiException If fail to serialize the given object + */ + public RequestBody serialize(Object obj, String contentType) throws ApiException { + if (obj instanceof byte[]) { + // Binary (byte array) body parameter support. + return RequestBody.create(MediaType.parse(contentType), (byte[]) obj); + } else if (obj instanceof File) { + // File body parameter support. + return RequestBody.create(MediaType.parse(contentType), (File) obj); + } else if (isJsonMime(contentType)) { + String content; + if (obj != null) { + content = json.serialize(obj); + } else { + content = null; + } + return RequestBody.create(MediaType.parse(contentType), content); + } else { + throw new ApiException("Content type \"" + contentType + "\" is not supported"); + } + } + + /** + * Download file from the given response. + * + * @param response An instance of the Response object + * @throws ApiException If fail to read file content from response and write to disk + * @return Downloaded file + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + BufferedSink sink = Okio.buffer(Okio.sink(file)); + sink.writeAll(response.body().source()); + sink.close(); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * Prepare file for download + * + * @param response An instance of the Response object + * @throws IOException If fail to prepare file for download + * @return Prepared file for the download + */ + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = response.header("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) { + filename = sanitizeFilename(matcher.group(1)); + } + } + + String prefix = null; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf("."); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // File.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return File.createTempFile(prefix, suffix); + else + return File.createTempFile(prefix, suffix, new File(tempFolderPath)); + } + + /** + * {@link #execute(Call, Type)} + * + * @param Type + * @param call An instance of the Call object + * @throws ApiException If fail to execute the call + * @return ApiResponse<T> + */ + public ApiResponse execute(Call call) throws ApiException { + return execute(call, null); + } + + /** + * Execute HTTP call and deserialize the HTTP response body into the given return type. + * + * @param returnType The return type used to deserialize HTTP response body + * @param The return type corresponding to (same with) returnType + * @param call Call + * @return ApiResponse object containing response status, headers and + * data, which is a Java object deserialized from response body and would be null + * when returnType is null. + * @throws ApiException If fail to execute the call + */ + public ApiResponse execute(Call call, Type returnType) throws ApiException { + try { + Response response = call.execute(); + T data = handleResponse(response, returnType); + return new ApiResponse(response.code(), response.headers().toMultimap(), data); + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * {@link #executeAsync(Call, Type, ApiCallback)} + * + * @param Type + * @param call An instance of the Call object + * @param callback ApiCallback<T> + */ + public void executeAsync(Call call, ApiCallback callback) { + executeAsync(call, null, callback); + } + + /** + * Execute HTTP call asynchronously. + * + * @see #execute(Call, Type) + * @param Type + * @param call The callback to be executed when the API call finishes + * @param returnType Return type + * @param callback ApiCallback + */ + @SuppressWarnings("unchecked") + public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { + call.enqueue(new Callback() { + @Override + public void onFailure(Request request, IOException e) { + callback.onFailure(new ApiException(e), 0, null); + } + + @Override + public void onResponse(Response response) throws IOException { + T result; + try { + result = (T) handleResponse(response, returnType); + } catch (ApiException e) { + callback.onFailure(e, response.code(), response.headers().toMultimap()); + return; + } + callback.onSuccess(result, response.code(), response.headers().toMultimap()); + } + }); + } + + /** + * Handle the given response, return the deserialized object when the response is successful. + * + * @param Type + * @param response Response + * @param returnType Return type + * @throws ApiException If the response has a unsuccessful status code or + * fail to deserialize the response body + * @return Type + */ + public T handleResponse(Response response, Type returnType) throws ApiException { + if (response.isSuccessful()) { + if (returnType == null || response.code() == 204) { + // returning null if the returnType is not defined, + // or the status code is 204 (No Content) + if (response.body() != null) { + try { + response.body().close(); + } catch (IOException e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + return null; + } else { + return deserialize(response, returnType); + } + } else { + String respBody = null; + if (response.body() != null) { + try { + respBody = response.body().string(); + } catch (IOException e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); + } + } + + /** + * Build HTTP call with the given options. + * + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param progressRequestListener Progress request listener + * @return The HTTP call + * @throws ApiException If fail to serialize the request body object + */ + public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, authNames, progressRequestListener); + + return httpClient.newCall(request); + } + + /** + * Build an HTTP request with the given options. + * + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param progressRequestListener Progress request listener + * @return The HTTP request + * @throws ApiException If fail to serialize the request body object + */ + public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams); + + final String url = buildUrl(path, queryParams, collectionQueryParams); + final Request.Builder reqBuilder = new Request.Builder().url(url); + processHeaderParams(headerParams, reqBuilder); + + String contentType = (String) headerParams.get("Content-Type"); + // ensuring a default content type + if (contentType == null) { + contentType = "application/json"; + } + + RequestBody reqBody; + if (!HttpMethod.permitsRequestBody(method)) { + reqBody = null; + } else if ("application/x-www-form-urlencoded".equals(contentType)) { + reqBody = buildRequestBodyFormEncoding(formParams); + } else if ("multipart/form-data".equals(contentType)) { + reqBody = buildRequestBodyMultipart(formParams); + } else if (body == null) { + if ("DELETE".equals(method)) { + // allow calling DELETE without sending a request body + reqBody = null; + } else { + // use an empty request body (for POST, PUT and PATCH) + reqBody = RequestBody.create(MediaType.parse(contentType), ""); + } + } else { + reqBody = serialize(body, contentType); + } + + Request request = null; + + if(progressRequestListener != null && reqBody != null) { + ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, progressRequestListener); + request = reqBuilder.method(method, progressRequestBody).build(); + } else { + request = reqBuilder.method(method, reqBody).build(); + } + + return request; + } + + /** + * Build full URL by concatenating base path, the given sub path and query parameters. + * + * @param path The sub path + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @return The full URL + */ + public String buildUrl(String path, List queryParams, List collectionQueryParams) { + final StringBuilder url = new StringBuilder(); + url.append(basePath).append(path); + + if (queryParams != null && !queryParams.isEmpty()) { + // support (constant) query string in `path`, e.g. "/posts?draft=1" + String prefix = path.contains("?") ? "&" : "?"; + for (Pair param : queryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + url.append(escapeString(param.getName())).append("=").append(escapeString(value)); + } + } + } + + if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { + String prefix = url.toString().contains("?") ? "&" : "?"; + for (Pair param : collectionQueryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + // collection query parameter value already escaped as part of parameterToPairs + url.append(escapeString(param.getName())).append("=").append(value); + } + } + } + + return url.toString(); + } + + /** + * Set header parameters to the request builder, including default headers. + * + * @param headerParams Header parameters in the ofrm of Map + * @param reqBuilder Reqeust.Builder + */ + public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { + for (Entry param : headerParams.entrySet()) { + reqBuilder.header(param.getKey(), parameterToString(param.getValue())); + } + for (Entry header : defaultHeaderMap.entrySet()) { + if (!headerParams.containsKey(header.getKey())) { + reqBuilder.header(header.getKey(), parameterToString(header.getValue())); + } + } + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + */ + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); + auth.applyToParams(queryParams, headerParams); + } + } + + /** + * Build a form-encoding request body with the given form parameters. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyFormEncoding(Map formParams) { + FormEncodingBuilder formBuilder = new FormEncodingBuilder(); + for (Entry param : formParams.entrySet()) { + formBuilder.add(param.getKey(), parameterToString(param.getValue())); + } + return formBuilder.build(); + } + + /** + * Build a multipart (file uploading) request body with the given form parameters, + * which could contain text fields and file fields. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyMultipart(Map formParams) { + MultipartBuilder mpBuilder = new MultipartBuilder().type(MultipartBuilder.FORM); + for (Entry param : formParams.entrySet()) { + if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + file.getName() + "\""); + MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); + mpBuilder.addPart(partHeaders, RequestBody.create(mediaType, file)); + } else { + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); + mpBuilder.addPart(partHeaders, RequestBody.create(null, parameterToString(param.getValue()))); + } + } + return mpBuilder.build(); + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + public String guessContentTypeFromFile(File file) { + String contentType = URLConnection.guessContentTypeFromName(file.getName()); + if (contentType == null) { + return "application/octet-stream"; + } else { + return contentType; + } + } + + /** + * Apply SSL related settings to httpClient according to the current values of + * verifyingSsl and sslCaCert. + */ + private void applySslSettings() { + try { + TrustManager[] trustManagers = null; + HostnameVerifier hostnameVerifier = null; + if (!verifyingSsl) { + TrustManager trustAll = new X509TrustManager() { + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {} + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {} + @Override + public X509Certificate[] getAcceptedIssuers() { return null; } + }; + SSLContext sslContext = SSLContext.getInstance("TLS"); + trustManagers = new TrustManager[]{ trustAll }; + hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { return true; } + }; + } else if (sslCaCert != null) { + char[] password = null; // Any password will work. + CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); + Collection certificates = certificateFactory.generateCertificates(sslCaCert); + if (certificates.isEmpty()) { + throw new IllegalArgumentException("expected non-empty set of trusted certificates"); + } + KeyStore caKeyStore = newEmptyKeyStore(password); + int index = 0; + for (Certificate certificate : certificates) { + String certificateAlias = "ca" + Integer.toString(index++); + caKeyStore.setCertificateEntry(certificateAlias, certificate); + } + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + trustManagerFactory.init(caKeyStore); + trustManagers = trustManagerFactory.getTrustManagers(); + } + + if (keyManagers != null || trustManagers != null) { + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagers, trustManagers, new SecureRandom()); + httpClient.setSslSocketFactory(sslContext.getSocketFactory()); + } else { + httpClient.setSslSocketFactory(null); + } + httpClient.setHostnameVerifier(hostnameVerifier); + } catch (GeneralSecurityException e) { + throw new RuntimeException(e); + } + } + + private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + try { + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + keyStore.load(null, password); + return keyStore; + } catch (IOException e) { + throw new AssertionError(e); + } + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiException.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiException.java new file mode 100644 index 0000000..34ccda4 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiException.java @@ -0,0 +1,91 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class ApiException extends Exception { + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiResponse.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiResponse.java new file mode 100644 index 0000000..c6547c7 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ApiResponse.java @@ -0,0 +1,59 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client; + +import java.util.List; +import java.util.Map; + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +public class ApiResponse { + final private int statusCode; + final private Map> headers; + final private T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + public int getStatusCode() { + return statusCode; + } + + public Map> getHeaders() { + return headers; + } + + public T getData() { + return data; + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/Configuration.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/Configuration.java new file mode 100644 index 0000000..603ff30 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/Configuration.java @@ -0,0 +1,39 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client; + +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class Configuration { + private static ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/GzipRequestInterceptor.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/GzipRequestInterceptor.java new file mode 100644 index 0000000..e22bd92 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/GzipRequestInterceptor.java @@ -0,0 +1,81 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client; + +import com.squareup.okhttp.*; +import okio.Buffer; +import okio.BufferedSink; +import okio.GzipSink; +import okio.Okio; + +import java.io.IOException; + +/** + * Encodes request bodies using gzip. + * + * Taken from https://github.com/square/okhttp/issues/350 + */ +class GzipRequestInterceptor implements Interceptor { + @Override public Response intercept(Chain chain) throws IOException { + Request originalRequest = chain.request(); + if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { + return chain.proceed(originalRequest); + } + + Request compressedRequest = originalRequest.newBuilder() + .header("Content-Encoding", "gzip") + .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) + .build(); + return chain.proceed(compressedRequest); + } + + private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return new RequestBody() { + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() { + return buffer.size(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + sink.write(buffer.snapshot()); + } + }; + } + + private RequestBody gzip(final RequestBody body) { + return new RequestBody() { + @Override public MediaType contentType() { + return body.contentType(); + } + + @Override public long contentLength() { + return -1; // We don't know the compressed length in advance! + } + + @Override public void writeTo(BufferedSink sink) throws IOException { + BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); + body.writeTo(gzipSink); + gzipSink.close(); + } + }; + } +} \ No newline at end of file diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/JSON.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/JSON.java new file mode 100644 index 0000000..11ef188 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/JSON.java @@ -0,0 +1,375 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.internal.bind.util.ISO8601Utils; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonElement; +import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; + +import de.uulm.omi.cloudiator.catalogue.client.model.*; + +import java.io.IOException; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.ParsePosition; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import java.util.Map; +import java.util.HashMap; + +public class JSON { + private Gson gson; + private boolean isLenientOnJson = false; + private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder() + .registerTypeSelector(Resource.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("Node".toUpperCase(), Node.class); + classByDiscriminatorValue.put("Requirement".toUpperCase(), Requirement.class); + classByDiscriminatorValue.put("VM".toUpperCase(), VM.class); + classByDiscriminatorValue.put("Resource".toUpperCase(), Resource.class); + return getClassByDiscriminator( + classByDiscriminatorValue, + getDiscriminatorValue(readElement, "resourceType")); + } + }) + ; + return fireBuilder.createGsonBuilder(); + } + + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if(null == element) { + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue.toUpperCase()); + if(null == clazz) { + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + + public JSON() { + gson = createGson() + .registerTypeAdapter(Date.class, dateTypeAdapter) + .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) + .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) + .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) + .create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + * @return JSON + */ + public JSON setGson(Gson gson) { + this.gson = gson; + return this; + } + + public JSON setLenientOnJson(boolean lenientOnJson) { + isLenientOnJson = lenientOnJson; + return this; + } + + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public String serialize(Object obj) { + return gson.toJson(obj); + } + + /** + * Deserialize the given JSON string to Java object. + * + * @param Type + * @param body The JSON string + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public T deserialize(String body, Type returnType) { + try { + if (isLenientOnJson) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(body, returnType); + } + } catch (JsonParseException e) { + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + if (returnType.equals(String.class)) + return (T) body; + else throw (e); + } + } + + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } + } + + /** + * Gson TypeAdapter for JSR310 LocalDate type + */ + public class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } + } + + public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + return this; + } + + public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + return this; + } + + /** + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() { + } + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } + } + + /** + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, ISO8601Utils will be used. + */ + public static class DateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public DateTypeAdapter() { + } + + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = ISO8601Utils.format(date, true); + } + out.value(value); + } + } + + @Override + public Date read(JsonReader in) throws IOException { + try { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } + + public JSON setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + return this; + } + + public JSON setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + return this; + } + +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/Pair.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/Pair.java new file mode 100644 index 0000000..6b5ed5e --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/Pair.java @@ -0,0 +1,52 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client; + +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) return; + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) return; + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) return false; + if (arg.trim().isEmpty()) return false; + + return true; + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ProgressRequestBody.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ProgressRequestBody.java new file mode 100644 index 0000000..ba8fc33 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ProgressRequestBody.java @@ -0,0 +1,77 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client; + +import com.squareup.okhttp.MediaType; +import com.squareup.okhttp.RequestBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSink; +import okio.ForwardingSink; +import okio.Okio; +import okio.Sink; + +public class ProgressRequestBody extends RequestBody { + + public interface ProgressRequestListener { + void onRequestProgress(long bytesWritten, long contentLength, boolean done); + } + + private final RequestBody requestBody; + + private final ProgressRequestListener progressListener; + + public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) { + this.requestBody = requestBody; + this.progressListener = progressListener; + } + + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() throws IOException { + return requestBody.contentLength(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink bufferedSink = Okio.buffer(sink(sink)); + requestBody.writeTo(bufferedSink); + bufferedSink.flush(); + } + + private Sink sink(Sink sink) { + return new ForwardingSink(sink) { + + long bytesWritten = 0L; + long contentLength = 0L; + + @Override + public void write(Buffer source, long byteCount) throws IOException { + super.write(source, byteCount); + if (contentLength == 0) { + contentLength = contentLength(); + } + + bytesWritten += byteCount; + progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength); + } + }; + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ProgressResponseBody.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ProgressResponseBody.java new file mode 100644 index 0000000..d5c4824 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/ProgressResponseBody.java @@ -0,0 +1,76 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client; + +import com.squareup.okhttp.MediaType; +import com.squareup.okhttp.ResponseBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSource; +import okio.ForwardingSource; +import okio.Okio; +import okio.Source; + +public class ProgressResponseBody extends ResponseBody { + + public interface ProgressListener { + void update(long bytesRead, long contentLength, boolean done); + } + + private final ResponseBody responseBody; + private final ProgressListener progressListener; + private BufferedSource bufferedSource; + + public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) { + this.responseBody = responseBody; + this.progressListener = progressListener; + } + + @Override + public MediaType contentType() { + return responseBody.contentType(); + } + + @Override + public long contentLength() throws IOException { + return responseBody.contentLength(); + } + + @Override + public BufferedSource source() throws IOException { + if (bufferedSource == null) { + bufferedSource = Okio.buffer(source(responseBody.source())); + } + return bufferedSource; + } + + private Source source(Source source) { + return new ForwardingSource(source) { + long totalBytesRead = 0L; + + @Override + public long read(Buffer sink, long byteCount) throws IOException { + long bytesRead = super.read(sink, byteCount); + // read() returns the number of bytes read, or -1 if this source is exhausted. + totalBytesRead += bytesRead != -1 ? bytesRead : 0; + progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1); + return bytesRead; + } + }; + } +} + + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/StringUtil.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/StringUtil.java new file mode 100644 index 0000000..c0a7380 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/StringUtil.java @@ -0,0 +1,55 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client; + +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) return true; + if (value != null && value.equalsIgnoreCase(str)) return true; + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) return ""; + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/ApplicationApi.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/ApplicationApi.java new file mode 100644 index 0000000..64fc8f2 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/ApplicationApi.java @@ -0,0 +1,188 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.api; + +import de.uulm.omi.cloudiator.catalogue.client.ApiCallback; +import de.uulm.omi.cloudiator.catalogue.client.ApiClient; +import de.uulm.omi.cloudiator.catalogue.client.ApiException; +import de.uulm.omi.cloudiator.catalogue.client.ApiResponse; +import de.uulm.omi.cloudiator.catalogue.client.Configuration; +import de.uulm.omi.cloudiator.catalogue.client.Pair; +import de.uulm.omi.cloudiator.catalogue.client.ProgressRequestBody; +import de.uulm.omi.cloudiator.catalogue.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import de.uulm.omi.cloudiator.catalogue.client.model.CloudiatorApplicationInstance; +import de.uulm.omi.cloudiator.catalogue.client.model.Component; +import de.uulm.omi.cloudiator.catalogue.client.model.Error; + +import java.lang.reflect.Type; + +public class ApplicationApi { + private ApiClient apiClient; + + public ApplicationApi() { + this(Configuration.getDefaultApiClient()); + } + + public ApplicationApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for genericPost + * @param applicationName maps to the parent application description to identify its application components (required) + * @param components a list of application components (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call genericPostCall(String applicationName, java.util.List components, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = components; + + // create path and map variables + String localVarPath = "/generic"; + + java.util.List localVarQueryParams = new java.util.ArrayList(); + java.util.List localVarCollectionQueryParams = new java.util.ArrayList(); + if (applicationName != null) + localVarQueryParams.addAll(apiClient.parameterToPair("applicationName", applicationName)); + + java.util.Map localVarHeaderParams = new java.util.HashMap(); + + java.util.Map localVarFormParams = new java.util.HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call genericPostValidateBeforeCall(String applicationName, java.util.List components, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'applicationName' is set + if (applicationName == null) { + throw new ApiException("Missing the required parameter 'applicationName' when calling genericPost(Async)"); + } + + // verify the required parameter 'components' is set + if (components == null) { + throw new ApiException("Missing the required parameter 'components' when calling genericPost(Async)"); + } + + + com.squareup.okhttp.Call call = genericPostCall(applicationName, components, progressListener, progressRequestListener); + return call; + + } + + /** + * Generic application deployment + * Deploy a generic application in a multi-cloud setup + * @param applicationName maps to the parent application description to identify its application components (required) + * @param components a list of application components (required) + * @return CloudiatorApplicationInstance + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CloudiatorApplicationInstance genericPost(String applicationName, java.util.List components) throws ApiException { + ApiResponse resp = genericPostWithHttpInfo(applicationName, components); + return resp.getData(); + } + + /** + * Generic application deployment + * Deploy a generic application in a multi-cloud setup + * @param applicationName maps to the parent application description to identify its application components (required) + * @param components a list of application components (required) + * @return ApiResponse<CloudiatorApplicationInstance> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse genericPostWithHttpInfo(String applicationName, java.util.List components) throws ApiException { + com.squareup.okhttp.Call call = genericPostValidateBeforeCall(applicationName, components, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Generic application deployment (asynchronously) + * Deploy a generic application in a multi-cloud setup + * @param applicationName maps to the parent application description to identify its application components (required) + * @param components a list of application components (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call genericPostAsync(String applicationName, java.util.List components, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = genericPostValidateBeforeCall(applicationName, components, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/BigDataApi.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/BigDataApi.java new file mode 100644 index 0000000..343cf9b --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/BigDataApi.java @@ -0,0 +1,322 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.api; + +import de.uulm.omi.cloudiator.catalogue.client.ApiCallback; +import de.uulm.omi.cloudiator.catalogue.client.ApiClient; +import de.uulm.omi.cloudiator.catalogue.client.ApiException; +import de.uulm.omi.cloudiator.catalogue.client.ApiResponse; +import de.uulm.omi.cloudiator.catalogue.client.Configuration; +import de.uulm.omi.cloudiator.catalogue.client.Pair; +import de.uulm.omi.cloudiator.catalogue.client.ProgressRequestBody; +import de.uulm.omi.cloudiator.catalogue.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import de.uulm.omi.cloudiator.catalogue.client.model.CloudiatorApplicationInstance; +import de.uulm.omi.cloudiator.catalogue.client.model.Cluster; +import de.uulm.omi.cloudiator.catalogue.client.model.Error; +import de.uulm.omi.cloudiator.catalogue.client.model.SparkJob; + +import java.lang.reflect.Type; + +public class BigDataApi { + private ApiClient apiClient; + + public BigDataApi() { + this(Configuration.getDefaultApiClient()); + } + + public BigDataApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for sparkJobPost + * @param job the Spark job to submit (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call sparkJobPostCall(SparkJob job, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = job; + + // create path and map variables + String localVarPath = "/sparkJob"; + + java.util.List localVarQueryParams = new java.util.ArrayList(); + java.util.List localVarCollectionQueryParams = new java.util.ArrayList(); + + java.util.Map localVarHeaderParams = new java.util.HashMap(); + + java.util.Map localVarFormParams = new java.util.HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call sparkJobPostValidateBeforeCall(SparkJob job, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'job' is set + if (job == null) { + throw new ApiException("Missing the required parameter 'job' when calling sparkJobPost(Async)"); + } + + + com.squareup.okhttp.Call call = sparkJobPostCall(job, progressListener, progressRequestListener); + return call; + + } + + /** + * submit an Apache Spark job to a Spark Master + * Submitting Spark jobs to an existing Apache Spark Cluster + * @param job the Spark job to submit (required) + * @return java.util.List<CloudiatorApplicationInstance> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public java.util.List sparkJobPost(SparkJob job) throws ApiException { + ApiResponse> resp = sparkJobPostWithHttpInfo(job); + return resp.getData(); + } + + /** + * submit an Apache Spark job to a Spark Master + * Submitting Spark jobs to an existing Apache Spark Cluster + * @param job the Spark job to submit (required) + * @return ApiResponse<java.util.List<CloudiatorApplicationInstance>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> sparkJobPostWithHttpInfo(SparkJob job) throws ApiException { + com.squareup.okhttp.Call call = sparkJobPostValidateBeforeCall(job, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * submit an Apache Spark job to a Spark Master (asynchronously) + * Submitting Spark jobs to an existing Apache Spark Cluster + * @param job the Spark job to submit (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call sparkJobPostAsync(SparkJob job, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = sparkJobPostValidateBeforeCall(job, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for sparkPost + * @param name the application name, needs to map an existing application description (required) + * @param applicationType the application type (required) + * @param cluster the Spark cluster, including one master and n workers (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call sparkPostCall(String name, String applicationType, Cluster cluster, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = cluster; + + // create path and map variables + String localVarPath = "/spark"; + + java.util.List localVarQueryParams = new java.util.ArrayList(); + java.util.List localVarCollectionQueryParams = new java.util.ArrayList(); + if (name != null) + localVarQueryParams.addAll(apiClient.parameterToPair("name", name)); + if (applicationType != null) + localVarQueryParams.addAll(apiClient.parameterToPair("applicationType", applicationType)); + + java.util.Map localVarHeaderParams = new java.util.HashMap(); + + java.util.Map localVarFormParams = new java.util.HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call sparkPostValidateBeforeCall(String name, String applicationType, Cluster cluster, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling sparkPost(Async)"); + } + + // verify the required parameter 'applicationType' is set + if (applicationType == null) { + throw new ApiException("Missing the required parameter 'applicationType' when calling sparkPost(Async)"); + } + + // verify the required parameter 'cluster' is set + if (cluster == null) { + throw new ApiException("Missing the required parameter 'cluster' when calling sparkPost(Async)"); + } + + + com.squareup.okhttp.Call call = sparkPostCall(name, applicationType, cluster, progressListener, progressRequestListener); + return call; + + } + + /** + * deploys an Apache Spark cluster + * Deploy a Spark cluster with 1 master and n workers the multi-cloud + * @param name the application name, needs to map an existing application description (required) + * @param applicationType the application type (required) + * @param cluster the Spark cluster, including one master and n workers (required) + * @return CloudiatorApplicationInstance + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CloudiatorApplicationInstance sparkPost(String name, String applicationType, Cluster cluster) throws ApiException { + ApiResponse resp = sparkPostWithHttpInfo(name, applicationType, cluster); + return resp.getData(); + } + + /** + * deploys an Apache Spark cluster + * Deploy a Spark cluster with 1 master and n workers the multi-cloud + * @param name the application name, needs to map an existing application description (required) + * @param applicationType the application type (required) + * @param cluster the Spark cluster, including one master and n workers (required) + * @return ApiResponse<CloudiatorApplicationInstance> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse sparkPostWithHttpInfo(String name, String applicationType, Cluster cluster) throws ApiException { + com.squareup.okhttp.Call call = sparkPostValidateBeforeCall(name, applicationType, cluster, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * deploys an Apache Spark cluster (asynchronously) + * Deploy a Spark cluster with 1 master and n workers the multi-cloud + * @param name the application name, needs to map an existing application description (required) + * @param applicationType the application type (required) + * @param cluster the Spark cluster, including one master and n workers (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call sparkPostAsync(String name, String applicationType, Cluster cluster, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = sparkPostValidateBeforeCall(name, applicationType, cluster, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/DatabaseApi.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/DatabaseApi.java new file mode 100644 index 0000000..433067f --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/DatabaseApi.java @@ -0,0 +1,579 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.api; + +import de.uulm.omi.cloudiator.catalogue.client.ApiCallback; +import de.uulm.omi.cloudiator.catalogue.client.ApiClient; +import de.uulm.omi.cloudiator.catalogue.client.ApiException; +import de.uulm.omi.cloudiator.catalogue.client.ApiResponse; +import de.uulm.omi.cloudiator.catalogue.client.Configuration; +import de.uulm.omi.cloudiator.catalogue.client.Pair; +import de.uulm.omi.cloudiator.catalogue.client.ProgressRequestBody; +import de.uulm.omi.cloudiator.catalogue.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import de.uulm.omi.cloudiator.catalogue.client.model.Cloud; +import de.uulm.omi.cloudiator.catalogue.client.model.CloudiatorApplicationInstance; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseCluster; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseCrossCluster; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseSingle; +import de.uulm.omi.cloudiator.catalogue.client.model.Error; + +import java.lang.reflect.Type; + +public class DatabaseApi { + private ApiClient apiClient; + + public DatabaseApi() { + this(Configuration.getDefaultApiClient()); + } + + public DatabaseApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for databaseClusterPost + * @param name database name, needs to map an existing database application description (required) + * @param databaseComponents a set of database components (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call databaseClusterPostCall(String name, DatabaseCluster databaseComponents, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = databaseComponents; + + // create path and map variables + String localVarPath = "/database/cluster"; + + java.util.List localVarQueryParams = new java.util.ArrayList(); + java.util.List localVarCollectionQueryParams = new java.util.ArrayList(); + if (name != null) + localVarQueryParams.addAll(apiClient.parameterToPair("name", name)); + + java.util.Map localVarHeaderParams = new java.util.HashMap(); + + java.util.Map localVarFormParams = new java.util.HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call databaseClusterPostValidateBeforeCall(String name, DatabaseCluster databaseComponents, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling databaseClusterPost(Async)"); + } + + // verify the required parameter 'databaseComponents' is set + if (databaseComponents == null) { + throw new ApiException("Missing the required parameter 'databaseComponents' when calling databaseClusterPost(Async)"); + } + + + com.squareup.okhttp.Call call = databaseClusterPostCall(name, databaseComponents, progressListener, progressRequestListener); + return call; + + } + + /** + * DDBMS cluster deployment + * Deploy a database cluster in the multi-cloud + * @param name database name, needs to map an existing database application description (required) + * @param databaseComponents a set of database components (required) + * @return CloudiatorApplicationInstance + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CloudiatorApplicationInstance databaseClusterPost(String name, DatabaseCluster databaseComponents) throws ApiException { + ApiResponse resp = databaseClusterPostWithHttpInfo(name, databaseComponents); + return resp.getData(); + } + + /** + * DDBMS cluster deployment + * Deploy a database cluster in the multi-cloud + * @param name database name, needs to map an existing database application description (required) + * @param databaseComponents a set of database components (required) + * @return ApiResponse<CloudiatorApplicationInstance> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse databaseClusterPostWithHttpInfo(String name, DatabaseCluster databaseComponents) throws ApiException { + com.squareup.okhttp.Call call = databaseClusterPostValidateBeforeCall(name, databaseComponents, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * DDBMS cluster deployment (asynchronously) + * Deploy a database cluster in the multi-cloud + * @param name database name, needs to map an existing database application description (required) + * @param databaseComponents a set of database components (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call databaseClusterPostAsync(String name, DatabaseCluster databaseComponents, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = databaseClusterPostValidateBeforeCall(name, databaseComponents, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for databaseCrossClusterPost + * @param name database name, needs to map an existing database application description (required) + * @param databaseComponents a set of database components (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call databaseCrossClusterPostCall(String name, DatabaseCrossCluster databaseComponents, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = databaseComponents; + + // create path and map variables + String localVarPath = "/database/crossCluster"; + + java.util.List localVarQueryParams = new java.util.ArrayList(); + java.util.List localVarCollectionQueryParams = new java.util.ArrayList(); + if (name != null) + localVarQueryParams.addAll(apiClient.parameterToPair("name", name)); + + java.util.Map localVarHeaderParams = new java.util.HashMap(); + + java.util.Map localVarFormParams = new java.util.HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call databaseCrossClusterPostValidateBeforeCall(String name, DatabaseCrossCluster databaseComponents, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling databaseCrossClusterPost(Async)"); + } + + // verify the required parameter 'databaseComponents' is set + if (databaseComponents == null) { + throw new ApiException("Missing the required parameter 'databaseComponents' when calling databaseCrossClusterPost(Async)"); + } + + + com.squareup.okhttp.Call call = databaseCrossClusterPostCall(name, databaseComponents, progressListener, progressRequestListener); + return call; + + } + + /** + * DDBMS cluster deployment + * Deploy a database cluster in the multi-cloud + * @param name database name, needs to map an existing database application description (required) + * @param databaseComponents a set of database components (required) + * @return CloudiatorApplicationInstance + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CloudiatorApplicationInstance databaseCrossClusterPost(String name, DatabaseCrossCluster databaseComponents) throws ApiException { + ApiResponse resp = databaseCrossClusterPostWithHttpInfo(name, databaseComponents); + return resp.getData(); + } + + /** + * DDBMS cluster deployment + * Deploy a database cluster in the multi-cloud + * @param name database name, needs to map an existing database application description (required) + * @param databaseComponents a set of database components (required) + * @return ApiResponse<CloudiatorApplicationInstance> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse databaseCrossClusterPostWithHttpInfo(String name, DatabaseCrossCluster databaseComponents) throws ApiException { + com.squareup.okhttp.Call call = databaseCrossClusterPostValidateBeforeCall(name, databaseComponents, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * DDBMS cluster deployment (asynchronously) + * Deploy a database cluster in the multi-cloud + * @param name database name, needs to map an existing database application description (required) + * @param databaseComponents a set of database components (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call databaseCrossClusterPostAsync(String name, DatabaseCrossCluster databaseComponents, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = databaseCrossClusterPostValidateBeforeCall(name, databaseComponents, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for databaseSinglePost + * @param name database name, needs to map an existing database application description (required) + * @param databaseComponents a set of database components (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call databaseSinglePostCall(String name, DatabaseSingle databaseComponents, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = databaseComponents; + + // create path and map variables + String localVarPath = "/database/single"; + + java.util.List localVarQueryParams = new java.util.ArrayList(); + java.util.List localVarCollectionQueryParams = new java.util.ArrayList(); + if (name != null) + localVarQueryParams.addAll(apiClient.parameterToPair("name", name)); + + java.util.Map localVarHeaderParams = new java.util.HashMap(); + + java.util.Map localVarFormParams = new java.util.HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call databaseSinglePostValidateBeforeCall(String name, DatabaseSingle databaseComponents, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling databaseSinglePost(Async)"); + } + + // verify the required parameter 'databaseComponents' is set + if (databaseComponents == null) { + throw new ApiException("Missing the required parameter 'databaseComponents' when calling databaseSinglePost(Async)"); + } + + + com.squareup.okhttp.Call call = databaseSinglePostCall(name, databaseComponents, progressListener, progressRequestListener); + return call; + + } + + /** + * DDBMS cluster deployment + * Deploy a database cluster in the multi-cloud + * @param name database name, needs to map an existing database application description (required) + * @param databaseComponents a set of database components (required) + * @return CloudiatorApplicationInstance + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CloudiatorApplicationInstance databaseSinglePost(String name, DatabaseSingle databaseComponents) throws ApiException { + ApiResponse resp = databaseSinglePostWithHttpInfo(name, databaseComponents); + return resp.getData(); + } + + /** + * DDBMS cluster deployment + * Deploy a database cluster in the multi-cloud + * @param name database name, needs to map an existing database application description (required) + * @param databaseComponents a set of database components (required) + * @return ApiResponse<CloudiatorApplicationInstance> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse databaseSinglePostWithHttpInfo(String name, DatabaseSingle databaseComponents) throws ApiException { + com.squareup.okhttp.Call call = databaseSinglePostValidateBeforeCall(name, databaseComponents, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * DDBMS cluster deployment (asynchronously) + * Deploy a database cluster in the multi-cloud + * @param name database name, needs to map an existing database application description (required) + * @param databaseComponents a set of database components (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call databaseSinglePostAsync(String name, DatabaseSingle databaseComponents, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = databaseSinglePostValidateBeforeCall(name, databaseComponents, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for utilsRegisterCloudPost + * @param cloud cloud data required to enable it in cloudiator (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call utilsRegisterCloudPostCall(Cloud cloud, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = cloud; + + // create path and map variables + String localVarPath = "/utils/registerCloud"; + + java.util.List localVarQueryParams = new java.util.ArrayList(); + java.util.List localVarCollectionQueryParams = new java.util.ArrayList(); + + java.util.Map localVarHeaderParams = new java.util.HashMap(); + + java.util.Map localVarFormParams = new java.util.HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call utilsRegisterCloudPostValidateBeforeCall(Cloud cloud, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'cloud' is set + if (cloud == null) { + throw new ApiException("Missing the required parameter 'cloud' when calling utilsRegisterCloudPost(Async)"); + } + + + com.squareup.okhttp.Call call = utilsRegisterCloudPostCall(cloud, progressListener, progressRequestListener); + return call; + + } + + /** + * Register a new cloud as deployment target + * + * @param cloud cloud data required to enable it in cloudiator (required) + * @return java.util.List<CloudiatorApplicationInstance> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public java.util.List utilsRegisterCloudPost(Cloud cloud) throws ApiException { + ApiResponse> resp = utilsRegisterCloudPostWithHttpInfo(cloud); + return resp.getData(); + } + + /** + * Register a new cloud as deployment target + * + * @param cloud cloud data required to enable it in cloudiator (required) + * @return ApiResponse<java.util.List<CloudiatorApplicationInstance>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> utilsRegisterCloudPostWithHttpInfo(Cloud cloud) throws ApiException { + com.squareup.okhttp.Call call = utilsRegisterCloudPostValidateBeforeCall(cloud, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Register a new cloud as deployment target (asynchronously) + * + * @param cloud cloud data required to enable it in cloudiator (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call utilsRegisterCloudPostAsync(Cloud cloud, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = utilsRegisterCloudPostValidateBeforeCall(cloud, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/ScriptsApi.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/ScriptsApi.java new file mode 100644 index 0000000..bdcb71a --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/api/ScriptsApi.java @@ -0,0 +1,323 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.api; + +import de.uulm.omi.cloudiator.catalogue.client.ApiCallback; +import de.uulm.omi.cloudiator.catalogue.client.ApiClient; +import de.uulm.omi.cloudiator.catalogue.client.ApiException; +import de.uulm.omi.cloudiator.catalogue.client.ApiResponse; +import de.uulm.omi.cloudiator.catalogue.client.Configuration; +import de.uulm.omi.cloudiator.catalogue.client.Pair; +import de.uulm.omi.cloudiator.catalogue.client.ProgressRequestBody; +import de.uulm.omi.cloudiator.catalogue.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import java.io.File; + +import java.lang.reflect.Type; + +public class ScriptsApi { + private ApiClient apiClient; + + public ScriptsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ScriptsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for scriptsBigdataGet + * @param frameworkName the Big Data Framework name, e.g. Spark (required) + * @param scriptType setup script type (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call scriptsBigdataGetCall(String frameworkName, String scriptType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/scripts/bigdata"; + + java.util.List localVarQueryParams = new java.util.ArrayList(); + java.util.List localVarCollectionQueryParams = new java.util.ArrayList(); + if (frameworkName != null) + localVarQueryParams.addAll(apiClient.parameterToPair("frameworkName", frameworkName)); + if (scriptType != null) + localVarQueryParams.addAll(apiClient.parameterToPair("scriptType", scriptType)); + + java.util.Map localVarHeaderParams = new java.util.HashMap(); + + java.util.Map localVarFormParams = new java.util.HashMap(); + + final String[] localVarAccepts = { + "application/x-sh" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call scriptsBigdataGetValidateBeforeCall(String frameworkName, String scriptType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'frameworkName' is set + if (frameworkName == null) { + throw new ApiException("Missing the required parameter 'frameworkName' when calling scriptsBigdataGet(Async)"); + } + + // verify the required parameter 'scriptType' is set + if (scriptType == null) { + throw new ApiException("Missing the required parameter 'scriptType' when calling scriptsBigdataGet(Async)"); + } + + + com.squareup.okhttp.Call call = scriptsBigdataGetCall(frameworkName, scriptType, progressListener, progressRequestListener); + return call; + + } + + /** + * Get custom database installation scripts + * + * @param frameworkName the Big Data Framework name, e.g. Spark (required) + * @param scriptType setup script type (required) + * @return File + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public File scriptsBigdataGet(String frameworkName, String scriptType) throws ApiException { + ApiResponse resp = scriptsBigdataGetWithHttpInfo(frameworkName, scriptType); + return resp.getData(); + } + + /** + * Get custom database installation scripts + * + * @param frameworkName the Big Data Framework name, e.g. Spark (required) + * @param scriptType setup script type (required) + * @return ApiResponse<File> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse scriptsBigdataGetWithHttpInfo(String frameworkName, String scriptType) throws ApiException { + com.squareup.okhttp.Call call = scriptsBigdataGetValidateBeforeCall(frameworkName, scriptType, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get custom database installation scripts (asynchronously) + * + * @param frameworkName the Big Data Framework name, e.g. Spark (required) + * @param scriptType setup script type (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call scriptsBigdataGetAsync(String frameworkName, String scriptType, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = scriptsBigdataGetValidateBeforeCall(frameworkName, scriptType, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for scriptsDatabaseGet + * @param dbName database name (required) + * @param scriptType setup script type (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call scriptsDatabaseGetCall(String dbName, String scriptType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/scripts/database"; + + java.util.List localVarQueryParams = new java.util.ArrayList(); + java.util.List localVarCollectionQueryParams = new java.util.ArrayList(); + if (dbName != null) + localVarQueryParams.addAll(apiClient.parameterToPair("dbName", dbName)); + if (scriptType != null) + localVarQueryParams.addAll(apiClient.parameterToPair("scriptType", scriptType)); + + java.util.Map localVarHeaderParams = new java.util.HashMap(); + + java.util.Map localVarFormParams = new java.util.HashMap(); + + final String[] localVarAccepts = { + "application/x-sh" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call scriptsDatabaseGetValidateBeforeCall(String dbName, String scriptType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'dbName' is set + if (dbName == null) { + throw new ApiException("Missing the required parameter 'dbName' when calling scriptsDatabaseGet(Async)"); + } + + // verify the required parameter 'scriptType' is set + if (scriptType == null) { + throw new ApiException("Missing the required parameter 'scriptType' when calling scriptsDatabaseGet(Async)"); + } + + + com.squareup.okhttp.Call call = scriptsDatabaseGetCall(dbName, scriptType, progressListener, progressRequestListener); + return call; + + } + + /** + * Get custom database installation scripts + * + * @param dbName database name (required) + * @param scriptType setup script type (required) + * @return File + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public File scriptsDatabaseGet(String dbName, String scriptType) throws ApiException { + ApiResponse resp = scriptsDatabaseGetWithHttpInfo(dbName, scriptType); + return resp.getData(); + } + + /** + * Get custom database installation scripts + * + * @param dbName database name (required) + * @param scriptType setup script type (required) + * @return ApiResponse<File> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse scriptsDatabaseGetWithHttpInfo(String dbName, String scriptType) throws ApiException { + com.squareup.okhttp.Call call = scriptsDatabaseGetValidateBeforeCall(dbName, scriptType, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get custom database installation scripts (asynchronously) + * + * @param dbName database name (required) + * @param scriptType setup script type (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call scriptsDatabaseGetAsync(String dbName, String scriptType, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = scriptsDatabaseGetValidateBeforeCall(dbName, scriptType, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/ApiKeyAuth.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/ApiKeyAuth.java new file mode 100644 index 0000000..f300c77 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/ApiKeyAuth.java @@ -0,0 +1,75 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.auth; + +import de.uulm.omi.cloudiator.catalogue.client.Pair; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams) { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/Authentication.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/Authentication.java new file mode 100644 index 0000000..75b9f86 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/Authentication.java @@ -0,0 +1,29 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.auth; + +import de.uulm.omi.cloudiator.catalogue.client.Pair; + +import java.util.Map; +import java.util.List; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + */ + void applyToParams(List queryParams, Map headerParams); +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/HttpBasicAuth.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/HttpBasicAuth.java new file mode 100644 index 0000000..f1c6b33 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/HttpBasicAuth.java @@ -0,0 +1,54 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.auth; + +import de.uulm.omi.cloudiator.catalogue.client.Pair; + +import com.squareup.okhttp.Credentials; + +import java.util.Map; +import java.util.List; + +import java.io.UnsupportedEncodingException; + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams) { + if (username == null && password == null) { + return; + } + headerParams.put("Authorization", Credentials.basic( + username == null ? "" : username, + password == null ? "" : password)); + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/OAuth.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/OAuth.java new file mode 100644 index 0000000..cff57d2 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/OAuth.java @@ -0,0 +1,39 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.auth; + +import de.uulm.omi.cloudiator.catalogue.client.Pair; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class OAuth implements Authentication { + private String accessToken; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams) { + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken); + } + } +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/OAuthFlow.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/OAuthFlow.java new file mode 100644 index 0000000..4c32395 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/auth/OAuthFlow.java @@ -0,0 +1,18 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.auth; + +public enum OAuthFlow { + accessCode, implicit, password, application +} diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Cloud.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Cloud.java new file mode 100644 index 0000000..ddf0650 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Cloud.java @@ -0,0 +1,139 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Cloud + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class Cloud { + @SerializedName("endpoint") + private String endpoint = null; + + @SerializedName("user") + private String user = null; + + @SerializedName("password") + private String password = null; + + public Cloud endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Get endpoint + * @return endpoint + **/ + @ApiModelProperty(value = "") + public String getEndpoint() { + return endpoint; + } + + public void setEndpoint(String endpoint) { + this.endpoint = endpoint; + } + + public Cloud user(String user) { + this.user = user; + return this; + } + + /** + * Get user + * @return user + **/ + @ApiModelProperty(value = "") + public String getUser() { + return user; + } + + public void setUser(String user) { + this.user = user; + } + + public Cloud password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @ApiModelProperty(value = "") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cloud cloud = (Cloud) o; + return Objects.equals(this.endpoint, cloud.endpoint) && + Objects.equals(this.user, cloud.user) && + Objects.equals(this.password, cloud.password); + } + + @Override + public int hashCode() { + return Objects.hash(endpoint, user, password); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cloud {\n"); + + sb.append(" endpoint: ").append(toIndentedString(endpoint)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CloudiatorApplicationInstance.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CloudiatorApplicationInstance.java new file mode 100644 index 0000000..d2fd4a9 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CloudiatorApplicationInstance.java @@ -0,0 +1,94 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * the Cloudiator applicationInstanceId for further interactions with the application instance, e.g. getting application components details, scale application components + */ +@ApiModel(description = "the Cloudiator applicationInstanceId for further interactions with the application instance, e.g. getting application components details, scale application components") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class CloudiatorApplicationInstance { + @SerializedName("applicationInstanceId") + private String applicationInstanceId = null; + + public CloudiatorApplicationInstance applicationInstanceId(String applicationInstanceId) { + this.applicationInstanceId = applicationInstanceId; + return this; + } + + /** + * Unique identifier representing a specific applicationInstance in Cloudiator + * @return applicationInstanceId + **/ + @ApiModelProperty(value = "Unique identifier representing a specific applicationInstance in Cloudiator") + public String getApplicationInstanceId() { + return applicationInstanceId; + } + + public void setApplicationInstanceId(String applicationInstanceId) { + this.applicationInstanceId = applicationInstanceId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloudiatorApplicationInstance cloudiatorApplicationInstance = (CloudiatorApplicationInstance) o; + return Objects.equals(this.applicationInstanceId, cloudiatorApplicationInstance.applicationInstanceId); + } + + @Override + public int hashCode() { + return Objects.hash(applicationInstanceId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudiatorApplicationInstance {\n"); + + sb.append(" applicationInstanceId: ").append(toIndentedString(applicationInstanceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Cluster.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Cluster.java new file mode 100644 index 0000000..9a3564a --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Cluster.java @@ -0,0 +1,126 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.SparkMasterComponent; +import de.uulm.omi.cloudiator.catalogue.client.model.SparkWorkerComponent; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Cluster + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class Cluster { + @SerializedName("sparkMasterComponent") + private SparkMasterComponent sparkMasterComponent = null; + + @SerializedName("sparkWorkerComponents") + private java.util.List sparkWorkerComponents = null; + + public Cluster sparkMasterComponent(SparkMasterComponent sparkMasterComponent) { + this.sparkMasterComponent = sparkMasterComponent; + return this; + } + + /** + * Get sparkMasterComponent + * @return sparkMasterComponent + **/ + @ApiModelProperty(value = "") + public SparkMasterComponent getSparkMasterComponent() { + return sparkMasterComponent; + } + + public void setSparkMasterComponent(SparkMasterComponent sparkMasterComponent) { + this.sparkMasterComponent = sparkMasterComponent; + } + + public Cluster sparkWorkerComponents(java.util.List sparkWorkerComponents) { + this.sparkWorkerComponents = sparkWorkerComponents; + return this; + } + + public Cluster addSparkWorkerComponentsItem(SparkWorkerComponent sparkWorkerComponentsItem) { + if (this.sparkWorkerComponents == null) { + this.sparkWorkerComponents = new java.util.ArrayList<>(); + } + this.sparkWorkerComponents.add(sparkWorkerComponentsItem); + return this; + } + + /** + * Get sparkWorkerComponents + * @return sparkWorkerComponents + **/ + @ApiModelProperty(value = "") + public java.util.List getSparkWorkerComponents() { + return sparkWorkerComponents; + } + + public void setSparkWorkerComponents(java.util.List sparkWorkerComponents) { + this.sparkWorkerComponents = sparkWorkerComponents; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cluster cluster = (Cluster) o; + return Objects.equals(this.sparkMasterComponent, cluster.sparkMasterComponent) && + Objects.equals(this.sparkWorkerComponents, cluster.sparkWorkerComponents); + } + + @Override + public int hashCode() { + return Objects.hash(sparkMasterComponent, sparkWorkerComponents); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cluster {\n"); + + sb.append(" sparkMasterComponent: ").append(toIndentedString(sparkMasterComponent)).append("\n"); + sb.append(" sparkWorkerComponents: ").append(toIndentedString(sparkWorkerComponents)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/ClusterConfiguration.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/ClusterConfiguration.java new file mode 100644 index 0000000..e19dc9b --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/ClusterConfiguration.java @@ -0,0 +1,93 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ClusterConfiguration + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class ClusterConfiguration { + @SerializedName("clusterPort") + private Integer clusterPort = null; + + public ClusterConfiguration clusterPort(Integer clusterPort) { + this.clusterPort = clusterPort; + return this; + } + + /** + * port to connect to a cluster + * @return clusterPort + **/ + @ApiModelProperty(value = "port to connect to a cluster") + public Integer getClusterPort() { + return clusterPort; + } + + public void setClusterPort(Integer clusterPort) { + this.clusterPort = clusterPort; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClusterConfiguration clusterConfiguration = (ClusterConfiguration) o; + return Objects.equals(this.clusterPort, clusterConfiguration.clusterPort); + } + + @Override + public int hashCode() { + return Objects.hash(clusterPort); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClusterConfiguration {\n"); + + sb.append(" clusterPort: ").append(toIndentedString(clusterPort)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Component.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Component.java new file mode 100644 index 0000000..ceb8687 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Component.java @@ -0,0 +1,117 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.VM; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Component + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class Component { + @SerializedName("instances") + private Integer instances = null; + + @SerializedName("resource") + private VM resource = null; + + public Component instances(Integer instances) { + this.instances = instances; + return this; + } + + /** + * number of component instances + * @return instances + **/ + @ApiModelProperty(value = "number of component instances") + public Integer getInstances() { + return instances; + } + + public void setInstances(Integer instances) { + this.instances = instances; + } + + public Component resource(VM resource) { + this.resource = resource; + return this; + } + + /** + * Get resource + * @return resource + **/ + @ApiModelProperty(value = "") + public VM getResource() { + return resource; + } + + public void setResource(VM resource) { + this.resource = resource; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Component component = (Component) o; + return Objects.equals(this.instances, component.instances) && + Objects.equals(this.resource, component.resource); + } + + @Override + public int hashCode() { + return Objects.hash(instances, resource); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Component {\n"); + + sb.append(" instances: ").append(toIndentedString(instances)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CrossClusterConfiguration.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CrossClusterConfiguration.java new file mode 100644 index 0000000..d99f0c2 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CrossClusterConfiguration.java @@ -0,0 +1,93 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CrossClusterConfiguration + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class CrossClusterConfiguration { + @SerializedName("crossClusterPort") + private Integer crossClusterPort = null; + + public CrossClusterConfiguration crossClusterPort(Integer crossClusterPort) { + this.crossClusterPort = crossClusterPort; + return this; + } + + /** + * port to connect across multiple clusters + * @return crossClusterPort + **/ + @ApiModelProperty(value = "port to connect across multiple clusters") + public Integer getCrossClusterPort() { + return crossClusterPort; + } + + public void setCrossClusterPort(Integer crossClusterPort) { + this.crossClusterPort = crossClusterPort; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CrossClusterConfiguration crossClusterConfiguration = (CrossClusterConfiguration) o; + return Objects.equals(this.crossClusterPort, crossClusterConfiguration.crossClusterPort); + } + + @Override + public int hashCode() { + return Objects.hash(crossClusterPort); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CrossClusterConfiguration {\n"); + + sb.append(" crossClusterPort: ").append(toIndentedString(crossClusterPort)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CrossDatabaseDataComponent.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CrossDatabaseDataComponent.java new file mode 100644 index 0000000..682423a --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CrossDatabaseDataComponent.java @@ -0,0 +1,190 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.CustomConfiguration; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseDataComponent; +import de.uulm.omi.cloudiator.catalogue.client.model.NodeConfiguration; +import de.uulm.omi.cloudiator.catalogue.client.model.VM; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * A data component of a cross-DDBMS, requires existing seed and CrossDatabaseSeedComponents + */ +@ApiModel(description = "A data component of a cross-DDBMS, requires existing seed and CrossDatabaseSeedComponents") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class CrossDatabaseDataComponent { + @SerializedName("instances") + private Integer instances = null; + + @SerializedName("resource") + private VM resource = null; + + @SerializedName("name") + private String name = "seed"; + + @SerializedName("nodeConfiguration") + private NodeConfiguration nodeConfiguration = null; + + @SerializedName("customConfiguration") + private CustomConfiguration customConfiguration = null; + + public CrossDatabaseDataComponent instances(Integer instances) { + this.instances = instances; + return this; + } + + /** + * number of component instances + * @return instances + **/ + @ApiModelProperty(value = "number of component instances") + public Integer getInstances() { + return instances; + } + + public void setInstances(Integer instances) { + this.instances = instances; + } + + public CrossDatabaseDataComponent resource(VM resource) { + this.resource = resource; + return this; + } + + /** + * Get resource + * @return resource + **/ + @ApiModelProperty(value = "") + public VM getResource() { + return resource; + } + + public void setResource(VM resource) { + this.resource = resource; + } + + public CrossDatabaseDataComponent name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(value = "") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CrossDatabaseDataComponent nodeConfiguration(NodeConfiguration nodeConfiguration) { + this.nodeConfiguration = nodeConfiguration; + return this; + } + + /** + * Get nodeConfiguration + * @return nodeConfiguration + **/ + @ApiModelProperty(value = "") + public NodeConfiguration getNodeConfiguration() { + return nodeConfiguration; + } + + public void setNodeConfiguration(NodeConfiguration nodeConfiguration) { + this.nodeConfiguration = nodeConfiguration; + } + + public CrossDatabaseDataComponent customConfiguration(CustomConfiguration customConfiguration) { + this.customConfiguration = customConfiguration; + return this; + } + + /** + * Get customConfiguration + * @return customConfiguration + **/ + @ApiModelProperty(value = "") + public CustomConfiguration getCustomConfiguration() { + return customConfiguration; + } + + public void setCustomConfiguration(CustomConfiguration customConfiguration) { + this.customConfiguration = customConfiguration; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CrossDatabaseDataComponent crossDatabaseDataComponent = (CrossDatabaseDataComponent) o; + return Objects.equals(this.instances, crossDatabaseDataComponent.instances) && + Objects.equals(this.resource, crossDatabaseDataComponent.resource) && + Objects.equals(this.name, crossDatabaseDataComponent.name) && + Objects.equals(this.nodeConfiguration, crossDatabaseDataComponent.nodeConfiguration) && + Objects.equals(this.customConfiguration, crossDatabaseDataComponent.customConfiguration); + } + + @Override + public int hashCode() { + return Objects.hash(instances, resource, name, nodeConfiguration, customConfiguration); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CrossDatabaseDataComponent {\n"); + + sb.append(" instances: ").append(toIndentedString(instances)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" nodeConfiguration: ").append(toIndentedString(nodeConfiguration)).append("\n"); + sb.append(" customConfiguration: ").append(toIndentedString(customConfiguration)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CrossDatabaseSeedComponent.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CrossDatabaseSeedComponent.java new file mode 100644 index 0000000..a831aa9 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CrossDatabaseSeedComponent.java @@ -0,0 +1,259 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.CrossClusterConfiguration; +import de.uulm.omi.cloudiator.catalogue.client.model.CustomConfiguration; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseSeedComponent; +import de.uulm.omi.cloudiator.catalogue.client.model.NodeConfiguration; +import de.uulm.omi.cloudiator.catalogue.client.model.VM; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * A seed component of a cross-DDBMS, provides the cluster entrypoint for DatabaseDataComponents and CrossDatabaseDataComponent + */ +@ApiModel(description = "A seed component of a cross-DDBMS, provides the cluster entrypoint for DatabaseDataComponents and CrossDatabaseDataComponent") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class CrossDatabaseSeedComponent { + @SerializedName("instances") + private Integer instances = null; + + @SerializedName("resource") + private VM resource = null; + + /** + * Gets or Sets name + */ + @JsonAdapter(NameEnum.Adapter.class) + public enum NameEnum { + SEED("SEED"); + + private String value; + + NameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static NameEnum fromValue(String text) { + for (NameEnum b : NameEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final NameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return NameEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("name") + private NameEnum name = null; + + @SerializedName("nodeConfiguration") + private NodeConfiguration nodeConfiguration = null; + + @SerializedName("customConfiguration") + private CustomConfiguration customConfiguration = null; + + @SerializedName("crossClusterConfiguration") + private CrossClusterConfiguration crossClusterConfiguration = null; + + public CrossDatabaseSeedComponent instances(Integer instances) { + this.instances = instances; + return this; + } + + /** + * number of component instances + * @return instances + **/ + @ApiModelProperty(value = "number of component instances") + public Integer getInstances() { + return instances; + } + + public void setInstances(Integer instances) { + this.instances = instances; + } + + public CrossDatabaseSeedComponent resource(VM resource) { + this.resource = resource; + return this; + } + + /** + * Get resource + * @return resource + **/ + @ApiModelProperty(value = "") + public VM getResource() { + return resource; + } + + public void setResource(VM resource) { + this.resource = resource; + } + + public CrossDatabaseSeedComponent name(NameEnum name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(value = "") + public NameEnum getName() { + return name; + } + + public void setName(NameEnum name) { + this.name = name; + } + + public CrossDatabaseSeedComponent nodeConfiguration(NodeConfiguration nodeConfiguration) { + this.nodeConfiguration = nodeConfiguration; + return this; + } + + /** + * Get nodeConfiguration + * @return nodeConfiguration + **/ + @ApiModelProperty(value = "") + public NodeConfiguration getNodeConfiguration() { + return nodeConfiguration; + } + + public void setNodeConfiguration(NodeConfiguration nodeConfiguration) { + this.nodeConfiguration = nodeConfiguration; + } + + public CrossDatabaseSeedComponent customConfiguration(CustomConfiguration customConfiguration) { + this.customConfiguration = customConfiguration; + return this; + } + + /** + * Get customConfiguration + * @return customConfiguration + **/ + @ApiModelProperty(value = "") + public CustomConfiguration getCustomConfiguration() { + return customConfiguration; + } + + public void setCustomConfiguration(CustomConfiguration customConfiguration) { + this.customConfiguration = customConfiguration; + } + + public CrossDatabaseSeedComponent crossClusterConfiguration(CrossClusterConfiguration crossClusterConfiguration) { + this.crossClusterConfiguration = crossClusterConfiguration; + return this; + } + + /** + * Get crossClusterConfiguration + * @return crossClusterConfiguration + **/ + @ApiModelProperty(value = "") + public CrossClusterConfiguration getCrossClusterConfiguration() { + return crossClusterConfiguration; + } + + public void setCrossClusterConfiguration(CrossClusterConfiguration crossClusterConfiguration) { + this.crossClusterConfiguration = crossClusterConfiguration; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CrossDatabaseSeedComponent crossDatabaseSeedComponent = (CrossDatabaseSeedComponent) o; + return Objects.equals(this.instances, crossDatabaseSeedComponent.instances) && + Objects.equals(this.resource, crossDatabaseSeedComponent.resource) && + Objects.equals(this.name, crossDatabaseSeedComponent.name) && + Objects.equals(this.nodeConfiguration, crossDatabaseSeedComponent.nodeConfiguration) && + Objects.equals(this.customConfiguration, crossDatabaseSeedComponent.customConfiguration) && + Objects.equals(this.crossClusterConfiguration, crossDatabaseSeedComponent.crossClusterConfiguration); + } + + @Override + public int hashCode() { + return Objects.hash(instances, resource, name, nodeConfiguration, customConfiguration, crossClusterConfiguration); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CrossDatabaseSeedComponent {\n"); + + sb.append(" instances: ").append(toIndentedString(instances)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" nodeConfiguration: ").append(toIndentedString(nodeConfiguration)).append("\n"); + sb.append(" customConfiguration: ").append(toIndentedString(customConfiguration)).append("\n"); + sb.append(" crossClusterConfiguration: ").append(toIndentedString(crossClusterConfiguration)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CustomConfiguration.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CustomConfiguration.java new file mode 100644 index 0000000..fefe43c --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CustomConfiguration.java @@ -0,0 +1,65 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import de.uulm.omi.cloudiator.catalogue.client.model.CustomConfigurationItem; +import io.swagger.annotations.ApiModel; + +/** + * a set of custom configuration items, the LCA scripts need to be aware of + */ +@ApiModel(description = "a set of custom configuration items, the LCA scripts need to be aware of") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class CustomConfiguration extends java.util.ArrayList { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomConfiguration {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CustomConfigurationItem.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CustomConfigurationItem.java new file mode 100644 index 0000000..06a621f --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/CustomConfigurationItem.java @@ -0,0 +1,116 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CustomConfigurationItem + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class CustomConfigurationItem { + @SerializedName("envName") + private String envName = null; + + @SerializedName("envValue") + private String envValue = null; + + public CustomConfigurationItem envName(String envName) { + this.envName = envName; + return this; + } + + /** + * environment variable name + * @return envName + **/ + @ApiModelProperty(value = "environment variable name") + public String getEnvName() { + return envName; + } + + public void setEnvName(String envName) { + this.envName = envName; + } + + public CustomConfigurationItem envValue(String envValue) { + this.envValue = envValue; + return this; + } + + /** + * environment variable value + * @return envValue + **/ + @ApiModelProperty(value = "environment variable value") + public String getEnvValue() { + return envValue; + } + + public void setEnvValue(String envValue) { + this.envValue = envValue; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomConfigurationItem customConfigurationItem = (CustomConfigurationItem) o; + return Objects.equals(this.envName, customConfigurationItem.envName) && + Objects.equals(this.envValue, customConfigurationItem.envValue); + } + + @Override + public int hashCode() { + return Objects.hash(envName, envValue); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomConfigurationItem {\n"); + + sb.append(" envName: ").append(toIndentedString(envName)).append("\n"); + sb.append(" envValue: ").append(toIndentedString(envValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DataMemory.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DataMemory.java new file mode 100644 index 0000000..45d706b --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DataMemory.java @@ -0,0 +1,161 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * DataMemory + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class DataMemory { + /** + * environment variable name + */ + @JsonAdapter(EnvNameEnum.Adapter.class) + public enum EnvNameEnum { + DATAMEMORY("DATAMEMORY"); + + private String value; + + EnvNameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EnvNameEnum fromValue(String text) { + for (EnvNameEnum b : EnvNameEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EnvNameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EnvNameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EnvNameEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("envName") + private EnvNameEnum envName = null; + + @SerializedName("envValue") + private String envValue = null; + + public DataMemory envName(EnvNameEnum envName) { + this.envName = envName; + return this; + } + + /** + * environment variable name + * @return envName + **/ + @ApiModelProperty(value = "environment variable name") + public EnvNameEnum getEnvName() { + return envName; + } + + public void setEnvName(EnvNameEnum envName) { + this.envName = envName; + } + + public DataMemory envValue(String envValue) { + this.envValue = envValue; + return this; + } + + /** + * amount of RAM to allocate for data caching + * @return envValue + **/ + @ApiModelProperty(value = "amount of RAM to allocate for data caching") + public String getEnvValue() { + return envValue; + } + + public void setEnvValue(String envValue) { + this.envValue = envValue; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataMemory dataMemory = (DataMemory) o; + return Objects.equals(this.envName, dataMemory.envName) && + Objects.equals(this.envValue, dataMemory.envValue); + } + + @Override + public int hashCode() { + return Objects.hash(envName, envValue); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataMemory {\n"); + + sb.append(" envName: ").append(toIndentedString(envName)).append("\n"); + sb.append(" envValue: ").append(toIndentedString(envValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseCluster.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseCluster.java new file mode 100644 index 0000000..c69a9cd --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseCluster.java @@ -0,0 +1,167 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseDataComponent; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseManagementComponent; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseSeedComponent; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * todo + */ +@ApiModel(description = "todo") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class DatabaseCluster { + @SerializedName("databaseDataComponent") + private java.util.List databaseDataComponent = null; + + @SerializedName("databaseSeedComponent") + private java.util.List databaseSeedComponent = null; + + @SerializedName("databaseManagementComponent") + private java.util.List databaseManagementComponent = null; + + public DatabaseCluster databaseDataComponent(java.util.List databaseDataComponent) { + this.databaseDataComponent = databaseDataComponent; + return this; + } + + public DatabaseCluster addDatabaseDataComponentItem(DatabaseDataComponent databaseDataComponentItem) { + if (this.databaseDataComponent == null) { + this.databaseDataComponent = new java.util.ArrayList<>(); + } + this.databaseDataComponent.add(databaseDataComponentItem); + return this; + } + + /** + * Get databaseDataComponent + * @return databaseDataComponent + **/ + @ApiModelProperty(value = "") + public java.util.List getDatabaseDataComponent() { + return databaseDataComponent; + } + + public void setDatabaseDataComponent(java.util.List databaseDataComponent) { + this.databaseDataComponent = databaseDataComponent; + } + + public DatabaseCluster databaseSeedComponent(java.util.List databaseSeedComponent) { + this.databaseSeedComponent = databaseSeedComponent; + return this; + } + + public DatabaseCluster addDatabaseSeedComponentItem(DatabaseSeedComponent databaseSeedComponentItem) { + if (this.databaseSeedComponent == null) { + this.databaseSeedComponent = new java.util.ArrayList<>(); + } + this.databaseSeedComponent.add(databaseSeedComponentItem); + return this; + } + + /** + * Get databaseSeedComponent + * @return databaseSeedComponent + **/ + @ApiModelProperty(value = "") + public java.util.List getDatabaseSeedComponent() { + return databaseSeedComponent; + } + + public void setDatabaseSeedComponent(java.util.List databaseSeedComponent) { + this.databaseSeedComponent = databaseSeedComponent; + } + + public DatabaseCluster databaseManagementComponent(java.util.List databaseManagementComponent) { + this.databaseManagementComponent = databaseManagementComponent; + return this; + } + + public DatabaseCluster addDatabaseManagementComponentItem(DatabaseManagementComponent databaseManagementComponentItem) { + if (this.databaseManagementComponent == null) { + this.databaseManagementComponent = new java.util.ArrayList<>(); + } + this.databaseManagementComponent.add(databaseManagementComponentItem); + return this; + } + + /** + * Get databaseManagementComponent + * @return databaseManagementComponent + **/ + @ApiModelProperty(value = "") + public java.util.List getDatabaseManagementComponent() { + return databaseManagementComponent; + } + + public void setDatabaseManagementComponent(java.util.List databaseManagementComponent) { + this.databaseManagementComponent = databaseManagementComponent; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabaseCluster databaseCluster = (DatabaseCluster) o; + return Objects.equals(this.databaseDataComponent, databaseCluster.databaseDataComponent) && + Objects.equals(this.databaseSeedComponent, databaseCluster.databaseSeedComponent) && + Objects.equals(this.databaseManagementComponent, databaseCluster.databaseManagementComponent); + } + + @Override + public int hashCode() { + return Objects.hash(databaseDataComponent, databaseSeedComponent, databaseManagementComponent); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabaseCluster {\n"); + + sb.append(" databaseDataComponent: ").append(toIndentedString(databaseDataComponent)).append("\n"); + sb.append(" databaseSeedComponent: ").append(toIndentedString(databaseSeedComponent)).append("\n"); + sb.append(" databaseManagementComponent: ").append(toIndentedString(databaseManagementComponent)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseConfiguration.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseConfiguration.java new file mode 100644 index 0000000..06dcb51 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseConfiguration.java @@ -0,0 +1,139 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * DatabaseConfiguration + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class DatabaseConfiguration { + @SerializedName("databaseName") + private String databaseName = null; + + @SerializedName("databaseUser") + private String databaseUser = null; + + @SerializedName("databasePassword") + private String databasePassword = null; + + public DatabaseConfiguration databaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * database name + * @return databaseName + **/ + @ApiModelProperty(value = "database name") + public String getDatabaseName() { + return databaseName; + } + + public void setDatabaseName(String databaseName) { + this.databaseName = databaseName; + } + + public DatabaseConfiguration databaseUser(String databaseUser) { + this.databaseUser = databaseUser; + return this; + } + + /** + * database user name + * @return databaseUser + **/ + @ApiModelProperty(value = "database user name") + public String getDatabaseUser() { + return databaseUser; + } + + public void setDatabaseUser(String databaseUser) { + this.databaseUser = databaseUser; + } + + public DatabaseConfiguration databasePassword(String databasePassword) { + this.databasePassword = databasePassword; + return this; + } + + /** + * database password + * @return databasePassword + **/ + @ApiModelProperty(value = "database password") + public String getDatabasePassword() { + return databasePassword; + } + + public void setDatabasePassword(String databasePassword) { + this.databasePassword = databasePassword; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabaseConfiguration databaseConfiguration = (DatabaseConfiguration) o; + return Objects.equals(this.databaseName, databaseConfiguration.databaseName) && + Objects.equals(this.databaseUser, databaseConfiguration.databaseUser) && + Objects.equals(this.databasePassword, databaseConfiguration.databasePassword); + } + + @Override + public int hashCode() { + return Objects.hash(databaseName, databaseUser, databasePassword); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabaseConfiguration {\n"); + + sb.append(" databaseName: ").append(toIndentedString(databaseName)).append("\n"); + sb.append(" databaseUser: ").append(toIndentedString(databaseUser)).append("\n"); + sb.append(" databasePassword: ").append(toIndentedString(databasePassword)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseCrossCluster.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseCrossCluster.java new file mode 100644 index 0000000..1772386 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseCrossCluster.java @@ -0,0 +1,231 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.CrossDatabaseDataComponent; +import de.uulm.omi.cloudiator.catalogue.client.model.CrossDatabaseSeedComponent; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseDataComponent; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseManagementComponent; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseSeedComponent; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * todo + */ +@ApiModel(description = "todo") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class DatabaseCrossCluster { + @SerializedName("databaseDataComponent") + private java.util.List databaseDataComponent = null; + + @SerializedName("databaseSeedComponent") + private java.util.List databaseSeedComponent = null; + + @SerializedName("databaseManagementComponent") + private java.util.List databaseManagementComponent = null; + + @SerializedName("crossDatabaseDataComponent") + private java.util.List crossDatabaseDataComponent = null; + + @SerializedName("crossDatabaseSeedComponent") + private java.util.List crossDatabaseSeedComponent = null; + + public DatabaseCrossCluster databaseDataComponent(java.util.List databaseDataComponent) { + this.databaseDataComponent = databaseDataComponent; + return this; + } + + public DatabaseCrossCluster addDatabaseDataComponentItem(DatabaseDataComponent databaseDataComponentItem) { + if (this.databaseDataComponent == null) { + this.databaseDataComponent = new java.util.ArrayList<>(); + } + this.databaseDataComponent.add(databaseDataComponentItem); + return this; + } + + /** + * Get databaseDataComponent + * @return databaseDataComponent + **/ + @ApiModelProperty(value = "") + public java.util.List getDatabaseDataComponent() { + return databaseDataComponent; + } + + public void setDatabaseDataComponent(java.util.List databaseDataComponent) { + this.databaseDataComponent = databaseDataComponent; + } + + public DatabaseCrossCluster databaseSeedComponent(java.util.List databaseSeedComponent) { + this.databaseSeedComponent = databaseSeedComponent; + return this; + } + + public DatabaseCrossCluster addDatabaseSeedComponentItem(DatabaseSeedComponent databaseSeedComponentItem) { + if (this.databaseSeedComponent == null) { + this.databaseSeedComponent = new java.util.ArrayList<>(); + } + this.databaseSeedComponent.add(databaseSeedComponentItem); + return this; + } + + /** + * Get databaseSeedComponent + * @return databaseSeedComponent + **/ + @ApiModelProperty(value = "") + public java.util.List getDatabaseSeedComponent() { + return databaseSeedComponent; + } + + public void setDatabaseSeedComponent(java.util.List databaseSeedComponent) { + this.databaseSeedComponent = databaseSeedComponent; + } + + public DatabaseCrossCluster databaseManagementComponent(java.util.List databaseManagementComponent) { + this.databaseManagementComponent = databaseManagementComponent; + return this; + } + + public DatabaseCrossCluster addDatabaseManagementComponentItem(DatabaseManagementComponent databaseManagementComponentItem) { + if (this.databaseManagementComponent == null) { + this.databaseManagementComponent = new java.util.ArrayList<>(); + } + this.databaseManagementComponent.add(databaseManagementComponentItem); + return this; + } + + /** + * Get databaseManagementComponent + * @return databaseManagementComponent + **/ + @ApiModelProperty(value = "") + public java.util.List getDatabaseManagementComponent() { + return databaseManagementComponent; + } + + public void setDatabaseManagementComponent(java.util.List databaseManagementComponent) { + this.databaseManagementComponent = databaseManagementComponent; + } + + public DatabaseCrossCluster crossDatabaseDataComponent(java.util.List crossDatabaseDataComponent) { + this.crossDatabaseDataComponent = crossDatabaseDataComponent; + return this; + } + + public DatabaseCrossCluster addCrossDatabaseDataComponentItem(CrossDatabaseDataComponent crossDatabaseDataComponentItem) { + if (this.crossDatabaseDataComponent == null) { + this.crossDatabaseDataComponent = new java.util.ArrayList<>(); + } + this.crossDatabaseDataComponent.add(crossDatabaseDataComponentItem); + return this; + } + + /** + * Get crossDatabaseDataComponent + * @return crossDatabaseDataComponent + **/ + @ApiModelProperty(value = "") + public java.util.List getCrossDatabaseDataComponent() { + return crossDatabaseDataComponent; + } + + public void setCrossDatabaseDataComponent(java.util.List crossDatabaseDataComponent) { + this.crossDatabaseDataComponent = crossDatabaseDataComponent; + } + + public DatabaseCrossCluster crossDatabaseSeedComponent(java.util.List crossDatabaseSeedComponent) { + this.crossDatabaseSeedComponent = crossDatabaseSeedComponent; + return this; + } + + public DatabaseCrossCluster addCrossDatabaseSeedComponentItem(CrossDatabaseSeedComponent crossDatabaseSeedComponentItem) { + if (this.crossDatabaseSeedComponent == null) { + this.crossDatabaseSeedComponent = new java.util.ArrayList<>(); + } + this.crossDatabaseSeedComponent.add(crossDatabaseSeedComponentItem); + return this; + } + + /** + * Get crossDatabaseSeedComponent + * @return crossDatabaseSeedComponent + **/ + @ApiModelProperty(value = "") + public java.util.List getCrossDatabaseSeedComponent() { + return crossDatabaseSeedComponent; + } + + public void setCrossDatabaseSeedComponent(java.util.List crossDatabaseSeedComponent) { + this.crossDatabaseSeedComponent = crossDatabaseSeedComponent; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabaseCrossCluster databaseCrossCluster = (DatabaseCrossCluster) o; + return Objects.equals(this.databaseDataComponent, databaseCrossCluster.databaseDataComponent) && + Objects.equals(this.databaseSeedComponent, databaseCrossCluster.databaseSeedComponent) && + Objects.equals(this.databaseManagementComponent, databaseCrossCluster.databaseManagementComponent) && + Objects.equals(this.crossDatabaseDataComponent, databaseCrossCluster.crossDatabaseDataComponent) && + Objects.equals(this.crossDatabaseSeedComponent, databaseCrossCluster.crossDatabaseSeedComponent); + } + + @Override + public int hashCode() { + return Objects.hash(databaseDataComponent, databaseSeedComponent, databaseManagementComponent, crossDatabaseDataComponent, crossDatabaseSeedComponent); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabaseCrossCluster {\n"); + + sb.append(" databaseDataComponent: ").append(toIndentedString(databaseDataComponent)).append("\n"); + sb.append(" databaseSeedComponent: ").append(toIndentedString(databaseSeedComponent)).append("\n"); + sb.append(" databaseManagementComponent: ").append(toIndentedString(databaseManagementComponent)).append("\n"); + sb.append(" crossDatabaseDataComponent: ").append(toIndentedString(crossDatabaseDataComponent)).append("\n"); + sb.append(" crossDatabaseSeedComponent: ").append(toIndentedString(crossDatabaseSeedComponent)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseDataComponent.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseDataComponent.java new file mode 100644 index 0000000..30e293f --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseDataComponent.java @@ -0,0 +1,235 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.Component; +import de.uulm.omi.cloudiator.catalogue.client.model.CustomConfiguration; +import de.uulm.omi.cloudiator.catalogue.client.model.NodeConfiguration; +import de.uulm.omi.cloudiator.catalogue.client.model.VM; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * A data component of a DDBMS, requires existing seed components + */ +@ApiModel(description = "A data component of a DDBMS, requires existing seed components") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class DatabaseDataComponent { + @SerializedName("instances") + private Integer instances = null; + + @SerializedName("resource") + private VM resource = null; + + /** + * Gets or Sets name + */ + @JsonAdapter(NameEnum.Adapter.class) + public enum NameEnum { + DATA("DATA"); + + private String value; + + NameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static NameEnum fromValue(String text) { + for (NameEnum b : NameEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final NameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return NameEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("name") + private NameEnum name = null; + + @SerializedName("nodeConfiguration") + private NodeConfiguration nodeConfiguration = null; + + @SerializedName("customConfiguration") + private CustomConfiguration customConfiguration = null; + + public DatabaseDataComponent instances(Integer instances) { + this.instances = instances; + return this; + } + + /** + * number of component instances + * @return instances + **/ + @ApiModelProperty(value = "number of component instances") + public Integer getInstances() { + return instances; + } + + public void setInstances(Integer instances) { + this.instances = instances; + } + + public DatabaseDataComponent resource(VM resource) { + this.resource = resource; + return this; + } + + /** + * Get resource + * @return resource + **/ + @ApiModelProperty(value = "") + public VM getResource() { + return resource; + } + + public void setResource(VM resource) { + this.resource = resource; + } + + public DatabaseDataComponent name(NameEnum name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(value = "") + public NameEnum getName() { + return name; + } + + public void setName(NameEnum name) { + this.name = name; + } + + public DatabaseDataComponent nodeConfiguration(NodeConfiguration nodeConfiguration) { + this.nodeConfiguration = nodeConfiguration; + return this; + } + + /** + * Get nodeConfiguration + * @return nodeConfiguration + **/ + @ApiModelProperty(value = "") + public NodeConfiguration getNodeConfiguration() { + return nodeConfiguration; + } + + public void setNodeConfiguration(NodeConfiguration nodeConfiguration) { + this.nodeConfiguration = nodeConfiguration; + } + + public DatabaseDataComponent customConfiguration(CustomConfiguration customConfiguration) { + this.customConfiguration = customConfiguration; + return this; + } + + /** + * Get customConfiguration + * @return customConfiguration + **/ + @ApiModelProperty(value = "") + public CustomConfiguration getCustomConfiguration() { + return customConfiguration; + } + + public void setCustomConfiguration(CustomConfiguration customConfiguration) { + this.customConfiguration = customConfiguration; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabaseDataComponent databaseDataComponent = (DatabaseDataComponent) o; + return Objects.equals(this.instances, databaseDataComponent.instances) && + Objects.equals(this.resource, databaseDataComponent.resource) && + Objects.equals(this.name, databaseDataComponent.name) && + Objects.equals(this.nodeConfiguration, databaseDataComponent.nodeConfiguration) && + Objects.equals(this.customConfiguration, databaseDataComponent.customConfiguration); + } + + @Override + public int hashCode() { + return Objects.hash(instances, resource, name, nodeConfiguration, customConfiguration); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabaseDataComponent {\n"); + + sb.append(" instances: ").append(toIndentedString(instances)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" nodeConfiguration: ").append(toIndentedString(nodeConfiguration)).append("\n"); + sb.append(" customConfiguration: ").append(toIndentedString(customConfiguration)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseManagementComponent.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseManagementComponent.java new file mode 100644 index 0000000..3150124 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseManagementComponent.java @@ -0,0 +1,259 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.CustomConfiguration; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseDataComponent; +import de.uulm.omi.cloudiator.catalogue.client.model.ManagementConfiguration; +import de.uulm.omi.cloudiator.catalogue.client.model.NodeConfiguration; +import de.uulm.omi.cloudiator.catalogue.client.model.VM; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * A management component of a DDBMS + */ +@ApiModel(description = "A management component of a DDBMS") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class DatabaseManagementComponent { + @SerializedName("instances") + private Integer instances = null; + + @SerializedName("resource") + private VM resource = null; + + /** + * Gets or Sets name + */ + @JsonAdapter(NameEnum.Adapter.class) + public enum NameEnum { + DATA("DATA"); + + private String value; + + NameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static NameEnum fromValue(String text) { + for (NameEnum b : NameEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final NameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return NameEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("name") + private NameEnum name = null; + + @SerializedName("nodeConfiguration") + private NodeConfiguration nodeConfiguration = null; + + @SerializedName("customConfiguration") + private CustomConfiguration customConfiguration = null; + + @SerializedName("managementConfiguration") + private ManagementConfiguration managementConfiguration = null; + + public DatabaseManagementComponent instances(Integer instances) { + this.instances = instances; + return this; + } + + /** + * number of component instances + * @return instances + **/ + @ApiModelProperty(value = "number of component instances") + public Integer getInstances() { + return instances; + } + + public void setInstances(Integer instances) { + this.instances = instances; + } + + public DatabaseManagementComponent resource(VM resource) { + this.resource = resource; + return this; + } + + /** + * Get resource + * @return resource + **/ + @ApiModelProperty(value = "") + public VM getResource() { + return resource; + } + + public void setResource(VM resource) { + this.resource = resource; + } + + public DatabaseManagementComponent name(NameEnum name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(value = "") + public NameEnum getName() { + return name; + } + + public void setName(NameEnum name) { + this.name = name; + } + + public DatabaseManagementComponent nodeConfiguration(NodeConfiguration nodeConfiguration) { + this.nodeConfiguration = nodeConfiguration; + return this; + } + + /** + * Get nodeConfiguration + * @return nodeConfiguration + **/ + @ApiModelProperty(value = "") + public NodeConfiguration getNodeConfiguration() { + return nodeConfiguration; + } + + public void setNodeConfiguration(NodeConfiguration nodeConfiguration) { + this.nodeConfiguration = nodeConfiguration; + } + + public DatabaseManagementComponent customConfiguration(CustomConfiguration customConfiguration) { + this.customConfiguration = customConfiguration; + return this; + } + + /** + * Get customConfiguration + * @return customConfiguration + **/ + @ApiModelProperty(value = "") + public CustomConfiguration getCustomConfiguration() { + return customConfiguration; + } + + public void setCustomConfiguration(CustomConfiguration customConfiguration) { + this.customConfiguration = customConfiguration; + } + + public DatabaseManagementComponent managementConfiguration(ManagementConfiguration managementConfiguration) { + this.managementConfiguration = managementConfiguration; + return this; + } + + /** + * Get managementConfiguration + * @return managementConfiguration + **/ + @ApiModelProperty(value = "") + public ManagementConfiguration getManagementConfiguration() { + return managementConfiguration; + } + + public void setManagementConfiguration(ManagementConfiguration managementConfiguration) { + this.managementConfiguration = managementConfiguration; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabaseManagementComponent databaseManagementComponent = (DatabaseManagementComponent) o; + return Objects.equals(this.instances, databaseManagementComponent.instances) && + Objects.equals(this.resource, databaseManagementComponent.resource) && + Objects.equals(this.name, databaseManagementComponent.name) && + Objects.equals(this.nodeConfiguration, databaseManagementComponent.nodeConfiguration) && + Objects.equals(this.customConfiguration, databaseManagementComponent.customConfiguration) && + Objects.equals(this.managementConfiguration, databaseManagementComponent.managementConfiguration); + } + + @Override + public int hashCode() { + return Objects.hash(instances, resource, name, nodeConfiguration, customConfiguration, managementConfiguration); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabaseManagementComponent {\n"); + + sb.append(" instances: ").append(toIndentedString(instances)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" nodeConfiguration: ").append(toIndentedString(nodeConfiguration)).append("\n"); + sb.append(" customConfiguration: ").append(toIndentedString(customConfiguration)).append("\n"); + sb.append(" managementConfiguration: ").append(toIndentedString(managementConfiguration)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseSeedComponent.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseSeedComponent.java new file mode 100644 index 0000000..92bb7be --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseSeedComponent.java @@ -0,0 +1,235 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.Component; +import de.uulm.omi.cloudiator.catalogue.client.model.CustomConfiguration; +import de.uulm.omi.cloudiator.catalogue.client.model.NodeConfiguration; +import de.uulm.omi.cloudiator.catalogue.client.model.VM; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * A seed component of a DDBMS, provides the cluster entrypoint for DatabaseDataComponents + */ +@ApiModel(description = "A seed component of a DDBMS, provides the cluster entrypoint for DatabaseDataComponents") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class DatabaseSeedComponent { + @SerializedName("instances") + private Integer instances = null; + + @SerializedName("resource") + private VM resource = null; + + /** + * Gets or Sets name + */ + @JsonAdapter(NameEnum.Adapter.class) + public enum NameEnum { + SEED("SEED"); + + private String value; + + NameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static NameEnum fromValue(String text) { + for (NameEnum b : NameEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final NameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return NameEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("name") + private NameEnum name = null; + + @SerializedName("nodeConfiguration") + private NodeConfiguration nodeConfiguration = null; + + @SerializedName("customConfiguration") + private CustomConfiguration customConfiguration = null; + + public DatabaseSeedComponent instances(Integer instances) { + this.instances = instances; + return this; + } + + /** + * number of component instances + * @return instances + **/ + @ApiModelProperty(value = "number of component instances") + public Integer getInstances() { + return instances; + } + + public void setInstances(Integer instances) { + this.instances = instances; + } + + public DatabaseSeedComponent resource(VM resource) { + this.resource = resource; + return this; + } + + /** + * Get resource + * @return resource + **/ + @ApiModelProperty(value = "") + public VM getResource() { + return resource; + } + + public void setResource(VM resource) { + this.resource = resource; + } + + public DatabaseSeedComponent name(NameEnum name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(value = "") + public NameEnum getName() { + return name; + } + + public void setName(NameEnum name) { + this.name = name; + } + + public DatabaseSeedComponent nodeConfiguration(NodeConfiguration nodeConfiguration) { + this.nodeConfiguration = nodeConfiguration; + return this; + } + + /** + * Get nodeConfiguration + * @return nodeConfiguration + **/ + @ApiModelProperty(value = "") + public NodeConfiguration getNodeConfiguration() { + return nodeConfiguration; + } + + public void setNodeConfiguration(NodeConfiguration nodeConfiguration) { + this.nodeConfiguration = nodeConfiguration; + } + + public DatabaseSeedComponent customConfiguration(CustomConfiguration customConfiguration) { + this.customConfiguration = customConfiguration; + return this; + } + + /** + * Get customConfiguration + * @return customConfiguration + **/ + @ApiModelProperty(value = "") + public CustomConfiguration getCustomConfiguration() { + return customConfiguration; + } + + public void setCustomConfiguration(CustomConfiguration customConfiguration) { + this.customConfiguration = customConfiguration; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabaseSeedComponent databaseSeedComponent = (DatabaseSeedComponent) o; + return Objects.equals(this.instances, databaseSeedComponent.instances) && + Objects.equals(this.resource, databaseSeedComponent.resource) && + Objects.equals(this.name, databaseSeedComponent.name) && + Objects.equals(this.nodeConfiguration, databaseSeedComponent.nodeConfiguration) && + Objects.equals(this.customConfiguration, databaseSeedComponent.customConfiguration); + } + + @Override + public int hashCode() { + return Objects.hash(instances, resource, name, nodeConfiguration, customConfiguration); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabaseSeedComponent {\n"); + + sb.append(" instances: ").append(toIndentedString(instances)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" nodeConfiguration: ").append(toIndentedString(nodeConfiguration)).append("\n"); + sb.append(" customConfiguration: ").append(toIndentedString(customConfiguration)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseSingle.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseSingle.java new file mode 100644 index 0000000..f718a82 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/DatabaseSingle.java @@ -0,0 +1,127 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseManagementComponent; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseSeedComponent; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * todo + */ +@ApiModel(description = "todo") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class DatabaseSingle { + @SerializedName("databaseSeedComponent") + private DatabaseSeedComponent databaseSeedComponent = null; + + @SerializedName("databaseManagementComponent") + private java.util.List databaseManagementComponent = null; + + public DatabaseSingle databaseSeedComponent(DatabaseSeedComponent databaseSeedComponent) { + this.databaseSeedComponent = databaseSeedComponent; + return this; + } + + /** + * Get databaseSeedComponent + * @return databaseSeedComponent + **/ + @ApiModelProperty(value = "") + public DatabaseSeedComponent getDatabaseSeedComponent() { + return databaseSeedComponent; + } + + public void setDatabaseSeedComponent(DatabaseSeedComponent databaseSeedComponent) { + this.databaseSeedComponent = databaseSeedComponent; + } + + public DatabaseSingle databaseManagementComponent(java.util.List databaseManagementComponent) { + this.databaseManagementComponent = databaseManagementComponent; + return this; + } + + public DatabaseSingle addDatabaseManagementComponentItem(DatabaseManagementComponent databaseManagementComponentItem) { + if (this.databaseManagementComponent == null) { + this.databaseManagementComponent = new java.util.ArrayList<>(); + } + this.databaseManagementComponent.add(databaseManagementComponentItem); + return this; + } + + /** + * Get databaseManagementComponent + * @return databaseManagementComponent + **/ + @ApiModelProperty(value = "") + public java.util.List getDatabaseManagementComponent() { + return databaseManagementComponent; + } + + public void setDatabaseManagementComponent(java.util.List databaseManagementComponent) { + this.databaseManagementComponent = databaseManagementComponent; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabaseSingle databaseSingle = (DatabaseSingle) o; + return Objects.equals(this.databaseSeedComponent, databaseSingle.databaseSeedComponent) && + Objects.equals(this.databaseManagementComponent, databaseSingle.databaseManagementComponent); + } + + @Override + public int hashCode() { + return Objects.hash(databaseSeedComponent, databaseManagementComponent); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabaseSingle {\n"); + + sb.append(" databaseSeedComponent: ").append(toIndentedString(databaseSeedComponent)).append("\n"); + sb.append(" databaseManagementComponent: ").append(toIndentedString(databaseManagementComponent)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Error.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Error.java new file mode 100644 index 0000000..088f1fc --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Error.java @@ -0,0 +1,139 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Error + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class Error { + @SerializedName("code") + private Integer code = null; + + @SerializedName("message") + private String message = null; + + @SerializedName("fields") + private String fields = null; + + public Error code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + @ApiModelProperty(value = "") + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public Error message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @ApiModelProperty(value = "") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public Error fields(String fields) { + this.fields = fields; + return this; + } + + /** + * Get fields + * @return fields + **/ + @ApiModelProperty(value = "") + public String getFields() { + return fields; + } + + public void setFields(String fields) { + this.fields = fields; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error error = (Error) o; + return Objects.equals(this.code, error.code) && + Objects.equals(this.message, error.message) && + Objects.equals(this.fields, error.fields); + } + + @Override + public int hashCode() { + return Objects.hash(code, message, fields); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/IndexMemory.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/IndexMemory.java new file mode 100644 index 0000000..a1b37d5 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/IndexMemory.java @@ -0,0 +1,161 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * IndexMemory + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class IndexMemory { + /** + * environment variable name + */ + @JsonAdapter(EnvNameEnum.Adapter.class) + public enum EnvNameEnum { + INDEXMEMORY("INDEXMEMORY"); + + private String value; + + EnvNameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EnvNameEnum fromValue(String text) { + for (EnvNameEnum b : EnvNameEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EnvNameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EnvNameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EnvNameEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("envName") + private EnvNameEnum envName = null; + + @SerializedName("envValue") + private String envValue = null; + + public IndexMemory envName(EnvNameEnum envName) { + this.envName = envName; + return this; + } + + /** + * environment variable name + * @return envName + **/ + @ApiModelProperty(value = "environment variable name") + public EnvNameEnum getEnvName() { + return envName; + } + + public void setEnvName(EnvNameEnum envName) { + this.envName = envName; + } + + public IndexMemory envValue(String envValue) { + this.envValue = envValue; + return this; + } + + /** + * amount of RAM to allocato for index caching + * @return envValue + **/ + @ApiModelProperty(value = "amount of RAM to allocato for index caching") + public String getEnvValue() { + return envValue; + } + + public void setEnvValue(String envValue) { + this.envValue = envValue; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IndexMemory indexMemory = (IndexMemory) o; + return Objects.equals(this.envName, indexMemory.envName) && + Objects.equals(this.envValue, indexMemory.envValue); + } + + @Override + public int hashCode() { + return Objects.hash(envName, envValue); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndexMemory {\n"); + + sb.append(" envName: ").append(toIndentedString(envName)).append("\n"); + sb.append(" envValue: ").append(toIndentedString(envValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/ManagementConfiguration.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/ManagementConfiguration.java new file mode 100644 index 0000000..21a91ec --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/ManagementConfiguration.java @@ -0,0 +1,93 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ManagementConfiguration + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class ManagementConfiguration { + @SerializedName("crossClusterPort") + private Integer crossClusterPort = null; + + public ManagementConfiguration crossClusterPort(Integer crossClusterPort) { + this.crossClusterPort = crossClusterPort; + return this; + } + + /** + * port to connect across multiple clusters + * @return crossClusterPort + **/ + @ApiModelProperty(value = "port to connect across multiple clusters") + public Integer getCrossClusterPort() { + return crossClusterPort; + } + + public void setCrossClusterPort(Integer crossClusterPort) { + this.crossClusterPort = crossClusterPort; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ManagementConfiguration managementConfiguration = (ManagementConfiguration) o; + return Objects.equals(this.crossClusterPort, managementConfiguration.crossClusterPort); + } + + @Override + public int hashCode() { + return Objects.hash(crossClusterPort); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ManagementConfiguration {\n"); + + sb.append(" crossClusterPort: ").append(toIndentedString(crossClusterPort)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Node.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Node.java new file mode 100644 index 0000000..458d62e --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Node.java @@ -0,0 +1,119 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.Resource; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * An existing node resource + */ +@ApiModel(description = "An existing node resource") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class Node extends Resource { + @SerializedName("endpoint") + private Integer endpoint = null; + + @SerializedName("credentials") + private Integer credentials = null; + + public Node endpoint(Integer endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * TODO + * @return endpoint + **/ + @ApiModelProperty(value = "TODO") + public Integer getEndpoint() { + return endpoint; + } + + public void setEndpoint(Integer endpoint) { + this.endpoint = endpoint; + } + + public Node credentials(Integer credentials) { + this.credentials = credentials; + return this; + } + + /** + * TODO + * @return credentials + **/ + @ApiModelProperty(value = "TODO") + public Integer getCredentials() { + return credentials; + } + + public void setCredentials(Integer credentials) { + this.credentials = credentials; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Node node = (Node) o; + return Objects.equals(this.endpoint, node.endpoint) && + Objects.equals(this.credentials, node.credentials) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(endpoint, credentials, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Node {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" endpoint: ").append(toIndentedString(endpoint)).append("\n"); + sb.append(" credentials: ").append(toIndentedString(credentials)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/NodeConfiguration.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/NodeConfiguration.java new file mode 100644 index 0000000..137dad4 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/NodeConfiguration.java @@ -0,0 +1,143 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.DataMemory; +import de.uulm.omi.cloudiator.catalogue.client.model.IndexMemory; +import de.uulm.omi.cloudiator.catalogue.client.model.ReplicationFactor; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * configuration settings on node level + */ +@ApiModel(description = "configuration settings on node level") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class NodeConfiguration { + @SerializedName("dataMemory") + private DataMemory dataMemory = null; + + @SerializedName("indexMemory") + private IndexMemory indexMemory = null; + + @SerializedName("replicationFactor") + private ReplicationFactor replicationFactor = null; + + public NodeConfiguration dataMemory(DataMemory dataMemory) { + this.dataMemory = dataMemory; + return this; + } + + /** + * Get dataMemory + * @return dataMemory + **/ + @ApiModelProperty(value = "") + public DataMemory getDataMemory() { + return dataMemory; + } + + public void setDataMemory(DataMemory dataMemory) { + this.dataMemory = dataMemory; + } + + public NodeConfiguration indexMemory(IndexMemory indexMemory) { + this.indexMemory = indexMemory; + return this; + } + + /** + * Get indexMemory + * @return indexMemory + **/ + @ApiModelProperty(value = "") + public IndexMemory getIndexMemory() { + return indexMemory; + } + + public void setIndexMemory(IndexMemory indexMemory) { + this.indexMemory = indexMemory; + } + + public NodeConfiguration replicationFactor(ReplicationFactor replicationFactor) { + this.replicationFactor = replicationFactor; + return this; + } + + /** + * Get replicationFactor + * @return replicationFactor + **/ + @ApiModelProperty(value = "") + public ReplicationFactor getReplicationFactor() { + return replicationFactor; + } + + public void setReplicationFactor(ReplicationFactor replicationFactor) { + this.replicationFactor = replicationFactor; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NodeConfiguration nodeConfiguration = (NodeConfiguration) o; + return Objects.equals(this.dataMemory, nodeConfiguration.dataMemory) && + Objects.equals(this.indexMemory, nodeConfiguration.indexMemory) && + Objects.equals(this.replicationFactor, nodeConfiguration.replicationFactor); + } + + @Override + public int hashCode() { + return Objects.hash(dataMemory, indexMemory, replicationFactor); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NodeConfiguration {\n"); + + sb.append(" dataMemory: ").append(toIndentedString(dataMemory)).append("\n"); + sb.append(" indexMemory: ").append(toIndentedString(indexMemory)).append("\n"); + sb.append(" replicationFactor: ").append(toIndentedString(replicationFactor)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/ReplicationFactor.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/ReplicationFactor.java new file mode 100644 index 0000000..149f3af --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/ReplicationFactor.java @@ -0,0 +1,161 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ReplicationFactor + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class ReplicationFactor { + /** + * environment variable name + */ + @JsonAdapter(EnvNameEnum.Adapter.class) + public enum EnvNameEnum { + REPLICATIONFACTOR("REPLICATIONFACTOR"); + + private String value; + + EnvNameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EnvNameEnum fromValue(String text) { + for (EnvNameEnum b : EnvNameEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EnvNameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EnvNameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EnvNameEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("envName") + private EnvNameEnum envName = null; + + @SerializedName("envValue") + private String envValue = null; + + public ReplicationFactor envName(EnvNameEnum envName) { + this.envName = envName; + return this; + } + + /** + * environment variable name + * @return envName + **/ + @ApiModelProperty(value = "environment variable name") + public EnvNameEnum getEnvName() { + return envName; + } + + public void setEnvName(EnvNameEnum envName) { + this.envName = envName; + } + + public ReplicationFactor envValue(String envValue) { + this.envValue = envValue; + return this; + } + + /** + * replication factor, 0 = repliation disabled + * @return envValue + **/ + @ApiModelProperty(value = "replication factor, 0 = repliation disabled") + public String getEnvValue() { + return envValue; + } + + public void setEnvValue(String envValue) { + this.envValue = envValue; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplicationFactor replicationFactor = (ReplicationFactor) o; + return Objects.equals(this.envName, replicationFactor.envName) && + Objects.equals(this.envValue, replicationFactor.envValue); + } + + @Override + public int hashCode() { + return Objects.hash(envName, envValue); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplicationFactor {\n"); + + sb.append(" envName: ").append(toIndentedString(envName)).append("\n"); + sb.append(" envValue: ").append(toIndentedString(envValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Requirement.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Requirement.java new file mode 100644 index 0000000..bed8728 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Requirement.java @@ -0,0 +1,96 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.Resource; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * A requirement set Colosseum will solves an provision the resources + */ +@ApiModel(description = "A requirement set Colosseum will solves an provision the resources") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class Requirement extends Resource { + @SerializedName("item") + private Integer item = null; + + public Requirement item(Integer item) { + this.item = item; + return this; + } + + /** + * TODO + * @return item + **/ + @ApiModelProperty(value = "TODO") + public Integer getItem() { + return item; + } + + public void setItem(Integer item) { + this.item = item; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Requirement requirement = (Requirement) o; + return Objects.equals(this.item, requirement.item) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(item, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Requirement {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" item: ").append(toIndentedString(item)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Resource.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Resource.java new file mode 100644 index 0000000..3b2ec9f --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/Resource.java @@ -0,0 +1,143 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Resource + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") + +public class Resource { + /** + * Gets or Sets resourceType + */ + @JsonAdapter(ResourceTypeEnum.Adapter.class) + public enum ResourceTypeEnum { + VM("VM"), + + NODE("NODE"), + + REQUIREMENT("REQUIREMENT"); + + private String value; + + ResourceTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ResourceTypeEnum fromValue(String text) { + for (ResourceTypeEnum b : ResourceTypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ResourceTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ResourceTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ResourceTypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("resourceType") + private ResourceTypeEnum resourceType = null; + + public Resource resourceType(ResourceTypeEnum resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get resourceType + * @return resourceType + **/ + @ApiModelProperty(required = true, value = "") + public ResourceTypeEnum getResourceType() { + return resourceType; + } + + public void setResourceType(ResourceTypeEnum resourceType) { + this.resourceType = resourceType; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Resource resource = (Resource) o; + return Objects.equals(this.resourceType, resource.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash(resourceType); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Resource {\n"); + + sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/SparkJob.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/SparkJob.java new file mode 100644 index 0000000..cd22562 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/SparkJob.java @@ -0,0 +1,162 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SparkJob + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class SparkJob { + @SerializedName("name") + private String name = null; + + @SerializedName("masterUrl") + private String masterUrl = null; + + @SerializedName("appplicationUrl") + private String appplicationUrl = null; + + @SerializedName("main Class") + private String mainClass = null; + + public SparkJob name(String name) { + this.name = name; + return this; + } + + /** + * processing job name + * @return name + **/ + @ApiModelProperty(value = "processing job name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SparkJob masterUrl(String masterUrl) { + this.masterUrl = masterUrl; + return this; + } + + /** + * Spark Master URL, e.g. spark://IP:7077 + * @return masterUrl + **/ + @ApiModelProperty(value = "Spark Master URL, e.g. spark://IP:7077") + public String getMasterUrl() { + return masterUrl; + } + + public void setMasterUrl(String masterUrl) { + this.masterUrl = masterUrl; + } + + public SparkJob appplicationUrl(String appplicationUrl) { + this.appplicationUrl = appplicationUrl; + return this; + } + + /** + * location of the application artifact, need to be accessible via http (to be verified) + * @return appplicationUrl + **/ + @ApiModelProperty(value = "location of the application artifact, need to be accessible via http (to be verified)") + public String getAppplicationUrl() { + return appplicationUrl; + } + + public void setAppplicationUrl(String appplicationUrl) { + this.appplicationUrl = appplicationUrl; + } + + public SparkJob mainClass(String mainClass) { + this.mainClass = mainClass; + return this; + } + + /** + * the main class of the application, e.g. \"com.some.job\" + * @return mainClass + **/ + @ApiModelProperty(value = "the main class of the application, e.g. \"com.some.job\"") + public String getMainClass() { + return mainClass; + } + + public void setMainClass(String mainClass) { + this.mainClass = mainClass; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SparkJob sparkJob = (SparkJob) o; + return Objects.equals(this.name, sparkJob.name) && + Objects.equals(this.masterUrl, sparkJob.masterUrl) && + Objects.equals(this.appplicationUrl, sparkJob.appplicationUrl) && + Objects.equals(this.mainClass, sparkJob.mainClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, masterUrl, appplicationUrl, mainClass); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SparkJob {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" masterUrl: ").append(toIndentedString(masterUrl)).append("\n"); + sb.append(" appplicationUrl: ").append(toIndentedString(appplicationUrl)).append("\n"); + sb.append(" mainClass: ").append(toIndentedString(mainClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/SparkMasterComponent.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/SparkMasterComponent.java new file mode 100644 index 0000000..9d221c2 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/SparkMasterComponent.java @@ -0,0 +1,208 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SparkMasterComponent + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class SparkMasterComponent { + @SerializedName("name") + private String name = null; + + @SerializedName("instances") + private Integer instances = null; + + @SerializedName("idCloud") + private Integer idCloud = null; + + @SerializedName("idImage") + private Integer idImage = null; + + @SerializedName("idLocation") + private Integer idLocation = null; + + @SerializedName("idHardware") + private Integer idHardware = null; + + public SparkMasterComponent name(String name) { + this.name = name; + return this; + } + + /** + * Spark master description identifier, needs to map an existing application description + * @return name + **/ + @ApiModelProperty(value = "Spark master description identifier, needs to map an existing application description") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SparkMasterComponent instances(Integer instances) { + this.instances = instances; + return this; + } + + /** + * number of database nodes in the cluster + * @return instances + **/ + @ApiModelProperty(value = "number of database nodes in the cluster") + public Integer getInstances() { + return instances; + } + + public void setInstances(Integer instances) { + this.instances = instances; + } + + public SparkMasterComponent idCloud(Integer idCloud) { + this.idCloud = idCloud; + return this; + } + + /** + * idCloud in Colosseum + * @return idCloud + **/ + @ApiModelProperty(value = "idCloud in Colosseum") + public Integer getIdCloud() { + return idCloud; + } + + public void setIdCloud(Integer idCloud) { + this.idCloud = idCloud; + } + + public SparkMasterComponent idImage(Integer idImage) { + this.idImage = idImage; + return this; + } + + /** + * idImage in Colosseum + * @return idImage + **/ + @ApiModelProperty(value = "idImage in Colosseum") + public Integer getIdImage() { + return idImage; + } + + public void setIdImage(Integer idImage) { + this.idImage = idImage; + } + + public SparkMasterComponent idLocation(Integer idLocation) { + this.idLocation = idLocation; + return this; + } + + /** + * idLocation in Colosseum + * @return idLocation + **/ + @ApiModelProperty(value = "idLocation in Colosseum") + public Integer getIdLocation() { + return idLocation; + } + + public void setIdLocation(Integer idLocation) { + this.idLocation = idLocation; + } + + public SparkMasterComponent idHardware(Integer idHardware) { + this.idHardware = idHardware; + return this; + } + + /** + * idHardware in Colosseum + * @return idHardware + **/ + @ApiModelProperty(value = "idHardware in Colosseum") + public Integer getIdHardware() { + return idHardware; + } + + public void setIdHardware(Integer idHardware) { + this.idHardware = idHardware; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SparkMasterComponent sparkMasterComponent = (SparkMasterComponent) o; + return Objects.equals(this.name, sparkMasterComponent.name) && + Objects.equals(this.instances, sparkMasterComponent.instances) && + Objects.equals(this.idCloud, sparkMasterComponent.idCloud) && + Objects.equals(this.idImage, sparkMasterComponent.idImage) && + Objects.equals(this.idLocation, sparkMasterComponent.idLocation) && + Objects.equals(this.idHardware, sparkMasterComponent.idHardware); + } + + @Override + public int hashCode() { + return Objects.hash(name, instances, idCloud, idImage, idLocation, idHardware); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SparkMasterComponent {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" instances: ").append(toIndentedString(instances)).append("\n"); + sb.append(" idCloud: ").append(toIndentedString(idCloud)).append("\n"); + sb.append(" idImage: ").append(toIndentedString(idImage)).append("\n"); + sb.append(" idLocation: ").append(toIndentedString(idLocation)).append("\n"); + sb.append(" idHardware: ").append(toIndentedString(idHardware)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/SparkWorkerComponent.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/SparkWorkerComponent.java new file mode 100644 index 0000000..f2d2249 --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/SparkWorkerComponent.java @@ -0,0 +1,208 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SparkWorkerComponent + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class SparkWorkerComponent { + @SerializedName("name") + private String name = null; + + @SerializedName("instances") + private Integer instances = null; + + @SerializedName("idCloud") + private Integer idCloud = null; + + @SerializedName("idImage") + private Integer idImage = null; + + @SerializedName("idLocation") + private Integer idLocation = null; + + @SerializedName("idHardware") + private Integer idHardware = null; + + public SparkWorkerComponent name(String name) { + this.name = name; + return this; + } + + /** + * Spark worker description identifier, needs to map an existing application description + * @return name + **/ + @ApiModelProperty(value = "Spark worker description identifier, needs to map an existing application description") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SparkWorkerComponent instances(Integer instances) { + this.instances = instances; + return this; + } + + /** + * number of database nodes in the cluster + * @return instances + **/ + @ApiModelProperty(value = "number of database nodes in the cluster") + public Integer getInstances() { + return instances; + } + + public void setInstances(Integer instances) { + this.instances = instances; + } + + public SparkWorkerComponent idCloud(Integer idCloud) { + this.idCloud = idCloud; + return this; + } + + /** + * idCloud in Colosseum + * @return idCloud + **/ + @ApiModelProperty(value = "idCloud in Colosseum") + public Integer getIdCloud() { + return idCloud; + } + + public void setIdCloud(Integer idCloud) { + this.idCloud = idCloud; + } + + public SparkWorkerComponent idImage(Integer idImage) { + this.idImage = idImage; + return this; + } + + /** + * idImage in Colosseum + * @return idImage + **/ + @ApiModelProperty(value = "idImage in Colosseum") + public Integer getIdImage() { + return idImage; + } + + public void setIdImage(Integer idImage) { + this.idImage = idImage; + } + + public SparkWorkerComponent idLocation(Integer idLocation) { + this.idLocation = idLocation; + return this; + } + + /** + * idLocation in Colosseum + * @return idLocation + **/ + @ApiModelProperty(value = "idLocation in Colosseum") + public Integer getIdLocation() { + return idLocation; + } + + public void setIdLocation(Integer idLocation) { + this.idLocation = idLocation; + } + + public SparkWorkerComponent idHardware(Integer idHardware) { + this.idHardware = idHardware; + return this; + } + + /** + * idHardware in Colosseum + * @return idHardware + **/ + @ApiModelProperty(value = "idHardware in Colosseum") + public Integer getIdHardware() { + return idHardware; + } + + public void setIdHardware(Integer idHardware) { + this.idHardware = idHardware; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SparkWorkerComponent sparkWorkerComponent = (SparkWorkerComponent) o; + return Objects.equals(this.name, sparkWorkerComponent.name) && + Objects.equals(this.instances, sparkWorkerComponent.instances) && + Objects.equals(this.idCloud, sparkWorkerComponent.idCloud) && + Objects.equals(this.idImage, sparkWorkerComponent.idImage) && + Objects.equals(this.idLocation, sparkWorkerComponent.idLocation) && + Objects.equals(this.idHardware, sparkWorkerComponent.idHardware); + } + + @Override + public int hashCode() { + return Objects.hash(name, instances, idCloud, idImage, idLocation, idHardware); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SparkWorkerComponent {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" instances: ").append(toIndentedString(instances)).append("\n"); + sb.append(" idCloud: ").append(toIndentedString(idCloud)).append("\n"); + sb.append(" idImage: ").append(toIndentedString(idImage)).append("\n"); + sb.append(" idLocation: ").append(toIndentedString(idLocation)).append("\n"); + sb.append(" idHardware: ").append(toIndentedString(idHardware)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/VM.java b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/VM.java new file mode 100644 index 0000000..80b4acb --- /dev/null +++ b/client/src/main/java/de/uulm/omi/cloudiator/catalogue/client/model/VM.java @@ -0,0 +1,165 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import de.uulm.omi.cloudiator.catalogue.client.model.Resource; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * A VM resource, which will be created by Colosseum + */ +@ApiModel(description = "A VM resource, which will be created by Colosseum") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-01-24T11:56:37.336Z") +public class VM extends Resource { + @SerializedName("idCloud") + private Integer idCloud = null; + + @SerializedName("idImage") + private Integer idImage = null; + + @SerializedName("idHardware") + private Integer idHardware = null; + + @SerializedName("idLocation") + private Integer idLocation = null; + + public VM idCloud(Integer idCloud) { + this.idCloud = idCloud; + return this; + } + + /** + * idCloud in Colosseum + * @return idCloud + **/ + @ApiModelProperty(required = true, value = "idCloud in Colosseum") + public Integer getIdCloud() { + return idCloud; + } + + public void setIdCloud(Integer idCloud) { + this.idCloud = idCloud; + } + + public VM idImage(Integer idImage) { + this.idImage = idImage; + return this; + } + + /** + * idImage in Colosseum + * @return idImage + **/ + @ApiModelProperty(required = true, value = "idImage in Colosseum") + public Integer getIdImage() { + return idImage; + } + + public void setIdImage(Integer idImage) { + this.idImage = idImage; + } + + public VM idHardware(Integer idHardware) { + this.idHardware = idHardware; + return this; + } + + /** + * idHardware in Colosseum + * @return idHardware + **/ + @ApiModelProperty(required = true, value = "idHardware in Colosseum") + public Integer getIdHardware() { + return idHardware; + } + + public void setIdHardware(Integer idHardware) { + this.idHardware = idHardware; + } + + public VM idLocation(Integer idLocation) { + this.idLocation = idLocation; + return this; + } + + /** + * idLocation in Colosseum + * @return idLocation + **/ + @ApiModelProperty(required = true, value = "idLocation in Colosseum") + public Integer getIdLocation() { + return idLocation; + } + + public void setIdLocation(Integer idLocation) { + this.idLocation = idLocation; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VM VM = (VM) o; + return Objects.equals(this.idCloud, VM.idCloud) && + Objects.equals(this.idImage, VM.idImage) && + Objects.equals(this.idHardware, VM.idHardware) && + Objects.equals(this.idLocation, VM.idLocation) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(idCloud, idImage, idHardware, idLocation, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VM {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" idCloud: ").append(toIndentedString(idCloud)).append("\n"); + sb.append(" idImage: ").append(toIndentedString(idImage)).append("\n"); + sb.append(" idHardware: ").append(toIndentedString(idHardware)).append("\n"); + sb.append(" idLocation: ").append(toIndentedString(idLocation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/ApplicationApiTest.java b/client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/ApplicationApiTest.java new file mode 100644 index 0000000..c7fc22e --- /dev/null +++ b/client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/ApplicationApiTest.java @@ -0,0 +1,50 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.api; + +import de.uulm.omi.cloudiator.catalogue.client.ApiException; +import de.uulm.omi.cloudiator.catalogue.client.model.CloudiatorApplicationInstance; +import de.uulm.omi.cloudiator.catalogue.client.model.Component; +import de.uulm.omi.cloudiator.catalogue.client.model.Error; +import org.junit.Test; +import org.junit.Ignore; + + +/** + * API tests for ApplicationApi + */ +@Ignore +public class ApplicationApiTest { + + private final ApplicationApi api = new ApplicationApi(); + + + /** + * Generic application deployment + * + * Deploy a generic application in a multi-cloud setup + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void genericPostTest() throws ApiException { + String applicationName = null; + java.util.List components = null; + CloudiatorApplicationInstance response = api.genericPost(applicationName, components); + + // TODO: test validations + } + +} diff --git a/client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/BigDataApiTest.java b/client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/BigDataApiTest.java new file mode 100644 index 0000000..6c17dce --- /dev/null +++ b/client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/BigDataApiTest.java @@ -0,0 +1,68 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.api; + +import de.uulm.omi.cloudiator.catalogue.client.ApiException; +import de.uulm.omi.cloudiator.catalogue.client.model.CloudiatorApplicationInstance; +import de.uulm.omi.cloudiator.catalogue.client.model.Cluster; +import de.uulm.omi.cloudiator.catalogue.client.model.Error; +import de.uulm.omi.cloudiator.catalogue.client.model.SparkJob; +import org.junit.Test; +import org.junit.Ignore; + + +/** + * API tests for BigDataApi + */ +@Ignore +public class BigDataApiTest { + + private final BigDataApi api = new BigDataApi(); + + + /** + * submit an Apache Spark job to a Spark Master + * + * Submitting Spark jobs to an existing Apache Spark Cluster + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void sparkJobPostTest() throws ApiException { + SparkJob job = null; + java.util.List response = api.sparkJobPost(job); + + // TODO: test validations + } + + /** + * deploys an Apache Spark cluster + * + * Deploy a Spark cluster with 1 master and n workers the multi-cloud + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void sparkPostTest() throws ApiException { + String name = null; + String applicationType = null; + Cluster cluster = null; + CloudiatorApplicationInstance response = api.sparkPost(name, applicationType, cluster); + + // TODO: test validations + } + +} diff --git a/client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/DatabaseApiTest.java b/client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/DatabaseApiTest.java new file mode 100644 index 0000000..fb3256f --- /dev/null +++ b/client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/DatabaseApiTest.java @@ -0,0 +1,103 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.api; + +import de.uulm.omi.cloudiator.catalogue.client.ApiException; +import de.uulm.omi.cloudiator.catalogue.client.model.Cloud; +import de.uulm.omi.cloudiator.catalogue.client.model.CloudiatorApplicationInstance; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseCluster; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseCrossCluster; +import de.uulm.omi.cloudiator.catalogue.client.model.DatabaseSingle; +import de.uulm.omi.cloudiator.catalogue.client.model.Error; +import org.junit.Test; +import org.junit.Ignore; + + +/** + * API tests for DatabaseApi + */ +@Ignore +public class DatabaseApiTest { + + private final DatabaseApi api = new DatabaseApi(); + + + /** + * DDBMS cluster deployment + * + * Deploy a database cluster in the multi-cloud + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void databaseClusterPostTest() throws ApiException { + String name = null; + DatabaseCluster databaseComponents = null; + CloudiatorApplicationInstance response = api.databaseClusterPost(name, databaseComponents); + + // TODO: test validations + } + + /** + * DDBMS cluster deployment + * + * Deploy a database cluster in the multi-cloud + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void databaseCrossClusterPostTest() throws ApiException { + String name = null; + DatabaseCrossCluster databaseComponents = null; + CloudiatorApplicationInstance response = api.databaseCrossClusterPost(name, databaseComponents); + + // TODO: test validations + } + + /** + * DDBMS cluster deployment + * + * Deploy a database cluster in the multi-cloud + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void databaseSinglePostTest() throws ApiException { + String name = null; + DatabaseSingle databaseComponents = null; + CloudiatorApplicationInstance response = api.databaseSinglePost(name, databaseComponents); + + // TODO: test validations + } + + /** + * Register a new cloud as deployment target + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void utilsRegisterCloudPostTest() throws ApiException { + Cloud cloud = null; + java.util.List response = api.utilsRegisterCloudPost(cloud); + + // TODO: test validations + } + +} diff --git a/client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/ScriptsApiTest.java b/client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/ScriptsApiTest.java new file mode 100644 index 0000000..1fb30ef --- /dev/null +++ b/client/src/test/java/de/uulm/omi/cloudiator/catalogue/client/api/ScriptsApiTest.java @@ -0,0 +1,65 @@ +/* + * Cloudiator Application Catalogue API + * Deploy a generic distributed application in the cloud + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.catalogue.client.api; + +import de.uulm.omi.cloudiator.catalogue.client.ApiException; +import java.io.File; +import org.junit.Test; +import org.junit.Ignore; + + +/** + * API tests for ScriptsApi + */ +@Ignore +public class ScriptsApiTest { + + private final ScriptsApi api = new ScriptsApi(); + + + /** + * Get custom database installation scripts + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void scriptsBigdataGetTest() throws ApiException { + String frameworkName = null; + String scriptType = null; + File response = api.scriptsBigdataGet(frameworkName, scriptType); + + // TODO: test validations + } + + /** + * Get custom database installation scripts + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void scriptsDatabaseGetTest() throws ApiException { + String dbName = null; + String scriptType = null; + File response = api.scriptsDatabaseGet(dbName, scriptType); + + // TODO: test validations + } + +} diff --git a/input/applications/database/couchbase_single.app b/input/applications/database/couchbase_single.app index 9f2871b..e251b80 100644 --- a/input/applications/database/couchbase_single.app +++ b/input/applications/database/couchbase_single.app @@ -9,7 +9,10 @@ components : number : 8091 lifecycleActions : init : "" - download : "sudo apt-get -y update && sudo apt-get install wget -y && sudo wget https://packages.couchbase.com/releases/4.5.0/couchbase-server-community_4.5.0-ubuntu14.04_amd64.deb && wget -O install.sh 'https://omi-gitlab.e-technik.uni-ulm.de/cloudiator/catalogue-scripts/raw/master/scripts/database/couchbase/install.sh' && wget -O init.sh 'https://omi-gitlab.e-technik.uni-ulm.de/cloudiator/catalogue-scripts/raw/master/scripts/database/couchbase/init.sh' && wget -O seed.sh 'https://omi-gitlab.e-technik.uni-ulm.de/cloudiator/catalogue-scripts/raw/master/scripts/database/couchbase/seed.sh' " + download : "sudo apt-get -y update && sudo apt-get install wget -y && sudo wget https://packages.couchbase.com/releases/4.5.0/couchbase-server-community_4.5.0-ubuntu14.04_amd64.deb + && wget -O install.sh 'https://omi-gitlab.e-technik.uni-ulm.de/cloudiator/catalogue-scripts/raw/master/scripts/database/couchbase/install.sh' + && wget -O init.sh 'https://omi-gitlab.e-technik.uni-ulm.de/cloudiator/catalogue-scripts/raw/master/scripts/database/couchbase/init.sh' + && wget -O seed.sh 'https://omi-gitlab.e-technik.uni-ulm.de/cloudiator/catalogue-scripts/raw/master/scripts/database/couchbase/seed.sh' " install : "sudo -E chmod +x install.sh && sudo -E ./install.sh" configure : " source /etc/environment && sudo -E chmod +x init.sh && sudo -E chmod +x seed.sh && sudo -E ./init.sh && sudo -E ./seed.sh" #configure : " sudo -E chmod +x init.sh && sudo -E chmod +x seed.sh " diff --git a/utils/java-client-config.json b/utils/java-client-config.json new file mode 100644 index 0000000..7757319 --- /dev/null +++ b/utils/java-client-config.json @@ -0,0 +1,9 @@ +{ + "modelPackage" : "de.uulm.omi.cloudiator.catalogue.client.model", + "apiPackage" : "de.uulm.omi.cloudiator.catalogue.client.api", + "invokerPackage" : "de.uulm.omi.cloudiator.catalogue.client", + "groupId" : "de.uulm.omi.cloudiator.catalogue", + "artifactId" : "client", + "fullJavaUtil" : true, + "dateLibrary" : "java8" +} \ No newline at end of file diff --git a/utils/runCodegenClient.sh b/utils/runCodegenClient.sh new file mode 100644 index 0000000..53cc50d --- /dev/null +++ b/utils/runCodegenClient.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +java -jar utils/swagger-codegen-cli-2.3.0.jar generate -i swagger/swagger.yaml -l java -c utils/java-client-config.json -o client/. diff --git a/utils/runCodegen.sh b/utils/runCodegenServer.sh similarity index 100% rename from utils/runCodegen.sh rename to utils/runCodegenServer.sh -- GitLab