Package protopoet
Class RpcFieldSpec
- java.lang.Object
-
- protopoet.RpcFieldSpec
-
- All Implemented Interfaces:
Buildable<RpcFieldSpec>
,protopoet.Useable.Field
public final class RpcFieldSpec extends java.lang.Object implements protopoet.Useable.Field, Buildable<RpcFieldSpec>
Defines an RPC field for use withServiceSpec
. Learn more: https://developers.google.com/protocol-buffers/docs/reference/proto3-spec#service_definition
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RpcFieldSpec.Builder
Builder for producing new instances ofRpcFieldSpec
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RpcFieldSpec
build()
Returns a built instance of the declared type.static RpcFieldSpec.Builder
builder(java.lang.String fieldName)
Creates a builder for anRpcFieldSpec
.void
emit(protopoet.ProtoWriter writer)
java.lang.String
fieldName()
java.util.Optional<java.lang.Integer>
fieldNumber()
-
-
-
Method Detail
-
builder
public static RpcFieldSpec.Builder builder(java.lang.String fieldName)
Creates a builder for anRpcFieldSpec
.
-
emit
public void emit(protopoet.ProtoWriter writer) throws java.io.IOException
- Throws:
java.io.IOException
-
build
public RpcFieldSpec build()
Description copied from interface:Buildable
Returns a built instance of the declared type.- Specified by:
build
in interfaceBuildable<RpcFieldSpec>
-
fieldName
public java.lang.String fieldName()
- Specified by:
fieldName
in interfaceprotopoet.Useable.Field
-
fieldNumber
public java.util.Optional<java.lang.Integer> fieldNumber()
- Specified by:
fieldNumber
in interfaceprotopoet.Useable.Field
-
-