Class V1OwnerReference

java.lang.Object
io.kubernetes.client.openapi.models.V1OwnerReference

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-02-02T17:56:12.287571Z[Etc/UTC]") public class V1OwnerReference extends Object
OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.
  • Field Details

  • Constructor Details

    • V1OwnerReference

      public V1OwnerReference()
  • Method Details

    • apiVersion

      public V1OwnerReference apiVersion(String apiVersion)
    • getApiVersion

      @Nonnull public String getApiVersion()
      API version of the referent.
      Returns:
      apiVersion
    • setApiVersion

      public void setApiVersion(String apiVersion)
    • blockOwnerDeletion

      public V1OwnerReference blockOwnerDeletion(Boolean blockOwnerDeletion)
    • getBlockOwnerDeletion

      @Nullable public Boolean getBlockOwnerDeletion()
      If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.
      Returns:
      blockOwnerDeletion
    • setBlockOwnerDeletion

      public void setBlockOwnerDeletion(Boolean blockOwnerDeletion)
    • controller

      public V1OwnerReference controller(Boolean controller)
    • getController

      @Nullable public Boolean getController()
      If true, this reference points to the managing controller.
      Returns:
      controller
    • setController

      public void setController(Boolean controller)
    • kind

      public V1OwnerReference kind(String kind)
    • getKind

      @Nonnull public String getKind()
      Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      Returns:
      kind
    • setKind

      public void setKind(String kind)
    • name

      public V1OwnerReference name(String name)
    • getName

      @Nonnull public String getName()
      Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
      Returns:
      name
    • setName

      public void setName(String name)
    • uid

      public V1OwnerReference uid(String uid)
    • getUid

      @Nonnull public String getUid()
      UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
      Returns:
      uid
    • setUid

      public void setUid(String uid)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      Validates the JSON Object and throws an exception if issues found
      Parameters:
      jsonObj - JSON Object
      Throws:
      IOException - if the JSON Object is invalid with respect to V1OwnerReference
    • fromJson

      public static V1OwnerReference fromJson(String jsonString) throws IOException
      Create an instance of V1OwnerReference given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of V1OwnerReference
      Throws:
      IOException - if the JSON string is invalid with respect to V1OwnerReference
    • toJson

      public String toJson()
      Convert an instance of V1OwnerReference to an JSON string
      Returns:
      JSON string