# Common Protos for Google Cloud APIs Client - Class AuditLog (1.0.0)

1.0.0 (latest) 0.8.3 0.7.0 0.6.0 0.5.2 0.4.2 0.3.8 Reference documentation and code samples for the Common Protos for Google Cloud APIs Client class AuditLog.

Common audit log format for Google Cloud Platform API operations.

Generated from protobuf message `google.cloud.audit.AuditLog`

## Namespace

Google \\ Cloud \\ Audit

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ service_name` | `string` The name of the API service performing the operation. For example, `"compute.googleapis.com"`. |
| `↳ method_name` | `string` The name of the service method or operation. For API calls, this should be the name of the API method. For example, "google.cloud.bigquery.v2.TableService.InsertTable" "google.logging.v2.ConfigServiceV2.CreateSink" |
| `↳ resource_name` | `string` The resource or collection that is the target of the operation. The name is a scheme-less URI, not including the API service name. For example: "projects/PROJECT_ID/zones/us-central1-a/instances" "projects/PROJECT_ID/datasets/DATASET_ID" |
| `↳ resource_location` | `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.ResourceLocation` The resource location information. |
| `↳ resource_original_state` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` The resource's original state before mutation. Present only for operations which have successfully modified the targeted resource(s). In general, this field should contain all changed fields, except those that are already been included in `request`, `response`, `metadata` or `service_data` fields. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `\@type` property. |
| `↳ num_response_items` | `int|string` The number of items returned from a List or Query API method, if applicable. |
| `↳ status` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` The status of the overall operation. |
| `↳ authentication_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.AuthenticationInfo` Authentication information. |
| `↳ authorization_info` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.AuthorizationInfo>` Authorization information. If there are multiple resources or permissions involved, then there is one AuthorizationInfo element for each {resource, permission} tuple. |
| `↳ policy_violation_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.PolicyViolationInfo` Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here. |
| `↳ request_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.RequestMetadata` Metadata about the operation. |
| `↳ request` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` The operation request. This may not include all request parameters, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `\@type` property. |
| `↳ response` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` The operation response. This may not include all response elements, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `\@type` property. |
| `↳ metadata` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` Other service-specific data about the request, response, and other information associated with the current audited event. |
| `↳ service_data` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Any` Deprecated. Use the `metadata` field instead. Other service-specific data about the request, response, and other activities. |

### getServiceName

The name of the API service performing the operation. For example,
`"compute.googleapis.com"`.

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

### setServiceName

The name of the API service performing the operation. For example,
`"compute.googleapis.com"`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMethodName

The name of the service method or operation.

For API calls, this should be the name of the API method.
For example,
"google.cloud.bigquery.v2.TableService.InsertTable"
"google.logging.v2.ConfigServiceV2.CreateSink"

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

### setMethodName

The name of the service method or operation.

For API calls, this should be the name of the API method.
For example,
"google.cloud.bigquery.v2.TableService.InsertTable"
"google.logging.v2.ConfigServiceV2.CreateSink"

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getResourceName

The resource or collection that is the target of the operation.

The name is a scheme-less URI, not including the API service name.
For example:
"projects/PROJECT_ID/zones/us-central1-a/instances"
"projects/PROJECT_ID/datasets/DATASET_ID"

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

### setResourceName

The resource or collection that is the target of the operation.

The name is a scheme-less URI, not including the API service name.
For example:
"projects/PROJECT_ID/zones/us-central1-a/instances"
"projects/PROJECT_ID/datasets/DATASET_ID"

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getResourceLocation

The resource location information.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.ResourceLocation|null` |   |

### hasResourceLocation

### clearResourceLocation

### setResourceLocation

The resource location information.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.ResourceLocation` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getResourceOriginalState

The resource's original state before mutation. Present only for
operations which have successfully modified the targeted resource(s).

In general, this field should contain all changed fields, except those
that are already been included in `request`, `response`, `metadata` or
`service_data` fields.
When the JSON object represented here has a proto equivalent,
the proto name will be indicated in the `\@type` property.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct|null` |   |

### hasResourceOriginalState

### clearResourceOriginalState

### setResourceOriginalState

The resource's original state before mutation. Present only for
operations which have successfully modified the targeted resource(s).

In general, this field should contain all changed fields, except those
that are already been included in `request`, `response`, `metadata` or
`service_data` fields.
When the JSON object represented here has a proto equivalent,
the proto name will be indicated in the `\@type` property.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNumResponseItems

The number of items returned from a List or Query API method,
if applicable.

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

### setNumResponseItems

The number of items returned from a List or Query API method,
if applicable.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getStatus

The status of the overall operation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html|null` |   |

### hasStatus

### clearStatus

### setStatus

The status of the overall operation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAuthenticationInfo

Authentication information.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.AuthenticationInfo|null` |   |

### hasAuthenticationInfo

### clearAuthenticationInfo

### setAuthenticationInfo

Authentication information.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.AuthenticationInfo` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAuthorizationInfo

Authorization information. If there are multiple
resources or permissions involved, then there is
one AuthorizationInfo element for each {resource, permission} tuple.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.AuthorizationInfo>` |   |

### setAuthorizationInfo

Authorization information. If there are multiple
resources or permissions involved, then there is
one AuthorizationInfo element for each {resource, permission} tuple.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.AuthorizationInfo>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPolicyViolationInfo

Indicates the policy violations for this request. If the request
is denied by the policy, violation information will be logged
here.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.PolicyViolationInfo|null` |   |

### hasPolicyViolationInfo

### clearPolicyViolationInfo

### setPolicyViolationInfo

Indicates the policy violations for this request. If the request
is denied by the policy, violation information will be logged
here.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.PolicyViolationInfo` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRequestMetadata

Metadata about the operation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.RequestMetadata|null` |   |

### hasRequestMetadata

### clearRequestMetadata

### setRequestMetadata

Metadata about the operation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.RequestMetadata` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRequest

The operation request. This may not include all request parameters,
such as those that are too large, privacy-sensitive, or duplicated
elsewhere in the log record.

It should never include user-generated data, such as file contents.
When the JSON object represented here has a proto equivalent, the proto
name will be indicated in the `\@type` property.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct|null` |   |

### hasRequest

### clearRequest

### setRequest

The operation request. This may not include all request parameters,
such as those that are too large, privacy-sensitive, or duplicated
elsewhere in the log record.

It should never include user-generated data, such as file contents.
When the JSON object represented here has a proto equivalent, the proto
name will be indicated in the `\@type` property.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getResponse

The operation response. This may not include all response elements,
such as those that are too large, privacy-sensitive, or duplicated
elsewhere in the log record.

It should never include user-generated data, such as file contents.
When the JSON object represented here has a proto equivalent, the proto
name will be indicated in the `\@type` property.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct|null` |   |

### hasResponse

### clearResponse

### setResponse

The operation response. This may not include all response elements,
such as those that are too large, privacy-sensitive, or duplicated
elsewhere in the log record.

It should never include user-generated data, such as file contents.
When the JSON object represented here has a proto equivalent, the proto
name will be indicated in the `\@type` property.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMetadata

Other service-specific data about the request, response, and other
information associated with the current audited event.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct|null` |   |

### hasMetadata

### clearMetadata

### setMetadata

Other service-specific data about the request, response, and other
information associated with the current audited event.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getServiceData

Deprecated. Use the `metadata` field instead.

Other service-specific data about the request, response, and other
activities.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Any|null` |   |

### hasServiceData

### clearServiceData

### setServiceData

Deprecated. Use the `metadata` field instead.

Other service-specific data about the request, response, and other
activities.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Any` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |