public static final class TypedStruct.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<TypedStruct.Builder> implements TypedStructOrBuilder
A TypedStruct contains an arbitrary JSON serialized protocol buffer message with a URL that describes the type of the serialized message. This is very similar to google.protobuf.Any, instead of having protocol buffer binary, this employs google.protobuf.Struct as value. This message is intended to be embedded inside Any, so it shouldn't be directly referred from other UDPA messages. When packing an opaque extension config, packing the expected type into Any is preferred wherever possible for its efficiency. TypedStruct should be used only if a proto descriptor is not available, for example if: - A control plane sends opaque message that is originally from external source in human readable format such as JSON or YAML. - The control plane doesn't have the knowledge of the protocol buffer schema hence it cannot serialize the message in protocol buffer binary format. - The DPLB doesn't have have the knowledge of the protocol buffer schema its plugin or extension uses. This has to be indicated in the DPLB capability negotiation. When a DPLB receives a TypedStruct in Any, it should: - Check if the type_url of the TypedStruct matches the type the extension expects. - Convert value to the type described in type_url and perform validation. TODO(lizan): Figure out how TypeStruct should be used with DPLB extensions that doesn't link protobuf descriptor with DPLB itself, (e.g. gRPC LB Plugin, Envoy WASM extensions).Protobuf type
udpa.type.v1.TypedStruct| Modifier and Type | Method and Description |
|---|---|
TypedStruct.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
TypedStruct |
build() |
TypedStruct |
buildPartial() |
TypedStruct.Builder |
clear() |
TypedStruct.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
TypedStruct.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
TypedStruct.Builder |
clearTypeUrl()
A URL that uniquely identifies the type of the serialize protocol buffer message.
|
TypedStruct.Builder |
clearValue()
A JSON representation of the above specified type.
|
TypedStruct.Builder |
clone() |
TypedStruct |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getTypeUrl()
A URL that uniquely identifies the type of the serialize protocol buffer message.
|
com.google.protobuf.ByteString |
getTypeUrlBytes()
A URL that uniquely identifies the type of the serialize protocol buffer message.
|
com.google.protobuf.Struct |
getValue()
A JSON representation of the above specified type.
|
com.google.protobuf.Struct.Builder |
getValueBuilder()
A JSON representation of the above specified type.
|
com.google.protobuf.StructOrBuilder |
getValueOrBuilder()
A JSON representation of the above specified type.
|
boolean |
hasValue()
A JSON representation of the above specified type.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
TypedStruct.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
TypedStruct.Builder |
mergeFrom(com.google.protobuf.Message other) |
TypedStruct.Builder |
mergeFrom(TypedStruct other) |
TypedStruct.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
TypedStruct.Builder |
mergeValue(com.google.protobuf.Struct value)
A JSON representation of the above specified type.
|
TypedStruct.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
TypedStruct.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
TypedStruct.Builder |
setTypeUrl(String value)
A URL that uniquely identifies the type of the serialize protocol buffer message.
|
TypedStruct.Builder |
setTypeUrlBytes(com.google.protobuf.ByteString value)
A URL that uniquely identifies the type of the serialize protocol buffer message.
|
TypedStruct.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
TypedStruct.Builder |
setValue(com.google.protobuf.Struct.Builder builderForValue)
A JSON representation of the above specified type.
|
TypedStruct.Builder |
setValue(com.google.protobuf.Struct value)
A JSON representation of the above specified type.
|
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<TypedStruct.Builder>public TypedStruct.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<TypedStruct.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TypedStruct.Builder>public TypedStruct getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic TypedStruct build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic TypedStruct buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic TypedStruct.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<TypedStruct.Builder>public TypedStruct.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<TypedStruct.Builder>public TypedStruct.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<TypedStruct.Builder>public TypedStruct.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TypedStruct.Builder>public TypedStruct.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TypedStruct.Builder>public TypedStruct.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TypedStruct.Builder>public TypedStruct.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<TypedStruct.Builder>public TypedStruct.Builder mergeFrom(TypedStruct other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TypedStruct.Builder>public TypedStruct.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<TypedStruct.Builder>IOExceptionpublic String getTypeUrl()
A URL that uniquely identifies the type of the serialize protocol buffer message. This has same semantics and format described in google.protobuf.Any: https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto
string type_url = 1;getTypeUrl in interface TypedStructOrBuilderpublic com.google.protobuf.ByteString getTypeUrlBytes()
A URL that uniquely identifies the type of the serialize protocol buffer message. This has same semantics and format described in google.protobuf.Any: https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto
string type_url = 1;getTypeUrlBytes in interface TypedStructOrBuilderpublic TypedStruct.Builder setTypeUrl(String value)
A URL that uniquely identifies the type of the serialize protocol buffer message. This has same semantics and format described in google.protobuf.Any: https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto
string type_url = 1;public TypedStruct.Builder clearTypeUrl()
A URL that uniquely identifies the type of the serialize protocol buffer message. This has same semantics and format described in google.protobuf.Any: https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto
string type_url = 1;public TypedStruct.Builder setTypeUrlBytes(com.google.protobuf.ByteString value)
A URL that uniquely identifies the type of the serialize protocol buffer message. This has same semantics and format described in google.protobuf.Any: https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto
string type_url = 1;public boolean hasValue()
A JSON representation of the above specified type.
.google.protobuf.Struct value = 2;hasValue in interface TypedStructOrBuilderpublic com.google.protobuf.Struct getValue()
A JSON representation of the above specified type.
.google.protobuf.Struct value = 2;getValue in interface TypedStructOrBuilderpublic TypedStruct.Builder setValue(com.google.protobuf.Struct value)
A JSON representation of the above specified type.
.google.protobuf.Struct value = 2;public TypedStruct.Builder setValue(com.google.protobuf.Struct.Builder builderForValue)
A JSON representation of the above specified type.
.google.protobuf.Struct value = 2;public TypedStruct.Builder mergeValue(com.google.protobuf.Struct value)
A JSON representation of the above specified type.
.google.protobuf.Struct value = 2;public TypedStruct.Builder clearValue()
A JSON representation of the above specified type.
.google.protobuf.Struct value = 2;public com.google.protobuf.Struct.Builder getValueBuilder()
A JSON representation of the above specified type.
.google.protobuf.Struct value = 2;public com.google.protobuf.StructOrBuilder getValueOrBuilder()
A JSON representation of the above specified type.
.google.protobuf.Struct value = 2;getValueOrBuilder in interface TypedStructOrBuilderpublic final TypedStruct.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TypedStruct.Builder>public final TypedStruct.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TypedStruct.Builder>Copyright © 2018–2021 The Envoy Project. All rights reserved.