Class V1.ObjectReference.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
io.kubernetes.client.proto.V1.ObjectReference.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, V1.ObjectReferenceOrBuilder, Cloneable
Enclosing class:
V1.ObjectReference

public static final class V1.ObjectReference.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder> implements V1.ObjectReferenceOrBuilder
 ObjectReference contains enough information to let you inspect or modify the referred object.
 ---
 New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
  1. Ignored fields.  It includes many fields which are not generally honored.  For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
  2. Invalid usage help.  It is impossible to add specific help for individual usage.  In most embedded usages, there are particular
     restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
     Those cannot be well described when embedded.
  3. Inconsistent validation.  Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
  4. The fields are both imprecise and overly precise.  Kind is not a precise mapping to a URL. This can produce ambiguity
     during interpretation and require a REST mapping.  In most cases, the dependency is on the group,resource tuple
     and the version of the actual struct is irrelevant.
  5. We cannot easily change it.  Because this type is embedded in many locations, updates to this type
     will affect numerous schemas.  Don't make new APIs embed an underspecified API type they do not control.
 Instead of using this type, create a locally provided and used type that is well-focused on your reference.
 For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
 +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 +structType=atomic
 
Protobuf type k8s.io.api.core.v1.ObjectReference
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
    • getDefaultInstanceForType

      public V1.ObjectReference getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public V1.ObjectReference build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public V1.ObjectReference buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
    • setField

      public V1.ObjectReference.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
    • clearField

      public V1.ObjectReference.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
    • clearOneof

      public V1.ObjectReference.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
    • setRepeatedField

      public V1.ObjectReference.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
    • addRepeatedField

      public V1.ObjectReference.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
    • mergeFrom

      public V1.ObjectReference.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<V1.ObjectReference.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
    • mergeFrom

      public V1.ObjectReference.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<V1.ObjectReference.Builder>
      Throws:
      IOException
    • hasKind

      public boolean hasKind()
       Kind of the referent.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
       +optional
       
      optional string kind = 1;
      Specified by:
      hasKind in interface V1.ObjectReferenceOrBuilder
    • getKind

      public String getKind()
       Kind of the referent.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
       +optional
       
      optional string kind = 1;
      Specified by:
      getKind in interface V1.ObjectReferenceOrBuilder
    • getKindBytes

      public com.google.protobuf.ByteString getKindBytes()
       Kind of the referent.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
       +optional
       
      optional string kind = 1;
      Specified by:
      getKindBytes in interface V1.ObjectReferenceOrBuilder
    • setKind

      public V1.ObjectReference.Builder setKind(String value)
       Kind of the referent.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
       +optional
       
      optional string kind = 1;
    • clearKind

      public V1.ObjectReference.Builder clearKind()
       Kind of the referent.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
       +optional
       
      optional string kind = 1;
    • setKindBytes

      public V1.ObjectReference.Builder setKindBytes(com.google.protobuf.ByteString value)
       Kind of the referent.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
       +optional
       
      optional string kind = 1;
    • hasNamespace

      public boolean hasNamespace()
       Namespace of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
       +optional
       
      optional string namespace = 2;
      Specified by:
      hasNamespace in interface V1.ObjectReferenceOrBuilder
    • getNamespace

      public String getNamespace()
       Namespace of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
       +optional
       
      optional string namespace = 2;
      Specified by:
      getNamespace in interface V1.ObjectReferenceOrBuilder
    • getNamespaceBytes

      public com.google.protobuf.ByteString getNamespaceBytes()
       Namespace of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
       +optional
       
      optional string namespace = 2;
      Specified by:
      getNamespaceBytes in interface V1.ObjectReferenceOrBuilder
    • setNamespace

      public V1.ObjectReference.Builder setNamespace(String value)
       Namespace of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
       +optional
       
      optional string namespace = 2;
    • clearNamespace

      public V1.ObjectReference.Builder clearNamespace()
       Namespace of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
       +optional
       
      optional string namespace = 2;
    • setNamespaceBytes

      public V1.ObjectReference.Builder setNamespaceBytes(com.google.protobuf.ByteString value)
       Namespace of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
       +optional
       
      optional string namespace = 2;
    • hasName

      public boolean hasName()
       Name of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
       +optional
       
      optional string name = 3;
      Specified by:
      hasName in interface V1.ObjectReferenceOrBuilder
    • getName

      public String getName()
       Name of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
       +optional
       
      optional string name = 3;
      Specified by:
      getName in interface V1.ObjectReferenceOrBuilder
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Name of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
       +optional
       
      optional string name = 3;
      Specified by:
      getNameBytes in interface V1.ObjectReferenceOrBuilder
    • setName

      public V1.ObjectReference.Builder setName(String value)
       Name of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
       +optional
       
      optional string name = 3;
    • clearName

      public V1.ObjectReference.Builder clearName()
       Name of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
       +optional
       
      optional string name = 3;
    • setNameBytes

      public V1.ObjectReference.Builder setNameBytes(com.google.protobuf.ByteString value)
       Name of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
       +optional
       
      optional string name = 3;
    • hasUid

      public boolean hasUid()
       UID of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
       +optional
       
      optional string uid = 4;
      Specified by:
      hasUid in interface V1.ObjectReferenceOrBuilder
    • getUid

      public String getUid()
       UID of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
       +optional
       
      optional string uid = 4;
      Specified by:
      getUid in interface V1.ObjectReferenceOrBuilder
    • getUidBytes

      public com.google.protobuf.ByteString getUidBytes()
       UID of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
       +optional
       
      optional string uid = 4;
      Specified by:
      getUidBytes in interface V1.ObjectReferenceOrBuilder
    • setUid

      public V1.ObjectReference.Builder setUid(String value)
       UID of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
       +optional
       
      optional string uid = 4;
    • clearUid

      public V1.ObjectReference.Builder clearUid()
       UID of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
       +optional
       
      optional string uid = 4;
    • setUidBytes

      public V1.ObjectReference.Builder setUidBytes(com.google.protobuf.ByteString value)
       UID of the referent.
       More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
       +optional
       
      optional string uid = 4;
    • hasApiVersion

      public boolean hasApiVersion()
       API version of the referent.
       +optional
       
      optional string apiVersion = 5;
      Specified by:
      hasApiVersion in interface V1.ObjectReferenceOrBuilder
    • getApiVersion

      public String getApiVersion()
       API version of the referent.
       +optional
       
      optional string apiVersion = 5;
      Specified by:
      getApiVersion in interface V1.ObjectReferenceOrBuilder
    • getApiVersionBytes

      public com.google.protobuf.ByteString getApiVersionBytes()
       API version of the referent.
       +optional
       
      optional string apiVersion = 5;
      Specified by:
      getApiVersionBytes in interface V1.ObjectReferenceOrBuilder
    • setApiVersion

      public V1.ObjectReference.Builder setApiVersion(String value)
       API version of the referent.
       +optional
       
      optional string apiVersion = 5;
    • clearApiVersion

      public V1.ObjectReference.Builder clearApiVersion()
       API version of the referent.
       +optional
       
      optional string apiVersion = 5;
    • setApiVersionBytes

      public V1.ObjectReference.Builder setApiVersionBytes(com.google.protobuf.ByteString value)
       API version of the referent.
       +optional
       
      optional string apiVersion = 5;
    • hasResourceVersion

      public boolean hasResourceVersion()
       Specific resourceVersion to which this reference is made, if any.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
       +optional
       
      optional string resourceVersion = 6;
      Specified by:
      hasResourceVersion in interface V1.ObjectReferenceOrBuilder
    • getResourceVersion

      public String getResourceVersion()
       Specific resourceVersion to which this reference is made, if any.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
       +optional
       
      optional string resourceVersion = 6;
      Specified by:
      getResourceVersion in interface V1.ObjectReferenceOrBuilder
    • getResourceVersionBytes

      public com.google.protobuf.ByteString getResourceVersionBytes()
       Specific resourceVersion to which this reference is made, if any.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
       +optional
       
      optional string resourceVersion = 6;
      Specified by:
      getResourceVersionBytes in interface V1.ObjectReferenceOrBuilder
    • setResourceVersion

      public V1.ObjectReference.Builder setResourceVersion(String value)
       Specific resourceVersion to which this reference is made, if any.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
       +optional
       
      optional string resourceVersion = 6;
    • clearResourceVersion

      public V1.ObjectReference.Builder clearResourceVersion()
       Specific resourceVersion to which this reference is made, if any.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
       +optional
       
      optional string resourceVersion = 6;
    • setResourceVersionBytes

      public V1.ObjectReference.Builder setResourceVersionBytes(com.google.protobuf.ByteString value)
       Specific resourceVersion to which this reference is made, if any.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
       +optional
       
      optional string resourceVersion = 6;
    • hasFieldPath

      public boolean hasFieldPath()
       If referring to a piece of an object instead of an entire object, this string
       should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
       For example, if the object reference is to a container within a pod, this would take on a value like:
       "spec.containers{name}" (where "name" refers to the name of the container that triggered
       the event) or if no container name is specified "spec.containers[2]" (container with
       index 2 in this pod). This syntax is chosen only to have some well-defined way of
       referencing a part of an object.
       TODO: this design is not final and this field is subject to change in the future.
       +optional
       
      optional string fieldPath = 7;
      Specified by:
      hasFieldPath in interface V1.ObjectReferenceOrBuilder
    • getFieldPath

      public String getFieldPath()
       If referring to a piece of an object instead of an entire object, this string
       should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
       For example, if the object reference is to a container within a pod, this would take on a value like:
       "spec.containers{name}" (where "name" refers to the name of the container that triggered
       the event) or if no container name is specified "spec.containers[2]" (container with
       index 2 in this pod). This syntax is chosen only to have some well-defined way of
       referencing a part of an object.
       TODO: this design is not final and this field is subject to change in the future.
       +optional
       
      optional string fieldPath = 7;
      Specified by:
      getFieldPath in interface V1.ObjectReferenceOrBuilder
    • getFieldPathBytes

      public com.google.protobuf.ByteString getFieldPathBytes()
       If referring to a piece of an object instead of an entire object, this string
       should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
       For example, if the object reference is to a container within a pod, this would take on a value like:
       "spec.containers{name}" (where "name" refers to the name of the container that triggered
       the event) or if no container name is specified "spec.containers[2]" (container with
       index 2 in this pod). This syntax is chosen only to have some well-defined way of
       referencing a part of an object.
       TODO: this design is not final and this field is subject to change in the future.
       +optional
       
      optional string fieldPath = 7;
      Specified by:
      getFieldPathBytes in interface V1.ObjectReferenceOrBuilder
    • setFieldPath

      public V1.ObjectReference.Builder setFieldPath(String value)
       If referring to a piece of an object instead of an entire object, this string
       should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
       For example, if the object reference is to a container within a pod, this would take on a value like:
       "spec.containers{name}" (where "name" refers to the name of the container that triggered
       the event) or if no container name is specified "spec.containers[2]" (container with
       index 2 in this pod). This syntax is chosen only to have some well-defined way of
       referencing a part of an object.
       TODO: this design is not final and this field is subject to change in the future.
       +optional
       
      optional string fieldPath = 7;
    • clearFieldPath

      public V1.ObjectReference.Builder clearFieldPath()
       If referring to a piece of an object instead of an entire object, this string
       should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
       For example, if the object reference is to a container within a pod, this would take on a value like:
       "spec.containers{name}" (where "name" refers to the name of the container that triggered
       the event) or if no container name is specified "spec.containers[2]" (container with
       index 2 in this pod). This syntax is chosen only to have some well-defined way of
       referencing a part of an object.
       TODO: this design is not final and this field is subject to change in the future.
       +optional
       
      optional string fieldPath = 7;
    • setFieldPathBytes

      public V1.ObjectReference.Builder setFieldPathBytes(com.google.protobuf.ByteString value)
       If referring to a piece of an object instead of an entire object, this string
       should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
       For example, if the object reference is to a container within a pod, this would take on a value like:
       "spec.containers{name}" (where "name" refers to the name of the container that triggered
       the event) or if no container name is specified "spec.containers[2]" (container with
       index 2 in this pod). This syntax is chosen only to have some well-defined way of
       referencing a part of an object.
       TODO: this design is not final and this field is subject to change in the future.
       +optional
       
      optional string fieldPath = 7;
    • setUnknownFields

      public final V1.ObjectReference.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
    • mergeUnknownFields

      public final V1.ObjectReference.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>