コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NewCampaignSet" /> class.
        /// </summary>
        /// <param name="applicationId">The ID of the application that owns this entity. (required).</param>
        /// <param name="version">Version of the campaign set (required).</param>
        /// <param name="set">set (required).</param>
        public NewCampaignSet(int applicationId = default(int), int version = default(int), CampaignSetBranchNode set = default(CampaignSetBranchNode))
        {
            // to ensure "applicationId" is required (not null)
            if (applicationId == null)
            {
                throw new InvalidDataException("applicationId is a required property for NewCampaignSet and cannot be null");
            }
            else
            {
                this.ApplicationId = applicationId;
            }

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

            // to ensure "set" is required (not null)
            if (set == null)
            {
                throw new InvalidDataException("set is a required property for NewCampaignSet and cannot be null");
            }
            else
            {
                this.Set = set;
            }
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CampaignSet" /> class.
        /// </summary>
        /// <param name="id">Unique ID for this entity. (required).</param>
        /// <param name="created">The exact moment this entity was created. (required).</param>
        /// <param name="applicationId">The ID of the application that owns this entity. (required).</param>
        /// <param name="version">Version of the campaign set (required).</param>
        /// <param name="set">set (required).</param>
        public CampaignSet(int id = default(int), DateTime created = default(DateTime), int applicationId = default(int), int version = default(int), CampaignSetBranchNode set = default(CampaignSetBranchNode))
        {
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for CampaignSet and cannot be null");
            }
            else
            {
                this.Id = id;
            }

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

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

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

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