// SetSent marks the metric has having been sent at
// the specified time.
423913
func (m *MetricBatch) SetSent(t time.Time) error {
	deleteTime := t.UTC().Add(CleanupAge)
	ops := setSentOps([]string{m.UUID()}, deleteTime)
	if err := m.st.db().RunTransaction(ops); err != nil {
		return errors.Annotatef(err, "cannot set metric sent for metric %q", m.UUID())
	}

	m.doc.Sent = true
	m.doc.DeleteTime = deleteTime
	return nil
}
459628
func (s *EnableMetricsCollectionInput) SetMetrics(v []*string) *EnableMetricsCollectionInput {
	s.Metrics = v
	return s
}
420830
func (s *JobOutput) SetDuration(v int64) *JobOutput {
	s.Duration = &v
	return s
}
664160
func (s *InsertableImage) SetDuration(v int64) *InsertableImage {
	s.Duration = &v
	return s
}
257855
func (s *BehaviorCriteria) SetValue(v *MetricValue) *BehaviorCriteria {
	s.Value = v
	return s
}
558675
func (s *Behavior) SetMetric(v string) *Behavior {
	s.Metric = &v
	return s
}
908464
func (s *MessageBody) SetMessage(v string) *MessageBody {
	s.Message = &v
	return s
}
671593
func (s *Diagnostics) SetMessage(v string) *Diagnostics {
	s.Message = &v
	return s
}
1014767
func (s *MetricStat) SetStat(v string) *MetricStat {
	s.Stat = &v
	return s
}
988885
func (s *DisableMetricsCollectionInput) SetMetrics(v []*string) *DisableMetricsCollectionInput {
	s.Metrics = v
	return s
}
351829
func (s *MaintenanceWindowIdentity) SetDuration(v int64) *MaintenanceWindowIdentity {
	s.Duration = &v
	return s
}
1004097
func (s *EndpointRequest) SetMetrics(v map[string]*float64) *EndpointRequest {
	s.Metrics = v
	return s
}
960290
func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated {
	s.Event = &v
	return s
}
271336
func (s *PutMetricAlarmInput) SetMetrics(v []*MetricDataQuery) *PutMetricAlarmInput {
	s.Metrics = v
	return s
}
735285
func (s *DateTimeRange) SetTo(v time.Time) *DateTimeRange {
	s.To = &v
	return s
}
25985
func (s *GetCostForecastInput) SetMetric(v string) *GetCostForecastInput {
	s.Metric = &v
	return s
}
1257825
func (s *Upload) SetMessage(v string) *Upload {
	s.Message = &v
	return s
}