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 classRpcFieldSpec.BuilderBuilder for producing new instances ofRpcFieldSpec.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RpcFieldSpecbuild()Returns a built instance of the declared type.static RpcFieldSpec.Builderbuilder(java.lang.String fieldName)Creates a builder for anRpcFieldSpec.voidemit(protopoet.ProtoWriter writer)java.lang.StringfieldName()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:BuildableReturns a built instance of the declared type.- Specified by:
buildin interfaceBuildable<RpcFieldSpec>
-
fieldName
public java.lang.String fieldName()
- Specified by:
fieldNamein interfaceprotopoet.Useable.Field
-
fieldNumber
public java.util.Optional<java.lang.Integer> fieldNumber()
- Specified by:
fieldNumberin interfaceprotopoet.Useable.Field
-
-