// SetResourceTagMappingList sets the ResourceTagMappingList field's value.
973411
func (s *GetResourcesOutput) SetResourceTagMappingList(v []*ResourceTagMapping) *GetResourcesOutput {
	s.ResourceTagMappingList = v
	return s
}
344549
func (s *Operation) SetResourceName(v string) *Operation {
	s.ResourceName = &v
	return s
}
538904
func (s *CreateJobInput) SetBillingTagsSource(v string) *CreateJobInput {
	s.BillingTagsSource = &v
	return s
}
1023888
func tagResources(e *ec2.EC2, ctx context.ProviderCallContext, tags map[string]string, resourceIds ...string) error {
	if len(tags) == 0 {
		return nil
	}
	ec2Tags := make([]ec2.Tag, 0, len(tags))
	for k, v := range tags {
		ec2Tags = append(ec2Tags, ec2.Tag{k, v})
	}
	var err error
	for a := shortAttempt.Start(); a.Next(); {
		_, err = e.CreateTags(resourceIds, ec2Tags)
		if err == nil || !strings.HasSuffix(ec2ErrCode(err), ".NotFound") {
			return err
		}
	}
	return maybeConvertCredentialError(err, ctx)
}
1138347
func (s *AddTagsToResourceInput) SetResourceName(v string) *AddTagsToResourceInput {
	s.ResourceName = &v
	return s
}
784496
func (s *ConfigurationOptionSetting) SetResourceName(v string) *ConfigurationOptionSetting {
	s.ResourceName = &v
	return s
}
940576
func (s *GetDomainSuggestionsOutput) SetSuggestionsList(v []*DomainSuggestion) *GetDomainSuggestionsOutput {
	s.SuggestionsList = v
	return s
}
900504
public void setResourceTagList(java.util.Collection<ResourceTag> resourceTagList) {
        if (resourceTagList == null) {
            this.resourceTagList = null;
            return;
        }

        this.resourceTagList = new com.amazonaws.internal.SdkInternalList<ResourceTag>(resourceTagList);
    }
1211784
func (s *RemoveTagsFromResourceInput) SetResourceType(v string) *RemoveTagsFromResourceInput {
	s.ResourceType = &v
	return s
}
109486
func (s *RemoveTagsFromResourceInput) SetResourceName(v string) *RemoveTagsFromResourceInput {
	s.ResourceName = &v
	return s
}
1293198
func (s *RemoveTagsFromResourceInput) SetTagKeyList(v []*string) *RemoveTagsFromResourceInput {
	s.TagKeyList = v
	return s
}
944287
func (s *AddTagsInput) SetTagsList(v []*Tag) *AddTagsInput {
	s.TagsList = v
	return s
}
610979
func (s *Job) SetBillingTagsSource(v string) *Job {
	s.BillingTagsSource = &v
	return s
}
135992
func (s *EC2TagSet) SetEc2TagSetList(v [][]*EC2TagFilter) *EC2TagSet {
	s.Ec2TagSetList = v
	return s
}
134791
func setAutoscalingTags(conn *autoscaling.AutoScaling, d *schema.ResourceData) error {
	resourceID := d.Get("name").(string)
	var createTags, removeTags []*autoscaling.Tag

	if d.HasChange("tag") || d.HasChange("tags") {
		oraw, nraw := d.GetChange("tag")
		o := setToMapByKey(oraw.(*schema.Set))
		n := setToMapByKey(nraw.(*schema.Set))

		old, err := autoscalingTagsFromMap(o, resourceID)
		if err != nil {
			return err
		}

		new, err := autoscalingTagsFromMap(n, resourceID)
		if err != nil {
			return err
		}

		c, r, err := diffAutoscalingTags(old, new, resourceID)
		if err != nil {
			return err
		}

		createTags = append(createTags, c...)
		removeTags = append(removeTags, r...)

		oraw, nraw = d.GetChange("tags")
		old, err = autoscalingTagsFromList(oraw.([]interface{}), resourceID)
		if err != nil {
			return err
		}

		new, err = autoscalingTagsFromList(nraw.([]interface{}), resourceID)
		if err != nil {
			return err
		}

		c, r, err = diffAutoscalingTags(old, new, resourceID)
		if err != nil {
			return err
		}

		createTags = append(createTags, c...)
		removeTags = append(removeTags, r...)
	}

	// Set tags
	if len(removeTags) > 0 {
		log.Printf("[DEBUG] Removing autoscaling tags: %#v", removeTags)

		remove := autoscaling.DeleteTagsInput{
			Tags: removeTags,
		}

		if _, err := conn.DeleteTags(&remove); err != nil {
			return err
		}
	}

	if len(createTags) > 0 {
		log.Printf("[DEBUG] Creating autoscaling tags: %#v", createTags)

		create := autoscaling.CreateOrUpdateTagsInput{
			Tags: createTags,
		}

		if _, err := conn.CreateOrUpdateTags(&create); err != nil {
			return err
		}
	}

	return nil
}
361871
func (s *WorkflowExecutionStartedEventAttributes) SetTagList(v []*string) *WorkflowExecutionStartedEventAttributes {
	s.TagList = v
	return s
}
82916
func setTagsS3(conn *s3.S3, d *schema.ResourceData) error {
	if d.HasChange("tags") {
		oraw, nraw := d.GetChange("tags")
		o := oraw.(map[string]interface{})
		n := nraw.(map[string]interface{})
		create, remove := diffTagsS3(tagsFromMapS3(o), tagsFromMapS3(n))

		// Set tags
		if len(remove) > 0 {
			log.Printf("[DEBUG] Removing tags: %#v", remove)
			_, err := RetryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) {
				return conn.DeleteBucketTagging(&s3.DeleteBucketTaggingInput{
					Bucket: aws.String(d.Get("bucket").(string)),
				})
			})
			if err != nil {
				return err
			}
		}
		if len(create) > 0 {
			log.Printf("[DEBUG] Creating tags: %#v", create)
			req := &s3.PutBucketTaggingInput{
				Bucket: aws.String(d.Get("bucket").(string)),
				Tagging: &s3.Tagging{
					TagSet: create,
				},
			}

			_, err := RetryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) {
				return conn.PutBucketTagging(req)
			})
			if err != nil {
				return err
			}
		}
	}

	return nil
}