Skip to content

Commit 40b79ac

Browse files
committed
generate model classes for Prometheus Operator v0.38.1
1 parent f3e213a commit 40b79ac

File tree

186 files changed

+38787
-3
lines changed

Some content is hidden

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

186 files changed

+38787
-3
lines changed

client-java-contrib/generate.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# This script orchestrates the code generation procedure. It is executed inside a crdgen
1818
# container in order to minimize the environment dependencies on the host, being Docker only.
1919

20-
CRD_URL=${CRD_URL:-}
20+
CRD_URLS=${CRD_URLS:-}
2121
OUTPUT_DIR=${OUTPUT_DIR:-}
2222
KUBERNETES_CRD_GROUP_PREFIX=${KUBERNETES_CRD_GROUP_PREFIX:-}
2323
PACKAGE_NAME=${PACKAGE_NAME:-}
@@ -32,7 +32,7 @@ print_usage() {
3232

3333
while getopts 'u:n:p:o:' flag; do
3434
case "${flag}" in
35-
u) CRD_URL="${OPTARG}" ;;
35+
u) CRD_URLS+=("${OPTARG}") ;;
3636
n) KUBERNETES_CRD_GROUP_PREFIX="${OPTARG}" ;;
3737
p) PACKAGE_NAME="${OPTARG}" ;;
3838
o) OUTPUT_DIR="${OPTARG}" ;;
@@ -45,7 +45,10 @@ done
4545
kind create cluster
4646

4747
# install CRDs to the KinD cluster and dump the swagger spec
48-
kubectl apply -f "${CRD_URL}"
48+
for url in "${CRD_URLS[@]}"; do
49+
kubectl apply -f "$url"
50+
done
51+
4952
sleep 5
5053
kubectl get --raw="/openapi/v2" > /tmp/swagger
5154

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>client-java-parent</artifactId>
7+
<groupId>io.kubernetes</groupId>
8+
<version>10.0.0-SNAPSHOT</version>
9+
<relativePath>../../pom.xml</relativePath>
10+
</parent>
11+
<modelVersion>4.0.0</modelVersion>
12+
13+
<artifactId>client-java-prometheus-operator-models</artifactId>
14+
<version>0.38.1-SNAPSHOT</version>
15+
<dependencies>
16+
<dependency>
17+
<groupId>io.kubernetes</groupId>
18+
<artifactId>client-java</artifactId>
19+
<version>${project.parent.version}</version>
20+
<scope>provided</scope>
21+
</dependency>
22+
</dependencies>
23+
</project>
Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
/*
2+
* Kubernetes
3+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4+
*
5+
* The version of the OpenAPI document: v1.18.2
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
package com.coreos.monitoring.models;
15+
16+
import java.util.Objects;
17+
import java.util.Arrays;
18+
import com.coreos.monitoring.models.V1AlertmanagerSpec;
19+
import com.coreos.monitoring.models.V1AlertmanagerStatus;
20+
import com.google.gson.TypeAdapter;
21+
import com.google.gson.annotations.JsonAdapter;
22+
import com.google.gson.annotations.SerializedName;
23+
import com.google.gson.stream.JsonReader;
24+
import com.google.gson.stream.JsonWriter;
25+
import io.kubernetes.client.openapi.models.V1ObjectMeta;
26+
import io.swagger.annotations.ApiModel;
27+
import io.swagger.annotations.ApiModelProperty;
28+
import java.io.IOException;
29+
30+
/**
31+
* Alertmanager describes an Alertmanager cluster.
32+
*/
33+
@ApiModel(description = "Alertmanager describes an Alertmanager cluster.")
34+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-08-31T19:41:55.826Z[Etc/UTC]")
35+
public class V1Alertmanager implements io.kubernetes.client.common.KubernetesObject {
36+
public static final String SERIALIZED_NAME_API_VERSION = "apiVersion";
37+
@SerializedName(SERIALIZED_NAME_API_VERSION)
38+
private String apiVersion;
39+
40+
public static final String SERIALIZED_NAME_KIND = "kind";
41+
@SerializedName(SERIALIZED_NAME_KIND)
42+
private String kind;
43+
44+
public static final String SERIALIZED_NAME_METADATA = "metadata";
45+
@SerializedName(SERIALIZED_NAME_METADATA)
46+
private V1ObjectMeta metadata = null;
47+
48+
public static final String SERIALIZED_NAME_SPEC = "spec";
49+
@SerializedName(SERIALIZED_NAME_SPEC)
50+
private V1AlertmanagerSpec spec;
51+
52+
public static final String SERIALIZED_NAME_STATUS = "status";
53+
@SerializedName(SERIALIZED_NAME_STATUS)
54+
private V1AlertmanagerStatus status;
55+
56+
57+
public V1Alertmanager apiVersion(String apiVersion) {
58+
59+
this.apiVersion = apiVersion;
60+
return this;
61+
}
62+
63+
/**
64+
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
65+
* @return apiVersion
66+
**/
67+
@javax.annotation.Nullable
68+
@ApiModelProperty(value = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources")
69+
70+
public String getApiVersion() {
71+
return apiVersion;
72+
}
73+
74+
75+
public void setApiVersion(String apiVersion) {
76+
this.apiVersion = apiVersion;
77+
}
78+
79+
80+
public V1Alertmanager kind(String kind) {
81+
82+
this.kind = kind;
83+
return this;
84+
}
85+
86+
/**
87+
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
88+
* @return kind
89+
**/
90+
@javax.annotation.Nullable
91+
@ApiModelProperty(value = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds")
92+
93+
public String getKind() {
94+
return kind;
95+
}
96+
97+
98+
public void setKind(String kind) {
99+
this.kind = kind;
100+
}
101+
102+
103+
public V1Alertmanager metadata(V1ObjectMeta metadata) {
104+
105+
this.metadata = metadata;
106+
return this;
107+
}
108+
109+
/**
110+
* Get metadata
111+
* @return metadata
112+
**/
113+
@javax.annotation.Nullable
114+
@ApiModelProperty(value = "")
115+
116+
public V1ObjectMeta getMetadata() {
117+
return metadata;
118+
}
119+
120+
121+
public void setMetadata(V1ObjectMeta metadata) {
122+
this.metadata = metadata;
123+
}
124+
125+
126+
public V1Alertmanager spec(V1AlertmanagerSpec spec) {
127+
128+
this.spec = spec;
129+
return this;
130+
}
131+
132+
/**
133+
* Get spec
134+
* @return spec
135+
**/
136+
@ApiModelProperty(required = true, value = "")
137+
138+
public V1AlertmanagerSpec getSpec() {
139+
return spec;
140+
}
141+
142+
143+
public void setSpec(V1AlertmanagerSpec spec) {
144+
this.spec = spec;
145+
}
146+
147+
148+
public V1Alertmanager status(V1AlertmanagerStatus status) {
149+
150+
this.status = status;
151+
return this;
152+
}
153+
154+
/**
155+
* Get status
156+
* @return status
157+
**/
158+
@javax.annotation.Nullable
159+
@ApiModelProperty(value = "")
160+
161+
public V1AlertmanagerStatus getStatus() {
162+
return status;
163+
}
164+
165+
166+
public void setStatus(V1AlertmanagerStatus status) {
167+
this.status = status;
168+
}
169+
170+
171+
@Override
172+
public boolean equals(java.lang.Object o) {
173+
if (this == o) {
174+
return true;
175+
}
176+
if (o == null || getClass() != o.getClass()) {
177+
return false;
178+
}
179+
V1Alertmanager v1Alertmanager = (V1Alertmanager) o;
180+
return Objects.equals(this.apiVersion, v1Alertmanager.apiVersion) &&
181+
Objects.equals(this.kind, v1Alertmanager.kind) &&
182+
Objects.equals(this.metadata, v1Alertmanager.metadata) &&
183+
Objects.equals(this.spec, v1Alertmanager.spec) &&
184+
Objects.equals(this.status, v1Alertmanager.status);
185+
}
186+
187+
@Override
188+
public int hashCode() {
189+
return Objects.hash(apiVersion, kind, metadata, spec, status);
190+
}
191+
192+
193+
@Override
194+
public String toString() {
195+
StringBuilder sb = new StringBuilder();
196+
sb.append("class V1Alertmanager {\n");
197+
sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n");
198+
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
199+
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
200+
sb.append(" spec: ").append(toIndentedString(spec)).append("\n");
201+
sb.append(" status: ").append(toIndentedString(status)).append("\n");
202+
sb.append("}");
203+
return sb.toString();
204+
}
205+
206+
/**
207+
* Convert the given object to string with each line indented by 4 spaces
208+
* (except the first line).
209+
*/
210+
private String toIndentedString(java.lang.Object o) {
211+
if (o == null) {
212+
return "null";
213+
}
214+
return o.toString().replace("\n", "\n ");
215+
}
216+
217+
}
218+

0 commit comments

Comments
 (0)