Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JsonApiLinksPaging" /> class.
 /// </summary>
 /// <param name="First">First.</param>
 /// <param name="Prev">Prev.</param>
 /// <param name="Next">Next.</param>
 /// <param name="Last">Last.</param>
 public JsonApiLinksPaging(JsonApiLink First = null, JsonApiLink Prev = null, JsonApiLink Next = null, JsonApiLink Last = null)
 {
     this.First = First;
     this.Prev  = Prev;
     this.Next  = Next;
     this.Last  = Last;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="JsonApiMetaLink" /> class.
 /// </summary>
 /// <param name="Link">Link (required).</param>
 public JsonApiMetaLink(JsonApiLink Link = null)
 {
     // to ensure "Link" is required (not null)
     if (Link == null)
     {
         throw new InvalidDataException("Link is a required property for JsonApiMetaLink and cannot be null");
     }
     else
     {
         this.Link = Link;
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="JsonApiLinksSelf" /> class.
 /// </summary>
 /// <param name="Self">Self (required).</param>
 public JsonApiLinksSelf(JsonApiLink Self = null)
 {
     // to ensure "Self" is required (not null)
     if (Self == null)
     {
         throw new InvalidDataException("Self is a required property for JsonApiLinksSelf and cannot be null");
     }
     else
     {
         this.Self = Self;
     }
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JsonApiErrorLinks" /> class.
 /// </summary>
 /// <param name="About">About (required).</param>
 public JsonApiErrorLinks(JsonApiLink About = null)
 {
     // to ensure "About" is required (not null)
     if (About == null)
     {
         throw new InvalidDataException("About is a required property for JsonApiErrorLinks and cannot be null");
     }
     else
     {
         this.About = About;
     }
 }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JsonApiLinksRelated" /> class.
 /// </summary>
 /// <param name="Related">Related (required).</param>
 public JsonApiLinksRelated(JsonApiLink Related = null)
 {
     // to ensure "Related" is required (not null)
     if (Related == null)
     {
         throw new InvalidDataException("Related is a required property for JsonApiLinksRelated and cannot be null");
     }
     else
     {
         this.Related = Related;
     }
 }
Beispiel #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JsonApiRelationshipsLinksRefsLinks" /> class.
 /// </summary>
 /// <param name="Self">Self (required).</param>
 /// <param name="Related">Related (required).</param>
 public JsonApiRelationshipsLinksRefsLinks(JsonApiLink Self = null, JsonApiLink Related = null)
 {
     // to ensure "Self" is required (not null)
     if (Self == null)
     {
         throw new InvalidDataException("Self is a required property for JsonApiRelationshipsLinksRefsLinks and cannot be null");
     }
     else
     {
         this.Self = Self;
     }
     // to ensure "Related" is required (not null)
     if (Related == null)
     {
         throw new InvalidDataException("Related is a required property for JsonApiRelationshipsLinksRefsLinks and cannot be null");
     }
     else
     {
         this.Related = Related;
     }
 }
Beispiel #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseAttributesExtensionObject" /> class.
        /// </summary>
        /// <param name="Type">Type (required).</param>
        /// <param name="Version">Version (required).</param>
        /// <param name="Schema">Schema (required).</param>
        /// <param name="Data">Data.</param>
        public BaseAttributesExtensionObject(string Type = null, string Version = null, JsonApiLink Schema = null, Object Data = null)
        {
            // to ensure "Type" is required (not null)
            if (Type == null)
            {
                throw new InvalidDataException("Type is a required property for BaseAttributesExtensionObject and cannot be null");
            }
            else
            {
                this.Type = Type;
            }
            // to ensure "Version" is required (not null)
            if (Version == null)
            {
                throw new InvalidDataException("Version is a required property for BaseAttributesExtensionObject and cannot be null");
            }
            else
            {
                this.Version = Version;
            }
            // to ensure "Schema" is required (not null)

            /* if (Schema == null)
             * {
             *  throw new InvalidDataException("Schema is a required property for BaseAttributesExtensionObject and cannot be null");
             * }
             * else
             * {
             *  this.Schema = Schema;
             * }*/
            this.Data = Data;
        }