Package com.google.protobuf
Class Api.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
- All Implemented Interfaces:
ApiOrBuilder,MessageLite.Builder,MessageLiteOrBuilder,Cloneable
- Enclosing class:
- Api
public static final class Api.Builder
extends GeneratedMessageLite.Builder<Api,Api.Builder>
implements ApiOrBuilder
Api is a light-weight descriptor for an API Interface. Interfaces are also described as "protocol buffer services" in some contexts, such as by the "service" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as "APIs" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.Protobuf type
google.protobuf.Api-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite.Builder
AbstractMessageLite.Builder.LimitedInputStream -
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllMethods(Iterable<? extends Method> values) The methods of this interface, in unspecified order.addAllMixins(Iterable<? extends Mixin> values) Included interfaces.addAllOptions(Iterable<? extends Option> values) Any metadata attached to the interface.addMethods(int index, Method value) The methods of this interface, in unspecified order.addMethods(int index, Method.Builder builderForValue) The methods of this interface, in unspecified order.addMethods(Method value) The methods of this interface, in unspecified order.addMethods(Method.Builder builderForValue) The methods of this interface, in unspecified order.Included interfaces.addMixins(int index, Mixin.Builder builderForValue) Included interfaces.Included interfaces.addMixins(Mixin.Builder builderForValue) Included interfaces.addOptions(int index, Option value) Any metadata attached to the interface.addOptions(int index, Option.Builder builderForValue) Any metadata attached to the interface.addOptions(Option value) Any metadata attached to the interface.addOptions(Option.Builder builderForValue) Any metadata attached to the interface.The methods of this interface, in unspecified order.Included interfaces.The fully qualified name of this interface, including package name followed by the interface's simple name.Any metadata attached to the interface.Source context for the protocol buffer service represented by this message.The source syntax of the service.A version string for this interface.getMethods(int index) The methods of this interface, in unspecified order.intThe methods of this interface, in unspecified order.The methods of this interface, in unspecified order.getMixins(int index) Included interfaces.intIncluded interfaces.Included interfaces.getName()The fully qualified name of this interface, including package name followed by the interface's simple name.The fully qualified name of this interface, including package name followed by the interface's simple name.getOptions(int index) Any metadata attached to the interface.intAny metadata attached to the interface.Any metadata attached to the interface.Source context for the protocol buffer service represented by this message.The source syntax of the service.intThe source syntax of the service.A version string for this interface.A version string for this interface.booleanSource context for the protocol buffer service represented by this message.mergeSourceContext(SourceContext value) Source context for the protocol buffer service represented by this message.removeMethods(int index) The methods of this interface, in unspecified order.removeMixins(int index) Included interfaces.removeOptions(int index) Any metadata attached to the interface.setMethods(int index, Method value) The methods of this interface, in unspecified order.setMethods(int index, Method.Builder builderForValue) The methods of this interface, in unspecified order.Included interfaces.setMixins(int index, Mixin.Builder builderForValue) Included interfaces.The fully qualified name of this interface, including package name followed by the interface's simple name.setNameBytes(ByteString value) The fully qualified name of this interface, including package name followed by the interface's simple name.setOptions(int index, Option value) Any metadata attached to the interface.setOptions(int index, Option.Builder builderForValue) Any metadata attached to the interface.setSourceContext(SourceContext value) Source context for the protocol buffer service represented by this message.setSourceContext(SourceContext.Builder builderForValue) Source context for the protocol buffer service represented by this message.The source syntax of the service.setSyntaxValue(int value) The source syntax of the service.setVersion(String value) A version string for this interface.setVersionBytes(ByteString value) A version string for this interface.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
getName
The fully qualified name of this interface, including package name followed by the interface's simple name.
string name = 1;- Specified by:
getNamein interfaceApiOrBuilder- Returns:
- The name.
-
getNameBytes
The fully qualified name of this interface, including package name followed by the interface's simple name.
string name = 1;- Specified by:
getNameBytesin interfaceApiOrBuilder- Returns:
- The bytes for name.
-
setName
The fully qualified name of this interface, including package name followed by the interface's simple name.
string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
The fully qualified name of this interface, including package name followed by the interface's simple name.
string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
The fully qualified name of this interface, including package name followed by the interface's simple name.
string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getMethodsList
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2;- Specified by:
getMethodsListin interfaceApiOrBuilder
-
getMethodsCount
public int getMethodsCount()The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2;- Specified by:
getMethodsCountin interfaceApiOrBuilder
-
getMethods
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2;- Specified by:
getMethodsin interfaceApiOrBuilder
-
setMethods
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2; -
setMethods
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2; -
addMethods
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2; -
addMethods
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2; -
addMethods
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2; -
addMethods
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2; -
addAllMethods
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2; -
clearMethods
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2; -
removeMethods
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2; -
getOptionsList
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3;- Specified by:
getOptionsListin interfaceApiOrBuilder
-
getOptionsCount
public int getOptionsCount()Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3;- Specified by:
getOptionsCountin interfaceApiOrBuilder
-
getOptions
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3;- Specified by:
getOptionsin interfaceApiOrBuilder
-
setOptions
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3; -
setOptions
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3; -
addOptions
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3; -
addOptions
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3; -
addOptions
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3; -
addOptions
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3; -
addAllOptions
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3; -
clearOptions
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3; -
removeOptions
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3; -
getVersion
A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v<major-version>`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces.
string version = 4;- Specified by:
getVersionin interfaceApiOrBuilder- Returns:
- The version.
-
getVersionBytes
A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v<major-version>`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces.
string version = 4;- Specified by:
getVersionBytesin interfaceApiOrBuilder- Returns:
- The bytes for version.
-
setVersion
A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v<major-version>`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces.
string version = 4;- Parameters:
value- The version to set.- Returns:
- This builder for chaining.
-
clearVersion
A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v<major-version>`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces.
string version = 4;- Returns:
- This builder for chaining.
-
setVersionBytes
A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v<major-version>`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces.
string version = 4;- Parameters:
value- The bytes for version to set.- Returns:
- This builder for chaining.
-
hasSourceContext
public boolean hasSourceContext()Source context for the protocol buffer service represented by this message.
.google.protobuf.SourceContext source_context = 5;- Specified by:
hasSourceContextin interfaceApiOrBuilder- Returns:
- Whether the sourceContext field is set.
-
getSourceContext
Source context for the protocol buffer service represented by this message.
.google.protobuf.SourceContext source_context = 5;- Specified by:
getSourceContextin interfaceApiOrBuilder- Returns:
- The sourceContext.
-
setSourceContext
Source context for the protocol buffer service represented by this message.
.google.protobuf.SourceContext source_context = 5; -
setSourceContext
Source context for the protocol buffer service represented by this message.
.google.protobuf.SourceContext source_context = 5; -
mergeSourceContext
Source context for the protocol buffer service represented by this message.
.google.protobuf.SourceContext source_context = 5; -
clearSourceContext
Source context for the protocol buffer service represented by this message.
.google.protobuf.SourceContext source_context = 5; -
getMixinsList
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6;- Specified by:
getMixinsListin interfaceApiOrBuilder
-
getMixinsCount
public int getMixinsCount()Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6;- Specified by:
getMixinsCountin interfaceApiOrBuilder
-
getMixins
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6;- Specified by:
getMixinsin interfaceApiOrBuilder
-
setMixins
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6; -
setMixins
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6; -
addMixins
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6; -
addMixins
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6; -
addMixins
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6; -
addMixins
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6; -
addAllMixins
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6; -
clearMixins
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6; -
removeMixins
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6; -
getSyntaxValue
public int getSyntaxValue()The source syntax of the service.
.google.protobuf.Syntax syntax = 7;- Specified by:
getSyntaxValuein interfaceApiOrBuilder- Returns:
- The enum numeric value on the wire for syntax.
-
setSyntaxValue
The source syntax of the service.
.google.protobuf.Syntax syntax = 7;- Parameters:
value- The syntax to set.- Returns:
- This builder for chaining.
-
getSyntax
The source syntax of the service.
.google.protobuf.Syntax syntax = 7;- Specified by:
getSyntaxin interfaceApiOrBuilder- Returns:
- The syntax.
-
setSyntax
The source syntax of the service.
.google.protobuf.Syntax syntax = 7;- Parameters:
value- The enum numeric value on the wire for syntax to set.- Returns:
- This builder for chaining.
-
clearSyntax
The source syntax of the service.
.google.protobuf.Syntax syntax = 7;- Returns:
- This builder for chaining.
-