// SetResourceMetadata sets the ResourceMetadata field's value.
486563
func (s *Activity) SetResourceMetadata(v *ResourceMetadata) *Activity {
	s.ResourceMetadata = v
	return s
}
535774
func (s *GetTelemetryMetadataOutput) SetTelemetryMetadata(v []*TelemetryMetadata) *GetTelemetryMetadataOutput {
	s.TelemetryMetadata = v
	return s
}
941084
func (s *UntagResourceInput) SetResource(v string) *UntagResourceInput {
	s.Resource = &v
	return s
}
780710
func (s *Store) setMetadata(id string, md map[string]string) error {
	// Check local data first.
	if func() bool {
		s.metaMu.RLock()
		defer s.metaMu.RUnlock()
		if _, ok := s.meta[id]; ok {
			for k, v := range md {
				if s.meta[id][k] != v {
					return false
				}
			}
			return true
		}
		return false
	}() {
		// Local data is same as data being pushed in,
		// nothing to do.
		return nil
	}

	c, err := newMetadataSetCommand(id, md)
	if err != nil {
		return err
	}
	b, err := json.Marshal(c)
	if err != nil {
		return err
	}
	f := s.raft.Apply(b, s.ApplyTimeout)
	if e := f.(raft.Future); e.Error() != nil {
		if e.Error() == raft.ErrNotLeader {
			return ErrNotLeader
		}
		return e.Error()
	}

	return f.Response().(*fsmGenericResponse).error
}
301092
func (s *Resource) SetResourceDataContainer(v *ResourceDataContainer) *Resource {
	s.ResourceDataContainer = v
	return s
}
113006
func (s *TagDescription) SetResourceType(v string) *TagDescription {
	s.ResourceType = &v
	return s
}
1054760
func (s *GetLabelDetectionOutput) SetVideoMetadata(v *VideoMetadata) *GetLabelDetectionOutput {
	s.VideoMetadata = v
	return s
}
772532
func (s *ConsumedLicenseSummary) SetResourceType(v string) *ConsumedLicenseSummary {
	s.ResourceType = &v
	return s
}
214423
func (s *RelationalDatabaseEvent) SetResource(v string) *RelationalDatabaseEvent {
	s.Resource = &v
	return s
}
314776
func (s *GetTemplateSummaryOutput) SetMetadata(v string) *GetTemplateSummaryOutput {
	s.Metadata = &v
	return s
}
614562
func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
	s.Metadata = v
	return s
}
55897
func (s *TaskSubmitFailedEventDetails) SetResource(v string) *TaskSubmitFailedEventDetails {
	s.Resource = &v
	return s
}
932364
func (s *GetReservationPurchaseRecommendationOutput) SetMetadata(v *ReservationPurchaseRecommendationMetadata) *GetReservationPurchaseRecommendationOutput {
	s.Metadata = v
	return s
}
806163
func (s *ConfigurationItem) SetResourceType(v string) *ConfigurationItem {
	s.ResourceType = &v
	return s
}
809757
func (s *Application) SetMetadata(v map[string]*string) *Application {
	s.Metadata = v
	return s
}
1192793
func (s *RouteData) SetMetadata(v *ResourceMetadata) *RouteData {
	s.Metadata = v
	return s
}
253990
func (s *FunctionConfiguration) SetDataSourceName(v string) *FunctionConfiguration {
	s.DataSourceName = &v
	return s
}