Class ContextRule (2.44.0)

public final class ContextRule extends GeneratedMessageV3 implements ContextRuleOrBuilder

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

Protobuf type google.api.ContextRule

Static Fields

ALLOWED_REQUEST_EXTENSIONS_FIELD_NUMBER

public static final int ALLOWED_REQUEST_EXTENSIONS_FIELD_NUMBER
Field Value
Type Description
int

ALLOWED_RESPONSE_EXTENSIONS_FIELD_NUMBER

public static final int ALLOWED_RESPONSE_EXTENSIONS_FIELD_NUMBER
Field Value
Type Description
int

PROVIDED_FIELD_NUMBER

public static final int PROVIDED_FIELD_NUMBER
Field Value
Type Description
int

REQUESTED_FIELD_NUMBER

public static final int REQUESTED_FIELD_NUMBER
Field Value
Type Description
int

SELECTOR_FIELD_NUMBER

public static final int SELECTOR_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ContextRule getDefaultInstance()
Returns
Type Description
ContextRule

getDescriptor()

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

newBuilder()

public static ContextRule.Builder newBuilder()
Returns
Type Description
ContextRule.Builder

newBuilder(ContextRule prototype)

public static ContextRule.Builder newBuilder(ContextRule prototype)
Parameter
Name Description
prototype ContextRule
Returns
Type Description
ContextRule.Builder

parseDelimitedFrom(InputStream input)

public static ContextRule parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ContextRule
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ContextRule parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ContextRule
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ContextRule parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ContextRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ContextRule parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ContextRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ContextRule parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ContextRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ContextRule parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ContextRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ContextRule parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ContextRule
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ContextRule parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ContextRule
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ContextRule parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ContextRule
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ContextRule parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ContextRule
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ContextRule parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ContextRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ContextRule parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ContextRule
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ContextRule> parser()
Returns
Type Description
Parser<ContextRule>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAllowedRequestExtensions(int index)

public String getAllowedRequestExtensions(int index)

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
index int

The index of the element to return.

Returns
Type Description
String

The allowedRequestExtensions at the given index.

getAllowedRequestExtensionsBytes(int index)

public ByteString getAllowedRequestExtensionsBytes(int index)

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
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the allowedRequestExtensions at the given index.

getAllowedRequestExtensionsCount()

public int getAllowedRequestExtensionsCount()

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
int

The count of allowedRequestExtensions.

getAllowedRequestExtensionsList()

public ProtocolStringList getAllowedRequestExtensionsList()

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
ProtocolStringList

A list containing the allowedRequestExtensions.

getAllowedResponseExtensions(int index)

public String getAllowedResponseExtensions(int index)

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
index int

The index of the element to return.

Returns
Type Description
String

The allowedResponseExtensions at the given index.

getAllowedResponseExtensionsBytes(int index)

public ByteString getAllowedResponseExtensionsBytes(int index)

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
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the allowedResponseExtensions at the given index.

getAllowedResponseExtensionsCount()

public int getAllowedResponseExtensionsCount()

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
int

The count of allowedResponseExtensions.

getAllowedResponseExtensionsList()

public ProtocolStringList getAllowedResponseExtensionsList()

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
ProtocolStringList

A list containing the allowedResponseExtensions.

getDefaultInstanceForType()

public ContextRule getDefaultInstanceForType()
Returns
Type Description
ContextRule

getParserForType()

public Parser<ContextRule> getParserForType()
Returns
Type Description
Parser<ContextRule>
Overrides

getProvided(int index)

public String getProvided(int index)

A list of full type names of provided contexts. It is used to support propagating HTTP headers and ETags from the response extension.

repeated string provided = 3;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The provided at the given index.

getProvidedBytes(int index)

public ByteString getProvidedBytes(int index)

A list of full type names of provided contexts. It is used to support propagating HTTP headers and ETags from the response extension.

repeated string provided = 3;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the provided at the given index.

getProvidedCount()

public int getProvidedCount()

A list of full type names of provided contexts. It is used to support propagating HTTP headers and ETags from the response extension.

repeated string provided = 3;

Returns
Type Description
int

The count of provided.

getProvidedList()

public ProtocolStringList getProvidedList()

A list of full type names of provided contexts. It is used to support propagating HTTP headers and ETags from the response extension.

repeated string provided = 3;

Returns
Type Description
ProtocolStringList

A list containing the provided.

getRequested(int index)

public String getRequested(int index)

A list of full type names of requested contexts, only the requested context will be made available to the backend.

repeated string requested = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The requested at the given index.

getRequestedBytes(int index)

public ByteString getRequestedBytes(int index)

A list of full type names of requested contexts, only the requested context will be made available to the backend.

repeated string requested = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the requested at the given index.

getRequestedCount()

public int getRequestedCount()

A list of full type names of requested contexts, only the requested context will be made available to the backend.

repeated string requested = 2;

Returns
Type Description
int

The count of requested.

getRequestedList()

public ProtocolStringList getRequestedList()

A list of full type names of requested contexts, only the requested context will be made available to the backend.

repeated string requested = 2;

Returns
Type Description
ProtocolStringList

A list containing the requested.

getSelector()

public String getSelector()

Selects the methods to which this rule applies.

Refer to selector for syntax details.

string selector = 1;

Returns
Type Description
String

The selector.

getSelectorBytes()

public ByteString getSelectorBytes()

Selects the methods to which this rule applies.

Refer to selector for syntax details.

string selector = 1;

Returns
Type Description
ByteString

The bytes for selector.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ContextRule.Builder newBuilderForType()
Returns
Type Description
ContextRule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ContextRule.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ContextRule.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ContextRule.Builder toBuilder()
Returns
Type Description
ContextRule.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException