Class OrgPolicyConnection (2.14.0)

This interface defines virtual methods for each of the user-facing overload sets in OrgPolicyClient. This allows users to inject custom behavior (e.g., with a Google Mock object) when writing tests that use objects of type OrgPolicyClient.

To create a concrete instance, see MakeOrgPolicyConnection().

For mocking, see orgpolicy_v2_mocks::MockOrgPolicyConnection.

Functions

virtual options()

Returns
Type Description
Options

virtual ListConstraints(google::cloud::orgpolicy::v2::ListConstraintsRequest)

Parameter
Name Description
request google::cloud::orgpolicy::v2::ListConstraintsRequest
Returns
Type Description
StreamRange< google::cloud::orgpolicy::v2::Constraint >

virtual ListPolicies(google::cloud::orgpolicy::v2::ListPoliciesRequest)

Parameter
Name Description
request google::cloud::orgpolicy::v2::ListPoliciesRequest
Returns
Type Description
StreamRange< google::cloud::orgpolicy::v2::Policy >

virtual GetPolicy(google::cloud::orgpolicy::v2::GetPolicyRequest const &)

Parameter
Name Description
request google::cloud::orgpolicy::v2::GetPolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::orgpolicy::v2::Policy >

virtual GetEffectivePolicy(google::cloud::orgpolicy::v2::GetEffectivePolicyRequest const &)

Parameter
Name Description
request google::cloud::orgpolicy::v2::GetEffectivePolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::orgpolicy::v2::Policy >

virtual CreatePolicy(google::cloud::orgpolicy::v2::CreatePolicyRequest const &)

Parameter
Name Description
request google::cloud::orgpolicy::v2::CreatePolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::orgpolicy::v2::Policy >

virtual UpdatePolicy(google::cloud::orgpolicy::v2::UpdatePolicyRequest const &)

Parameter
Name Description
request google::cloud::orgpolicy::v2::UpdatePolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::orgpolicy::v2::Policy >

virtual DeletePolicy(google::cloud::orgpolicy::v2::DeletePolicyRequest const &)

Parameter
Name Description
request google::cloud::orgpolicy::v2::DeletePolicyRequest const &
Returns
Type Description
Status