Class TemplateRoles.Builder (0.3.0)

public static final class TemplateRoles.Builder extends GeneratedMessage.Builder<TemplateRoles.Builder> implements TemplateRolesOrBuilder

Template Roles provide the level and roles

Protobuf type google.cloud.designcenter.v1.TemplateRoles

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllRoles(Iterable<String> values)

public TemplateRoles.Builder addAllRoles(Iterable<String> values)

Required. List of roles.

repeated string roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<String>

The roles to add.

Returns
Type Description
TemplateRoles.Builder

This builder for chaining.

addRoles(String value)

public TemplateRoles.Builder addRoles(String value)

Required. List of roles.

repeated string roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The roles to add.

Returns
Type Description
TemplateRoles.Builder

This builder for chaining.

addRolesBytes(ByteString value)

public TemplateRoles.Builder addRolesBytes(ByteString value)

Required. List of roles.

repeated string roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes of the roles to add.

Returns
Type Description
TemplateRoles.Builder

This builder for chaining.

build()

public TemplateRoles build()
Returns
Type Description
TemplateRoles

buildPartial()

public TemplateRoles buildPartial()
Returns
Type Description
TemplateRoles

clear()

public TemplateRoles.Builder clear()
Returns
Type Description
TemplateRoles.Builder
Overrides

clearLevel()

public TemplateRoles.Builder clearLevel()

Required. Level of the role.

string level = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TemplateRoles.Builder

This builder for chaining.

clearRoles()

public TemplateRoles.Builder clearRoles()

Required. List of roles.

repeated string roles = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TemplateRoles.Builder

This builder for chaining.

getDefaultInstanceForType()

public TemplateRoles getDefaultInstanceForType()
Returns
Type Description
TemplateRoles

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getLevel()

public String getLevel()

Required. Level of the role.

string level = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The level.

getLevelBytes()

public ByteString getLevelBytes()

Required. Level of the role.

string level = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for level.

getRoles(int index)

public String getRoles(int index)

Required. List of roles.

repeated string roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The roles at the given index.

getRolesBytes(int index)

public ByteString getRolesBytes(int index)

Required. List of roles.

repeated string roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the roles at the given index.

getRolesCount()

public int getRolesCount()

Required. List of roles.

repeated string roles = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of roles.

getRolesList()

public ProtocolStringList getRolesList()

Required. List of roles.

repeated string roles = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProtocolStringList

A list containing the roles.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TemplateRoles other)

public TemplateRoles.Builder mergeFrom(TemplateRoles other)
Parameter
Name Description
other TemplateRoles
Returns
Type Description
TemplateRoles.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TemplateRoles.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TemplateRoles.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public TemplateRoles.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
TemplateRoles.Builder
Overrides

setLevel(String value)

public TemplateRoles.Builder setLevel(String value)

Required. Level of the role.

string level = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The level to set.

Returns
Type Description
TemplateRoles.Builder

This builder for chaining.

setLevelBytes(ByteString value)

public TemplateRoles.Builder setLevelBytes(ByteString value)

Required. Level of the role.

string level = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for level to set.

Returns
Type Description
TemplateRoles.Builder

This builder for chaining.

setRoles(int index, String value)

public TemplateRoles.Builder setRoles(int index, String value)

Required. List of roles.

repeated string roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value String

The roles to set.

Returns
Type Description
TemplateRoles.Builder

This builder for chaining.