コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CampaignRule" /> class.
        /// </summary>



        /// <param name="Name">The name of the CampaignRule. (required).</param>



        /// <param name="Version">Required for updates, must match the version number of the most recent update.</param>



        /// <param name="CampaignRuleEntities">The list of entities that this CampaignRule monitors. (required).</param>



        /// <param name="CampaignRuleConditions">The list of conditions that are evaluated on the entities. (required).</param>



        /// <param name="CampaignRuleActions">The list of actions that are executed if the conditions are satisfied. (required).</param>



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



        /// <param name="Enabled">Whether or not this CampaignRule is currently enabled. Required on updates..</param>



        public CampaignRule(string Name = null, int?Version = null, CampaignRuleEntities CampaignRuleEntities = null, List <CampaignRuleCondition> CampaignRuleConditions = null, List <CampaignRuleAction> CampaignRuleActions = null, bool?MatchAnyConditions = null, bool?Enabled = null)
        {
            // to ensure "Name" is required (not null)
            if (Name == null)
            {
                throw new InvalidDataException("Name is a required property for CampaignRule and cannot be null");
            }
            else
            {
                this.Name = Name;
            }



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



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



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



            this.Version = Version;



            this.MatchAnyConditions = MatchAnyConditions;



            this.Enabled = Enabled;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="CampaignRule" /> class.
 /// </summary>
 /// <param name="Name">The name of the CampaignRule. (required).</param>
 /// <param name="Version">Required for updates, must match the version number of the most recent update.</param>
 /// <param name="CampaignRuleEntities">The list of entities that this CampaignRule monitors. (required).</param>
 /// <param name="CampaignRuleConditions">The list of conditions that are evaluated on the entities. (required).</param>
 /// <param name="CampaignRuleActions">The list of actions that are executed if the conditions are satisfied. (required).</param>
 /// <param name="MatchAnyConditions">MatchAnyConditions.</param>
 /// <param name="Enabled">Whether or not this CampaignRule is currently enabled. Required on updates..</param>
 public CampaignRule(string Name = null, int?Version = null, CampaignRuleEntities CampaignRuleEntities = null, List <CampaignRuleCondition> CampaignRuleConditions = null, List <CampaignRuleAction> CampaignRuleActions = null, bool?MatchAnyConditions = null, bool?Enabled = null)
 {
     this.Name    = Name;
     this.Version = Version;
     this.CampaignRuleEntities   = CampaignRuleEntities;
     this.CampaignRuleConditions = CampaignRuleConditions;
     this.CampaignRuleActions    = CampaignRuleActions;
     this.MatchAnyConditions     = MatchAnyConditions;
     this.Enabled = Enabled;
 }