Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Storage" /> class.
 /// </summary>
 /// <param name="Id">resource id (required).</param>
 /// <param name="Type">Type (required).</param>
 /// <param name="Attributes">Attributes.</param>
 /// <param name="Meta">Meta.</param>
 /// <param name="Relationships">Relationships.</param>
 /// <param name="Links">Links.</param>
 public Storage(string Id = null, TypeEnum?Type = null, JsonApiAttributes Attributes = null, JsonApiMeta Meta = null, StorageRelationships Relationships = null, JsonApiLinks Links = null)
 {
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for Storage and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "Type" is required (not null)
     if (Type == null)
     {
         throw new InvalidDataException("Type is a required property for Storage and cannot be null");
     }
     else
     {
         this.Type = Type;
     }
     this.Attributes    = Attributes;
     this.Meta          = Meta;
     this.Relationships = Relationships;
     this.Links         = Links;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Version" /> class.
 /// </summary>
 /// <param name="Jsonapi">Jsonapi.</param>
 /// <param name="Data">Data (required).</param>
 /// <param name="Included">Included.</param>
 /// <param name="Links">Links (required).</param>
 /// <param name="Id">resource id (required).</param>
 /// <param name="Type">Type (required).</param>
 /// <param name="Attributes">Attributes.</param>
 /// <param name="Meta">Meta.</param>
 /// <param name="Relationships">Relationships.</param>
 public Version(JsonApiVersionJsonapi Jsonapi = null, JsonApiResource Data = null, List <JsonApiResource> Included = null, JsonApiLinks Links = null, string Id = null, TypeEnum?Type = null, VersionAttributes Attributes = null, JsonApiMeta Meta = null, VersionRelationships Relationships = null)
 {
     // to ensure "Data" is required (not null)
     if (Data == null)
     {
         throw new InvalidDataException("Data is a required property for Version and cannot be null");
     }
     else
     {
         this.Data = Data;
     }
     // to ensure "Links" is required (not null)
     if (Links == null)
     {
         throw new InvalidDataException("Links is a required property for Version and cannot be null");
     }
     else
     {
         this.Links = Links;
     }
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for Version and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "Type" is required (not null)
     if (Type == null)
     {
         throw new InvalidDataException("Type is a required property for Version and cannot be null");
     }
     else
     {
         this.Type = Type;
     }
     this.Jsonapi       = Jsonapi;
     this.Included      = Included;
     this.Attributes    = Attributes;
     this.Meta          = Meta;
     this.Relationships = Relationships;
 }