Class ProtoClient

java.lang.Object
io.kubernetes.client.ProtoClient

public class ProtoClient extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    ProtoClient.ObjectOrStatus<T extends com.google.protobuf.Message>
    ObjectOrStatus is an object that is the return from a method call it holds either an API Object or an API Status object, but not both.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Simple Protocol Budder API client constructor, uses default configuration
    ProtoClient(io.kubernetes.client.openapi.ApiClient apiClient)
    ProtocolBuffer Client Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends com.google.protobuf.Message>
    ProtoClient.ObjectOrStatus<T>
    create(T obj, String path, String apiVersion, String kind)
    Create a Kubernetes API object using protocol buffer encoding.
    <T extends com.google.protobuf.Message>
    ProtoClient.ObjectOrStatus<T>
    delete(com.google.protobuf.Message.Builder builder, String path)
    Delete a kubernetes API object using protocol buffer encoding.
    <T extends com.google.protobuf.Message>
    ProtoClient.ObjectOrStatus<T>
    delete(com.google.protobuf.Message.Builder builder, String path, io.kubernetes.client.proto.Meta.DeleteOptions deleteOptions)
    Delete a kubernetes API object using protocol buffer encoding.
    <T extends com.google.protobuf.Message>
    ProtoClient.ObjectOrStatus<T>
    get(com.google.protobuf.Message.Builder builder, String path)
    Get a Kubernetes API object using protocol buffer encoding.
    io.kubernetes.client.openapi.ApiClient
    Get the API client for these ProtocolBuffer operations.
    <T extends com.google.protobuf.Message>
    ProtoClient.ObjectOrStatus<T>
    list(com.google.protobuf.Message.Builder builder, String path)
    List is fluent, semantic sugar method on top of get, which is intended to convey that the object is a List of objects rather than a single object
    <T extends com.google.protobuf.Message>
    ProtoClient.ObjectOrStatus<T>
    merge(T obj, String path, String apiVersion, String kind)
    Merge a Kubernetes API object using protocol buffer encoding.
    <T extends com.google.protobuf.Message>
    ProtoClient.ObjectOrStatus<T>
    request(com.google.protobuf.Message.Builder builder, String path, String method, T body, String apiVersion, String kind)
    Generic protocol buffer based HTTP request.
    void
    setApiClient(io.kubernetes.client.openapi.ApiClient apiClient)
    Set the API client for subsequent ProtocolBuffer operations.
    <T extends com.google.protobuf.Message>
    ProtoClient.ObjectOrStatus<T>
    update(T obj, String path, String apiVersion, String kind)
    Update a Kubernetes API object using protocol buffer encoding.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProtoClient

      public ProtoClient()
      Simple Protocol Budder API client constructor, uses default configuration
    • ProtoClient

      public ProtoClient(io.kubernetes.client.openapi.ApiClient apiClient)
      ProtocolBuffer Client Constructor
      Parameters:
      apiClient - The api client to use.
  • Method Details

    • getApiClient

      public io.kubernetes.client.openapi.ApiClient getApiClient()
      Get the API client for these ProtocolBuffer operations.
      Returns:
      The API client that will be used.
    • setApiClient

      public void setApiClient(io.kubernetes.client.openapi.ApiClient apiClient)
      Set the API client for subsequent ProtocolBuffer operations.
      Parameters:
      apiClient - The new API client to use.
    • get

      public <T extends com.google.protobuf.Message> ProtoClient.ObjectOrStatus<T> get(com.google.protobuf.Message.Builder builder, String path) throws io.kubernetes.client.openapi.ApiException, IOException
      Get a Kubernetes API object using protocol buffer encoding.
      Parameters:
      builder - The appropriate Builder for the object received from the request.
      path - The URL path to call (e.g. /api/v1/namespaces/default/pods/pod-name)
      Returns:
      An ObjectOrStatus which contains the Object requested, or a Status about the request.
      Throws:
      io.kubernetes.client.openapi.ApiException
      IOException
    • list

      public <T extends com.google.protobuf.Message> ProtoClient.ObjectOrStatus<T> list(com.google.protobuf.Message.Builder builder, String path) throws io.kubernetes.client.openapi.ApiException, IOException
      List is fluent, semantic sugar method on top of get, which is intended to convey that the object is a List of objects rather than a single object
      Parameters:
      builder - The appropriate Builder for the object received from the request.
      path - The URL path to call (e.g. /api/v1/namespaces/default/pods/pod-name)
      Returns:
      An ObjectOrStatus which contains the Object requested, or a Status about the request.
      Throws:
      io.kubernetes.client.openapi.ApiException
      IOException
    • create

      public <T extends com.google.protobuf.Message> ProtoClient.ObjectOrStatus<T> create(T obj, String path, String apiVersion, String kind) throws io.kubernetes.client.openapi.ApiException, IOException
      Create a Kubernetes API object using protocol buffer encoding. Performs a POST
      Parameters:
      obj - The object to create
      path - The URL path to call
      apiVersion - The api version to use
      kind - The kind of the object
      Returns:
      An ObjectOrStatus which contains the Object requested, or a Status about the request.
      Throws:
      io.kubernetes.client.openapi.ApiException
      IOException
    • update

      public <T extends com.google.protobuf.Message> ProtoClient.ObjectOrStatus<T> update(T obj, String path, String apiVersion, String kind) throws io.kubernetes.client.openapi.ApiException, IOException
      Update a Kubernetes API object using protocol buffer encoding. Performs a PUT
      Parameters:
      obj - The object to create
      path - The URL path to call
      apiVersion - The api version to use
      kind - The kind of the object
      Returns:
      An ObjectOrStatus which contains the Object requested, or a Status about the request.
      Throws:
      io.kubernetes.client.openapi.ApiException
      IOException
    • merge

      public <T extends com.google.protobuf.Message> ProtoClient.ObjectOrStatus<T> merge(T obj, String path, String apiVersion, String kind) throws io.kubernetes.client.openapi.ApiException, IOException
      Merge a Kubernetes API object using protocol buffer encoding. Performs a PATCH
      Parameters:
      obj - The object to merge
      path - The URL path to call
      apiVersion - The api version to use
      kind - The kind of the object
      Returns:
      An ObjectOrStatus which contains the Object requested, or a Status about the request.
      Throws:
      io.kubernetes.client.openapi.ApiException
      IOException
    • delete

      public <T extends com.google.protobuf.Message> ProtoClient.ObjectOrStatus<T> delete(com.google.protobuf.Message.Builder builder, String path) throws io.kubernetes.client.openapi.ApiException, IOException
      Delete a kubernetes API object using protocol buffer encoding.
      Parameters:
      builder - The builder for the response
      path - The path to call in the API server
      Returns:
      The response status
      Throws:
      io.kubernetes.client.openapi.ApiException
      IOException
    • delete

      public <T extends com.google.protobuf.Message> ProtoClient.ObjectOrStatus<T> delete(com.google.protobuf.Message.Builder builder, String path, io.kubernetes.client.proto.Meta.DeleteOptions deleteOptions) throws io.kubernetes.client.openapi.ApiException, IOException
      Delete a kubernetes API object using protocol buffer encoding.
      Parameters:
      builder - The builder for the response
      path - The path to call in the API server
      deleteOptions - optional deleteOptions
      Returns:
      The response status
      Throws:
      io.kubernetes.client.openapi.ApiException
      IOException
    • request

      public <T extends com.google.protobuf.Message> ProtoClient.ObjectOrStatus<T> request(com.google.protobuf.Message.Builder builder, String path, String method, T body, String apiVersion, String kind) throws io.kubernetes.client.openapi.ApiException, IOException
      Generic protocol buffer based HTTP request. Not intended for general consumption, but public for advance use cases.
      Parameters:
      builder - The appropriate Builder for the object received from the request.
      method - The HTTP method (e.g. GET) for this request.
      path - The URL path to call (e.g. /api/v1/namespaces/default/pods/pod-name)
      body - The body to send with the request (optional)
      apiVersion - The 'apiVersion' to use when encoding, required if body is non-null, ignored otherwise.
      kind - The 'kind' field to use when encoding, required if body is non-null, ignored otherwise.
      Returns:
      An ObjectOrStatus which contains the Object requested, or a Status about the request.
      Throws:
      io.kubernetes.client.openapi.ApiException
      IOException