// SetUserMetadata - Set user metadata as a key/value couple.
// Can be retrieved through a HEAD request or an event.
189937
func (p *PostPolicy) SetUserMetadata(key string, value string) error {
	if strings.TrimSpace(key) == "" || key == "" {
		return ErrInvalidArgument("Key is empty")
	}
	if strings.TrimSpace(value) == "" || value == "" {
		return ErrInvalidArgument("Value is empty")
	}
	headerName := fmt.Sprintf("x-amz-meta-%s", key)
	policyCond := policyCondition{
		matchType: "eq",
		condition: fmt.Sprintf("$%s", headerName),
		value:     value,
	}
	if err := p.addNewPolicy(policyCond); err != nil {
		return err
	}
	p.formData[headerName] = value
	return nil
}
416395
func (s *ConfirmSignUpInput) SetUserContextData(v *UserContextDataType) *ConfirmSignUpInput {
	s.UserContextData = v
	return s
}
1033373
func (s *DataSource) SetRDSMetadata(v *RDSMetadata) *DataSource {
	s.RDSMetadata = v
	return s
}
134546
func (s *AdminInitiateAuthInput) SetClientMetadata(v map[string]*string) *AdminInitiateAuthInput {
	s.ClientMetadata = v
	return s
}
549073
func (s *VirtualRouterData) SetMetadata(v *ResourceMetadata) *VirtualRouterData {
	s.Metadata = v
	return s
}
198318
func (s *fs) SetMetadata(dgst digest.Digest, key string, data []byte) error {
	s.Lock()
	defer s.Unlock()
	if _, err := s.get(dgst); err != nil {
		return err
	}

	baseDir := filepath.Join(s.metadataDir(dgst))
	if err := os.MkdirAll(baseDir, 0700); err != nil {
		return err
	}
	return ioutils.AtomicWriteFile(filepath.Join(s.metadataDir(dgst), key), data, 0600)
}
1021347
func (s *GetDocumentVersionOutput) SetMetadata(v *DocumentVersionMetadata) *GetDocumentVersionOutput {
	s.Metadata = v
	return s
}
1192793
func (s *RouteData) SetMetadata(v *ResourceMetadata) *RouteData {
	s.Metadata = v
	return s
}
823054
func (s *PullRequestMergedStateChangedEventMetadata) SetMergeMetadata(v *MergeMetadata) *PullRequestMergedStateChangedEventMetadata {
	s.MergeMetadata = v
	return s
}
959335
func (s *Location) SetUserMetadata(v []*MetadataEntry) *Location {
	s.UserMetadata = v
	return s
}
1138838
func (s *DocumentClassifierProperties) SetClassifierMetadata(v *ClassifierMetadata) *DocumentClassifierProperties {
	s.ClassifierMetadata = v
	return s
}
342100
func (s *DescribeThingTypeOutput) SetThingTypeMetadata(v *ThingTypeMetadata) *DescribeThingTypeOutput {
	s.ThingTypeMetadata = v
	return s
}
803333
func (s *LaunchConfiguration) SetUserData(v string) *LaunchConfiguration {
	s.UserData = &v
	return s
}
858924
func (s *GetRecoveryPointRestoreMetadataOutput) SetRestoreMetadata(v map[string]*string) *GetRecoveryPointRestoreMetadataOutput {
	s.RestoreMetadata = v
	return s
}
548100
func (s *CreateInstancesInput) SetUserData(v string) *CreateInstancesInput {
	s.UserData = &v
	return s
}
1270911
func (t *Task) SetMeta(key, val string) *Task {
	if t.Meta == nil {
		t.Meta = make(map[string]string)
	}
	t.Meta[key] = val
	return t
}
934073
func (s *CreateLaunchConfigurationInput) SetUserData(v string) *CreateLaunchConfigurationInput {
	s.UserData = &v
	return s
}