A generic empty message that you can re-use to avoid defining duplicated
empty messages in your APIs. A typical example is to use it as the request
or the response type of an API method. For instance:
service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
The JSON representation for `Empty` is empty JSON object `{}`.
Protobuf type google.protobuf.Empty
| Modifier and Type | Class and Description |
|---|---|
| public static class | Empty.Builder
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. |
| Modifier and Type | Field and Description |
|---|---|
| private static final Empty | |
| private byte | |
| private static final Parser | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| private | |
| private | |
| private |
| DEFAULT_INSTANCE | back to summary |
|---|---|
| private static final Empty DEFAULT_INSTANCE | |
| memoizedIsInitialized | back to summary |
|---|---|
| private byte memoizedIsInitialized | |
| PARSER | back to summary |
|---|---|
| private static final Parser<Empty> PARSER | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| Empty | back to summary |
|---|---|
| private Empty(GeneratedMessageV3. | |
| Empty | back to summary |
|---|---|
| private Empty() | |
| Empty | back to summary |
|---|---|
| private Empty(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides com. Implements com. Doc from com. Compares the specified object with this message for equality. Returns | |
| getDefaultInstance | back to summary |
|---|---|
| public static Empty getDefaultInstance() | |
| getDefaultInstanceForType | back to summary |
|---|---|
| public Empty getDefaultInstanceForType() Implements com. Doc from com. Get an instance of the type with no fields set. Because no fields are set, all getters for
singular fields will return default values and repeated fields will appear empty. This may or
may not be a singleton. This differs from the
| |
| getDescriptor | back to summary |
|---|---|
| public static final Descriptors. | |
| getParserForType | back to summary |
|---|---|
| public Parser Overrides com. Implements com. Doc from com. Gets the parser for a message of the same type as this message.
| |
| getSerializedSize | back to summary |
|---|---|
| public int getSerializedSize() Overrides com. Implements com. Doc from com. Get the number of bytes required to encode this message. The result is only computed on the first call and memoized after that.
| |
| getUnknownFields | back to summary |
|---|---|
| public final UnknownFieldSet getUnknownFields() Overrides com. Implements com. Doc from com. Get the
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides com. Implements com. Doc from com. Returns the hash code value for this message. The hash code of a message should mix the
message's type (object identity of the descriptor) with its contents (known and unknown field
values). Subclasses must implement this; inheriting
| |
| internalGetFieldAccessorTable | back to summary |
|---|---|
| protected GeneratedMessageV3. Implements abstract com. Doc from com. Get the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.
| |
| isInitialized | back to summary |
|---|---|
| public final boolean isInitialized() Overrides com. Implements com. Doc from com. Returns true if all required fields in the message and all embedded messages are set, false otherwise. See also:
| |
| newBuilder | back to summary |
|---|---|
| public static Empty. | |
| newBuilder | back to summary |
|---|---|
| public static Empty. | |
| newBuilderForType | back to summary |
|---|---|
| public Empty. Implements com. Doc from com. Constructs a new builder for a message of the same type as this message.
| |
| newBuilderForType | back to summary |
|---|---|
| protected Empty. Implements abstract com. Doc from com. TODO(xiaofeng): remove this together with GeneratedMessageV3.BuilderParent.
| |
| parseDelimitedFrom | back to summary |
|---|---|
| public static Empty parseDelimitedFrom(InputStream input) throws IOException | |
| parseDelimitedFrom | back to summary |
|---|---|
| public static Empty parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException | |
| parseFrom | back to summary |
|---|---|
| public static Empty parseFrom(ByteBuffer data) throws InvalidProtocolBufferException | |
| parseFrom | back to summary |
|---|---|
| public static Empty parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException | |
| parseFrom | back to summary |
|---|---|
| public static Empty parseFrom(ByteString data) throws InvalidProtocolBufferException | |
| parseFrom | back to summary |
|---|---|
| public static Empty parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException | |
| parseFrom | back to summary |
|---|---|
| public static Empty parseFrom(byte[] data) throws InvalidProtocolBufferException | |
| parseFrom | back to summary |
|---|---|
| public static Empty parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException | |
| parseFrom | back to summary |
|---|---|
| public static Empty parseFrom(InputStream input) throws IOException | |
| parseFrom | back to summary |
|---|---|
| public static Empty parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException | |
| parseFrom | back to summary |
|---|---|
| public static Empty parseFrom(CodedInputStream input) throws IOException | |
| parseFrom | back to summary |
|---|---|
| public static Empty parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException | |
| parser | back to summary |
|---|---|
| public static Parser | |
| toBuilder | back to summary |
|---|---|
| public Empty. Implements com. Doc from com. Constructs a builder initialized with the current message. Use this to derive a new message from the current one.
| |
| writeTo | back to summary |
|---|---|
| public void writeTo(CodedOutputStream output) throws IOException Overrides com. Implements com. Doc from com. Serializes the message and writes it to
| |
A generic empty message that you can re-use to avoid defining duplicated
empty messages in your APIs. A typical example is to use it as the request
or the response type of an API method. For instance:
service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
The JSON representation for `Empty` is empty JSON object `{}`.
Protobuf type google.protobuf.Empty
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Builder | back to summary |
|---|---|
| private Builder() | |
| Builder | back to summary |
|---|---|
| private Builder(GeneratedMessageV3. | |
| addRepeatedField | back to summary |
|---|---|
| public Empty. Overrides com. Implements com. Doc from com. Like
| |
| build | back to summary |
|---|---|
| public Empty build() Implements com. Doc from com. Constructs the message based on the state of the Builder. Subsequent changes to the Builder will not affect the returned message.
| |
| buildPartial | back to summary |
|---|---|
| public Empty buildPartial() Implements com. Doc from com. Like
| |
| clear | back to summary |
|---|---|
| public Empty. Overrides com. Implements com. Doc from com. Called by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.
| |
| clearField | back to summary |
|---|---|
| public Empty. Overrides com. Implements com. Doc from com. Clears the field. This is exactly equivalent to calling the generated "clear" accessor method corresponding to the field.
| |
| clearOneof | back to summary |
|---|---|
| public Empty. Overrides com. Implements com. Doc from com. TODO(jieluo): Clear it when all subclasses have implemented this method.
| |
| clone | back to summary |
|---|---|
| public Empty. Overrides com. Implements com. Doc from com. Clones the Builder.
| |
| getDefaultInstanceForType | back to summary |
|---|---|
| public Empty getDefaultInstanceForType() Implements com. Doc from com. Get an instance of the type with no fields set. Because no fields are set, all getters for
singular fields will return default values and repeated fields will appear empty. This may or
may not be a singleton. This differs from the
| |
| getDescriptor | back to summary |
|---|---|
| public static final Descriptors. | |
| getDescriptorForType | back to summary |
|---|---|
| public Descriptors. Overrides com. Implements com. Doc from com. Get the message's type's descriptor. This differs from the
| |
| internalGetFieldAccessorTable | back to summary |
|---|---|
| protected GeneratedMessageV3. Implements abstract com. Doc from com. Get the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.
| |
| isInitialized | back to summary |
|---|---|
| public final boolean isInitialized() Overrides com. Implements com. Doc from com. Returns true if all required fields in the message and all embedded messages are set, false otherwise. See also:
| |
| maybeForceBuilderInitialization | back to summary |
|---|---|
| private void maybeForceBuilderInitialization() | |
| mergeFrom | back to summary |
|---|---|
| public Empty. Overrides com. Implements com. Doc from com. Merge Merging occurs as follows. For each field: This is equivalent to the
| |
| mergeFrom | back to summary |
|---|---|
| public Empty. | |
| mergeFrom | back to summary |
|---|---|
| public Empty. Overrides com. Implements com. Doc from com. Like
| |
| mergeUnknownFields | back to summary |
|---|---|
| public final Empty. Overrides com. Implements com. Doc from com. Merge some unknown fields into the
| |
| setField | back to summary |
|---|---|
| public Empty. Overrides com. Implements com. Doc from com. Sets a field to the given value. The value must be of the correct type for this field, i.e.
the same type that
| |
| setRepeatedField | back to summary |
|---|---|
| public Empty. Overrides com. Implements com. Doc from com. Sets an element of a repeated field to the given value. The value must be of the correct type
for this field, i.e. the same type that
| |
| setUnknownFields | back to summary |
|---|---|
| public final Empty. Overrides com. Implements com. Doc from com. Set the
| |