# XRGoogleCloudAuthResult

The authentication result from Google Cloud APIs.

## Summary

### Inheritance

Inherits from: `IEquatable< XRGoogleCloudAuthResult >`

| ### Constructors and Destructors ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGoogleCloudAuthResult#xrgooglecloudauthresult(OpenXRResultStatus status, https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrgooglecloudautherror error)` Constructs auth result with OpenXRResultStatus and [XRGoogleCloudAuthError](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrgooglecloudautherror). ||
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGoogleCloudAuthResult#xrgooglecloudauthresult(OpenXRResultStatus status)` Constructs auth result with OpenXRResultStatus. ||
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGoogleCloudAuthResult#xrgooglecloudauthresult(https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrgooglecloudautherror error)` Constructs auth result with [XRGoogleCloudAuthError](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrgooglecloudautherror). ||

| ### Public attributes ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGoogleCloudAuthResult#cloudautherror` | `https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrgooglecloudautherror` The cause of authentication error when invoking a Google Cloud API. |
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGoogleCloudAuthResult#status` | `OpenXRResultStatus` Represents the status of a completed OpenXR operation. |

| ### Public functions ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGoogleCloudAuthResult#equals(object obj)` | `override bool` |
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGoogleCloudAuthResult#equals(https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGoogleCloudAuthResult#structGoogle_1_1XR_1_1Extensions_1_1XRGoogleCloudAuthResult other)` | `bool` |
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGoogleCloudAuthResult#gethashcode()` | `override int` |
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGoogleCloudAuthResult#tostring()` | `override string` |

## Public attributes

### CloudAuthError

```c#
XRGoogleCloudAuthError Google::XR::Extensions::XRGoogleCloudAuthResult::CloudAuthError
```
The cause of authentication error when invoking a Google Cloud API.

### Status

```c#
OpenXRResultStatus Google::XR::Extensions::XRGoogleCloudAuthResult::Status
```
Represents the status of a completed OpenXR operation.

Use OpenXRResultStatus.IsSuccess() to confirm if succeed. Otherwise, check OpenXRResultStatus.nativeStatusCode or [CloudAuthError](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGoogleCloudAuthResult#cloudautherror) for more details.

## Public functions

### Equals

```c#
override bool Google::XR::Extensions::XRGoogleCloudAuthResult::Equals(
  object obj
)
```

### Equals

```c#
bool Google::XR::Extensions::XRGoogleCloudAuthResult::Equals(
  XRGoogleCloudAuthResult other
)
```

### GetHashCode

```c#
override int Google::XR::Extensions::XRGoogleCloudAuthResult::GetHashCode()
```

### ToString

```c#
override string Google::XR::Extensions::XRGoogleCloudAuthResult::ToString()
```

### XRGoogleCloudAuthResult

```c#
 Google::XR::Extensions::XRGoogleCloudAuthResult::XRGoogleCloudAuthResult(
  OpenXRResultStatus status,
  XRGoogleCloudAuthError error
)
```
Constructs auth result with OpenXRResultStatus and [XRGoogleCloudAuthError](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrgooglecloudautherror).


Details Parameters `status` The OpenXRResultStatus returned from relevant OpenXR APIs. `error` The [XRGoogleCloudAuthError](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrgooglecloudautherror) chained to the output.

### XRGoogleCloudAuthResult

```c#
 Google::XR::Extensions::XRGoogleCloudAuthResult::XRGoogleCloudAuthResult(
  OpenXRResultStatus status
)
```
Constructs auth result with OpenXRResultStatus.

The OpenXR calls failed before accessing Google Cloud services, thus [CloudAuthError](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGoogleCloudAuthResult#cloudautherror) defaults to [XRGoogleCloudAuthError.None](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrgooglecloudautherror_none).


Details Parameters `status` The OpenXRResultStatus returned from relevant OpenXR APIs.

### XRGoogleCloudAuthResult

```c#
 Google::XR::Extensions::XRGoogleCloudAuthResult::XRGoogleCloudAuthResult(
  XRGoogleCloudAuthError error
)
```
Constructs auth result with [XRGoogleCloudAuthError](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrgooglecloudautherror).

The authentication setup failed, and the [Status](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGoogleCloudAuthResult#status) can be ignored.


Details Parameters `error` A [XRGoogleCloudAuthError](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrgooglecloudautherror) from dependent features.