// SetTimePeriod sets the TimePeriod field's value.
162988
func (s *GetTagsInput) SetTimePeriod(v *DateInterval) *GetTagsInput {
	s.TimePeriod = v
	return s
}
1268992
func withinTimePeriod(start, end, now time.Time) bool {
	// Converts to UTC and only keeps the hour and minute info.
	start, end, now = start.UTC(), end.UTC(), now.UTC()
	start = time.Date(0, 0, 0, start.Hour(), start.Minute(), 0, 0, time.UTC)
	end = time.Date(0, 0, 0, end.Hour(), end.Minute(), 0, 0, time.UTC)
	now = time.Date(0, 0, 0, now.Hour(), now.Minute(), 0, 0, time.UTC)
	// for cases like from 00:00 to 06:00
	if end.Sub(start) >= 0 {
		return now.Sub(start) >= 0 && now.Sub(end) <= 0
	}
	// for cases like from 22:00 to 06:00
	return now.Sub(end) <= 0 || now.Sub(start) >= 0
}
262371
func (s *EnableSnapshotCopyInput) SetRetentionPeriod(v int64) *EnableSnapshotCopyInput {
	s.RetentionPeriod = &v
	return s
}
852908
func (s *HlsGroupSettings) SetTimedMetadataId3Period(v int64) *HlsGroupSettings {
	s.TimedMetadataId3Period = &v
	return s
}
577279
func (s *Endpoint) SetCachePeriodInMinutes(v int64) *Endpoint {
	s.CachePeriodInMinutes = &v
	return s
}
709964
func (s *ElasticsearchDestinationUpdate) SetIndexRotationPeriod(v string) *ElasticsearchDestinationUpdate {
	s.IndexRotationPeriod = &v
	return s
}
104440
func (s *PutMetricAlarmInput) SetEvaluationPeriods(v int64) *PutMetricAlarmInput {
	s.EvaluationPeriods = &v
	return s
}
877551
func (s *DashPackage) SetPeriodTriggers(v []*string) *DashPackage {
	s.PeriodTriggers = v
	return s
}
40905
func (s *ModifyDBClusterInput) SetBackupRetentionPeriod(v int64) *ModifyDBClusterInput {
	s.BackupRetentionPeriod = &v
	return s
}
677142
func (s *CreateLBCookieStickinessPolicyInput) SetCookieExpirationPeriod(v int64) *CreateLBCookieStickinessPolicyInput {
	s.CookieExpirationPeriod = &v
	return s
}
530834
func (s *BatchModifyClusterSnapshotsInput) SetManualSnapshotRetentionPeriod(v int64) *BatchModifyClusterSnapshotsInput {
	s.ManualSnapshotRetentionPeriod = &v
	return s
}
586417
func (s *Dataset) SetRetentionPeriod(v *RetentionPeriod) *Dataset {
	s.RetentionPeriod = v
	return s
}
848166
func (servo *Servo) SetPeriod(milliseconds int) error {
	return servo.PWM.SetPeriod(servo.Pin, int64(milliseconds*1000000))
}
444344
func (s *ElasticsearchDestinationDescription) SetIndexRotationPeriod(v string) *ElasticsearchDestinationDescription {
	s.IndexRotationPeriod = &v
	return s
}
896818
func (s *ScalingPolicy) SetEvaluationPeriods(v int64) *ScalingPolicy {
	s.EvaluationPeriods = &v
	return s
}
1311738
func (s *CreateDBClusterInput) SetBackupRetentionPeriod(v int64) *CreateDBClusterInput {
	s.BackupRetentionPeriod = &v
	return s
}
101395
func (s *ElasticsearchDestinationConfiguration) SetIndexRotationPeriod(v string) *ElasticsearchDestinationConfiguration {
	s.IndexRotationPeriod = &v
	return s
}