/// <summary>
        /// 添加一条LifecycleRule。
        /// </summary>
        /// <param name="lifecycleRule"></param>
        public void AddLifecycleRule(LifecycleRule lifecycleRule)
        {
            if (lifecycleRule == null)
                throw new ArgumentException("lifecycleRule should not be null or empty.");

            if (_lifecycleRules.Count >= OssUtils.LifecycleRuleLimit)
                throw new ArgumentException("One bucket not allow exceed one thousand item of LifecycleRules.");

            if ((!lifecycleRule.ExpirationTime.HasValue && !lifecycleRule.ExpriationDays.HasValue)
                || (lifecycleRule.ExpirationTime.HasValue && lifecycleRule.ExpriationDays.HasValue))
            {
                throw new ArgumentException("Only one expiration property should be specified.");
            }

            _lifecycleRules.Add(lifecycleRule);
        }
        /// <summary>
        /// 添加一条LifecycleRule。
        /// </summary>
        /// <param name="lifecycleRule"></param>
        public void AddLifecycleRule(LifecycleRule lifecycleRule)
        {
            if (lifecycleRule == null)
            {
                throw new ArgumentException("lifecycleRule should not be null or empty.");
            }

            if (_lifecycleRules.Count >= OssUtils.LifecycleRuleLimit)
            {
                throw new ArgumentException("One bucket not allow exceed one thousand item of LifecycleRules.");
            }

            if ((!lifecycleRule.ExpirationTime.HasValue && !lifecycleRule.ExpriationDays.HasValue) ||
                (lifecycleRule.ExpirationTime.HasValue && lifecycleRule.ExpriationDays.HasValue))
            {
                throw new ArgumentException("Only one expiration property should be specified.");
            }

            _lifecycleRules.Add(lifecycleRule);
        }