Package protopoet
Class RpcFieldSpec.Builder
- java.lang.Object
-
- protopoet.RpcFieldSpec.Builder
-
- All Implemented Interfaces:
Buildable<RpcFieldSpec>
- Enclosing class:
- RpcFieldSpec
public static final class RpcFieldSpec.Builder extends java.lang.Object implements Buildable<RpcFieldSpec>
Builder for producing new instances ofRpcFieldSpec
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RpcFieldSpec.Builder
addFieldOptions(java.lang.Iterable<? extends Buildable<OptionSpec>> options)
Adds options to the field.RpcFieldSpec.Builder
addFieldOptions(Buildable<OptionSpec>... options)
Adds options to the field.RpcFieldSpec
build()
Builds a new instance ofRpcFieldSpec
.RpcFieldSpec.Builder
setFieldComment(java.lang.Iterable<java.lang.String> lines)
Declares a comment for the field.RpcFieldSpec.Builder
setFieldComment(java.lang.String... lines)
Declares a comment for the field.RpcFieldSpec.Builder
setRequestMessageName(java.lang.String messageName)
Declares the message name for the request part of the field.RpcFieldSpec.Builder
setRequestMessageName(java.lang.String messageName, boolean isStreaming)
Declares the message name for the request part of the field and signals if this part of the rpc is streaming.RpcFieldSpec.Builder
setResponseMessageName(java.lang.String messageName)
Declares the message name for the response part of the field.RpcFieldSpec.Builder
setResponseMessageName(java.lang.String messageName, boolean isStreaming)
Declares the message name for the response part of the field and signals if this part of the rpc is streaming.
-
-
-
Method Detail
-
setFieldComment
public RpcFieldSpec.Builder setFieldComment(java.lang.Iterable<java.lang.String> lines)
Declares a comment for the field.
-
setFieldComment
public RpcFieldSpec.Builder setFieldComment(java.lang.String... lines)
Declares a comment for the field.
-
setRequestMessageName
public RpcFieldSpec.Builder setRequestMessageName(java.lang.String messageName)
Declares the message name for the request part of the field.
-
setRequestMessageName
public RpcFieldSpec.Builder setRequestMessageName(java.lang.String messageName, boolean isStreaming)
Declares the message name for the request part of the field and signals if this part of the rpc is streaming.
-
setResponseMessageName
public RpcFieldSpec.Builder setResponseMessageName(java.lang.String messageName)
Declares the message name for the response part of the field.
-
setResponseMessageName
public RpcFieldSpec.Builder setResponseMessageName(java.lang.String messageName, boolean isStreaming)
Declares the message name for the response part of the field and signals if this part of the rpc is streaming.
-
addFieldOptions
public RpcFieldSpec.Builder addFieldOptions(java.lang.Iterable<? extends Buildable<OptionSpec>> options)
Adds options to the field. SeeOptionSpec
.
-
addFieldOptions
@SafeVarargs public final RpcFieldSpec.Builder addFieldOptions(Buildable<OptionSpec>... options)
Adds options to the field. SeeOptionSpec
.
-
build
public RpcFieldSpec build()
Builds a new instance ofRpcFieldSpec
.- Specified by:
build
in interfaceBuildable<RpcFieldSpec>
-
-