// SetPeriod sets the Period field's value.
18100
func (s *DescribeAlarmsForMetricInput) SetPeriod(v int64) *DescribeAlarmsForMetricInput {
	s.Period = &v
	return s
}
885450
func (s *RestoreDBInstanceFromS3Input) SetBackupRetentionPeriod(v int64) *RestoreDBInstanceFromS3Input {
	s.BackupRetentionPeriod = &v
	return s
}
436231
func (s *ResultByTime) SetTimePeriod(v *DateInterval) *ResultByTime {
	s.TimePeriod = v
	return s
}
1064167
func (s *PutScalingPolicyInput) SetEvaluationPeriods(v int64) *PutScalingPolicyInput {
	s.EvaluationPeriods = &v
	return s
}
1068001
func (s *UpdateChannelInput) SetRetentionPeriod(v *RetentionPeriod) *UpdateChannelInput {
	s.RetentionPeriod = v
	return s
}
389818
func (s *CreateDatasetOutput) SetRetentionPeriod(v *RetentionPeriod) *CreateDatasetOutput {
	s.RetentionPeriod = v
	return s
}
1369593
func (g *Generator) SetLinuxResourcesCPURealtimePeriod(period uint64) {
	g.InitConfigLinuxResourcesCPU()
	g.Config.Linux.Resources.CPU.RealtimePeriod = &period
}
1255083
func (s *CreateChannelInput) SetRetentionPeriod(v *RetentionPeriod) *CreateChannelInput {
	s.RetentionPeriod = v
	return s
}
877551
func (s *DashPackage) SetPeriodTriggers(v []*string) *DashPackage {
	s.PeriodTriggers = v
	return s
}
867898
func (s *ModifyDBInstanceInput) SetBackupRetentionPeriod(v int64) *ModifyDBInstanceInput {
	s.BackupRetentionPeriod = &v
	return s
}
985260
func month2Period(month uint64) uint64 {
	if month == 0 {
		return 0
	}

	year := month / 12
	if year < 70 {
		year += 2000
	} else if year < 100 {
		year += 1900
	}

	return year*100 + month%12 + 1
}
720530
func (s *CreateDatastoreInput) SetRetentionPeriod(v *RetentionPeriod) *CreateDatastoreInput {
	s.RetentionPeriod = v
	return s
}
197935
func (s *CloudWatchAlarmDefinition) SetEvaluationPeriods(v int64) *CloudWatchAlarmDefinition {
	s.EvaluationPeriods = &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
}
162988
func (s *GetTagsInput) SetTimePeriod(v *DateInterval) *GetTagsInput {
	s.TimePeriod = v
	return s
}
910123
func (s *DescribeScheduledAuditOutput) SetDayOfMonth(v string) *DescribeScheduledAuditOutput {
	s.DayOfMonth = &v
	return s
}
223491
func (s *UdpGroupSettings) SetTimedMetadataId3Period(v int64) *UdpGroupSettings {
	s.TimedMetadataId3Period = &v
	return s
}