Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Article" /> class.
 /// </summary>
 /// <param name="Id">unique article id (required).</param>
 /// <param name="ModelId">unique article model id (required).</param>
 /// <param name="Name">article name (required).</param>
 /// <param name="ShopUrl">url of the article within the Zalando webshop (required).</param>
 /// <param name="Color">the main color of the article (required).</param>
 /// <param name="Available">will be true if at least one article unit is available (required).</param>
 /// <param name="Season">collection season the article belongs to (required).</param>
 /// <param name="SeasonYear">collection year the article belongs to. Could be either a year or &#39;ALL&#39; (required).</param>
 /// <param name="ActivationDate">timestamp the article was available in the Zalando webshop (required).</param>
 /// <param name="AdditionalInfos">any additional information of the article  (required).</param>
 /// <param name="Genders">gender of the article belongs to (required).</param>
 /// <param name="AgeGroups">age group of the article belongs to (required).</param>
 /// <param name="Brand">Brand (required).</param>
 /// <param name="CategoryKeys">category keys of the article belongs to (required).</param>
 /// <param name="Attributes">article attributes (required).</param>
 /// <param name="Units">price of the article (required).</param>
 /// <param name="Tags">Tags.</param>
 /// <param name="Media">Media (required).</param>
 public Article(string Id = null, string ModelId = null, string Name = null, string ShopUrl = null, string Color = null, bool?Available = null, SeasonEnum?Season = null, string SeasonYear = null, DateTime?ActivationDate = null, List <string> AdditionalInfos = null, List <GendersEnum> Genders = null, List <AgeGroupsEnum> AgeGroups = null, Brand Brand = null, List <string> CategoryKeys = null, List <ArticleAttribute> Attributes = null, List <ArticleUnit> Units = null, List <string> Tags = null, ArticleMedia Media = null)
 {
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for Article and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "ModelId" is required (not null)
     if (ModelId == null)
     {
         throw new InvalidDataException("ModelId is a required property for Article and cannot be null");
     }
     else
     {
         this.ModelId = ModelId;
     }
     // to ensure "Name" is required (not null)
     if (Name == null)
     {
         throw new InvalidDataException("Name is a required property for Article and cannot be null");
     }
     else
     {
         this.Name = Name;
     }
     // to ensure "ShopUrl" is required (not null)
     if (ShopUrl == null)
     {
         throw new InvalidDataException("ShopUrl is a required property for Article and cannot be null");
     }
     else
     {
         this.ShopUrl = ShopUrl;
     }
     // to ensure "Color" is required (not null)
     if (Color == null)
     {
         throw new InvalidDataException("Color is a required property for Article and cannot be null");
     }
     else
     {
         this.Color = Color;
     }
     // to ensure "Available" is required (not null)
     if (Available == null)
     {
         throw new InvalidDataException("Available is a required property for Article and cannot be null");
     }
     else
     {
         this.Available = Available;
     }
     // to ensure "Season" is required (not null)
     if (Season == null)
     {
         throw new InvalidDataException("Season is a required property for Article and cannot be null");
     }
     else
     {
         this.Season = Season;
     }
     // to ensure "SeasonYear" is required (not null)
     if (SeasonYear == null)
     {
         throw new InvalidDataException("SeasonYear is a required property for Article and cannot be null");
     }
     else
     {
         this.SeasonYear = SeasonYear;
     }
     // to ensure "ActivationDate" is required (not null)
     if (ActivationDate == null)
     {
         throw new InvalidDataException("ActivationDate is a required property for Article and cannot be null");
     }
     else
     {
         this.ActivationDate = ActivationDate;
     }
     // to ensure "AdditionalInfos" is required (not null)
     if (AdditionalInfos == null)
     {
         throw new InvalidDataException("AdditionalInfos is a required property for Article and cannot be null");
     }
     else
     {
         this.AdditionalInfos = AdditionalInfos;
     }
     // to ensure "Genders" is required (not null)
     if (Genders == null)
     {
         throw new InvalidDataException("Genders is a required property for Article and cannot be null");
     }
     else
     {
         this.Genders = Genders;
     }
     // to ensure "AgeGroups" is required (not null)
     if (AgeGroups == null)
     {
         throw new InvalidDataException("AgeGroups is a required property for Article and cannot be null");
     }
     else
     {
         this.AgeGroups = AgeGroups;
     }
     // to ensure "Brand" is required (not null)
     if (Brand == null)
     {
         throw new InvalidDataException("Brand is a required property for Article and cannot be null");
     }
     else
     {
         this.Brand = Brand;
     }
     // to ensure "CategoryKeys" is required (not null)
     if (CategoryKeys == null)
     {
         throw new InvalidDataException("CategoryKeys is a required property for Article and cannot be null");
     }
     else
     {
         this.CategoryKeys = CategoryKeys;
     }
     // to ensure "Attributes" is required (not null)
     if (Attributes == null)
     {
         throw new InvalidDataException("Attributes is a required property for Article and cannot be null");
     }
     else
     {
         this.Attributes = Attributes;
     }
     // to ensure "Units" is required (not null)
     if (Units == null)
     {
         throw new InvalidDataException("Units is a required property for Article and cannot be null");
     }
     else
     {
         this.Units = Units;
     }
     // to ensure "Media" is required (not null)
     if (Media == null)
     {
         throw new InvalidDataException("Media is a required property for Article and cannot be null");
     }
     else
     {
         this.Media = Media;
     }
     this.Tags = Tags;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RecommendationsArticle" /> class.
 /// </summary>
 /// <param name="Id">Id (required).</param>
 /// <param name="ModelId">ModelId (required).</param>
 /// <param name="Name">Name (required).</param>
 /// <param name="ShopUrl">ShopUrl (required).</param>
 /// <param name="Media">Media (required).</param>
 public RecommendationsArticle(string Id = null, string ModelId = null, string Name = null, string ShopUrl = null, ArticleMedia Media = null)
 {
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for RecommendationsArticle and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "ModelId" is required (not null)
     if (ModelId == null)
     {
         throw new InvalidDataException("ModelId is a required property for RecommendationsArticle and cannot be null");
     }
     else
     {
         this.ModelId = ModelId;
     }
     // to ensure "Name" is required (not null)
     if (Name == null)
     {
         throw new InvalidDataException("Name is a required property for RecommendationsArticle and cannot be null");
     }
     else
     {
         this.Name = Name;
     }
     // to ensure "ShopUrl" is required (not null)
     if (ShopUrl == null)
     {
         throw new InvalidDataException("ShopUrl is a required property for RecommendationsArticle and cannot be null");
     }
     else
     {
         this.ShopUrl = ShopUrl;
     }
     // to ensure "Media" is required (not null)
     if (Media == null)
     {
         throw new InvalidDataException("Media is a required property for RecommendationsArticle and cannot be null");
     }
     else
     {
         this.Media = Media;
     }
 }