Class OrgPolicyConnection (2.21.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
TypeDescription
Options

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

Parameter
NameDescription
request google::cloud::orgpolicy::v2::ListConstraintsRequest
Returns
TypeDescription
StreamRange< google::cloud::orgpolicy::v2::Constraint >

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

Parameter
NameDescription
request google::cloud::orgpolicy::v2::ListPoliciesRequest
Returns
TypeDescription
StreamRange< google::cloud::orgpolicy::v2::Policy >

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

Parameter
NameDescription
request google::cloud::orgpolicy::v2::GetPolicyRequest const &
Returns
TypeDescription
StatusOr< google::cloud::orgpolicy::v2::Policy >

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

Parameter
NameDescription
request google::cloud::orgpolicy::v2::GetEffectivePolicyRequest const &
Returns
TypeDescription
StatusOr< google::cloud::orgpolicy::v2::Policy >

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

Parameter
NameDescription
request google::cloud::orgpolicy::v2::CreatePolicyRequest const &
Returns
TypeDescription
StatusOr< google::cloud::orgpolicy::v2::Policy >

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

Parameter
NameDescription
request google::cloud::orgpolicy::v2::UpdatePolicyRequest const &
Returns
TypeDescription
StatusOr< google::cloud::orgpolicy::v2::Policy >

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

Parameter
NameDescription
request google::cloud::orgpolicy::v2::DeletePolicyRequest const &
Returns
TypeDescription
Status

virtual CreateCustomConstraint(google::cloud::orgpolicy::v2::CreateCustomConstraintRequest const &)

Parameter
NameDescription
request google::cloud::orgpolicy::v2::CreateCustomConstraintRequest const &
Returns
TypeDescription
StatusOr< google::cloud::orgpolicy::v2::CustomConstraint >

virtual UpdateCustomConstraint(google::cloud::orgpolicy::v2::UpdateCustomConstraintRequest const &)

Parameter
NameDescription
request google::cloud::orgpolicy::v2::UpdateCustomConstraintRequest const &
Returns
TypeDescription
StatusOr< google::cloud::orgpolicy::v2::CustomConstraint >

virtual GetCustomConstraint(google::cloud::orgpolicy::v2::GetCustomConstraintRequest const &)

Parameter
NameDescription
request google::cloud::orgpolicy::v2::GetCustomConstraintRequest const &
Returns
TypeDescription
StatusOr< google::cloud::orgpolicy::v2::CustomConstraint >

virtual ListCustomConstraints(google::cloud::orgpolicy::v2::ListCustomConstraintsRequest)

Parameter
NameDescription
request google::cloud::orgpolicy::v2::ListCustomConstraintsRequest
Returns
TypeDescription
StreamRange< google::cloud::orgpolicy::v2::CustomConstraint >

virtual DeleteCustomConstraint(google::cloud::orgpolicy::v2::DeleteCustomConstraintRequest const &)

Parameter
NameDescription
request google::cloud::orgpolicy::v2::DeleteCustomConstraintRequest const &
Returns
TypeDescription
Status