// SetAccessControlPolicy sets the AccessControlPolicy field's value.
489098
func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput {
	s.AccessControlPolicy = v
	return s
}
619945
func (s *StartKeyPhrasesDetectionJobInput) SetDataAccessRoleArn(v string) *StartKeyPhrasesDetectionJobInput {
	s.DataAccessRoleArn = &v
	return s
}
638590
func (s *AssumeRoleWithSAMLInput) SetPolicy(v string) *AssumeRoleWithSAMLInput {
	s.Policy = &v
	return s
}
1176061
func (s *PutDestinationPolicyInput) SetAccessPolicy(v string) *PutDestinationPolicyInput {
	s.AccessPolicy = &v
	return s
}
332075
func (s *Location) SetAccessControlList(v []*Grant) *Location {
	s.AccessControlList = v
	return s
}
1261093
func (s *CreateKeyInput) SetPolicy(v string) *CreateKeyInput {
	s.Policy = &v
	return s
}
669347
func (s *TopicsDetectionJobProperties) SetDataAccessRoleArn(v string) *TopicsDetectionJobProperties {
	s.DataAccessRoleArn = &v
	return s
}
815607
func (s *BatchWriteOperation) SetAttachPolicy(v *BatchAttachPolicy) *BatchWriteOperation {
	s.AttachPolicy = v
	return s
}
458201
func (s *StartTopicsDetectionJobInput) SetDataAccessRoleArn(v string) *StartTopicsDetectionJobInput {
	s.DataAccessRoleArn = &v
	return s
}
188718
func (s *RoleDetail) SetRolePolicyList(v []*PolicyDetail) *RoleDetail {
	s.RolePolicyList = v
	return s
}
382041
func (cip *cachedSelectorPolicy) setPolicy(policy *policy.SelectorPolicy) {
	// A lock must be held to ensure consistency between these fields.
	atomic.StorePointer(&cip.policy, unsafe.Pointer(policy))
}
1321511
func (s *S3CopyObjectOperation) SetAccessControlGrants(v []*S3Grant) *S3CopyObjectOperation {
	s.AccessControlGrants = v
	return s
}
848391
func (s *GetVaultLockOutput) SetPolicy(v string) *GetVaultLockOutput {
	s.Policy = &v
	return s
}
1099369
func (s *S3Location) SetAccessControlList(v []*Grant) *S3Location {
	s.AccessControlList = v
	return s
}
287350
func (cl *Client) SetIAMPolicy(c context.Context, resource string, p Policy) (*Policy, error) {
	var request struct {
		Policy *Policy `json:"policy"`
	}
	request.Policy = &p
	response := &Policy{}
	if err := cl.iamAPIRequest(c, resource, "setIamPolicy", &request, response); err != nil {
		return nil, err
	}
	return response, nil
}
440967
func (a *SetGeolocationOverrideArgs) SetAccuracy(accuracy float64) *SetGeolocationOverrideArgs {
	a.Accuracy = &accuracy
	return a
}
598838
func (c *s3Client) SetAccess(bucketPolicy string, isJSON bool) *probe.Error {
	bucket, object := c.url2BucketAndObject()
	if bucket == "" {
		return probe.NewError(BucketNameEmpty{})
	}
	if isJSON {
		if e := c.api.SetBucketPolicy(bucket, bucketPolicy); e != nil {
			return probe.NewError(e)
		}
		return nil
	}
	policyStr, e := c.api.GetBucketPolicy(bucket)
	if e != nil {
		return probe.NewError(e)
	}
	var p = policy.BucketAccessPolicy{Version: "2012-10-17"}
	if policyStr != "" {
		if e = json.Unmarshal([]byte(policyStr), &p); e != nil {
			return probe.NewError(e)
		}
	}
	p.Statements = policy.SetPolicy(p.Statements, policy.BucketPolicy(bucketPolicy), bucket, object)
	if len(p.Statements) == 0 {
		if e = c.api.SetBucketPolicy(bucket, ""); e != nil {
			return probe.NewError(e)
		}
		return nil
	}
	policyB, e := json.Marshal(p)
	if e != nil {
		return probe.NewError(e)
	}
	if e = c.api.SetBucketPolicy(bucket, string(policyB)); e != nil {
		return probe.NewError(e)
	}
	return nil
}