Package org.jdrupes.vmoperator.common
Class K8sDynamicModel
java.lang.Object
org.jdrupes.vmoperator.common.K8sDynamicModel
- All Implemented Interfaces:
io.kubernetes.client.common.KubernetesObject
,io.kubernetes.client.common.KubernetesType
- Direct Known Subclasses:
VmDefinitionModel
Represents a Kubernetes object using a JSON data structure.
Some information that is common to all Kubernetes objects,
notably the metadata, is made available through the methods
defined by KubernetesObject
.
-
Constructor Summary
ConstructorDescriptionK8sDynamicModel
(com.google.gson.Gson delegate, com.google.gson.JsonObject json) Instantiates a new model from the JSON representation. -
Method Summary
Modifier and TypeMethodDescriptionGets the API version.com.google.gson.JsonObject
data()
Gets the data.getKind()
io.kubernetes.client.openapi.models.V1ObjectMeta
kind()
Gets the kind.io.kubernetes.client.openapi.models.V1ObjectMeta
metadata()
Gets the metadata.com.google.gson.JsonObject
status()
Convenience method for getting the status.toString()
-
Constructor Details
-
K8sDynamicModel
Instantiates a new model from the JSON representation.- Parameters:
delegate
- the gson instance to use for extracting structured datajson
- the JSON
-
-
Method Details
-
getApiVersion
- Specified by:
getApiVersion
in interfaceio.kubernetes.client.common.KubernetesType
-
apiVersion
Gets the API version.(Abbreviated method name for convenience.)
- Returns:
- the API version
-
getKind
- Specified by:
getKind
in interfaceio.kubernetes.client.common.KubernetesType
-
kind
Gets the kind.(Abbreviated method name for convenience.)
- Returns:
- the kind
-
getMetadata
- Specified by:
getMetadata
in interfaceio.kubernetes.client.common.KubernetesObject
-
metadata
Gets the metadata.(Abbreviated method name for convenience.)
- Returns:
- the metadata
-
data
Gets the data.- Returns:
- the data
-
status
Convenience method for getting the status.- Returns:
- the JSON object describing the status
-
toString
-