Class ContextRule.Builder (2.21.1)

public static final class ContextRule.Builder extends GeneratedMessageV3.Builder<ContextRule.Builder> implements ContextRuleOrBuilder

A context rule provides information about the context for an individual API element.

Protobuf type google.api.ContextRule

Static Methods

getDescriptor()

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

Methods

addAllAllowedRequestExtensions(Iterable<String> values)

public ContextRule.Builder addAllAllowedRequestExtensions(Iterable<String> values)

A list of full type names or extension IDs of extensions allowed in grpc side channel from client to backend.

repeated string allowed_request_extensions = 4;

Parameter
Name Description
values Iterable<String>

The allowedRequestExtensions to add.

Returns
Type Description
ContextRule.Builder

This builder for chaining.

addAllAllowedResponseExtensions(Iterable<String> values)

public ContextRule.Builder addAllAllowedResponseExtensions(Iterable<String> values)

A list of full type names or extension IDs of extensions allowed in grpc side channel from backend to client.

repeated string allowed_response_extensions = 5;

Parameter
Name Description
values Iterable<String>

The allowedResponseExtensions to add.

Returns
Type Description
ContextRule.Builder

This builder for chaining.

addAllProvided(Iterable<String> values)

public ContextRule.Builder addAllProvided(Iterable<String> values)

A list of full type names of provided contexts.

repeated string provided = 3;

Parameter
Name Description
values Iterable<String>

The provided to add.

Returns
Type Description
ContextRule.Builder

This builder for chaining.

addAllRequested(Iterable<String> values)

public ContextRule.Builder addAllRequested(Iterable<String> values)

A list of full type names of requested contexts.

repeated string requested = 2;

Parameter
Name Description
values Iterable<String>

The requested to add.

Returns
Type Description
ContextRule.Builder

This builder for chaining.

addAllowedRequestExtensions(String value)

public ContextRule.Builder addAllowedRequestExtensions(String value)

A list of full type names or extension IDs of extensions allowed in grpc side channel from client to backend.

repeated string allowed_request_extensions = 4;

Parameter
Name Description
value String

The allowedRequestExtensions to add.

Returns
Type Description
ContextRule.Builder

This builder for chaining.

addAllowedRequestExtensionsBytes(ByteString value)

public ContextRule.Builder addAllowedRequestExtensionsBytes(ByteString value)

A list of full type names or extension IDs of extensions allowed in grpc side channel from client to backend.

repeated string allowed_request_extensions = 4;

Parameter
Name Description
value ByteString

The bytes of the allowedRequestExtensions to add.

Returns
Type Description
ContextRule.Builder

This builder for chaining.

addAllowedResponseExtensions(String value)

public ContextRule.Builder addAllowedResponseExtensions(String value)

A list of full type names or extension IDs of extensions allowed in grpc side channel from backend to client.

repeated string allowed_response_extensions = 5;

Parameter
Name Description
value String

The allowedResponseExtensions to add.

Returns
Type Description
ContextRule.Builder

This builder for chaining.

addAllowedResponseExtensionsBytes(ByteString value)

public ContextRule.Builder addAllowedResponseExtensionsBytes(ByteString value)

A list of full type names or extension IDs of extensions allowed in grpc side channel from backend to client.

repeated string allowed_response_extensions = 5;

Parameter
Name Description
value ByteString

The bytes of the allowedResponseExtensions to add.

Returns
Type Description
ContextRule.Builder

This builder for chaining.

addProvided(String value)

public ContextRule.Builder addProvided(String value)

A list of full type names of provided contexts.

repeated string provided = 3;

Parameter
Name Description
value String

The provided to add.

Returns
Type Description
ContextRule.Builder

This builder for chaining.

addProvidedBytes(ByteString value)

public ContextRule.Builder addProvidedBytes(ByteString value)

A list of full type names of provided contexts.

repeated string provided = 3;

Parameter
Name Description
value ByteString

The bytes of the provided to add.

Returns
Type Description
ContextRule.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ContextRule.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ContextRule.Builder
Overrides

addRequested(String value)

public ContextRule.Builder addRequested(String value)

A list of full type names of requested contexts.

repeated string requested = 2;

Parameter
Name Description
value String

The requested to add.

Returns
Type Description
ContextRule.Builder

This builder for chaining.

addRequestedBytes(ByteString value)

public ContextRule.Builder addRequestedBytes(ByteString value)

A list of full type names of requested contexts.

repeated string requested = 2;

Parameter
Name Description
value ByteString

The bytes of the requested to add.

Returns
Type Description
ContextRule.Builder

This builder for chaining.

build()

public ContextRule build()
Returns
Type Description
ContextRule

buildPartial()

public ContextRule buildPartial()
Returns
Type Description
ContextRule

clear()

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

clearAllowedRequestExtensions()

public ContextRule.Builder clearAllowedRequestExtensions()

A list of full type names or extension IDs of extensions allowed in grpc side channel from client to backend.

repeated string allowed_request_extensions = 4;

Returns
Type Description
ContextRule.Builder

This builder for chaining.

clearAllowedResponseExtensions()

public ContextRule.Builder clearAllowedResponseExtensions()

A list of full type names or extension IDs of extensions allowed in grpc side channel from backend to client.

repeated string allowed_response_extensions = 5;

Returns
Type Description
ContextRule.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ContextRule.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ContextRule.Builder
Overrides