func (opt *RetryOptions) toRetryParameters() *pb.TaskQueueRetryParameters {
	params := &pb.TaskQueueRetryParameters{}
	if opt.RetryLimit > 0 {
		params.RetryLimit = proto.Int32(opt.RetryLimit)
	}
	if opt.AgeLimit > 0 {
		params.AgeLimitSec = proto.Int64(int64(opt.AgeLimit.Seconds()))
	}
	if opt.MinBackoff > 0 {
		params.MinBackoffSec = proto.Float64(opt.MinBackoff.Seconds())
	}
	if opt.MaxBackoff > 0 {
		params.MaxBackoffSec = proto.Float64(opt.MaxBackoff.Seconds())
	}
	if opt.MaxDoublings > 0 || (opt.MaxDoublings == 0 && opt.ApplyZeroMaxDoublings) {
		params.MaxDoublings = proto.Int32(opt.MaxDoublings)
	}
	return params
}
func (opt *RetryOptions) toRetryParameters() *pb.TaskQueueRetryParameters {
	params := &pb.TaskQueueRetryParameters{}
	if opt.RetryLimit > 0 {
		params.RetryLimit = proto.Int32(opt.RetryLimit)
	}
	if opt.AgeLimit > 0 {
		params.AgeLimitSec = proto.Int64(int64(opt.AgeLimit.Seconds()))
	}
	if opt.MinBackoff > 0 {
		params.MinBackoffSec = proto.Float64(opt.MinBackoff.Seconds())
	}
	if opt.MaxBackoff > 0 {
		params.MaxBackoffSec = proto.Float64(opt.MaxBackoff.Seconds())
	}
	if opt.MaxDoublings > 0 || (opt.MaxDoublings == 0 && opt.ApplyZeroMaxDoublings) {
		params.MaxDoublings = proto.Int32(opt.MaxDoublings)
	}
	return params
}
func ( opt * RetryOptions ) toRetryParameters ( ) * pb . TaskQueueRetryParameters { params := & pb . TaskQueueRetryParameters { } if opt . RetryLimit > 0 { params . RetryLimit = proto . Int32 ( opt . RetryLimit ) } if opt . AgeLimit > 0 { params . AgeLimitSec = proto . Int64 ( int64 ( opt . AgeLimit . Seconds ( ) ) ) } if opt . MinBackoff > 0 { params . MinBackoffSec = proto . Float64 ( opt . MinBackoff . Seconds ( ) ) } if opt . MaxBackoff > 0 { params . MaxBackoffSec = proto . Float64 ( opt . MaxBackoff . Seconds ( ) ) } if opt . MaxDoublings > 0 || ( opt . MaxDoublings == 0 && opt . ApplyZeroMaxDoublings ) { params . MaxDoublings = proto . Int32 ( opt . MaxDoublings ) } return params }
// toRetryParameter converts RetryOptions to pb.TaskQueueRetryParameters.
toRetryParameter converts RetryOptions to pb . TaskQueueRetryParameters .