/// <summary>
 /// Initializes a new instance of the <see cref="UpsertRecipeRequest" /> class.
 /// </summary>
 /// <param name="configurationRecipe">configurationRecipe.</param>
 /// <param name="configurationRecipeSnippet">configurationRecipeSnippet.</param>
 public UpsertRecipeRequest(ConfigurationRecipe configurationRecipe = default(ConfigurationRecipe), ConfigurationRecipeSnippet configurationRecipeSnippet = default(ConfigurationRecipeSnippet))
 {
     this.ConfigurationRecipe        = configurationRecipe;
     this.ConfigurationRecipeSnippet = configurationRecipeSnippet;
 }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UpsertRecipeRequest" /> class.
        /// </summary>
        /// <param name="code">User given string name (code) to identify the recipe or snippet for storage in and retrieval from the data store.  Sensibly it would be expected to match the same code given inside the configuration recipe, if that is the element being stored,  though this is not enforced. In the case of a snippet for rules or options, again a sensible naming convention such as options_...  or marketrules_... is advocated to aid in ease of understanding when included elsewhere though not enforced. (required).</param>
        /// <param name="configurationRecipe">configurationRecipe (required).</param>
        /// <param name="configurationRecipeSnippet">configurationRecipeSnippet (required).</param>
        public UpsertRecipeRequest(string code = default(string), ConfigurationRecipe configurationRecipe = default(ConfigurationRecipe), ConfigurationRecipeSnippet configurationRecipeSnippet = default(ConfigurationRecipeSnippet))
        {
            // to ensure "code" is required (not null)
            if (code == null)
            {
                throw new InvalidDataException("code is a required property for UpsertRecipeRequest and cannot be null");
            }
            else
            {
                this.Code = code;
            }

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

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