2.17.0 (latest) 2.15.0 2.10.0 2.2.0

    public sealed class AuditContext : IMessage<AuditContext>, IEquatable<AuditContext>, IDeepCloneable<AuditContext>, IBufferMessage, IMessage

`AuditContext` provides information that is needed for audit logging.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> AuditContext

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[AuditContext](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.AuditContext.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AuditContext](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.AuditContext.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[AuditContext](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.AuditContext.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## Inherited Members

[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)

## Namespace

[Google.Rpc.Context](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Context.md.txt)

## Assembly

Google.Api.CommonProtos.dll

## Constructors

### AuditContext()

    public AuditContext()

### AuditContext(AuditContext)

    public AuditContext(AuditContext other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `AuditContext` |

## Fields

### AuditLogFieldNumber

    public const int AuditLogFieldNumber = 1

Field number for the "audit_log" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### ScrubbedRequestFieldNumber

    public const int ScrubbedRequestFieldNumber = 2

Field number for the "scrubbed_request" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### ScrubbedResponseFieldNumber

    public const int ScrubbedResponseFieldNumber = 3

Field number for the "scrubbed_response" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### ScrubbedResponseItemCountFieldNumber

    public const int ScrubbedResponseItemCountFieldNumber = 4

Field number for the "scrubbed_response_item_count" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### TargetResourceFieldNumber

    public const int TargetResourceFieldNumber = 5

Field number for the "target_resource" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

## Properties

### AuditLog

    public ByteString AuditLog { get; set; }

Serialized audit log.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ByteString` |   |

### Descriptor

    public static MessageDescriptor Descriptor { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MessageDescriptor` |   |

### Parser

    public static MessageParser<AuditContext> Parser { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MessageParserAuditContext` |   |

### ScrubbedRequest

    public Struct ScrubbedRequest { get; set; }

An API request message that is scrubbed based on the method annotation.
This field should only be filled if audit_log field is present.
Service Control will use this to assemble a complete log for Cloud Audit
Logs and Google internal audit logs.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `Struct` |   |

### ScrubbedResponse

    public Struct ScrubbedResponse { get; set; }

An API response message that is scrubbed based on the method annotation.
This field should only be filled if audit_log field is present.
Service Control will use this to assemble a complete log for Cloud Audit
Logs and Google internal audit logs.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `Struct` |   |

### ScrubbedResponseItemCount

    public int ScrubbedResponseItemCount { get; set; }

Number of scrubbed response items.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### TargetResource

    public string TargetResource { get; set; }

Audit resource name which is scrubbed.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

## Methods

### CalculateSize()

    public int CalculateSize()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### Clone()

    public AuditContext Clone()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AuditContext` |   |

### Equals(AuditContext)

    public bool Equals(AuditContext other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `AuditContext` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### Equals(object)

    public override bool Equals(object other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `object` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

**Overrides** [object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))

### GetHashCode()

    public override int GetHashCode()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

**Overrides** [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)

### MergeFrom(CodedInputStream)

    public void MergeFrom(CodedInputStream input)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `input` | `CodedInputStream` |

### MergeFrom(AuditContext)

    public void MergeFrom(AuditContext other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `AuditContext` |

### ToString()

    public override string ToString()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

**Overrides** [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

### WriteTo(CodedOutputStream)

    public void WriteTo(CodedOutputStream output)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `output` | `CodedOutputStream` |