// AddWithTimeout is same as Add, but with a timeout that aborts initialization.
499498
func (ini *Init) AddWithTimeout(timeout time.Duration, f func(ctx context.Context) (interface{}, error)) *Init {
	return ini.Add(func() (interface{}, error) {
		return ini.withTimeout(timeout, f)
	})
}
1236841
func (o *DestroyOneParams) WithTimeout(timeout time.Duration) *DestroyOneParams {
	o.SetTimeout(timeout)
	return o
}
673593
func WithTimeout(d time.Duration) DialOption {
	return func(o *DialOptions) {
		o.Timeout = d
	}
}
615994
func (o *DeleteJSONWebKeySetParams) WithTimeout(timeout time.Duration) *DeleteJSONWebKeySetParams {
	o.SetTimeout(timeout)
	return o
}
1110577
func (bt *BaseTask) WithTimeout(timeout time.Duration) *BaseTask {
	bt.TimeoutSeconds = timeout
	return bt
}
741651
func WithTimeout(timeout string) ClientOptionFunc {
	return func(c *Client) error {
		if timeout == "" {
			c.sessionTimeout = DefaultSessionTimeout
			return nil
		}

		t, err := time.ParseDuration(timeout)
		if err != nil {
			return client.InvalidTimeoutError{Timeout: timeout}
		}
		c.sessionTimeout = t
		return nil
	}
}
945551
func (o *GetFqdnCacheIDParams) WithTimeout(timeout time.Duration) *GetFqdnCacheIDParams {
	o.SetTimeout(timeout)
	return o
}
621198
func (o *IsInstanceReadyParams) WithTimeout(timeout time.Duration) *IsInstanceReadyParams {
	o.SetTimeout(timeout)
	return o
}
636396
func (o *ListTasksParams) WithTimeout(timeout time.Duration) *ListTasksParams {
	o.SetTimeout(timeout)
	return o
}
258181
func (o *PetUploadImageParams) WithTimeout(timeout time.Duration) *PetUploadImageParams {
	o.SetTimeout(timeout)
	return o
}
1360671
func (o *Oauth2TokenParams) WithTimeout(timeout time.Duration) *Oauth2TokenParams {
	o.SetTimeout(timeout)
	return o
}
1307476
func (c *Ctx) WithTimeout(timeout time.Duration) context.CancelFunc {
	ctx, cf := context.WithTimeout(c.request.Context(), timeout)
	c.request = c.request.WithContext(ctx) // temporarily shallow copying to avoid problems with external libraries
	return cf
}
396131
func (o *PatchEndpointIDLabelsParams) WithTimeout(timeout time.Duration) *PatchEndpointIDLabelsParams {
	o.SetTimeout(timeout)
	return o
}
779847
func (o *GetDebuginfoParams) WithTimeout(timeout time.Duration) *GetDebuginfoParams {
	o.SetTimeout(timeout)
	return o
}
230687
func (o *GetServiceIDParams) WithTimeout(timeout time.Duration) *GetServiceIDParams {
	o.SetTimeout(timeout)
	return o
}
152230
func (o *UpdateJSONWebKeyParams) WithTimeout(timeout time.Duration) *UpdateJSONWebKeyParams {
	o.SetTimeout(timeout)
	return o
}
1117227
func (o *ListOAuth2ClientsParams) WithTimeout(timeout time.Duration) *ListOAuth2ClientsParams {
	o.SetTimeout(timeout)
	return o
}