|
16 | 16 |
|
17 | 17 | import io.kubernetes.client.ApiCallback;
|
18 | 18 | import io.kubernetes.client.ApiException;
|
| 19 | +import io.kubernetes.client.models.V1ConfigMap; |
| 20 | +import io.kubernetes.client.models.V1ConfigMapList; |
19 | 21 | import io.kubernetes.client.models.V1DeleteOptions;
|
20 | 22 | import io.kubernetes.client.models.V1ListMeta;
|
21 | 23 | import io.kubernetes.client.models.V1PersistentVolumeClaimList;
|
@@ -350,6 +352,188 @@ public Step createCustomResourceDefinitionAsync(String name, V1beta1CustomResour
|
350 | 352 | return createRequestAsync(responseStep, new RequestParams("createCustomResourceDefinition", null, name, body), CREATE_CUSTOMRESOURCEDEFINITION);
|
351 | 353 | }
|
352 | 354 |
|
| 355 | + /* Config Maps */ |
| 356 | + |
| 357 | + /** |
| 358 | + * List config maps |
| 359 | + * @param namespace Namespace |
| 360 | + * @return List of config maps |
| 361 | + * @throws ApiException API Exception |
| 362 | + */ |
| 363 | + public V1ConfigMapList listConfigMap(String namespace) throws ApiException { |
| 364 | + String _continue = ""; |
| 365 | + ClientUsage cu = useClient(); |
| 366 | + try { |
| 367 | + return cu.client().getCoreApiClient().listNamespacedConfigMap(namespace, pretty, _continue, fieldSelector, |
| 368 | + includeUninitialized, labelSelector, limit, resourceVersion, timeoutSeconds, watch); |
| 369 | + } finally { |
| 370 | + cu.recycle(); |
| 371 | + } |
| 372 | + } |
| 373 | + |
| 374 | + private com.squareup.okhttp.Call listConfigMapAsync(ClientUsage usage, String namespace, String _continue, ApiCallback<V1ConfigMapList> callback) throws ApiException { |
| 375 | + return usage.client().getCoreApiClient().listNamespacedConfigMapAsync(namespace, pretty, _continue, |
| 376 | + fieldSelector, includeUninitialized, labelSelector, limit, resourceVersion, timeoutSeconds, watch, callback); |
| 377 | + } |
| 378 | + |
| 379 | + private final CallFactory<V1ConfigMapList> LIST_CONFIGMAP = (requestParams, usage, cont, callback) -> { |
| 380 | + return listConfigMapAsync(usage, requestParams.namespace, cont, callback); |
| 381 | + }; |
| 382 | + |
| 383 | + /** |
| 384 | + * Asynchronous step for listing config maps |
| 385 | + * @param namespace Namespace |
| 386 | + * @param responseStep Response step for when call completes |
| 387 | + * @return Asynchronous step |
| 388 | + */ |
| 389 | + public Step listConfigMapAsync(String namespace, ResponseStep<V1ConfigMapList> responseStep) { |
| 390 | + return createRequestAsync(responseStep, new RequestParams("listConfigMap", namespace, null, null), LIST_CONFIGMAP); |
| 391 | + } |
| 392 | + |
| 393 | + /** |
| 394 | + * Read config map |
| 395 | + * @param name Name |
| 396 | + * @param namespace Namespace |
| 397 | + * @return Read config map |
| 398 | + * @throws ApiException API Exception |
| 399 | + */ |
| 400 | + public V1ConfigMap readConfigMap(String name, String namespace) throws ApiException { |
| 401 | + ClientUsage cu = useClient(); |
| 402 | + try { |
| 403 | + return cu.client().getCoreApiClient().readNamespacedConfigMap(name, namespace, pretty, exact, export); |
| 404 | + } finally { |
| 405 | + cu.recycle(); |
| 406 | + } |
| 407 | + } |
| 408 | + |
| 409 | + private com.squareup.okhttp.Call readConfigMapAsync(ClientUsage usage, String name, String namespace, ApiCallback<V1ConfigMap> callback) throws ApiException { |
| 410 | + return usage.client().getCoreApiClient().readNamespacedConfigMapAsync(name, namespace, pretty, exact, export, callback); |
| 411 | + } |
| 412 | + |
| 413 | + private final CallFactory<V1ConfigMap> READ_CONFIGMAP = (requestParams, usage, cont, callback) -> { |
| 414 | + return readConfigMapAsync(usage, requestParams.name, requestParams.namespace, callback); |
| 415 | + }; |
| 416 | + |
| 417 | + /** |
| 418 | + * Asynchronous step for reading config map |
| 419 | + * @param name Name |
| 420 | + * @param namespace Namespace |
| 421 | + * @param responseStep Response step for when call completes |
| 422 | + * @return Asynchronous step |
| 423 | + */ |
| 424 | + public Step readConfigMapAsync(String name, String namespace, ResponseStep<V1ConfigMap> responseStep) { |
| 425 | + return createRequestAsync(responseStep, new RequestParams("readConfigMap", namespace, name, null), READ_CONFIGMAP); |
| 426 | + } |
| 427 | + |
| 428 | + /** |
| 429 | + * Create config map |
| 430 | + * @param namespace Namespace |
| 431 | + * @param body Body |
| 432 | + * @return Created config map |
| 433 | + * @throws ApiException API Exception |
| 434 | + */ |
| 435 | + public V1ConfigMap createConfigMap(String namespace, V1ConfigMap body) throws ApiException { |
| 436 | + ClientUsage cu = useClient(); |
| 437 | + try { |
| 438 | + return cu.client().getCoreApiClient().createNamespacedConfigMap(namespace, body, pretty); |
| 439 | + } finally { |
| 440 | + cu.recycle(); |
| 441 | + } |
| 442 | + } |
| 443 | + |
| 444 | + private com.squareup.okhttp.Call createConfigMapAsync(ClientUsage usage, String namespace, V1ConfigMap body, ApiCallback<V1ConfigMap> callback) throws ApiException { |
| 445 | + return usage.client().getCoreApiClient().createNamespacedConfigMapAsync(namespace, body, pretty, callback); |
| 446 | + } |
| 447 | + |
| 448 | + private final CallFactory<V1ConfigMap> CREATE_CONFIGMAP = (requestParams, usage, cont, callback) -> { |
| 449 | + return createConfigMapAsync(usage, requestParams.namespace, (V1ConfigMap) requestParams.body, callback); |
| 450 | + }; |
| 451 | + |
| 452 | + /** |
| 453 | + * Asynchronous step for creating config map |
| 454 | + * @param namespace Namespace |
| 455 | + * @param body Body |
| 456 | + * @param responseStep Response step for when call completes |
| 457 | + * @return Asynchronous step |
| 458 | + */ |
| 459 | + public Step createConfigMapAsync(String namespace, V1ConfigMap body, ResponseStep<V1ConfigMap> responseStep) { |
| 460 | + return createRequestAsync(responseStep, new RequestParams("createConfigMap", namespace, null, body), CREATE_CONFIGMAP); |
| 461 | + } |
| 462 | + |
| 463 | + /** |
| 464 | + * Replace config map |
| 465 | + * @param name Name |
| 466 | + * @param namespace Namespace |
| 467 | + * @param body Body |
| 468 | + * @return Replaced config map |
| 469 | + * @throws ApiException API Exception |
| 470 | + */ |
| 471 | + public V1ConfigMap replaceConfigMap(String name, String namespace, V1ConfigMap body) throws ApiException { |
| 472 | + ClientUsage cu = useClient(); |
| 473 | + try { |
| 474 | + return cu.client().getCoreApiClient().replaceNamespacedConfigMap(name, namespace, body, pretty); |
| 475 | + } finally { |
| 476 | + cu.recycle(); |
| 477 | + } |
| 478 | + } |
| 479 | + |
| 480 | + private com.squareup.okhttp.Call replaceConfigMapAsync(ClientUsage usage, String name, String namespace, V1ConfigMap body, ApiCallback<V1ConfigMap> callback) throws ApiException { |
| 481 | + return usage.client().getCoreApiClient().replaceNamespacedConfigMapAsync(name, namespace, body, pretty, callback); |
| 482 | + } |
| 483 | + |
| 484 | + private final CallFactory<V1ConfigMap> REPLACE_CONFIGMAP = (requestParams, usage, cont, callback) -> { |
| 485 | + return replaceConfigMapAsync(usage, requestParams.name, requestParams.namespace, (V1ConfigMap) requestParams.body, callback); |
| 486 | + }; |
| 487 | + |
| 488 | + /** |
| 489 | + * Asynchronous step for replacing config map |
| 490 | + * @param name Name |
| 491 | + * @param namespace Namespace |
| 492 | + * @param body Body |
| 493 | + * @param responseStep Response step for when call completes |
| 494 | + * @return Asynchronous step |
| 495 | + */ |
| 496 | + public Step replaceConfigMapAsync(String name, String namespace, V1ConfigMap body, ResponseStep<V1ConfigMap> responseStep) { |
| 497 | + return createRequestAsync(responseStep, new RequestParams("replaceConfigMap", namespace, name, body), REPLACE_CONFIGMAP); |
| 498 | + } |
| 499 | + |
| 500 | + /** |
| 501 | + * Delete config map |
| 502 | + * @param name Name |
| 503 | + * @param namespace Namespace |
| 504 | + * @param deleteOptions Delete options |
| 505 | + * @return Status of deletion |
| 506 | + * @throws ApiException API Exception |
| 507 | + */ |
| 508 | + public V1Status deleteConfigMap(String name, String namespace, V1DeleteOptions deleteOptions) throws ApiException { |
| 509 | + ClientUsage cu = useClient(); |
| 510 | + try { |
| 511 | + return cu.client().getCoreApiClient().deleteNamespacedConfigMap(name, namespace, deleteOptions, pretty, gracePeriodSeconds, |
| 512 | + orphanDependents, propagationPolicy); |
| 513 | + } finally { |
| 514 | + cu.recycle(); |
| 515 | + } |
| 516 | + } |
| 517 | + |
| 518 | + private com.squareup.okhttp.Call deleteConfigMapAsync(ClientUsage usage, String name, String namespace, V1DeleteOptions deleteOptions, ApiCallback<V1Status> callback) throws ApiException { |
| 519 | + return usage.client().getCoreApiClient().deleteNamespacedConfigMapAsync(name, namespace, deleteOptions, pretty, gracePeriodSeconds, orphanDependents, propagationPolicy, callback); |
| 520 | + } |
| 521 | + |
| 522 | + private final CallFactory<V1Status> DELETE_CONFIGMAP = (requestParams, usage, cont, callback) -> { |
| 523 | + return deleteConfigMapAsync(usage, requestParams.name, requestParams.namespace, (V1DeleteOptions) requestParams.body, callback); |
| 524 | + }; |
| 525 | + |
| 526 | + /** |
| 527 | + * Asynchronous step for deleting config map |
| 528 | + * @param name Name |
| 529 | + * @param namespace Namespace |
| 530 | + * @param responseStep Response step for when call completes |
| 531 | + * @return Asynchronous step |
| 532 | + */ |
| 533 | + public Step deleteConfigMapAsync(String name, String namespace, ResponseStep<V1Status> responseStep) { |
| 534 | + return createRequestAsync(responseStep, new RequestParams("deleteConfigMap", namespace, name, null), DELETE_CONFIGMAP); |
| 535 | + } |
| 536 | + |
353 | 537 | /* Pods */
|
354 | 538 |
|
355 | 539 | /**
|
|
0 commit comments