Package io.kubernetes.client
Class ProtoClient
java.lang.Object
io.kubernetes.client.ProtoClient
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic 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
ConstructorsConstructorDescriptionSimple Protocol Budder API client constructor, uses default configurationProtoClient
(io.kubernetes.client.openapi.ApiClient apiClient) ProtocolBuffer Client Constructor -
Method Summary
Modifier and TypeMethodDescription<T extends com.google.protobuf.Message>
ProtoClient.ObjectOrStatus<T>Create a Kubernetes API object using protocol buffer encoding.<T extends com.google.protobuf.Message>
ProtoClient.ObjectOrStatus<T>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 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 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 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 a Kubernetes API object using protocol buffer encoding.
-
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 createpath
- The URL path to callapiVersion
- The api version to usekind
- 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 createpath
- The URL path to callapiVersion
- The api version to usekind
- 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 mergepath
- The URL path to callapiVersion
- The api version to usekind
- 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 responsepath
- 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 responsepath
- The path to call in the API serverdeleteOptions
- 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
-