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:
VmDefinition
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
ConstructorsConstructorDescriptionK8sDynamicModel(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.JsonObjectdata()Gets the data.getKind()io.kubernetes.client.openapi.models.V1ObjectMetakind()Gets the kind.io.kubernetes.client.openapi.models.V1ObjectMetametadata()Gets the metadata.com.google.gson.JsonObjectConvenience 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:
getApiVersionin interfaceio.kubernetes.client.common.KubernetesType
-
apiVersion
Gets the API version.(Abbreviated method name for convenience.)
- Returns:
- the API version
-
getKind
- Specified by:
getKindin interfaceio.kubernetes.client.common.KubernetesType
-
kind
Gets the kind.(Abbreviated method name for convenience.)
- Returns:
- the kind
-
getMetadata
- Specified by:
getMetadatain interfaceio.kubernetes.client.common.KubernetesObject
-
metadata
Gets the metadata.(Abbreviated method name for convenience.)
- Returns:
- the metadata
-
data
Gets the data.- Returns:
- the data
-
statusJson
Convenience method for getting the status.- Returns:
- the JSON object describing the status
-
toString
-