// SetPolicyId sets the PolicyId field's value.
519263
func (s *GetPolicyInput) SetPolicyId(v string) *GetPolicyInput {
	s.PolicyId = &v
	return s
}
1330669
func (s *GetComplianceDetailInput) SetPolicyId(v string) *GetComplianceDetailInput {
	s.PolicyId = &v
	return s
}
345987
func (s *PutPermissionPolicyInput) SetPolicy(v string) *PutPermissionPolicyInput {
	s.Policy = &v
	return s
}
276556
func (s *ListTargetsForPolicyInput) SetPolicyId(v string) *ListTargetsForPolicyInput {
	s.PolicyId = &v
	return s
}
1200947
func (s *CreatePolicyVersionOutput) SetPolicyVersionId(v string) *CreatePolicyVersionOutput {
	s.PolicyVersionId = &v
	return s
}
1269588
func (s *GetFederationTokenInput) SetPolicy(v string) *GetFederationTokenInput {
	s.Policy = &v
	return s
}
726554
func (s *PolicyComplianceStatus) SetPolicyId(v string) *PolicyComplianceStatus {
	s.PolicyId = &v
	return s
}
1334390
func (s *Permission) SetPolicy(v string) *Permission {
	s.Policy = &v
	return s
}
818403
func (s *ResourceIdentifier) SetPolicyVersionIdentifier(v *PolicyVersionIdentifier) *ResourceIdentifier {
	s.PolicyVersionIdentifier = v
	return s
}
253013
func (s *GetLifecyclePolicyInput) SetPolicyId(v string) *GetLifecyclePolicyInput {
	s.PolicyId = &v
	return s
}
1272827
func (s *PolicySummary) SetPolicyArn(v string) *PolicySummary {
	s.PolicyArn = &v
	return s
}
374096
func (s *Statement) SetSourcePolicyId(v string) *Statement {
	s.SourcePolicyId = &v
	return s
}
733951
func (s *DescribePolicyOutput) SetPolicy(v *Policy) *DescribePolicyOutput {
	s.Policy = v
	return s
}
146221
func (s *GetPolicyVersionOutput) SetPolicyVersion(v *PolicyVersion) *GetPolicyVersionOutput {
	s.PolicyVersion = v
	return s
}
401996
func (ps *PolicyStore) SetPolicy(ctx context.Context, p *Policy) error {
	defer metrics.MeasureSince([]string{"policy", "set_policy"}, time.Now())
	if p == nil {
		return fmt.Errorf("nil policy passed in for storage")
	}
	if p.Name == "" {
		return fmt.Errorf("policy name missing")
	}
	// Policies are normalized to lower-case
	p.Name = ps.sanitizeName(p.Name)
	if strutil.StrListContains(immutablePolicies, p.Name) {
		return fmt.Errorf("cannot update %q policy", p.Name)
	}

	return ps.setPolicyInternal(ctx, p)
}
661462
func (s *DeletePolicyInput) SetPolicyId(v string) *DeletePolicyInput {
	s.PolicyId = &v
	return s
}
885058
func (s *VaultAccessPolicy) SetPolicy(v string) *VaultAccessPolicy {
	s.Policy = &v
	return s
}