Class: Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaExplainedAccess

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/policysimulator_v1beta/classes.rb,
lib/google/apis/policysimulator_v1beta/representations.rb,
lib/google/apis/policysimulator_v1beta/representations.rb

Overview

Details about how a set of policies, listed in ExplainedPolicy, resulted in a certain AccessState when replaying an access tuple.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudPolicysimulatorV1betaExplainedAccess

Returns a new instance of GoogleCloudPolicysimulatorV1betaExplainedAccess.



1112
1113
1114
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1112

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#access_stateString

Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies. Corresponds to the JSON property accessState

Returns:

  • (String)


1096
1097
1098
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1096

def access_state
  @access_state
end

#errorsArray<Google::Apis::PolicysimulatorV1beta::GoogleRpcStatus>

If the AccessState 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. Corresponds to the JSON property errors



1103
1104
1105
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1103

def errors
  @errors
end

#policiesArray<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaExplainedPolicy>

If the AccessState is UNKNOWN, this field contains the policies that led to that result. If the AccessState is GRANTED or NOT_GRANTED, this field is omitted. Corresponds to the JSON property policies



1110
1111
1112
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1110

def policies
  @policies
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1117
1118
1119
1120
1121
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1117

def update!(**args)
  @access_state = args[:access_state] if args.key?(:access_state)
  @errors = args[:errors] if args.key?(:errors)
  @policies = args[:policies] if args.key?(:policies)
end