public class GenericKubernetesResource extends Object implements HasMetadata
DNS_LABEL_END, DNS_LABEL_REGEXP, DNS_LABEL_START, FINALIZER_NAME_MATCHER| Constructor and Description |
|---|
GenericKubernetesResource() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
get(Object... path)
Allows the retrieval of field values from this Resource for the provided path segments.
|
Map<String,Object> |
getAdditionalProperties() |
com.fasterxml.jackson.databind.JsonNode |
getAdditionalPropertiesNode() |
void |
setAdditionalProperties(Map<String,Object> additionalProperties) |
void |
setAdditionalProperty(String name,
Object value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddFinalizer, addOwnerReference, addOwnerReference, getApiVersion, getApiVersion, getFinalizers, getFullResourceName, getFullResourceName, getFullResourceName, getGroup, getKind, getKind, getMetadata, getOwnerReferenceFor, getOwnerReferenceFor, getPlural, getPlural, getSingular, getSingular, getVersion, hasFinalizer, hasOwnerReferenceFor, hasOwnerReferenceFor, isFinalizerValid, isMarkedForDeletion, optionalMetadata, removeFinalizer, removeOwnerReference, removeOwnerReference, sanitizeAndValidate, setApiVersion, setMetadatapublic void setAdditionalProperties(Map<String,Object> additionalProperties)
public com.fasterxml.jackson.databind.JsonNode getAdditionalPropertiesNode()
public <T> T get(Object... path)
If the path segment is of type Integer, then we assume that it is an array index to retrieve
the value of an entry in the array.
If the path segment is of type String, then we assume that it is a field name to retrieve the value
from the resource.
In any other case, the path segment is ignored and considered invalid. The method returns null.
Considering the following JSON object:
{
"field": {
"value": 42
"list": [
{entry: 1}, {entry: 2}, {entry: 3}
],
"1": "one"
}
}
The following invocations will produce the documented results:
get("field", "value") will result in 42get("field", "1") will result in "one"get("field", 1) will result in nullget("field", "list", 1, "entry") will result in 2get("field", "list", 99, "entry") will result in nullget("field", "list", "1", "entry") will result in nullget("field", "list", 1, false) will result in nullT - type of the returned object.path - of the field to retrieve.Copyright © 2015–2020 Red Hat. All rights reserved.