Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UpdateCalendarRequest" /> class.
        /// </summary>
        /// <param name="weekendMask">weekendMask (required).</param>
        /// <param name="sourceProvider">sourceProvider (required).</param>
        /// <param name="properties">properties (required).</param>
        public UpdateCalendarRequest(WeekendMask weekendMask = default(WeekendMask), string sourceProvider = default(string), List <Property> properties = default(List <Property>))
        {
            // to ensure "weekendMask" is required (not null)
            if (weekendMask == null)
            {
                throw new InvalidDataException("weekendMask is a required property for UpdateCalendarRequest and cannot be null");
            }
            else
            {
                this.WeekendMask = weekendMask;
            }

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

            // to ensure "properties" is required (not null)
            if (properties == null)
            {
                throw new InvalidDataException("properties is a required property for UpdateCalendarRequest and cannot be null");
            }
            else
            {
                this.Properties = properties;
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="Calendar" /> class.
        /// </summary>
        /// <param name="href">href.</param>
        /// <param name="id">id (required).</param>
        /// <param name="type">type (required).</param>
        /// <param name="weekendMask">weekendMask (required).</param>
        /// <param name="sourceProvider">sourceProvider (required).</param>
        /// <param name="properties">properties (required).</param>
        public Calendar(string href = default(string), ResourceId id = default(ResourceId), string type = default(string), WeekendMask weekendMask = default(WeekendMask), string sourceProvider = default(string), List <Property> properties = default(List <Property>))
        {
            this.Href = href;
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for Calendar and cannot be null");
            }
            else
            {
                this.Id = id;
            }

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

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

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

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

            this.Href = href;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateCalendarRequest" /> class.
        /// </summary>
        /// <param name="calendarId">calendarId (required).</param>
        /// <param name="calendarType">calendarType (required).</param>
        /// <param name="weekendMask">weekendMask (required).</param>
        /// <param name="sourceProvider">sourceProvider (required).</param>
        /// <param name="properties">properties.</param>
        public CreateCalendarRequest(ResourceId calendarId = default(ResourceId), string calendarType = default(string), WeekendMask weekendMask = default(WeekendMask), string sourceProvider = default(string), List <Property> properties = default(List <Property>))
        {
            // to ensure "calendarId" is required (not null)
            if (calendarId == null)
            {
                throw new InvalidDataException("calendarId is a required property for CreateCalendarRequest and cannot be null");
            }
            else
            {
                this.CalendarId = calendarId;
            }

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

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

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

            this.Properties = properties;
            this.Properties = properties;
        }