Class AuthenticationRule (2.45.1)

public final class AuthenticationRule extends GeneratedMessageV3 implements AuthenticationRuleOrBuilder

Authentication rules for the service.

By default, if a method has any authentication requirements, every request must include a valid credential matching one of the requirements. It's an error to include more than one kind of credential in a single request.

If a method doesn't have any auth requirements, request credentials will be ignored.

Protobuf type google.api.AuthenticationRule

Static Fields

ALLOW_WITHOUT_CREDENTIAL_FIELD_NUMBER

public static final int ALLOW_WITHOUT_CREDENTIAL_FIELD_NUMBER
Field Value
Type Description
int

OAUTH_FIELD_NUMBER

public static final int OAUTH_FIELD_NUMBER
Field Value
Type Description
int

REQUIREMENTS_FIELD_NUMBER

public static final int REQUIREMENTS_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 AuthenticationRule getDefaultInstance()
Returns
Type Description
AuthenticationRule

getDescriptor()

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

newBuilder()

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

newBuilder(AuthenticationRule prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAllowWithoutCredential()

public boolean getAllowWithoutCredential()

If true, the service accepts API keys without any other credential. This flag only applies to HTTP and gRPC requests.

bool allow_without_credential = 5;

Returns
Type Description
boolean

The allowWithoutCredential.

getDefaultInstanceForType()

public AuthenticationRule getDefaultInstanceForType()
Returns
Type Description
AuthenticationRule

getOauth()

public OAuthRequirements getOauth()

The requirements for OAuth credentials.

.google.api.OAuthRequirements oauth = 2;

Returns
Type Description
OAuthRequirements

The oauth.

getOauthOrBuilder()

public OAuthRequirementsOrBuilder getOauthOrBuilder()

The requirements for OAuth credentials.

.google.api.OAuthRequirements oauth = 2;

Returns
Type Description
OAuthRequirementsOrBuilder

getParserForType()

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

getRequirements(int index)

public AuthRequirement getRequirements(int index)

Requirements for additional authentication providers.

repeated .google.api.AuthRequirement requirements = 7;

Parameter
Name Description
index int
Returns
Type Description
AuthRequirement

getRequirementsCount()

public int getRequirementsCount()

Requirements for additional authentication providers.

repeated .google.api.AuthRequirement requirements = 7;

Returns
Type Description
int

getRequirementsList()

public List<AuthRequirement> getRequirementsList()

Requirements for additional authentication providers.

repeated .google.api.AuthRequirement requirements = 7;

Returns
Type Description
List<AuthRequirement>

getRequirementsOrBuilder(int index)

public AuthRequirementOrBuilder getRequirementsOrBuilder(int index)

Requirements for additional authentication providers.

repeated .google.api.AuthRequirement requirements = 7;

Parameter
Name Description
index int
Returns
Type Description
AuthRequirementOrBuilder

getRequirementsOrBuilderList()

public List<? extends AuthRequirementOrBuilder> getRequirementsOrBuilderList()

Requirements for additional authentication providers.

repeated .google.api.AuthRequirement requirements = 7;

Returns
Type Description
List<? extends com.google.api.AuthRequirementOrBuilder>

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

hasOauth()

public boolean hasOauth()

The requirements for OAuth credentials.

.google.api.OAuthRequirements oauth = 2;

Returns
Type Description
boolean

Whether the oauth field is set.

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 AuthenticationRule.Builder newBuilderForType()
Returns
Type Description
AuthenticationRule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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