// ResetExecutionTimeout schedules a Timeout for this Execution. It inspects the
// Execution's State to determine which timeout should be set, if any. If no
// timeout should be active, this will cancel any existing timeouts for this
// Execution.
9376
func ResetExecutionTimeout(c context.Context, e *model.Execution) error {
	howLong := time.Duration(0)
	switch e.State {
	case dm.Execution_SCHEDULING:
		howLong = e.TimeToStart
	case dm.Execution_RUNNING:
		howLong = e.TimeToRun
	case dm.Execution_STOPPING:
		howLong = e.TimeToStop
	}
	eid := e.GetEID()
	key := model.ExecutionKeyFromID(c, eid)
	if howLong == 0 {
		return tumble.CancelNamedMutations(c, key, "timeout")
	}
	return tumble.PutNamedMutations(c, key, map[string]tumble.Mutation{
		"timeout": &TimeoutExecution{eid, e.State, 0, clock.Now(c).UTC().Add(howLong)},
	})
}
199655
func (s *DeleteService) Timeout(timeout string) *DeleteService {
	s.timeout = timeout
	return s
}
718817
func (s *SnapshotDeleteRepositoryService) Timeout(timeout string) *SnapshotDeleteRepositoryService {
	s.timeout = timeout
	return s
}
1022079
func (r *RedisStorer) ResetExpiry(key string) error {
	return r.client.Expire(key, r.maxAge).Err()
}
156268
func (s *InstanceResizePolicy) SetInstanceTerminationTimeout(v int64) *InstanceResizePolicy {
	s.InstanceTerminationTimeout = &v
	return s
}
966299
func (c *Client) SetTimeout(t time.Duration) {
	if c.HTTPClient != nil {
		c.HTTPClient.Timeout = t
	}
}
906314
func (s *JobDetail) SetTimeout(v *JobTimeout) *JobDetail {
	s.Timeout = v
	return s
}
8463
func (s *DeleteByQueryService) Timeout(timeout string) *DeleteByQueryService {
	s.timeout = timeout
	return s
}
778534
func ShutdownTimeout(timeout time.Duration) InboundOption {
	return func(i *Inbound) {
		i.shutdownTimeout = timeout
	}
}
504588
func (s *UpdateByQueryService) Timeout(timeout string) *UpdateByQueryService {
	s.timeout = timeout
	return s
}
339135
func (s *Server) SetTimeout(t time.Duration) {
	if t <= 0 {
		s.timeout = defaultTimeout
	} else {
		s.timeout = t
	}
}
373937
func (s *JobRun) SetTimeout(v int64) *JobRun {
	s.Timeout = &v
	return s
}
198931
func (s *ReindexService) Timeout(timeout string) *ReindexService {
	s.timeout = timeout
	return s
}
674020
func (s *GetCommandInvocationOutput) SetExecutionElapsedTime(v string) *GetCommandInvocationOutput {
	s.ExecutionElapsedTime = &v
	return s
}
473163
func (s *ScheduledWindowExecution) SetExecutionTime(v string) *ScheduledWindowExecution {
	s.ExecutionTime = &v
	return s
}
1252794
func (s *DeleteMappingService) MasterTimeout(masterTimeout string) *DeleteMappingService {
	s.masterTimeout = masterTimeout
	return s
}
1346319
func (s *Job) SetTimeout(v int64) *Job {
	s.Timeout = &v
	return s
}