// setTags is a helper to set the tags for a resource. It expects the
// tags field to be named "tags"
555149
func setTagsLicenseManager(conn *licensemanager.LicenseManager, 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 := diffTagsLicenseManager(tagsFromMapLicenseManager(o), tagsFromMapLicenseManager(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.UntagResource(&licensemanager.UntagResourceInput{
				ResourceArn: aws.String(d.Id()),
				TagKeys:     k,
			})
			if err != nil {
				return err
			}
		}
		if len(create) > 0 {
			log.Printf("[DEBUG] Creating tags: %#v", create)
			_, err := conn.TagResource(&licensemanager.TagResourceInput{
				ResourceArn: aws.String(d.Id()),
				Tags:        create,
			})
			if err != nil {
				return err
			}
		}
	}

	return nil
}
155250
func (s *LoadBalancer) SetTags(v []*Tag) *LoadBalancer {
	s.Tags = v
	return s
}
387682
func (s *Domain) SetTags(v []*Tag) *Domain {
	s.Tags = v
	return s
}
887027
func (s *CreateStageInput) SetTags(v map[string]*string) *CreateStageInput {
	s.Tags = v
	return s
}
420753
func (s *CreateConfigurationSetInput) SetTags(v []*Tag) *CreateConfigurationSetInput {
	s.Tags = v
	return s
}
481581
func (s *ResourceGroup) SetTags(v []*ResourceGroupTag) *ResourceGroup {
	s.Tags = v
	return s
}
978506
func (s *FileSystemDescription) SetTags(v []*Tag) *FileSystemDescription {
	s.Tags = v
	return s
}
158252
func (s *Input) SetTags(v map[string]*string) *Input {
	s.Tags = v
	return s
}
1204890
func (s *ResourceShare) SetTags(v []*Tag) *ResourceShare {
	s.Tags = v
	return s
}
1083937
func (s *CreateConnectorDefinitionInput) SetTags(v map[string]*string) *CreateConnectorDefinitionInput {
	s.Tags = v
	return s
}
825823
func (s *CreateCoreDefinitionInput) SetTags(v map[string]*string) *CreateCoreDefinitionInput {
	s.Tags = v
	return s
}
390749
func (s *CreateStreamInput) SetTags(v map[string]*string) *CreateStreamInput {
	s.Tags = v
	return s
}
1361369
func (s *ClusterParameterGroup) SetTags(v []*Tag) *ClusterParameterGroup {
	s.Tags = v
	return s
}
584602
func (s *Project) SetTags(v []*Tag) *Project {
	s.Tags = v
	return s
}
543942
func (s *CreateVirtualServiceInput) SetTags(v []*TagRef) *CreateVirtualServiceInput {
	s.Tags = v
	return s
}
1263442
func (s *CreateFleetOutput) SetTags(v map[string]*string) *CreateFleetOutput {
	s.Tags = v
	return s
}
385144
func (s *CreateLoadBalancerInput) SetTags(v []*Tag) *CreateLoadBalancerInput {
	s.Tags = v
	return s
}