// setTags is a helper to set the tags for a resource. It expects the
// tags field to be named "tags"
545713
func setTagsMQ(conn *mq.MQ, d *schema.ResourceData, arn string) error {
	if d.HasChange("tags") {
		oraw, nraw := d.GetChange("tags")
		o := oraw.(map[string]interface{})
		n := nraw.(map[string]interface{})
		create, remove := diffTagsGeneric(o, n)

		// Set tags
		if len(remove) > 0 {
			log.Printf("[DEBUG] Removing tags: %#v", remove)
			keys := make([]*string, 0, len(remove))
			for k := range remove {
				keys = append(keys, aws.String(k))
			}

			_, err := conn.DeleteTags(&mq.DeleteTagsInput{
				ResourceArn: aws.String(arn),
				TagKeys:     keys,
			})
			if err != nil {
				return err
			}
		}
		if len(create) > 0 {
			log.Printf("[DEBUG] Creating tags: %#v", create)

			_, err := conn.CreateTags(&mq.CreateTagsInput{
				ResourceArn: aws.String(arn),
				Tags:        create,
			})
			if err != nil {
				return err
			}
		}
	}

	return nil
}
786407
func (s *ReplicationRuleAndOperator) SetTags(v []*Tag) *ReplicationRuleAndOperator {
	s.Tags = v
	return s
}
1088684
func (s *CreateChannelOutput) SetTags(v map[string]*string) *CreateChannelOutput {
	s.Tags = v
	return s
}
655008
func (s *PutMetricAlarmInput) SetTags(v []*Tag) *PutMetricAlarmInput {
	s.Tags = v
	return s
}
784129
func (s *UpdateOriginEndpointOutput) SetTags(v map[string]*string) *UpdateOriginEndpointOutput {
	s.Tags = v
	return s
}
293369
func (s *TagResourceInput) SetTags(v *Tags) *TagResourceInput {
	s.Tags = v
	return s
}
120250
func (s *PutParameterInput) SetTags(v []*Tag) *PutParameterInput {
	s.Tags = v
	return s
}
2232
func (s *WorkspaceRequest) SetTags(v []*Tag) *WorkspaceRequest {
	s.Tags = v
	return s
}
1201192
func (s *DescribeConfigurationOutput) SetTags(v map[string]*string) *DescribeConfigurationOutput {
	s.Tags = v
	return s
}
1204890
func (s *ResourceShare) SetTags(v []*Tag) *ResourceShare {
	s.Tags = v
	return s
}
385144
func (s *CreateLoadBalancerInput) SetTags(v []*Tag) *CreateLoadBalancerInput {
	s.Tags = v
	return s
}
887027
func (s *CreateStageInput) SetTags(v map[string]*string) *CreateStageInput {
	s.Tags = v
	return s
}
1200618
func (s *AssetAttributes) SetTags(v []*Tag) *AssetAttributes {
	s.Tags = v
	return s
}
1347973
func (s *EventFilter) SetTags(v []map[string]*string) *EventFilter {
	s.Tags = v
	return s
}
773351
func (s *CreateDatastoreInput) SetTags(v []*Tag) *CreateDatastoreInput {
	s.Tags = v
	return s
}
396600
func (s *ListResourceTagsOutput) SetTags(v []*Tag) *ListResourceTagsOutput {
	s.Tags = v
	return s
}
307053
func (s *Instance) SetTags(v []*Tag) *Instance {
	s.Tags = v
	return s
}