public sealed class AuthenticationRule : IMessage<AuthenticationRule>, IEquatable<AuthenticationRule>, IDeepCloneable<AuthenticationRule>, IBufferMessage, IMessageAuthentication 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.
Implements
IMessageAuthenticationRule, IEquatableAuthenticationRule, IDeepCloneableAuthenticationRule, IBufferMessage, IMessageNamespace
Google.ApiAssembly
Google.Api.CommonProtos.dll
Constructors
AuthenticationRule()
public AuthenticationRule()AuthenticationRule(AuthenticationRule)
public AuthenticationRule(AuthenticationRule other)| Parameter | |
|---|---|
| Name | Description | 
| other | AuthenticationRule | 
Fields
AllowWithoutCredentialFieldNumber
public const int AllowWithoutCredentialFieldNumber = 5Field number for the "allow_without_credential" field.
| Field Value | |
|---|---|
| Type | Description | 
| int | |
OauthFieldNumber
public const int OauthFieldNumber = 2Field number for the "oauth" field.
| Field Value | |
|---|---|
| Type | Description | 
| int | |
RequirementsFieldNumber
public const int RequirementsFieldNumber = 7Field number for the "requirements" field.
| Field Value | |
|---|---|
| Type | Description | 
| int | |
SelectorFieldNumber
public const int SelectorFieldNumber = 1Field number for the "selector" field.
| Field Value | |
|---|---|
| Type | Description | 
| int | |
Properties
AllowWithoutCredential
public bool AllowWithoutCredential { get; set; }If true, the service accepts API keys without any other credential. This flag only applies to HTTP and gRPC requests.
| Property Value | |
|---|---|
| Type | Description | 
| bool | |
Descriptor
public static MessageDescriptor Descriptor { get; }| Property Value | |
|---|---|
| Type | Description | 
| MessageDescriptor | |
Oauth
public OAuthRequirements Oauth { get; set; }The requirements for OAuth credentials.
| Property Value | |
|---|---|
| Type | Description | 
| OAuthRequirements | |
Parser
public static MessageParser<AuthenticationRule> Parser { get; }| Property Value | |
|---|---|
| Type | Description | 
| MessageParserAuthenticationRule | |
Requirements
public RepeatedField<AuthRequirement> Requirements { get; }Requirements for additional authentication providers.
| Property Value | |
|---|---|
| Type | Description | 
| RepeatedFieldAuthRequirement | |
Selector
public string Selector { get; set; }Selects the methods to which this rule applies.
Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
| Property Value | |
|---|---|
| Type | Description | 
| string | |
Methods
CalculateSize()
public int CalculateSize()Calculates the size of this message in Protocol Buffer wire format, in bytes.
| Returns | |
|---|---|
| Type | Description | 
| int | The number of bytes required to write this message to a coded output stream. | 
Clone()
public AuthenticationRule Clone()Creates a deep clone of this object.
| Returns | |
|---|---|
| Type | Description | 
| AuthenticationRule | A deep clone of this object. | 
Equals(AuthenticationRule)
public bool Equals(AuthenticationRule other)| Parameter | |
|---|---|
| Name | Description | 
| other | AuthenticationRule | 
| Returns | |
|---|---|
| Type | Description | 
| bool | |
Equals(object)
public override bool Equals(object other)| Parameter | |
|---|---|
| Name | Description | 
| other | object | 
| Returns | |
|---|---|
| Type | Description | 
| bool | |
GetHashCode()
public override int GetHashCode()| Returns | |
|---|---|
| Type | Description | 
| int | |
MergeFrom(AuthenticationRule)
public void MergeFrom(AuthenticationRule other)Merges the given message into this one.
| Parameter | |
|---|---|
| Name | Description | 
| other | AuthenticationRule | 
See the user guide for precise merge semantics.
MergeFrom(CodedInputStream)
public void MergeFrom(CodedInputStream input)Merges the data from the specified coded input stream with the current message.
| Parameter | |
|---|---|
| Name | Description | 
| input | CodedInputStream | 
See the user guide for precise merge semantics.
ToString()
public override string ToString()| Returns | |
|---|---|
| Type | Description | 
| string | |
WriteTo(CodedOutputStream)
public void WriteTo(CodedOutputStream output)Writes the data to the given coded output stream.
| Parameter | |
|---|---|
| Name | Description | 
| output | CodedOutputStreamCoded output stream to write the data to. Must not be null. |