Package io.kubernetes.client.proto
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 Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()API version of the referent.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) 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].Kind of the referent.Name of the referent.Namespace of the referent.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Specific resourceVersion to which this reference is made, if any.clearUid()UID of the referent.clone()API version of the referent.com.google.protobuf.ByteStringAPI version of the referent.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorIf 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].com.google.protobuf.ByteStringIf 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].getKind()Kind of the referent.com.google.protobuf.ByteStringKind of the referent.getName()Name of the referent.com.google.protobuf.ByteStringName of the referent.Namespace of the referent.com.google.protobuf.ByteStringNamespace of the referent.Specific resourceVersion to which this reference is made, if any.com.google.protobuf.ByteStringSpecific resourceVersion to which this reference is made, if any.getUid()UID of the referent.com.google.protobuf.ByteStringUID of the referent.booleanAPI version of the referent.booleanIf 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].booleanhasKind()Kind of the referent.booleanhasName()Name of the referent.booleanNamespace of the referent.booleanSpecific resourceVersion to which this reference is made, if any.booleanhasUid()UID of the referent.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(V1.ObjectReference other) mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setApiVersion(String value) API version of the referent.setApiVersionBytes(com.google.protobuf.ByteString value) API version of the referent.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].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].Kind of the referent.setKindBytes(com.google.protobuf.ByteString value) Kind of the referent.Name of the referent.setNameBytes(com.google.protobuf.ByteString value) Name of the referent.setNamespace(String value) Namespace of the referent.setNamespaceBytes(com.google.protobuf.ByteString value) Namespace of the referent.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setResourceVersion(String value) Specific resourceVersion to which this reference is made, if any.setResourceVersionBytes(com.google.protobuf.ByteString value) Specific resourceVersion to which this reference is made, if any.UID of the referent.setUidBytes(com.google.protobuf.ByteString value) UID of the referent.setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
-
setField
public V1.ObjectReference.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.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:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
-
addRepeatedField
public V1.ObjectReference.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<V1.ObjectReference.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.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:
hasKindin interfaceV1.ObjectReferenceOrBuilder
-
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:
getKindin interfaceV1.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:
getKindBytesin interfaceV1.ObjectReferenceOrBuilder
-
setKind
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
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
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:
hasNamespacein interfaceV1.ObjectReferenceOrBuilder
-
getNamespace
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ +optional
optional string namespace = 2;- Specified by:
getNamespacein interfaceV1.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:
getNamespaceBytesin interfaceV1.ObjectReferenceOrBuilder
-
setNamespace
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ +optional
optional string namespace = 2; -
clearNamespace
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ +optional
optional string namespace = 2; -
setNamespaceBytes
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:
hasNamein interfaceV1.ObjectReferenceOrBuilder
-
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:
getNamein interfaceV1.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:
getNameBytesin interfaceV1.ObjectReferenceOrBuilder
-
setName
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +optional
optional string name = 3; -
clearName
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +optional
optional string name = 3; -
setNameBytes
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:
hasUidin interfaceV1.ObjectReferenceOrBuilder
-
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:
getUidin interfaceV1.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:
getUidBytesin interfaceV1.ObjectReferenceOrBuilder
-
setUid
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids +optional
optional string uid = 4; -
clearUid
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids +optional
optional string uid = 4; -
setUidBytes
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:
hasApiVersionin interfaceV1.ObjectReferenceOrBuilder
-
getApiVersion
API version of the referent. +optional
optional string apiVersion = 5;- Specified by:
getApiVersionin interfaceV1.ObjectReferenceOrBuilder
-
getApiVersionBytes
public com.google.protobuf.ByteString getApiVersionBytes()API version of the referent. +optional
optional string apiVersion = 5;- Specified by:
getApiVersionBytesin interfaceV1.ObjectReferenceOrBuilder
-
setApiVersion
API version of the referent. +optional
optional string apiVersion = 5; -
clearApiVersion
API version of the referent. +optional
optional string apiVersion = 5; -
setApiVersionBytes
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:
hasResourceVersionin interfaceV1.ObjectReferenceOrBuilder
-
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:
getResourceVersionin interfaceV1.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:
getResourceVersionBytesin interfaceV1.ObjectReferenceOrBuilder
-
setResourceVersion
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
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
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. +optionaloptional string fieldPath = 7;- Specified by:
hasFieldPathin interfaceV1.ObjectReferenceOrBuilder
-
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. +optionaloptional string fieldPath = 7;- Specified by:
getFieldPathin interfaceV1.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. +optionaloptional string fieldPath = 7;- Specified by:
getFieldPathBytesin interfaceV1.ObjectReferenceOrBuilder
-
setFieldPath
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. +optionaloptional string fieldPath = 7; -
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. +optionaloptional string fieldPath = 7; -
setFieldPathBytes
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. +optionaloptional string fieldPath = 7; -
setUnknownFields
public final V1.ObjectReference.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
-
mergeUnknownFields
public final V1.ObjectReference.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.ObjectReference.Builder>
-