Skip to content

Commit 7fd40d0

Browse files
committed
rollback prometheus-operator update.sh
1 parent cd5a0d0 commit 7fd40d0

File tree

382 files changed

+30464
-78563
lines changed

Some content is hidden

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

382 files changed

+30464
-78563
lines changed

client-java-contrib/prometheus-operator/src/main/java/com/coreos/monitoring/models/V1Alertmanager.java

Lines changed: 74 additions & 205 deletions
Large diffs are not rendered by default.
Lines changed: 71 additions & 204 deletions
Original file line numberDiff line numberDiff line change
@@ -1,186 +1,166 @@
11
/*
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.21.1
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-
2+
Copyright 2020 The Kubernetes Authors.
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.
12+
*/
1413
package com.coreos.monitoring.models;
1514

16-
import java.util.Objects;
17-
import java.util.Arrays;
18-
import com.coreos.monitoring.models.V1Alertmanager;
19-
import com.google.gson.TypeAdapter;
20-
import com.google.gson.annotations.JsonAdapter;
2115
import com.google.gson.annotations.SerializedName;
22-
import com.google.gson.stream.JsonReader;
23-
import com.google.gson.stream.JsonWriter;
2416
import io.kubernetes.client.openapi.models.V1ListMeta;
25-
import java.io.IOException;
17+
import io.swagger.annotations.ApiModel;
18+
import io.swagger.annotations.ApiModelProperty;
2619
import java.util.ArrayList;
2720
import java.util.List;
21+
import java.util.Objects;
2822

29-
import com.google.gson.Gson;
30-
import com.google.gson.GsonBuilder;
31-
import com.google.gson.JsonArray;
32-
import com.google.gson.JsonDeserializationContext;
33-
import com.google.gson.JsonDeserializer;
34-
import com.google.gson.JsonElement;
35-
import com.google.gson.JsonObject;
36-
import com.google.gson.JsonParseException;
37-
import com.google.gson.TypeAdapterFactory;
38-
import com.google.gson.reflect.TypeToken;
39-
import com.google.gson.TypeAdapter;
40-
import com.google.gson.stream.JsonReader;
41-
import com.google.gson.stream.JsonWriter;
42-
import java.io.IOException;
43-
44-
import java.lang.reflect.Type;
45-
import java.util.HashMap;
46-
import java.util.HashSet;
47-
import java.util.List;
48-
import java.util.Map;
49-
import java.util.Map.Entry;
50-
import java.util.Set;
51-
52-
import io.kubernetes.client.openapi.JSON;
53-
54-
/**
55-
* AlertmanagerList is a list of Alertmanager
56-
*/
57-
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-03-01T07:02:10.169254Z[Etc/UTC]")
23+
/** AlertmanagerList is a list of Alertmanager */
24+
@ApiModel(description = "AlertmanagerList is a list of Alertmanager")
25+
@javax.annotation.Generated(
26+
value = "org.openapitools.codegen.languages.JavaClientCodegen",
27+
date = "2020-08-31T19:41:55.826Z[Etc/UTC]")
5828
public class V1AlertmanagerList implements io.kubernetes.client.common.KubernetesListObject {
5929
public static final String SERIALIZED_NAME_API_VERSION = "apiVersion";
30+
6031
@SerializedName(SERIALIZED_NAME_API_VERSION)
6132
private String apiVersion;
6233

6334
public static final String SERIALIZED_NAME_ITEMS = "items";
35+
6436
@SerializedName(SERIALIZED_NAME_ITEMS)
65-
private List<V1Alertmanager> items = new ArrayList<>();
37+
private List<V1Alertmanager> items = new ArrayList<V1Alertmanager>();
6638

6739
public static final String SERIALIZED_NAME_KIND = "kind";
40+
6841
@SerializedName(SERIALIZED_NAME_KIND)
6942
private String kind;
7043

7144
public static final String SERIALIZED_NAME_METADATA = "metadata";
45+
7246
@SerializedName(SERIALIZED_NAME_METADATA)
7347
private V1ListMeta metadata = null;
7448

75-
public V1AlertmanagerList() {
76-
}
77-
7849
public V1AlertmanagerList apiVersion(String apiVersion) {
79-
50+
8051
this.apiVersion = apiVersion;
8152
return this;
8253
}
8354

84-
/**
85-
* 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
55+
/**
56+
* APIVersion defines the versioned schema of this representation of an object. Servers should
57+
* convert recognized schemas to the latest internal value, and may reject unrecognized values.
58+
* More info:
59+
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
60+
*
8661
* @return apiVersion
87-
**/
88-
@jakarta.annotation.Nullable
62+
*/
63+
@javax.annotation.Nullable
64+
@ApiModelProperty(
65+
value =
66+
"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")
8967
public String getApiVersion() {
9068
return apiVersion;
9169
}
9270

93-
9471
public void setApiVersion(String apiVersion) {
9572
this.apiVersion = apiVersion;
9673
}
9774

98-
9975
public V1AlertmanagerList items(List<V1Alertmanager> items) {
100-
76+
10177
this.items = items;
10278
return this;
10379
}
10480

10581
public V1AlertmanagerList addItemsItem(V1Alertmanager itemsItem) {
106-
if (this.items == null) {
107-
this.items = new ArrayList<>();
108-
}
10982
this.items.add(itemsItem);
11083
return this;
11184
}
11285

113-
/**
114-
* List of alertmanagers. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
86+
/**
87+
* List of alertmanagers. More info:
88+
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
89+
*
11590
* @return items
116-
**/
117-
@jakarta.annotation.Nonnull
91+
*/
92+
@ApiModelProperty(
93+
required = true,
94+
value =
95+
"List of alertmanagers. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md")
11896
public List<V1Alertmanager> getItems() {
11997
return items;
12098
}
12199

122-
123100
public void setItems(List<V1Alertmanager> items) {
124101
this.items = items;
125102
}
126103

127-
128104
public V1AlertmanagerList kind(String kind) {
129-
105+
130106
this.kind = kind;
131107
return this;
132108
}
133109

134-
/**
135-
* 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
110+
/**
111+
* Kind is a string value representing the REST resource this object represents. Servers may infer
112+
* this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More
113+
* info:
114+
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
115+
*
136116
* @return kind
137-
**/
138-
@jakarta.annotation.Nullable
117+
*/
118+
@javax.annotation.Nullable
119+
@ApiModelProperty(
120+
value =
121+
"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")
139122
public String getKind() {
140123
return kind;
141124
}
142125

143-
144126
public void setKind(String kind) {
145127
this.kind = kind;
146128
}
147129

148-
149130
public V1AlertmanagerList metadata(V1ListMeta metadata) {
150-
131+
151132
this.metadata = metadata;
152133
return this;
153134
}
154135

155-
/**
136+
/**
156137
* Get metadata
138+
*
157139
* @return metadata
158-
**/
159-
@jakarta.annotation.Nullable
140+
*/
141+
@javax.annotation.Nullable
142+
@ApiModelProperty(value = "")
160143
public V1ListMeta getMetadata() {
161144
return metadata;
162145
}
163146

164-
165147
public void setMetadata(V1ListMeta metadata) {
166148
this.metadata = metadata;
167149
}
168150

169-
170-
171151
@Override
172-
public boolean equals(Object o) {
152+
public boolean equals(java.lang.Object o) {
173153
if (this == o) {
174154
return true;
175155
}
176156
if (o == null || getClass() != o.getClass()) {
177157
return false;
178158
}
179159
V1AlertmanagerList v1AlertmanagerList = (V1AlertmanagerList) o;
180-
return Objects.equals(this.apiVersion, v1AlertmanagerList.apiVersion) &&
181-
Objects.equals(this.items, v1AlertmanagerList.items) &&
182-
Objects.equals(this.kind, v1AlertmanagerList.kind) &&
183-
Objects.equals(this.metadata, v1AlertmanagerList.metadata);
160+
return Objects.equals(this.apiVersion, v1AlertmanagerList.apiVersion)
161+
&& Objects.equals(this.items, v1AlertmanagerList.items)
162+
&& Objects.equals(this.kind, v1AlertmanagerList.kind)
163+
&& Objects.equals(this.metadata, v1AlertmanagerList.metadata);
184164
}
185165

186166
@Override
@@ -201,125 +181,12 @@ public String toString() {
201181
}
202182

203183
/**
204-
* Convert the given object to string with each line indented by 4 spaces
205-
* (except the first line).
184+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
206185
*/
207-
private String toIndentedString(Object o) {
186+
private String toIndentedString(java.lang.Object o) {
208187
if (o == null) {
209188
return "null";
210189
}
211190
return o.toString().replace("\n", "\n ");
212191
}
213-
214-
215-
public static HashSet<String> openapiFields;
216-
public static HashSet<String> openapiRequiredFields;
217-
218-
static {
219-
// a set of all properties/fields (JSON key names)
220-
openapiFields = new HashSet<String>();
221-
openapiFields.add("apiVersion");
222-
openapiFields.add("items");
223-
openapiFields.add("kind");
224-
openapiFields.add("metadata");
225-
226-
// a set of required properties/fields (JSON key names)
227-
openapiRequiredFields = new HashSet<String>();
228-
openapiRequiredFields.add("items");
229-
}
230-
231-
/**
232-
* Validates the JSON Object and throws an exception if issues found
233-
*
234-
* @param jsonObj JSON Object
235-
* @throws IOException if the JSON Object is invalid with respect to V1AlertmanagerList
236-
*/
237-
public static void validateJsonObject(JsonObject jsonObj) throws IOException {
238-
if (jsonObj == null) {
239-
if (!V1AlertmanagerList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
240-
throw new IllegalArgumentException(String.format("The required field(s) %s in V1AlertmanagerList is not found in the empty JSON string", V1AlertmanagerList.openapiRequiredFields.toString()));
241-
}
242-
}
243-
244-
Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();
245-
// check to see if the JSON string contains additional fields
246-
for (Entry<String, JsonElement> entry : entries) {
247-
if (!V1AlertmanagerList.openapiFields.contains(entry.getKey())) {
248-
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AlertmanagerList` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
249-
}
250-
}
251-
252-
// check to make sure all required properties/fields are present in the JSON string
253-
for (String requiredField : V1AlertmanagerList.openapiRequiredFields) {
254-
if (jsonObj.get(requiredField) == null) {
255-
throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
256-
}
257-
}
258-
if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) {
259-
throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString()));
260-
}
261-
// ensure the json data is an array
262-
if (!jsonObj.get("items").isJsonArray()) {
263-
throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString()));
264-
}
265-
266-
JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items");
267-
// validate the required field `items` (array)
268-
for (int i = 0; i < jsonArrayitems.size(); i++) {
269-
V1Alertmanager.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject());
270-
};
271-
if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) {
272-
throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString()));
273-
}
274-
}
275-
276-
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
277-
@SuppressWarnings("unchecked")
278-
@Override
279-
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
280-
if (!V1AlertmanagerList.class.isAssignableFrom(type.getRawType())) {
281-
return null; // this class only serializes 'V1AlertmanagerList' and its subtypes
282-
}
283-
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
284-
final TypeAdapter<V1AlertmanagerList> thisAdapter
285-
= gson.getDelegateAdapter(this, TypeToken.get(V1AlertmanagerList.class));
286-
287-
return (TypeAdapter<T>) new TypeAdapter<V1AlertmanagerList>() {
288-
@Override
289-
public void write(JsonWriter out, V1AlertmanagerList value) throws IOException {
290-
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
291-
elementAdapter.write(out, obj);
292-
}
293-
294-
@Override
295-
public V1AlertmanagerList read(JsonReader in) throws IOException {
296-
JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
297-
validateJsonObject(jsonObj);
298-
return thisAdapter.fromJsonTree(jsonObj);
299-
}
300-
301-
}.nullSafe();
302-
}
303-
}
304-
305-
/**
306-
* Create an instance of V1AlertmanagerList given an JSON string
307-
*
308-
* @param jsonString JSON string
309-
* @return An instance of V1AlertmanagerList
310-
* @throws IOException if the JSON string is invalid with respect to V1AlertmanagerList
311-
*/
312-
public static V1AlertmanagerList fromJson(String jsonString) throws IOException {
313-
return JSON.getGson().fromJson(jsonString, V1AlertmanagerList.class);
314-
}
315-
316-
/**
317-
* Convert an instance of V1AlertmanagerList to an JSON string
318-
*
319-
* @return JSON string
320-
*/
321-
public String toJson() {
322-
return JSON.getGson().toJson(this);
323-
}
324192
}
325-

0 commit comments

Comments
 (0)