# Policy Simulator V1 API - Class Google::Cloud::PolicySimulator::V1::ExplainedAccess (v1.9.0)

1.9.0 (latest) 1.8.1 1.7.0 1.6.1 1.5.0 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 0.4.0 0.3.2 0.2.0 0.1.1 Reference documentation and code samples for the Policy Simulator V1 API class Google::Cloud::PolicySimulator::V1::ExplainedAccess.

Details about how a set of policies, listed in
[ExplainedPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-ExplainedPolicy "Google::Cloud::PolicySimulator::V1::ExplainedPolicy (class)"), resulted
in a certain [AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-AccessState "Google::Cloud::PolicySimulator::V1::AccessState (module)") when
replaying an access tuple.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #access_state

    def access_state() -> ::Google::Cloud::PolicySimulator::V1::AccessState

**Returns**

- ([::Google::Cloud::PolicySimulator::V1::AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-AccessState)) --- Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.

### #access_state=

    def access_state=(value) -> ::Google::Cloud::PolicySimulator::V1::AccessState

**Parameter**

- **value** ([::Google::Cloud::PolicySimulator::V1::AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-AccessState)) --- Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.
**Returns**

- ([::Google::Cloud::PolicySimulator::V1::AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-AccessState)) --- Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.

### #errors

    def errors() -> ::Array<::Google::Rpc::Status>

**Returns**

- (::Array\<[::Google::Rpc::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Rpc-Status)\>) --- If the [AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-AccessState "Google::Cloud::PolicySimulator::V1::AccessState (module)") is `UNKNOWN`, this field contains a list of errors explaining why the result is `UNKNOWN`.


  If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is
  omitted.

### #errors=

    def errors=(value) -> ::Array<::Google::Rpc::Status>

**Parameter**

- **value** (::Array\<[::Google::Rpc::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Rpc-Status)\>) --- If the [AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-AccessState "Google::Cloud::PolicySimulator::V1::AccessState (module)") is `UNKNOWN`, this field contains a list of errors explaining why the result is `UNKNOWN`.


  If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is
  omitted.
**Returns**

- (::Array\<[::Google::Rpc::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Rpc-Status)\>) --- If the [AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-AccessState "Google::Cloud::PolicySimulator::V1::AccessState (module)") is `UNKNOWN`, this field contains a list of errors explaining why the result is `UNKNOWN`.


  If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is
  omitted.

### #policies

    def policies() -> ::Array<::Google::Cloud::PolicySimulator::V1::ExplainedPolicy>

**Returns**

- (::Array\<[::Google::Cloud::PolicySimulator::V1::ExplainedPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-ExplainedPolicy)\>) --- If the [AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-AccessState "Google::Cloud::PolicySimulator::V1::AccessState (module)") is `UNKNOWN`, this field contains the policies that led to that result.


  If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is
  omitted.

### #policies=

    def policies=(value) -> ::Array<::Google::Cloud::PolicySimulator::V1::ExplainedPolicy>

**Parameter**

- **value** (::Array\<[::Google::Cloud::PolicySimulator::V1::ExplainedPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-ExplainedPolicy)\>) --- If the [AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-AccessState "Google::Cloud::PolicySimulator::V1::AccessState (module)") is `UNKNOWN`, this field contains the policies that led to that result.


  If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is
  omitted.
**Returns**

- (::Array\<[::Google::Cloud::PolicySimulator::V1::ExplainedPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-ExplainedPolicy)\>) --- If the [AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-AccessState "Google::Cloud::PolicySimulator::V1::AccessState (module)") is `UNKNOWN`, this field contains the policies that led to that result.


  If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is
  omitted.