Class Generated.LocalObjectReference

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

    public static final class Generated.LocalObjectReference
    extends com.google.protobuf.GeneratedMessageV3
    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
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • 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
      • 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.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Generated.LocalObjectReference parseFrom​(ByteBuffer data)
                                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Generated.LocalObjectReference parseFrom​(ByteBuffer data,
                                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Generated.LocalObjectReference parseFrom​(com.google.protobuf.ByteString data)
                                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Generated.LocalObjectReference parseFrom​(com.google.protobuf.ByteString data,
                                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Generated.LocalObjectReference parseFrom​(byte[] data)
                                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Generated.LocalObjectReference parseFrom​(byte[] data,
                                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • newBuilderForType

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

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

        protected Generated.LocalObjectReference.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<Generated.LocalObjectReference> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

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