コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StructuredResultData" /> class.
        /// </summary>
        /// <param name="documentFormat">The format of the accompanying document. (required).</param>
        /// <param name="version">The semantic version of the document format; MAJOR.MINOR.PATCH.</param>
        /// <param name="name">The name or description for the document.</param>
        /// <param name="document">The document that will be stored (or retrieved) and which describes a unit result data entity such as a set of prices or yields (required).</param>
        /// <param name="dataMap">dataMap.</param>
        public StructuredResultData(string documentFormat = default(string), string version = default(string), string name = default(string), string document = default(string), DataMapping dataMap = default(DataMapping))
        {
            // to ensure "documentFormat" is required (not null)
            if (documentFormat == null)
            {
                throw new InvalidDataException("documentFormat is a required property for StructuredResultData and cannot be null");
            }
            else
            {
                this.DocumentFormat = documentFormat;
            }

            this.Version = version;
            this.Name    = name;
            // to ensure "document" is required (not null)
            if (document == null)
            {
                throw new InvalidDataException("document is a required property for StructuredResultData and cannot be null");
            }
            else
            {
                this.Document = document;
            }

            this.Version = version;
            this.Name    = name;
            this.DataMap = dataMap;
        }