/// <summary>
 /// Initializes a new instance of the <see cref="CampaignRuleAction" /> class.
 /// </summary>
 /// <param name="Id">Id.</param>
 /// <param name="Parameters">The parameters for the CampaignRuleAction. Required for certain actionTypes..</param>
 /// <param name="ActionType">The action to take on the campaignRuleActionEntities. (required).</param>
 /// <param name="CampaignRuleActionEntities">The list of entities that this action will apply to. (required).</param>
 public CampaignRuleAction(string Id = null, CampaignRuleParameters Parameters = null, ActionTypeEnum?ActionType = null, CampaignRuleActionEntities CampaignRuleActionEntities = null)
 {
     this.Id         = Id;
     this.Parameters = Parameters;
     this.ActionType = ActionType;
     this.CampaignRuleActionEntities = CampaignRuleActionEntities;
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CampaignRuleAction" /> class.
        /// </summary>


        /// <param name="Id">Id.</param>



        /// <param name="Parameters">The parameters for the CampaignRuleAction. Required for certain actionTypes..</param>



        /// <param name="ActionType">The action to take on the campaignRuleActionEntities. (required).</param>



        /// <param name="CampaignRuleActionEntities">The list of entities that this action will apply to. (required).</param>


        public CampaignRuleAction(string Id = null, CampaignRuleParameters Parameters = null, ActionTypeEnum?ActionType = null, CampaignRuleActionEntities CampaignRuleActionEntities = null)
        {
            // to ensure "ActionType" is required (not null)
            if (ActionType == null)
            {
                throw new InvalidDataException("ActionType is a required property for CampaignRuleAction and cannot be null");
            }
            else
            {
                this.ActionType = ActionType;
            }



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



            this.Id = Id;



            this.Parameters = Parameters;
        }