package domain

import (
	"topsdk/util"
)

type AlibabaWdkCouponTemplateCreateCouponTemplateTimeLimitConfig struct {
	/*
	   优惠券结束时间     */
	EndValidTime *util.LocalTime `json:"end_valid_time,omitempty" `

	/*
	   优惠券开始时间     */
	StartValidTime *util.LocalTime `json:"start_valid_time,omitempty" `

	/*
	   优惠券有效时间类型 RANGE(1,"开始/结束时间"), DURATION(2,"固定时长"),BETWEEN(4, "发放后X-Y天失效")     */
	ValidTimeType *int64 `json:"valid_time_type,omitempty" `

	/*
	   优惠券有效时长，单位为秒（固定有效时长的优惠券）     */
	ValidityPeriod *int64 `json:"validity_period,omitempty" `

	/*
	   优惠券有效开始时长，单位为秒（优惠券领取后X天开始有效）     */
	ValidityStartInterval *int64 `json:"validity_start_interval,omitempty" `

	/*
	   优惠券有效结束时长，单位为秒（优惠券领取后X-Y天有效的Y）     */
	ValidityEndInterval *int64 `json:"validity_end_interval,omitempty" `
}

func (s *AlibabaWdkCouponTemplateCreateCouponTemplateTimeLimitConfig) SetEndValidTime(v util.LocalTime) *AlibabaWdkCouponTemplateCreateCouponTemplateTimeLimitConfig {
	s.EndValidTime = &v
	return s
}
func (s *AlibabaWdkCouponTemplateCreateCouponTemplateTimeLimitConfig) SetStartValidTime(v util.LocalTime) *AlibabaWdkCouponTemplateCreateCouponTemplateTimeLimitConfig {
	s.StartValidTime = &v
	return s
}
func (s *AlibabaWdkCouponTemplateCreateCouponTemplateTimeLimitConfig) SetValidTimeType(v int64) *AlibabaWdkCouponTemplateCreateCouponTemplateTimeLimitConfig {
	s.ValidTimeType = &v
	return s
}
func (s *AlibabaWdkCouponTemplateCreateCouponTemplateTimeLimitConfig) SetValidityPeriod(v int64) *AlibabaWdkCouponTemplateCreateCouponTemplateTimeLimitConfig {
	s.ValidityPeriod = &v
	return s
}
func (s *AlibabaWdkCouponTemplateCreateCouponTemplateTimeLimitConfig) SetValidityStartInterval(v int64) *AlibabaWdkCouponTemplateCreateCouponTemplateTimeLimitConfig {
	s.ValidityStartInterval = &v
	return s
}
func (s *AlibabaWdkCouponTemplateCreateCouponTemplateTimeLimitConfig) SetValidityEndInterval(v int64) *AlibabaWdkCouponTemplateCreateCouponTemplateTimeLimitConfig {
	s.ValidityEndInterval = &v
	return s
}
