public static final class Api.Builder extends GeneratedMessage.Builder<Api.Builder> implements ApiOrBuilder
google.protobuf.Api
Api is a light-weight descriptor for a protocol buffer service.
Modifier and Type | Method and Description |
---|---|
Api.Builder |
addAllMethods(Iterable<? extends Method> values)
repeated .google.protobuf.Method methods = 2; |
Api.Builder |
addAllOptions(Iterable<? extends Option> values)
repeated .google.protobuf.Option options = 3; |
Api.Builder |
addMethods(int index,
Method.Builder builderForValue)
repeated .google.protobuf.Method methods = 2; |
Api.Builder |
addMethods(int index,
Method value)
repeated .google.protobuf.Method methods = 2; |
Api.Builder |
addMethods(Method.Builder builderForValue)
repeated .google.protobuf.Method methods = 2; |
Api.Builder |
addMethods(Method value)
repeated .google.protobuf.Method methods = 2; |
Method.Builder |
addMethodsBuilder()
repeated .google.protobuf.Method methods = 2; |
Method.Builder |
addMethodsBuilder(int index)
repeated .google.protobuf.Method methods = 2; |
Api.Builder |
addOptions(int index,
Option.Builder builderForValue)
repeated .google.protobuf.Option options = 3; |
Api.Builder |
addOptions(int index,
Option value)
repeated .google.protobuf.Option options = 3; |
Api.Builder |
addOptions(Option.Builder builderForValue)
repeated .google.protobuf.Option options = 3; |
Api.Builder |
addOptions(Option value)
repeated .google.protobuf.Option options = 3; |
Option.Builder |
addOptionsBuilder()
repeated .google.protobuf.Option options = 3; |
Option.Builder |
addOptionsBuilder(int index)
repeated .google.protobuf.Option options = 3; |
Api |
build()
Constructs the message based on the state of the Builder.
|
Api |
buildPartial()
Like
MessageLite.Builder.build() , but does not throw an exception if the message
is missing required fields. |
Api.Builder |
clear()
Called by the initialization and clear code paths to allow subclasses to
reset any of their builtin fields back to the initial values.
|
Api.Builder |
clearMethods()
repeated .google.protobuf.Method methods = 2; |
Api.Builder |
clearName()
optional string name = 1; |
Api.Builder |
clearOptions()
repeated .google.protobuf.Option options = 3; |
Api.Builder |
clearSourceContext()
optional .google.protobuf.SourceContext source_context = 5; |
Api.Builder |
clearVersion()
optional string version = 4; |
Api |
getDefaultInstanceForType()
Get an instance of the type with no fields set.
|
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType()
Get the message's type's descriptor.
|
Method |
getMethods(int index)
repeated .google.protobuf.Method methods = 2; |
Method.Builder |
getMethodsBuilder(int index)
repeated .google.protobuf.Method methods = 2; |
List<Method.Builder> |
getMethodsBuilderList()
repeated .google.protobuf.Method methods = 2; |
int |
getMethodsCount()
repeated .google.protobuf.Method methods = 2; |
List<Method> |
getMethodsList()
repeated .google.protobuf.Method methods = 2; |
MethodOrBuilder |
getMethodsOrBuilder(int index)
repeated .google.protobuf.Method methods = 2; |
List<? extends MethodOrBuilder> |
getMethodsOrBuilderList()
repeated .google.protobuf.Method methods = 2; |
String |
getName()
optional string name = 1; |
ByteString |
getNameBytes()
optional string name = 1; |
Option |
getOptions(int index)
repeated .google.protobuf.Option options = 3; |
Option.Builder |
getOptionsBuilder(int index)
repeated .google.protobuf.Option options = 3; |
List<Option.Builder> |
getOptionsBuilderList()
repeated .google.protobuf.Option options = 3; |
int |
getOptionsCount()
repeated .google.protobuf.Option options = 3; |
List<Option> |
getOptionsList()
repeated .google.protobuf.Option options = 3; |
OptionOrBuilder |
getOptionsOrBuilder(int index)
repeated .google.protobuf.Option options = 3; |
List<? extends OptionOrBuilder> |
getOptionsOrBuilderList()
repeated .google.protobuf.Option options = 3; |
SourceContext |
getSourceContext()
optional .google.protobuf.SourceContext source_context = 5; |
SourceContext.Builder |
getSourceContextBuilder()
optional .google.protobuf.SourceContext source_context = 5; |
SourceContextOrBuilder |
getSourceContextOrBuilder()
optional .google.protobuf.SourceContext source_context = 5; |
String |
getVersion()
optional string version = 4; |
ByteString |
getVersionBytes()
optional string version = 4; |
boolean |
hasSourceContext()
optional .google.protobuf.SourceContext source_context = 5; |
protected GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable()
Get the FieldAccessorTable for this type.
|
boolean |
isInitialized()
Returns true if all required fields in the message and all embedded
messages are set, false otherwise.
|
Api.Builder |
mergeFrom(Api other) |
Api.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry)
Like
MessageLite.Builder.mergeFrom(CodedInputStream) , but also
parses extensions. |
Api.Builder |
mergeFrom(Message other)
Merge
other into the message being built. |
Api.Builder |
mergeSourceContext(SourceContext value)
optional .google.protobuf.SourceContext source_context = 5; |
Api.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
Merge some unknown fields into the
UnknownFieldSet for this
message. |
Api.Builder |
removeMethods(int index)
repeated .google.protobuf.Method methods = 2; |
Api.Builder |
removeOptions(int index)
repeated .google.protobuf.Option options = 3; |
Api.Builder |
setMethods(int index,
Method.Builder builderForValue)
repeated .google.protobuf.Method methods = 2; |
Api.Builder |
setMethods(int index,
Method value)
repeated .google.protobuf.Method methods = 2; |
Api.Builder |
setName(String value)
optional string name = 1; |
Api.Builder |
setNameBytes(ByteString value)
optional string name = 1; |
Api.Builder |
setOptions(int index,
Option.Builder builderForValue)
repeated .google.protobuf.Option options = 3; |
Api.Builder |
setOptions(int index,
Option value)
repeated .google.protobuf.Option options = 3; |
Api.Builder |
setSourceContext(SourceContext.Builder builderForValue)
optional .google.protobuf.SourceContext source_context = 5; |
Api.Builder |
setSourceContext(SourceContext value)
optional .google.protobuf.SourceContext source_context = 5; |
Api.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
Set the
UnknownFieldSet for this message. |
Api.Builder |
setVersion(String value)
optional string version = 4; |
Api.Builder |
setVersionBytes(ByteString value)
optional string version = 4; |
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField
findInitializationErrors, getInitializationErrorString, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
GeneratedMessage.Builder
internalGetFieldAccessorTable
in class GeneratedMessage.Builder<Api.Builder>
public Api.Builder clear()
GeneratedMessage.Builder
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessage.Builder<Api.Builder>
public Descriptors.Descriptor getDescriptorForType()
Message.Builder
MessageOrBuilder.getDescriptorForType()
.getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessage.Builder<Api.Builder>
public Api getDefaultInstanceForType()
MessageLiteOrBuilder
getDefaultInstance()
method of generated message classes in that
this method is an abstract method of the MessageLite
interface
whereas getDefaultInstance()
is a static method of a specific
class. They return the same thing.getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public Api build()
MessageLite.Builder
build
in interface Message.Builder
build
in interface MessageLite.Builder
public Api buildPartial()
MessageLite.Builder
MessageLite.Builder.build()
, but does not throw an exception if the message
is missing required fields. Instead, a partial message is returned.
Subsequent changes to the Builder will not affect the returned message.buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public Api.Builder mergeFrom(Message other)
Message.Builder
other
into the message being built. other
must
have the exact same type as this
(i.e.
getDescriptorForType() == other.getDescriptorForType()
).
Merging occurs as follows. For each field:other
,
then other
's value overwrites the value in this message.other
,
it is merged into the corresponding sub-message of this message
using the same merging rules.other
are concatenated
with the elements in this message.
This is equivalent to the Message::MergeFrom
method in C++.mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<Api.Builder>
public Api.Builder mergeFrom(Api other)
public final boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessage.Builder<Api.Builder>
public Api.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
MessageLite.Builder
MessageLite.Builder.mergeFrom(CodedInputStream)
, but also
parses extensions. The extensions that you want to be able to parse
must be registered in extensionRegistry
. Extensions not in
the registry will be treated as unknown fields.mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<Api.Builder>
IOException
public String getName()
optional string name = 1;
The fully qualified name of this api, including package name followed by the api's simple name.
getName
in interface ApiOrBuilder
public ByteString getNameBytes()
optional string name = 1;
The fully qualified name of this api, including package name followed by the api's simple name.
getNameBytes
in interface ApiOrBuilder
public Api.Builder setName(String value)
optional string name = 1;
The fully qualified name of this api, including package name followed by the api's simple name.
public Api.Builder clearName()
optional string name = 1;
The fully qualified name of this api, including package name followed by the api's simple name.
public Api.Builder setNameBytes(ByteString value)
optional string name = 1;
The fully qualified name of this api, including package name followed by the api's simple name.
public List<Method> getMethodsList()
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethodsList
in interface ApiOrBuilder
public int getMethodsCount()
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethodsCount
in interface ApiOrBuilder
public Method getMethods(int index)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethods
in interface ApiOrBuilder
public Api.Builder setMethods(int index, Method value)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
public Api.Builder setMethods(int index, Method.Builder builderForValue)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
public Api.Builder addMethods(Method value)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
public Api.Builder addMethods(int index, Method value)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
public Api.Builder addMethods(Method.Builder builderForValue)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
public Api.Builder addMethods(int index, Method.Builder builderForValue)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
public Api.Builder addAllMethods(Iterable<? extends Method> values)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
public Api.Builder clearMethods()
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
public Api.Builder removeMethods(int index)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
public Method.Builder getMethodsBuilder(int index)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
public MethodOrBuilder getMethodsOrBuilder(int index)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethodsOrBuilder
in interface ApiOrBuilder
public List<? extends MethodOrBuilder> getMethodsOrBuilderList()
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethodsOrBuilderList
in interface ApiOrBuilder
public Method.Builder addMethodsBuilder()
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
public Method.Builder addMethodsBuilder(int index)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
public List<Method.Builder> getMethodsBuilderList()
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
public List<Option> getOptionsList()
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptionsList
in interface ApiOrBuilder
public int getOptionsCount()
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptionsCount
in interface ApiOrBuilder
public Option getOptions(int index)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptions
in interface ApiOrBuilder
public Api.Builder setOptions(int index, Option value)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
public Api.Builder setOptions(int index, Option.Builder builderForValue)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
public Api.Builder addOptions(Option value)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
public Api.Builder addOptions(int index, Option value)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
public Api.Builder addOptions(Option.Builder builderForValue)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
public Api.Builder addOptions(int index, Option.Builder builderForValue)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
public Api.Builder addAllOptions(Iterable<? extends Option> values)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
public Api.Builder clearOptions()
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
public Api.Builder removeOptions(int index)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
public Option.Builder getOptionsBuilder(int index)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
public OptionOrBuilder getOptionsOrBuilder(int index)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptionsOrBuilder
in interface ApiOrBuilder
public List<? extends OptionOrBuilder> getOptionsOrBuilderList()
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptionsOrBuilderList
in interface ApiOrBuilder
public Option.Builder addOptionsBuilder()
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
public Option.Builder addOptionsBuilder(int index)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
public List<Option.Builder> getOptionsBuilderList()
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
public String getVersion()
optional string version = 4;
A version string for this api. 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 API, 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, none-GA apis. See also: [design doc](http://go/api-versioning).
getVersion
in interface ApiOrBuilder
public ByteString getVersionBytes()
optional string version = 4;
A version string for this api. 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 API, 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, none-GA apis. See also: [design doc](http://go/api-versioning).
getVersionBytes
in interface ApiOrBuilder
public Api.Builder setVersion(String value)
optional string version = 4;
A version string for this api. 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 API, 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, none-GA apis. See also: [design doc](http://go/api-versioning).
public Api.Builder clearVersion()
optional string version = 4;
A version string for this api. 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 API, 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, none-GA apis. See also: [design doc](http://go/api-versioning).
public Api.Builder setVersionBytes(ByteString value)
optional string version = 4;
A version string for this api. 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 API, 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, none-GA apis. See also: [design doc](http://go/api-versioning).
public boolean hasSourceContext()
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
hasSourceContext
in interface ApiOrBuilder
public SourceContext getSourceContext()
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
getSourceContext
in interface ApiOrBuilder
public Api.Builder setSourceContext(SourceContext value)
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
public Api.Builder setSourceContext(SourceContext.Builder builderForValue)
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
public Api.Builder mergeSourceContext(SourceContext value)
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
public Api.Builder clearSourceContext()
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
public SourceContext.Builder getSourceContextBuilder()
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
public SourceContextOrBuilder getSourceContextOrBuilder()
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
getSourceContextOrBuilder
in interface ApiOrBuilder
public final Api.Builder setUnknownFields(UnknownFieldSet unknownFields)
Message.Builder
UnknownFieldSet
for this message.setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessage.Builder<Api.Builder>
public final Api.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Message.Builder
UnknownFieldSet
for this
message.mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessage.Builder<Api.Builder>
Copyright © 2008–2015 Google. All rights reserved.