Class Generated.LocalObjectReference.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, Generated.LocalObjectReferenceOrBuilder
    Enclosing class:
    Generated.LocalObjectReference

    public static final class Generated.LocalObjectReference.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Generated.LocalObjectReference.Builder>
    implements Generated.LocalObjectReferenceOrBuilder
     LocalObjectReference contains enough information to let you locate the
     referenced object inside the same namespace.
     ---
     New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
      1. 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.
      2. 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.
      3. 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 .
     +structType=atomic
     
    Protobuf type k8s.io.api.core.v1.LocalObjectReference
    • Method Detail

      • 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<Generated.LocalObjectReference.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<Generated.LocalObjectReference.Builder>
      • getDefaultInstanceForType

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

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

        public Generated.LocalObjectReference buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Generated.LocalObjectReference.Builder>
      • hasName

        public boolean hasName()
         Name of the referent.
         This field is effectively required, but due to backwards compatibility is
         allowed to be empty. Instances of this type with an empty value here are
         almost certainly wrong.
         More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
         +optional
         +default=""
         +kubebuilder:default=""
         TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
         
        optional string name = 1;
        Specified by:
        hasName in interface Generated.LocalObjectReferenceOrBuilder
        Returns:
        Whether the name field is set.
      • getName

        public String getName()
         Name of the referent.
         This field is effectively required, but due to backwards compatibility is
         allowed to be empty. Instances of this type with an empty value here are
         almost certainly wrong.
         More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
         +optional
         +default=""
         +kubebuilder:default=""
         TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
         
        optional string name = 1;
        Specified by:
        getName in interface Generated.LocalObjectReferenceOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Name of the referent.
         This field is effectively required, but due to backwards compatibility is
         allowed to be empty. Instances of this type with an empty value here are
         almost certainly wrong.
         More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
         +optional
         +default=""
         +kubebuilder:default=""
         TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
         
        optional string name = 1;
        Specified by:
        getNameBytes in interface Generated.LocalObjectReferenceOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Generated.LocalObjectReference.Builder setName​(String value)
         Name of the referent.
         This field is effectively required, but due to backwards compatibility is
         allowed to be empty. Instances of this type with an empty value here are
         almost certainly wrong.
         More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
         +optional
         +default=""
         +kubebuilder:default=""
         TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
         
        optional string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Generated.LocalObjectReference.Builder clearName()
         Name of the referent.
         This field is effectively required, but due to backwards compatibility is
         allowed to be empty. Instances of this type with an empty value here are
         almost certainly wrong.
         More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
         +optional
         +default=""
         +kubebuilder:default=""
         TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
         
        optional string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Generated.LocalObjectReference.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Name of the referent.
         This field is effectively required, but due to backwards compatibility is
         allowed to be empty. Instances of this type with an empty value here are
         almost certainly wrong.
         More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
         +optional
         +default=""
         +kubebuilder:default=""
         TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
         
        optional string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.