예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateDateRequest" /> class.
        /// </summary>
        /// <param name="dateId">dateId (required).</param>
        /// <param name="fromUtc">fromUtc (required).</param>
        /// <param name="toUtc">toUtc (required).</param>
        /// <param name="timeZone">timeZone (required).</param>
        /// <param name="description">description (required).</param>
        /// <param name="type">type.</param>
        /// <param name="attributes">attributes.</param>
        /// <param name="sourceData">sourceData.</param>
        public CreateDateRequest(string dateId = default(string), DateTimeOffset?fromUtc = default(DateTimeOffset?), DateTimeOffset?toUtc = default(DateTimeOffset?), string timeZone = default(string), string description = default(string), string type = default(string), DateAttributes attributes = default(DateAttributes), Dictionary <string, string> sourceData = default(Dictionary <string, string>))
        {
            // to ensure "dateId" is required (not null)
            if (dateId == null)
            {
                throw new InvalidDataException("dateId is a required property for CreateDateRequest and cannot be null");
            }
            else
            {
                this.DateId = dateId;
            }

            // to ensure "fromUtc" is required (not null)
            if (fromUtc == null)
            {
                throw new InvalidDataException("fromUtc is a required property for CreateDateRequest and cannot be null");
            }
            else
            {
                this.FromUtc = fromUtc;
            }

            // to ensure "toUtc" is required (not null)
            if (toUtc == null)
            {
                throw new InvalidDataException("toUtc is a required property for CreateDateRequest and cannot be null");
            }
            else
            {
                this.ToUtc = toUtc;
            }

            // to ensure "timeZone" is required (not null)
            if (timeZone == null)
            {
                throw new InvalidDataException("timeZone is a required property for CreateDateRequest and cannot be null");
            }
            else
            {
                this.TimeZone = timeZone;
            }

            // to ensure "description" is required (not null)
            if (description == null)
            {
                throw new InvalidDataException("description is a required property for CreateDateRequest and cannot be null");
            }
            else
            {
                this.Description = description;
            }

            this.Type       = type;
            this.SourceData = sourceData;
            this.Type       = type;
            this.Attributes = attributes;
            this.SourceData = sourceData;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CalendarDate" /> class.
        /// </summary>
        /// <param name="href">href.</param>
        /// <param name="dateIdentifier">dateIdentifier (required).</param>
        /// <param name="fromUtc">fromUtc (required).</param>
        /// <param name="toUtc">toUtc (required).</param>
        /// <param name="localDate">localDate (required).</param>
        /// <param name="timezone">timezone (required).</param>
        /// <param name="description">description (required).</param>
        /// <param name="type">type (required).</param>
        /// <param name="attributes">attributes (required).</param>
        /// <param name="sourceData">sourceData (required).</param>
        public CalendarDate(string href = default(string), string dateIdentifier = default(string), DateTimeOffset?fromUtc = default(DateTimeOffset?), DateTimeOffset?toUtc = default(DateTimeOffset?), string localDate = default(string), string timezone = default(string), string description = default(string), string type = default(string), DateAttributes attributes = default(DateAttributes), Dictionary <string, string> sourceData = default(Dictionary <string, string>))
        {
            this.Href = href;
            // to ensure "dateIdentifier" is required (not null)
            if (dateIdentifier == null)
            {
                throw new InvalidDataException("dateIdentifier is a required property for CalendarDate and cannot be null");
            }
            else
            {
                this.DateIdentifier = dateIdentifier;
            }

            // to ensure "fromUtc" is required (not null)
            if (fromUtc == null)
            {
                throw new InvalidDataException("fromUtc is a required property for CalendarDate and cannot be null");
            }
            else
            {
                this.FromUtc = fromUtc;
            }

            // to ensure "toUtc" is required (not null)
            if (toUtc == null)
            {
                throw new InvalidDataException("toUtc is a required property for CalendarDate and cannot be null");
            }
            else
            {
                this.ToUtc = toUtc;
            }

            // to ensure "localDate" is required (not null)
            if (localDate == null)
            {
                throw new InvalidDataException("localDate is a required property for CalendarDate and cannot be null");
            }
            else
            {
                this.LocalDate = localDate;
            }

            // to ensure "timezone" is required (not null)
            if (timezone == null)
            {
                throw new InvalidDataException("timezone is a required property for CalendarDate and cannot be null");
            }
            else
            {
                this.Timezone = timezone;
            }

            // to ensure "description" is required (not null)
            if (description == null)
            {
                throw new InvalidDataException("description is a required property for CalendarDate and cannot be null");
            }
            else
            {
                this.Description = description;
            }

            // to ensure "type" is required (not null)
            if (type == null)
            {
                throw new InvalidDataException("type is a required property for CalendarDate and cannot be null");
            }
            else
            {
                this.Type = type;
            }

            // to ensure "attributes" is required (not null)
            if (attributes == null)
            {
                throw new InvalidDataException("attributes is a required property for CalendarDate and cannot be null");
            }
            else
            {
                this.Attributes = attributes;
            }

            // to ensure "sourceData" is required (not null)
            if (sourceData == null)
            {
                throw new InvalidDataException("sourceData is a required property for CalendarDate and cannot be null");
            }
            else
            {
                this.SourceData = sourceData;
            }

            this.Href = href;
        }