// SetNotification sets the Notification field's value.
346875
func (s *DeleteSubscriberInput) SetNotification(v *Notification) *DeleteSubscriberInput {
	s.Notification = v
	return s
}
727404
func (s *CreateClusterInput) SetNotification(v *Notification) *CreateClusterInput {
	s.Notification = v
	return s
}
1092086
func (s *CreateMatchmakingConfigurationInput) SetNotificationTarget(v string) *CreateMatchmakingConfigurationInput {
	s.NotificationTarget = &v
	return s
}
592169
func (s *Command) SetNotificationConfig(v *NotificationConfig) *Command {
	s.NotificationConfig = v
	return s
}
1273065
func (s *StartFaceDetectionInput) SetNotificationChannel(v *NotificationChannel) *StartFaceDetectionInput {
	s.NotificationChannel = v
	return s
}
1233538
func (c *ConfigLocal) SetNotifier(n Notifier) {
	c.lock.Lock()
	defer c.lock.Unlock()
	c.notifier = n
}
1317723
func (s *JobMetadata) SetNotification(v *Notification) *JobMetadata {
	s.Notification = v
	return s
}
45708
func (s *LifecycleHookSpecification) SetNotificationTargetARN(v string) *LifecycleHookSpecification {
	s.NotificationTargetARN = &v
	return s
}
450580
func (s *SetIdentityHeadersInNotificationsEnabledInput) SetNotificationType(v string) *SetIdentityHeadersInNotificationsEnabledInput {
	s.NotificationType = &v
	return s
}
215413
func (s *JobRun) SetNotificationProperty(v *NotificationProperty) *JobRun {
	s.NotificationProperty = v
	return s
}
827980
func (s *UpdateBranchInput) SetEnableNotification(v bool) *UpdateBranchInput {
	s.EnableNotification = &v
	return s
}
1024060
func (s *DescribeNotificationsForBudgetOutput) SetNotifications(v []*Notification) *DescribeNotificationsForBudgetOutput {
	s.Notifications = v
	return s
}
904615
func (s *CreateReplicationGroupInput) SetNotificationTopicArn(v string) *CreateReplicationGroupInput {
	s.NotificationTopicArn = &v
	return s
}
876788
func (s *SetIdentityNotificationTopicInput) SetNotificationType(v string) *SetIdentityNotificationTopicInput {
	s.NotificationType = &v
	return s
}
541850
func (this *FcmClient) SetNotificationPayload(payload *NotificationPayload) *FcmClient {

	this.Message.Notification = *payload

	return this
}
791851
func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
	s.NotificationConfiguration = v
	return s
}
1275985
func (c Client) SetBucketNotification(bucketName string, bucketNotification BucketNotification) error {
	// Input validation.
	if err := s3utils.CheckValidBucketName(bucketName); err != nil {
		return err
	}

	// Get resources properly escaped and lined up before
	// using them in http request.
	urlValues := make(url.Values)
	urlValues.Set("notification", "")

	notifBytes, err := xml.Marshal(bucketNotification)
	if err != nil {
		return err
	}

	notifBuffer := bytes.NewReader(notifBytes)
	reqMetadata := requestMetadata{
		bucketName:       bucketName,
		queryValues:      urlValues,
		contentBody:      notifBuffer,
		contentLength:    int64(len(notifBytes)),
		contentMD5Base64: sumMD5Base64(notifBytes),
		contentSHA256Hex: sum256Hex(notifBytes),
	}

	// Execute PUT to upload a new bucket notification.
	resp, err := c.executeMethod(context.Background(), "PUT", reqMetadata)
	defer closeResponse(resp)
	if err != nil {
		return err
	}
	if resp != nil {
		if resp.StatusCode != http.StatusOK {
			return httpRespToErrorResponse(resp, bucketName, "")
		}
	}
	return nil
}