// setTags is a helper to set the tags for a resource. It expects the
// tags field to be named "tags"
164265
func setTagsKinesisFirehose(conn *firehose.Firehose, d *schema.ResourceData, sn string) error {
	if d.HasChange("tags") {
		oraw, nraw := d.GetChange("tags")
		o := oraw.(map[string]interface{})
		n := nraw.(map[string]interface{})
		create, remove := diffTagsKinesisFirehose(tagsFromMapKinesisFirehose(o), tagsFromMapKinesisFirehose(n))

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

			_, err := conn.UntagDeliveryStream(&firehose.UntagDeliveryStreamInput{
				DeliveryStreamName: aws.String(sn),
				TagKeys:            k,
			})
			if err != nil {
				return err
			}
		}
		if len(create) > 0 {
			log.Printf("[DEBUG] Creating tags: %#v", create)
			_, err := conn.TagDeliveryStream(&firehose.TagDeliveryStreamInput{
				DeliveryStreamName: aws.String(sn),
				Tags:               create,
			})
			if err != nil {
				return err
			}
		}
	}

	return nil
}
992667
func (s *CreateRepositoryInput) SetTags(v []*Tag) *CreateRepositoryInput {
	s.Tags = v
	return s
}
1223712
func (s *UpdateChannelOutput) SetTags(v map[string]*string) *UpdateChannelOutput {
	s.Tags = v
	return s
}
201182
func (s *DeviceDescription) SetTags(v map[string]*string) *DeviceDescription {
	s.Tags = v
	return s
}
990946
func (s *App) SetTags(v map[string]*string) *App {
	s.Tags = v
	return s
}
293369
func (s *TagResourceInput) SetTags(v *Tags) *TagResourceInput {
	s.Tags = v
	return s
}
390749
func (s *CreateStreamInput) SetTags(v map[string]*string) *CreateStreamInput {
	s.Tags = v
	return s
}
477794
func (s *ComputeResource) SetTags(v map[string]*string) *ComputeResource {
	s.Tags = v
	return s
}
602525
func (s *ListCrawlersInput) SetTags(v map[string]*string) *ListCrawlersInput {
	s.Tags = v
	return s
}
382405
func (s *InstanceSnapshot) SetTags(v []*Tag) *InstanceSnapshot {
	s.Tags = v
	return s
}
120250
func (s *PutParameterInput) SetTags(v []*Tag) *PutParameterInput {
	s.Tags = v
	return s
}
786407
func (s *ReplicationRuleAndOperator) SetTags(v []*Tag) *ReplicationRuleAndOperator {
	s.Tags = v
	return s
}
832628
func (s *ResourceTagSet) SetTags(v []*Tag) *ResourceTagSet {
	s.Tags = v
	return s
}
158252
func (s *Input) SetTags(v map[string]*string) *Input {
	s.Tags = v
	return s
}
1361369
func (s *ClusterParameterGroup) SetTags(v []*Tag) *ClusterParameterGroup {
	s.Tags = v
	return s
}
825823
func (s *CreateCoreDefinitionInput) SetTags(v map[string]*string) *CreateCoreDefinitionInput {
	s.Tags = v
	return s
}
1058362
func (s *ResourceTag) SetTags(v []*Tag) *ResourceTag {
	s.Tags = v
	return s
}