#[non_exhaustive]pub struct PolicyItemBuilder { /* private fields */ }Expand description
A builder for PolicyItem.
Implementations§
source§impl PolicyItemBuilder
impl PolicyItemBuilder
sourcepub fn policy_store_id(self, input: impl Into<String>) -> Self
pub fn policy_store_id(self, input: impl Into<String>) -> Self
The identifier of the PolicyStore where the policy you want information about is stored.
This field is required.sourcepub fn set_policy_store_id(self, input: Option<String>) -> Self
pub fn set_policy_store_id(self, input: Option<String>) -> Self
The identifier of the PolicyStore where the policy you want information about is stored.
sourcepub fn get_policy_store_id(&self) -> &Option<String>
pub fn get_policy_store_id(&self) -> &Option<String>
The identifier of the PolicyStore where the policy you want information about is stored.
sourcepub fn policy_id(self, input: impl Into<String>) -> Self
pub fn policy_id(self, input: impl Into<String>) -> Self
The identifier of the policy you want information about.
This field is required.sourcepub fn set_policy_id(self, input: Option<String>) -> Self
pub fn set_policy_id(self, input: Option<String>) -> Self
The identifier of the policy you want information about.
sourcepub fn get_policy_id(&self) -> &Option<String>
pub fn get_policy_id(&self) -> &Option<String>
The identifier of the policy you want information about.
sourcepub fn policy_type(self, input: PolicyType) -> Self
pub fn policy_type(self, input: PolicyType) -> Self
The type of the policy. This is one of the following values:
-
static -
templateLinked
sourcepub fn set_policy_type(self, input: Option<PolicyType>) -> Self
pub fn set_policy_type(self, input: Option<PolicyType>) -> Self
The type of the policy. This is one of the following values:
-
static -
templateLinked
sourcepub fn get_policy_type(&self) -> &Option<PolicyType>
pub fn get_policy_type(&self) -> &Option<PolicyType>
The type of the policy. This is one of the following values:
-
static -
templateLinked
sourcepub fn principal(self, input: EntityIdentifier) -> Self
pub fn principal(self, input: EntityIdentifier) -> Self
The principal associated with the policy.
sourcepub fn set_principal(self, input: Option<EntityIdentifier>) -> Self
pub fn set_principal(self, input: Option<EntityIdentifier>) -> Self
The principal associated with the policy.
sourcepub fn get_principal(&self) -> &Option<EntityIdentifier>
pub fn get_principal(&self) -> &Option<EntityIdentifier>
The principal associated with the policy.
sourcepub fn resource(self, input: EntityIdentifier) -> Self
pub fn resource(self, input: EntityIdentifier) -> Self
The resource associated with the policy.
sourcepub fn set_resource(self, input: Option<EntityIdentifier>) -> Self
pub fn set_resource(self, input: Option<EntityIdentifier>) -> Self
The resource associated with the policy.
sourcepub fn get_resource(&self) -> &Option<EntityIdentifier>
pub fn get_resource(&self) -> &Option<EntityIdentifier>
The resource associated with the policy.
sourcepub fn actions(self, input: ActionIdentifier) -> Self
pub fn actions(self, input: ActionIdentifier) -> Self
Appends an item to actions.
To override the contents of this collection use set_actions.
The action that a policy permits or forbids. For example, {"actions": \[{"actionId": "ViewPhoto", "actionType": "PhotoFlash::Action"}, {"entityID": "SharePhoto", "entityType": "PhotoFlash::Action"}\]}.
sourcepub fn set_actions(self, input: Option<Vec<ActionIdentifier>>) -> Self
pub fn set_actions(self, input: Option<Vec<ActionIdentifier>>) -> Self
The action that a policy permits or forbids. For example, {"actions": \[{"actionId": "ViewPhoto", "actionType": "PhotoFlash::Action"}, {"entityID": "SharePhoto", "entityType": "PhotoFlash::Action"}\]}.
sourcepub fn get_actions(&self) -> &Option<Vec<ActionIdentifier>>
pub fn get_actions(&self) -> &Option<Vec<ActionIdentifier>>
The action that a policy permits or forbids. For example, {"actions": \[{"actionId": "ViewPhoto", "actionType": "PhotoFlash::Action"}, {"entityID": "SharePhoto", "entityType": "PhotoFlash::Action"}\]}.
sourcepub fn definition(self, input: PolicyDefinitionItem) -> Self
pub fn definition(self, input: PolicyDefinitionItem) -> Self
The policy definition of an item in the list of policies returned.
This field is required.sourcepub fn set_definition(self, input: Option<PolicyDefinitionItem>) -> Self
pub fn set_definition(self, input: Option<PolicyDefinitionItem>) -> Self
The policy definition of an item in the list of policies returned.
sourcepub fn get_definition(&self) -> &Option<PolicyDefinitionItem>
pub fn get_definition(&self) -> &Option<PolicyDefinitionItem>
The policy definition of an item in the list of policies returned.
sourcepub fn created_date(self, input: DateTime) -> Self
pub fn created_date(self, input: DateTime) -> Self
The date and time the policy was created.
This field is required.sourcepub fn set_created_date(self, input: Option<DateTime>) -> Self
pub fn set_created_date(self, input: Option<DateTime>) -> Self
The date and time the policy was created.
sourcepub fn get_created_date(&self) -> &Option<DateTime>
pub fn get_created_date(&self) -> &Option<DateTime>
The date and time the policy was created.
sourcepub fn last_updated_date(self, input: DateTime) -> Self
pub fn last_updated_date(self, input: DateTime) -> Self
The date and time the policy was most recently updated.
This field is required.sourcepub fn set_last_updated_date(self, input: Option<DateTime>) -> Self
pub fn set_last_updated_date(self, input: Option<DateTime>) -> Self
The date and time the policy was most recently updated.
sourcepub fn get_last_updated_date(&self) -> &Option<DateTime>
pub fn get_last_updated_date(&self) -> &Option<DateTime>
The date and time the policy was most recently updated.
sourcepub fn effect(self, input: PolicyEffect) -> Self
pub fn effect(self, input: PolicyEffect) -> Self
The effect of the decision that a policy returns to an authorization request. For example, "effect": "Permit".
sourcepub fn set_effect(self, input: Option<PolicyEffect>) -> Self
pub fn set_effect(self, input: Option<PolicyEffect>) -> Self
The effect of the decision that a policy returns to an authorization request. For example, "effect": "Permit".
sourcepub fn get_effect(&self) -> &Option<PolicyEffect>
pub fn get_effect(&self) -> &Option<PolicyEffect>
The effect of the decision that a policy returns to an authorization request. For example, "effect": "Permit".
sourcepub fn build(self) -> Result<PolicyItem, BuildError>
pub fn build(self) -> Result<PolicyItem, BuildError>
Consumes the builder and constructs a PolicyItem.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for PolicyItemBuilder
impl Clone for PolicyItemBuilder
source§fn clone(&self) -> PolicyItemBuilder
fn clone(&self) -> PolicyItemBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for PolicyItemBuilder
impl Debug for PolicyItemBuilder
source§impl Default for PolicyItemBuilder
impl Default for PolicyItemBuilder
source§fn default() -> PolicyItemBuilder
fn default() -> PolicyItemBuilder
source§impl PartialEq for PolicyItemBuilder
impl PartialEq for PolicyItemBuilder
impl StructuralPartialEq for PolicyItemBuilder
Auto Trait Implementations§
impl Freeze for PolicyItemBuilder
impl RefUnwindSafe for PolicyItemBuilder
impl Send for PolicyItemBuilder
impl Sync for PolicyItemBuilder
impl Unpin for PolicyItemBuilder
impl UnwindSafe for PolicyItemBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more