Class Api.Builder (3.19.4)

  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

Implements

ApiOrBuilder

Methods

addAllMethods(Iterable<? extends Method> values)

  public 
  
 Api 
 . 
 Builder 
  
 addAllMethods 
 ( 
 Iterable 
< ? 
  
 extends 
  
 Method 
>  
 values 
 ) 
 

The methods of this interface, in unspecified order.

repeated .google.protobuf.Method methods = 2;

Parameter
Name
Description
values
Iterable < ? extends com.google.protobuf.Method >
Returns
Type
Description

addAllMixins(Iterable<? extends Mixin> values)

  public 
  
 Api 
 . 
 Builder 
  
 addAllMixins 
 ( 
 Iterable 
< ? 
  
 extends 
  
 Mixin 
>  
 values 
 ) 
 

Included interfaces. See [Mixin][].

repeated .google.protobuf.Mixin mixins = 6;

Parameter
Name
Description
values
Iterable < ? extends com.google.protobuf.Mixin >
Returns
Type
Description

addAllOptions(Iterable<? extends Option> values)

  public 
  
 Api 
 . 
 Builder 
  
 addAllOptions 
 ( 
 Iterable 
< ? 
  
 extends 
  
 Option 
>  
 values 
 ) 
 

Any metadata attached to the interface.

repeated .google.protobuf.Option options = 3;

Parameter
Name
Description
values
Iterable < ? extends com.google.protobuf.Option >
Returns
Type
Description

addMethods(Method value)

  public 
  
 Api 
 . 
 Builder 
  
 addMethods 
 ( 
 Method 
  
 value 
 ) 
 

The methods of this interface, in unspecified order.

repeated .google.protobuf.Method methods = 2;

Parameter
Name
Description
value
Returns
Type
Description

addMethods(Method.Builder builderForValue)

  public 
  
 Api 
 . 
 Builder 
  
 addMethods 
 ( 
 Method 
 . 
 Builder 
  
 builderForValue 
 ) 
 

The methods of this interface, in unspecified order.

repeated .google.protobuf.Method methods = 2;

Parameter
Name
Description
builderForValue
Returns
Type
Description

addMethods(int index, Method value)

  public 
  
 Api 
 . 
 Builder 
  
 addMethods 
 ( 
 int 
  
 index 
 , 
  
 Method 
  
 value 
 ) 
 

The methods of this interface, in unspecified order.

repeated .google.protobuf.Method methods = 2;

Parameters
Name
Description
index
int
value
Returns
Type
Description

addMethods(int index, Method.Builder builderForValue)

  public 
  
 Api 
 . 
 Builder 
  
 addMethods 
 ( 
 int 
  
 index 
 , 
  
 Method 
 . 
 Builder 
  
 builderForValue 
 ) 
 

The methods of this interface, in unspecified order.

repeated .google.protobuf.Method methods = 2;

Parameters
Name
Description
index
int
builderForValue
Returns
Type
Description

addMixins(Mixin value)

  public 
  
 Api 
 . 
 Builder 
  
 addMixins 
 ( 
 Mixin 
  
 value 
 ) 
 

Included interfaces. See [Mixin][].

repeated .google.protobuf.Mixin mixins = 6;

Parameter
Name
Description
value
Returns
Type
Description

addMixins(Mixin.Builder builderForValue)

  public 
  
 Api 
 . 
 Builder 
  
 addMixins 
 ( 
 Mixin 
 . 
 Builder 
  
 builderForValue 
 ) 
 

Included interfaces. See [Mixin][].

repeated .google.protobuf.Mixin mixins = 6;

Parameter
Name
Description
builderForValue
Returns
Type
Description

addMixins(int index, Mixin value)

  public 
  
 Api 
 . 
 Builder 
  
 addMixins 
 ( 
 int 
  
 index 
 , 
  
 Mixin 
  
 value 
 ) 
 

Included interfaces. See [Mixin][].

repeated .google.protobuf.Mixin mixins = 6;

Parameters
Name
Description
index
int
value
Returns
Type
Description

addMixins(int index, Mixin.Builder builderForValue)

  public 
  
 Api 
 . 
 Builder 
  
 addMixins 
 ( 
 int 
  
 index 
 , 
  
 Mixin 
 . 
 Builder 
  
 builderForValue 
 ) 
 

Included interfaces. See [Mixin][].

repeated .google.protobuf.Mixin mixins = 6;

Parameters
Name
Description
index
int
builderForValue
Returns
Type
Description

addOptions(Option value)

  public 
  
 Api 
 . 
 Builder 
  
 addOptions 
 ( 
 Option 
  
 value 
 ) 
 

Any metadata attached to the interface.

repeated .google.protobuf.Option options = 3;

Parameter
Name
Description
value
Returns
Type
Description

addOptions(Option.Builder builderForValue)

  public 
  
 Api 
 . 
 Builder 
  
 addOptions 
 ( 
 Option 
 . 
 Builder 
  
 builderForValue 
 ) 
 

Any metadata attached to the interface.

repeated .google.protobuf.Option options = 3;

Parameter
Name
Description
builderForValue
Returns
Type
Description

addOptions(int index, Option value)

  public 
  
 Api 
 . 
 Builder 
  
 addOptions 
 ( 
 int 
  
 index 
 , 
  
 Option 
  
 value 
 ) 
 

Any metadata attached to the interface.

repeated .google.protobuf.Option options = 3;

Parameters
Name
Description
index
int
value
Returns
Type
Description

addOptions(int index, Option.Builder builderForValue)

  public 
  
 Api 
 . 
 Builder 
  
 addOptions 
 ( 
 int 
  
 index 
 , 
  
 Option 
 . 
 Builder 
  
 builderForValue 
 ) 
 

Any metadata attached to the interface.

repeated .google.protobuf.Option options = 3;

Parameters
Name
Description
index
int
builderForValue
Returns
Type
Description

clearMethods()

  public 
  
 Api 
 . 
 Builder 
  
 clearMethods 
 () 
 

The methods of this interface, in unspecified order.

repeated .google.protobuf.Method methods = 2;

Returns
Type
Description

clearMixins()

  public 
  
 Api 
 . 
 Builder 
  
 clearMixins 
 () 
 

Included interfaces. See [Mixin][].

repeated .google.protobuf.Mixin mixins = 6;

Returns
Type
Description

clearName()

  public 
  
 Api 
 . 
 Builder 
  
 clearName 
 () 
 

The fully qualified name of this interface, including package name followed by the interface's simple name.

string name = 1;

Returns
Type
Description

This builder for chaining.

clearOptions()

  public 
  
 Api 
 . 
 Builder 
  
 clearOptions 
 () 
 

Any metadata attached to the interface.

repeated .google.protobuf.Option options = 3;

Returns
Type
Description

clearSourceContext()

  public 
  
 Api 
 . 
 Builder 
  
 clearSourceContext 
 () 
 

Source context for the protocol buffer service represented by this message.

.google.protobuf.SourceContext source_context = 5;

Returns
Type
Description

clearSyntax()

  public 
  
 Api 
 . 
 Builder 
  
 clearSyntax 
 () 
 

The source syntax of the service.

.google.protobuf.Syntax syntax = 7;

Returns
Type
Description

This builder for chaining.

clearVersion()

  public 
  
 Api 
 . 
 Builder 
  
 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 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
Type
Description

This builder for chaining.

getMethods(int index)

  public 
  
 Method 
  
 getMethods 
 ( 
 int 
  
 index 
 ) 
 

The methods of this interface, in unspecified order.

repeated .google.protobuf.Method methods = 2;

Parameter
Name
Description
index
int
Returns
Type
Description

getMethodsCount()

  public 
  
 int 
  
 getMethodsCount 
 () 
 

The methods of this interface, in unspecified order.

repeated .google.protobuf.Method methods = 2;

Returns
Type
Description
int

getMethodsList()

  public 
  
 List<Method> 
  
 getMethodsList 
 () 
 

The methods of this interface, in unspecified order.

repeated .google.protobuf.Method methods = 2;

Returns
Type
Description
List < Method >

getMixins(int index)

  public 
  
 Mixin 
  
 getMixins 
 ( 
 int 
  
 index 
 ) 
 

Included interfaces. See [Mixin][].

repeated .google.protobuf.Mixin mixins = 6;

Parameter
Name
Description
index
int
Returns
Type
Description

getMixinsCount()

  public 
  
 int 
  
 getMixinsCount 
 () 
 

Included interfaces. See [Mixin][].

repeated .google.protobuf.Mixin mixins = 6;

Returns
Type
Description
int

getMixinsList()

  public 
  
 List<Mixin> 
  
 getMixinsList 
 () 
 

Included interfaces. See [Mixin][].

repeated .google.protobuf.Mixin mixins = 6;

Returns
Type
Description
List < Mixin >

getName()

  public 
  
 String 
  
 getName 
 () 
 

The fully qualified name of this interface, including package name followed by the interface's simple name.

string name = 1;

Returns
Type
Description

The name.

getNameBytes()

  public 
  
 ByteString 
  
 getNameBytes 
 () 
 

The fully qualified name of this interface, including package name followed by the interface's simple name.

string name = 1;

Returns
Type
Description

The bytes for name.

getOptions(int index)

  public 
  
 Option 
  
 getOptions 
 ( 
 int 
  
 index 
 ) 
 

Any metadata attached to the interface.

repeated .google.protobuf.Option options = 3;

Parameter
Name
Description
index
int
Returns
Type
Description

getOptionsCount()

  public 
  
 int 
  
 getOptionsCount 
 () 
 

Any metadata attached to the interface.

repeated .google.protobuf.Option options = 3;

Returns
Type
Description
int

getOptionsList()

  public 
  
 List<Option> 
  
 getOptionsList 
 () 
 

Any metadata attached to the interface.

repeated .google.protobuf.Option options = 3;

Returns
Type
Description
List < Option >

getSourceContext()

  public 
  
 SourceContext 
  
 getSourceContext 
 () 
 

Source context for the protocol buffer service represented by this message.

.google.protobuf.SourceContext source_context = 5;

Returns
Type
Description

getSyntax()

  public 
  
 Syntax 
  
 getSyntax 
 () 
 

The source syntax of the service.

.google.protobuf.Syntax syntax = 7;

Returns
Type
Description

The syntax.

getSyntaxValue()

  public 
  
 int 
  
 getSyntaxValue 
 () 
 

The source syntax of the service.

.google.protobuf.Syntax syntax = 7;

Returns
Type
Description
int

The enum numeric value on the wire for syntax.

getVersion()

  public 
  
 String 
  
 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 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
Type
Description

The version.

getVersionBytes()

  public 
  
 ByteString 
  
 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 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
Type
Description

The bytes for version.

hasSourceContext()

  public 
  
 boolean 
  
 hasSourceContext 
 () 
 

Source context for the protocol buffer service represented by this message.

.google.protobuf.SourceContext source_context = 5;

Returns
Type
Description

mergeSourceContext(SourceContext value)

  public 
  
 Api 
 . 
 Builder 
  
 mergeSourceContext 
 ( 
 SourceContext 
  
 value 
 ) 
 

Source context for the protocol buffer service represented by this message.

.google.protobuf.SourceContext source_context = 5;

Parameter
Name
Description
Returns
Type
Description

removeMethods(int index)

  public 
  
 Api 
 . 
 Builder 
  
 removeMethods 
 ( 
 int 
  
 index 
 ) 
 

The methods of this interface, in unspecified order.

repeated .google.protobuf.Method methods = 2;

Parameter
Name
Description
index
int
Returns
Type
Description

removeMixins(int index)

  public 
  
 Api 
 . 
 Builder 
  
 removeMixins 
 ( 
 int 
  
 index 
 ) 
 

Included interfaces. See [Mixin][].

repeated .google.protobuf.Mixin mixins = 6;

Parameter
Name
Description
index
int
Returns
Type
Description

removeOptions(int index)

  public 
  
 Api 
 . 
 Builder 
  
 removeOptions 
 ( 
 int 
  
 index 
 ) 
 

Any metadata attached to the interface.

repeated .google.protobuf.Option options = 3;

Parameter
Name
Description
index
int
Returns
Type
Description

setMethods(int index, Method value)

  public 
  
 Api 
 . 
 Builder 
  
 setMethods 
 ( 
 int 
  
 index 
 , 
  
 Method 
  
 value 
 ) 
 

The methods of this interface, in unspecified order.

repeated .google.protobuf.Method methods = 2;

Parameters
Name
Description
index
int
value
Returns
Type
Description

setMethods(int index, Method.Builder builderForValue)

  public 
  
 Api 
 . 
 Builder 
  
 setMethods 
 ( 
 int 
  
 index 
 , 
  
 Method 
 . 
 Builder 
  
 builderForValue 
 ) 
 

The methods of this interface, in unspecified order.

repeated .google.protobuf.Method methods = 2;

Parameters
Name
Description
index
int
builderForValue
Returns
Type
Description

setMixins(int index, Mixin value)

  public 
  
 Api 
 . 
 Builder 
  
 setMixins 
 ( 
 int 
  
 index 
 , 
  
 Mixin 
  
 value 
 ) 
 

Included interfaces. See [Mixin][].

repeated .google.protobuf.Mixin mixins = 6;

Parameters
Name
Description
index
int
value
Returns
Type
Description

setMixins(int index, Mixin.Builder builderForValue)

  public 
  
 Api 
 . 
 Builder 
  
 setMixins 
 ( 
 int 
  
 index 
 , 
  
 Mixin 
 . 
 Builder 
  
 builderForValue 
 ) 
 

Included interfaces. See [Mixin][].

repeated .google.protobuf.Mixin mixins = 6;

Parameters
Name
Description
index
int
builderForValue
Returns
Type
Description

setName(String value)

  public 
  
 Api 
 . 
 Builder 
  
 setName 
 ( 
 String 
  
 value 
 ) 
 

The fully qualified name of this interface, including package name followed by the interface's simple name.

string name = 1;

Parameter
Name
Description
value
String

The name to set.

Returns
Type
Description

This builder for chaining.

setNameBytes(ByteString value)

  public 
  
 Api 
 . 
 Builder 
  
 setNameBytes 
 ( 
 ByteString 
  
 value 
 ) 
 

The fully qualified name of this interface, including package name followed by the interface's simple name.

string name = 1;

Parameter
Name
Description
value
ByteString

The bytes for name to set.

Returns
Type
Description

This builder for chaining.

setOptions(int index, Option value)

  public 
  
 Api 
 . 
 Builder 
  
 setOptions 
 ( 
 int 
  
 index 
 , 
  
 Option 
  
 value 
 ) 
 

Any metadata attached to the interface.

repeated .google.protobuf.Option options = 3;

Parameters
Name
Description
index
int
value
Returns
Type
Description

setOptions(int index, Option.Builder builderForValue)

  public 
  
 Api 
 . 
 Builder 
  
 setOptions 
 ( 
 int 
  
 index 
 , 
  
 Option 
 . 
 Builder 
  
 builderForValue 
 ) 
 

Any metadata attached to the interface.

repeated .google.protobuf.Option options = 3;

Parameters
Name
Description
index
int
builderForValue
Returns
Type
Description

setSourceContext(SourceContext value)

  public 
  
 Api 
 . 
 Builder 
  
 setSourceContext 
 ( 
 SourceContext 
  
 value 
 ) 
 

Source context for the protocol buffer service represented by this message.

.google.protobuf.SourceContext source_context = 5;

Parameter
Name
Description
Returns
Type
Description

setSourceContext(SourceContext.Builder builderForValue)

  public 
  
 Api 
 . 
 Builder 
  
 setSourceContext 
 ( 
 SourceContext 
 . 
 Builder 
  
 builderForValue 
 ) 
 

Source context for the protocol buffer service represented by this message.

.google.protobuf.SourceContext source_context = 5;

Parameter
Name
Description
builderForValue
Returns
Type
Description

setSyntax(Syntax value)

  public 
  
 Api 
 . 
 Builder 
  
 setSyntax 
 ( 
 Syntax 
  
 value 
 ) 
 

The source syntax of the service.

.google.protobuf.Syntax syntax = 7;

Parameter
Name
Description
value
Syntax

The enum numeric value on the wire for syntax to set.

Returns
Type
Description

This builder for chaining.

setSyntaxValue(int value)

  public 
  
 Api 
 . 
 Builder 
  
 setSyntaxValue 
 ( 
 int 
  
 value 
 ) 
 

The source syntax of the service.

.google.protobuf.Syntax syntax = 7;

Parameter
Name
Description
value
int

The syntax to set.

Returns
Type
Description

This builder for chaining.

setVersion(String value)

  public 
  
 Api 
 . 
 Builder 
  
 setVersion 
 ( 
 String 
  
 value 
 ) 
 

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 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;

Parameter
Name
Description
value
String

The version to set.

Returns
Type
Description

This builder for chaining.

setVersionBytes(ByteString value)

  public 
  
 Api 
 . 
 Builder 
  
 setVersionBytes 
 ( 
 ByteString 
  
 value 
 ) 
 

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 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;

Parameter
Name
Description
value
ByteString

The bytes for version to set.

Returns
Type
Description

This builder for chaining.

Design a Mobile Site
View Site in Mobile | Classic
Share by: