Send feedback
Class AuthenticationRule (2.9.6)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.9.6 keyboard_arrow_down
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
OAUTH_FIELD_NUMBER
public static final int OAUTH_FIELD_NUMBER
Field Value
REQUIREMENTS_FIELD_NUMBER
public static final int REQUIREMENTS_FIELD_NUMBER
Field Value
SELECTOR_FIELD_NUMBER
public static final int SELECTOR_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static AuthenticationRule getDefaultInstance ()
Returns
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Returns
newBuilder()
public static AuthenticationRule . Builder newBuilder ()
Returns
newBuilder(AuthenticationRule prototype)
public static AuthenticationRule . Builder newBuilder ( AuthenticationRule prototype )
Parameter
Returns
public static AuthenticationRule parseDelimitedFrom ( InputStream input )
Parameter
Returns
Exceptions
public static AuthenticationRule parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static AuthenticationRule parseFrom ( byte [] data )
Parameter
Name Description data byte []
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static AuthenticationRule parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static AuthenticationRule parseFrom ( ByteString data )
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static AuthenticationRule parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static AuthenticationRule parseFrom ( CodedInputStream input )
Parameter
Returns
Exceptions
public static AuthenticationRule parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static AuthenticationRule parseFrom ( InputStream input )
Parameter
Returns
Exceptions
public static AuthenticationRule parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static AuthenticationRule parseFrom ( ByteBuffer data )
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static AuthenticationRule parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parser()
public static Parser<AuthenticationRule> parser ()
Returns
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Returns
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
getOauth()
public OAuthRequirements getOauth ()
The requirements for OAuth credentials.
.google.api.OAuthRequirements oauth = 2;
Returns
getOauthOrBuilder()
public OAuthRequirementsOrBuilder getOauthOrBuilder ()
The requirements for OAuth credentials.
.google.api.OAuthRequirements oauth = 2;
Returns
getParserForType()
public Parser<AuthenticationRule> getParserForType ()
Returns
Overrides
getRequirements(int index)
public AuthRequirement getRequirements ( int index )
Requirements for additional authentication providers.
repeated .google.api.AuthRequirement requirements = 7;
Parameter
Returns
getRequirementsCount()
public int getRequirementsCount ()
Requirements for additional authentication providers.
repeated .google.api.AuthRequirement requirements = 7;
Returns
getRequirementsList()
public List<AuthRequirement> getRequirementsList ()
Requirements for additional authentication providers.
repeated .google.api.AuthRequirement requirements = 7;
Returns
getRequirementsOrBuilder(int index)
public AuthRequirementOrBuilder getRequirementsOrBuilder ( int index )
Requirements for additional authentication providers.
repeated .google.api.AuthRequirement requirements = 7;
Parameter
Returns
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
getSerializedSize()
public int getSerializedSize ()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields ()
Returns
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()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
newBuilderForType()
public AuthenticationRule . Builder newBuilderForType ()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected AuthenticationRule . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Parameter
Returns
Overrides
toBuilder()
public AuthenticationRule . Builder toBuilder ()
Returns
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Parameter
Overrides
Exceptions
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-27 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-27 UTC."],[],[]]