Skip to content

Commit 75c81fb

Browse files
committed
Initial generated client
1 parent 6176e13 commit 75c81fb

File tree

779 files changed

+225080
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

779 files changed

+225080
-0
lines changed

kubernetes/.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
*.class
2+
3+
# Mobile Tools for Java (J2ME)
4+
.mtj.tmp/
5+
6+
# Package Files #
7+
*.jar
8+
*.war
9+
*.ear
10+
11+
# exclude jar for gradle wrapper
12+
!gradle/wrapper/*.jar
13+
14+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
15+
hs_err_pid*
16+
17+
# build files
18+
**/target
19+
target
20+
.gradle
21+
build

kubernetes/.swagger-codegen-ignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.gitignore
2+
git_push.sh
3+

kubernetes/.travis.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
3+
#
4+
language: java
5+
jdk:
6+
- oraclejdk8
7+
- oraclejdk7
8+
before_install:
9+
# ensure gradlew has proper permission
10+
- chmod a+x ./gradlew
11+
script:
12+
# test using maven
13+
- mvn test
14+
# uncomment below to test using gradle
15+
# - gradle test
16+
# uncomment below to test using sbt
17+
# - sbt test

kubernetes/README.md

+982
Large diffs are not rendered by default.

kubernetes/build.gradle

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
apply plugin: 'idea'
2+
apply plugin: 'eclipse'
3+
4+
group = 'io.kubernetes'
5+
version = '1.0-SNAPSHOT'
6+
7+
buildscript {
8+
repositories {
9+
jcenter()
10+
}
11+
dependencies {
12+
classpath 'com.android.tools.build:gradle:1.5.+'
13+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
14+
}
15+
}
16+
17+
repositories {
18+
jcenter()
19+
}
20+
21+
22+
if(hasProperty('target') && target == 'android') {
23+
24+
apply plugin: 'com.android.library'
25+
apply plugin: 'com.github.dcendents.android-maven'
26+
27+
android {
28+
compileSdkVersion 23
29+
buildToolsVersion '23.0.2'
30+
defaultConfig {
31+
minSdkVersion 14
32+
targetSdkVersion 23
33+
}
34+
compileOptions {
35+
sourceCompatibility JavaVersion.VERSION_1_7
36+
targetCompatibility JavaVersion.VERSION_1_7
37+
}
38+
39+
// Rename the aar correctly
40+
libraryVariants.all { variant ->
41+
variant.outputs.each { output ->
42+
def outputFile = output.outputFile
43+
if (outputFile != null && outputFile.name.endsWith('.aar')) {
44+
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
45+
output.outputFile = new File(outputFile.parent, fileName)
46+
}
47+
}
48+
}
49+
50+
dependencies {
51+
provided 'javax.annotation:jsr250-api:1.0'
52+
}
53+
}
54+
55+
afterEvaluate {
56+
android.libraryVariants.all { variant ->
57+
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
58+
task.description = "Create jar artifact for ${variant.name}"
59+
task.dependsOn variant.javaCompile
60+
task.from variant.javaCompile.destinationDir
61+
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
62+
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
63+
artifacts.add('archives', task);
64+
}
65+
}
66+
67+
task sourcesJar(type: Jar) {
68+
from android.sourceSets.main.java.srcDirs
69+
classifier = 'sources'
70+
}
71+
72+
artifacts {
73+
archives sourcesJar
74+
}
75+
76+
} else {
77+
78+
apply plugin: 'java'
79+
apply plugin: 'maven'
80+
81+
sourceCompatibility = JavaVersion.VERSION_1_7
82+
targetCompatibility = JavaVersion.VERSION_1_7
83+
84+
install {
85+
repositories.mavenInstaller {
86+
pom.artifactId = 'client-java'
87+
}
88+
}
89+
90+
task execute(type:JavaExec) {
91+
main = System.getProperty('mainClass')
92+
classpath = sourceSets.main.runtimeClasspath
93+
}
94+
}
95+
96+
dependencies {
97+
compile 'io.swagger:swagger-annotations:1.5.8'
98+
compile 'com.squareup.okhttp:okhttp:2.7.5'
99+
compile 'com.squareup.okhttp:logging-interceptor:2.7.5'
100+
compile 'com.google.code.gson:gson:2.6.2'
101+
compile 'joda-time:joda-time:2.9.3'
102+
testCompile 'junit:junit:4.12'
103+
}

kubernetes/build.sbt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
lazy val root = (project in file(".")).
2+
settings(
3+
organization := "io.kubernetes",
4+
name := "client-java",
5+
version := "1.0-SNAPSHOT",
6+
scalaVersion := "2.11.4",
7+
scalacOptions ++= Seq("-feature"),
8+
javacOptions in compile ++= Seq("-Xlint:deprecation"),
9+
publishArtifact in (Compile, packageDoc) := false,
10+
resolvers += Resolver.mavenLocal,
11+
libraryDependencies ++= Seq(
12+
"io.swagger" % "swagger-annotations" % "1.5.8",
13+
"com.squareup.okhttp" % "okhttp" % "2.7.5",
14+
"com.squareup.okhttp" % "logging-interceptor" % "2.7.5",
15+
"com.google.code.gson" % "gson" % "2.6.2",
16+
"joda-time" % "joda-time" % "2.9.3" % "compile",
17+
"junit" % "junit" % "4.12" % "test",
18+
"com.novocode" % "junit-interface" % "0.10" % "test"
19+
)
20+
)

kubernetes/docs/ApisApi.md

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# ApisApi
2+
3+
All URIs are relative to *https://localhost*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**getAPIVersions**](ApisApi.md#getAPIVersions) | **GET** /apis/ |
8+
9+
10+
<a name="getAPIVersions"></a>
11+
# **getAPIVersions**
12+
> V1APIGroupList getAPIVersions()
13+
14+
15+
16+
get available API versions
17+
18+
### Example
19+
```java
20+
// Import classes:
21+
//import io.kubernetes.client.ApiClient;
22+
//import io.kubernetes.client.ApiException;
23+
//import io.kubernetes.client.Configuration;
24+
//import io.kubernetes.client.auth.*;
25+
//import io.kubernetes.client.apis.ApisApi;
26+
27+
ApiClient defaultClient = Configuration.getDefaultApiClient();
28+
29+
// Configure API key authorization: BearerToken
30+
ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
31+
BearerToken.setApiKey("YOUR API KEY");
32+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
33+
//BearerToken.setApiKeyPrefix("Token");
34+
35+
ApisApi apiInstance = new ApisApi();
36+
try {
37+
V1APIGroupList result = apiInstance.getAPIVersions();
38+
System.out.println(result);
39+
} catch (ApiException e) {
40+
System.err.println("Exception when calling ApisApi#getAPIVersions");
41+
e.printStackTrace();
42+
}
43+
```
44+
45+
### Parameters
46+
This endpoint does not need any parameter.
47+
48+
### Return type
49+
50+
[**V1APIGroupList**](V1APIGroupList.md)
51+
52+
### Authorization
53+
54+
[BearerToken](../README.md#BearerToken)
55+
56+
### HTTP request headers
57+
58+
- **Content-Type**: application/json, application/yaml, application/vnd.kubernetes.protobuf
59+
- **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf
60+

kubernetes/docs/AppsApi.md

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# AppsApi
2+
3+
All URIs are relative to *https://localhost*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**getAPIGroup**](AppsApi.md#getAPIGroup) | **GET** /apis/apps/ |
8+
9+
10+
<a name="getAPIGroup"></a>
11+
# **getAPIGroup**
12+
> V1APIGroup getAPIGroup()
13+
14+
15+
16+
get information of a group
17+
18+
### Example
19+
```java
20+
// Import classes:
21+
//import io.kubernetes.client.ApiClient;
22+
//import io.kubernetes.client.ApiException;
23+
//import io.kubernetes.client.Configuration;
24+
//import io.kubernetes.client.auth.*;
25+
//import io.kubernetes.client.apis.AppsApi;
26+
27+
ApiClient defaultClient = Configuration.getDefaultApiClient();
28+
29+
// Configure API key authorization: BearerToken
30+
ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
31+
BearerToken.setApiKey("YOUR API KEY");
32+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
33+
//BearerToken.setApiKeyPrefix("Token");
34+
35+
AppsApi apiInstance = new AppsApi();
36+
try {
37+
V1APIGroup result = apiInstance.getAPIGroup();
38+
System.out.println(result);
39+
} catch (ApiException e) {
40+
System.err.println("Exception when calling AppsApi#getAPIGroup");
41+
e.printStackTrace();
42+
}
43+
```
44+
45+
### Parameters
46+
This endpoint does not need any parameter.
47+
48+
### Return type
49+
50+
[**V1APIGroup**](V1APIGroup.md)
51+
52+
### Authorization
53+
54+
[BearerToken](../README.md#BearerToken)
55+
56+
### HTTP request headers
57+
58+
- **Content-Type**: application/json, application/yaml, application/vnd.kubernetes.protobuf
59+
- **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf
60+

0 commit comments

Comments
 (0)