/* 
 * bSDD API prototype
 *
 * API to access the buildingSMART Data Dictionary
 *
 * OpenAPI spec version: v1
 * Contact: bsdd_support@buildingsmart.org
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;

namespace IO.Swagger.Model
{
    /// <summary>
    /// PropertyContractV2
    /// </summary>
    [DataContract]
        public partial class PropertyContractV2 :  IEquatable<PropertyContractV2>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PropertyContractV2" /> class.
        /// </summary>
        /// <param name="description">Plain language description of the property..</param>
        /// <param name="connectedPropertyCodes">List of connected property codes.</param>
        /// <param name="dataType">Format for expressing the value of the property: Boolean, Character, Date, Enumeration, Integer, Real, String, Time.</param>
        /// <param name="dimension">Dimension of the physical quantity in format \&quot;L M T I Θ N J\&quot;, for example \&quot;-2 1 0 0 0 0 0\&quot;.  With    L   Length    M   Mass    T   Time    I   Electric current    Θ   Thermodynamic Temperature    N   Amount of substance    J   Luminous intensity.</param>
        /// <param name="dimensionLength">The Length value of the dimension.</param>
        /// <param name="dimensionMass">The Mass value of the dimension.</param>
        /// <param name="dimensionTime">The Time value of the dimension.</param>
        /// <param name="dimensionElectricCurrent">The Electric current value of the dimension.</param>
        /// <param name="dimensionThermodynamicTemperature">The Thermodynamic temperature value of the dimension.</param>
        /// <param name="dimensionAmountOfSubstance">The Amount of substance value of the dimension.</param>
        /// <param name="dimensionLuminousIntensity">The Luminous intensity value of the dimension.</param>
        /// <param name="dynamicParameterPropertyCodes">List of codes of the properties which are parameters of the function for a dynamic property.  Only applicable for dynamic properties (IsDynamic).</param>
        /// <param name="example">Illustrate possible use or values of the Property.</param>
        /// <param name="isDynamic">True if the value of this property is dependent on other properties (as provided in DynamicParameterPropertyCodes).</param>
        /// <param name="maxExclusive">Maximum value of the property, exclusive.</param>
        /// <param name="maxInclusive">Maximum value of the property, inclusive.</param>
        /// <param name="methodOfMeasurement">Description of the method of measurement.</param>
        /// <param name="minExclusive">Minimum value of the property, exclusive.</param>
        /// <param name="minInclusive">Minimum value of the property, inclusive.</param>
        /// <param name="pattern">An XML Schema Regular expression for the property value.  See for explanation: https://www.regular-expressions.info/xml.html..</param>
        /// <param name="physicalQuantity">The quantity in plain text.</param>
        /// <param name="possibleValues">List of possible values.</param>
        /// <param name="propertyValueKind">Indicates kind of value: Single, Range (2 values expected), List (multiple values expected), Complex (use in combination with \&quot;ConnectedProperties\&quot;), ComplexList.</param>
        /// <param name="propertyRelations">List of relations with other properties.</param>
        /// <param name="textFormat">The text type, e.g. UTF-8.</param>
        /// <param name="units">Multiple references to Unit.</param>
        /// <param name="activationDateUtc">Date of activation (required).</param>
        /// <param name="code">Code used originally by the domain (required).</param>
        /// <param name="creatorLanguageCode">Language code of the creator.</param>
        /// <param name="countriesOfUse">List of countries where used.</param>
        /// <param name="countryOfOrigin">Country of origin.</param>
        /// <param name="deActivationDateUtc">Date of deactivation.</param>
        /// <param name="definition">Definition.</param>
        /// <param name="deprecationExplanation">Explanation of the deprecation.</param>
        /// <param name="documentReference">Reference to a(n official) document.</param>
        /// <param name="name">Name (required).</param>
        /// <param name="namespaceUri">Unique identification (required).</param>
        /// <param name="replacedObjectCodes">List of codes of the replaced items.</param>
        /// <param name="replacingObjectCodes">List of codes of the replacing items.</param>
        /// <param name="revisionDateUtc">Date of the revision.</param>
        /// <param name="revisionNumber">Revision number.</param>
        /// <param name="status">Status, can be: Preview, Active or Inactive (required).</param>
        /// <param name="subdivisionsOfUse">List of subdivisions (e.g. states) where used.</param>
        /// <param name="uid">Alternative unique global identification.</param>
        /// <param name="versionDateUtc">Date of the version (required).</param>
        /// <param name="versionNumber">Version number.</param>
        /// <param name="visualRepresentationUri">URI of a visual representation.</param>
        public PropertyContractV2(string description = default(string), List<string> connectedPropertyCodes = default(List<string>), string dataType = default(string), string dimension = default(string), int? dimensionLength = default(int?), int? dimensionMass = default(int?), int? dimensionTime = default(int?), int? dimensionElectricCurrent = default(int?), int? dimensionThermodynamicTemperature = default(int?), int? dimensionAmountOfSubstance = default(int?), int? dimensionLuminousIntensity = default(int?), List<string> dynamicParameterPropertyCodes = default(List<string>), string example = default(string), bool? isDynamic = default(bool?), double? maxExclusive = default(double?), double? maxInclusive = default(double?), string methodOfMeasurement = default(string), double? minExclusive = default(double?), double? minInclusive = default(double?), string pattern = default(string), string physicalQuantity = default(string), List<PropertyValueContractV2> possibleValues = default(List<PropertyValueContractV2>), string propertyValueKind = default(string), List<PropertyRelationContractV2> propertyRelations = default(List<PropertyRelationContractV2>), string textFormat = default(string), List<string> units = default(List<string>), DateTime? activationDateUtc = default(DateTime?), string code = default(string), string creatorLanguageCode = default(string), List<string> countriesOfUse = default(List<string>), string countryOfOrigin = default(string), DateTime? deActivationDateUtc = default(DateTime?), string definition = default(string), string deprecationExplanation = default(string), string documentReference = default(string), string name = default(string), string namespaceUri = default(string), List<string> replacedObjectCodes = default(List<string>), List<string> replacingObjectCodes = default(List<string>), DateTime? revisionDateUtc = default(DateTime?), int? revisionNumber = default(int?), string status = default(string), List<string> subdivisionsOfUse = default(List<string>), string uid = default(string), DateTime? versionDateUtc = default(DateTime?), int? versionNumber = default(int?), string visualRepresentationUri = default(string))
        {
            // to ensure "activationDateUtc" is required (not null)
            if (activationDateUtc == null)
            {
                throw new InvalidDataException("activationDateUtc is a required property for PropertyContractV2 and cannot be null");
            }
            else
            {
                this.ActivationDateUtc = activationDateUtc;
            }
            // to ensure "code" is required (not null)
            if (code == null)
            {
                throw new InvalidDataException("code is a required property for PropertyContractV2 and cannot be null");
            }
            else
            {
                this.Code = code;
            }
            // to ensure "name" is required (not null)
            if (name == null)
            {
                throw new InvalidDataException("name is a required property for PropertyContractV2 and cannot be null");
            }
            else
            {
                this.Name = name;
            }
            // to ensure "namespaceUri" is required (not null)
            if (namespaceUri == null)
            {
                throw new InvalidDataException("namespaceUri is a required property for PropertyContractV2 and cannot be null");
            }
            else
            {
                this.NamespaceUri = namespaceUri;
            }
            // to ensure "status" is required (not null)
            if (status == null)
            {
                throw new InvalidDataException("status is a required property for PropertyContractV2 and cannot be null");
            }
            else
            {
                this.Status = status;
            }
            // to ensure "versionDateUtc" is required (not null)
            if (versionDateUtc == null)
            {
                throw new InvalidDataException("versionDateUtc is a required property for PropertyContractV2 and cannot be null");
            }
            else
            {
                this.VersionDateUtc = versionDateUtc;
            }
            this.Description = description;
            this.ConnectedPropertyCodes = connectedPropertyCodes;
            this.DataType = dataType;
            this.Dimension = dimension;
            this.DimensionLength = dimensionLength;
            this.DimensionMass = dimensionMass;
            this.DimensionTime = dimensionTime;
            this.DimensionElectricCurrent = dimensionElectricCurrent;
            this.DimensionThermodynamicTemperature = dimensionThermodynamicTemperature;
            this.DimensionAmountOfSubstance = dimensionAmountOfSubstance;
            this.DimensionLuminousIntensity = dimensionLuminousIntensity;
            this.DynamicParameterPropertyCodes = dynamicParameterPropertyCodes;
            this.Example = example;
            this.IsDynamic = isDynamic;
            this.MaxExclusive = maxExclusive;
            this.MaxInclusive = maxInclusive;
            this.MethodOfMeasurement = methodOfMeasurement;
            this.MinExclusive = minExclusive;
            this.MinInclusive = minInclusive;
            this.Pattern = pattern;
            this.PhysicalQuantity = physicalQuantity;
            this.PossibleValues = possibleValues;
            this.PropertyValueKind = propertyValueKind;
            this.PropertyRelations = propertyRelations;
            this.TextFormat = textFormat;
            this.Units = units;
            this.CreatorLanguageCode = creatorLanguageCode;
            this.CountriesOfUse = countriesOfUse;
            this.CountryOfOrigin = countryOfOrigin;
            this.DeActivationDateUtc = deActivationDateUtc;
            this.Definition = definition;
            this.DeprecationExplanation = deprecationExplanation;
            this.DocumentReference = documentReference;
            this.ReplacedObjectCodes = replacedObjectCodes;
            this.ReplacingObjectCodes = replacingObjectCodes;
            this.RevisionDateUtc = revisionDateUtc;
            this.RevisionNumber = revisionNumber;
            this.SubdivisionsOfUse = subdivisionsOfUse;
            this.Uid = uid;
            this.VersionNumber = versionNumber;
            this.VisualRepresentationUri = visualRepresentationUri;
        }
        
        /// <summary>
        /// Plain language description of the property.
        /// </summary>
        /// <value>Plain language description of the property.</value>
        [DataMember(Name="description", EmitDefaultValue=false)]
        public string Description { get; set; }

        /// <summary>
        /// List of connected property codes
        /// </summary>
        /// <value>List of connected property codes</value>
        [DataMember(Name="connectedPropertyCodes", EmitDefaultValue=false)]
        public List<string> ConnectedPropertyCodes { get; set; }

        /// <summary>
        /// Format for expressing the value of the property: Boolean, Character, Date, Enumeration, Integer, Real, String, Time
        /// </summary>
        /// <value>Format for expressing the value of the property: Boolean, Character, Date, Enumeration, Integer, Real, String, Time</value>
        [DataMember(Name="dataType", EmitDefaultValue=false)]
        public string DataType { get; set; }

        /// <summary>
        /// Dimension of the physical quantity in format \&quot;L M T I Θ N J\&quot;, for example \&quot;-2 1 0 0 0 0 0\&quot;.  With    L   Length    M   Mass    T   Time    I   Electric current    Θ   Thermodynamic Temperature    N   Amount of substance    J   Luminous intensity
        /// </summary>
        /// <value>Dimension of the physical quantity in format \&quot;L M T I Θ N J\&quot;, for example \&quot;-2 1 0 0 0 0 0\&quot;.  With    L   Length    M   Mass    T   Time    I   Electric current    Θ   Thermodynamic Temperature    N   Amount of substance    J   Luminous intensity</value>
        [DataMember(Name="dimension", EmitDefaultValue=false)]
        public string Dimension { get; set; }

        /// <summary>
        /// The Length value of the dimension
        /// </summary>
        /// <value>The Length value of the dimension</value>
        [DataMember(Name="dimensionLength", EmitDefaultValue=false)]
        public int? DimensionLength { get; set; }

        /// <summary>
        /// The Mass value of the dimension
        /// </summary>
        /// <value>The Mass value of the dimension</value>
        [DataMember(Name="dimensionMass", EmitDefaultValue=false)]
        public int? DimensionMass { get; set; }

        /// <summary>
        /// The Time value of the dimension
        /// </summary>
        /// <value>The Time value of the dimension</value>
        [DataMember(Name="dimensionTime", EmitDefaultValue=false)]
        public int? DimensionTime { get; set; }

        /// <summary>
        /// The Electric current value of the dimension
        /// </summary>
        /// <value>The Electric current value of the dimension</value>
        [DataMember(Name="dimensionElectricCurrent", EmitDefaultValue=false)]
        public int? DimensionElectricCurrent { get; set; }

        /// <summary>
        /// The Thermodynamic temperature value of the dimension
        /// </summary>
        /// <value>The Thermodynamic temperature value of the dimension</value>
        [DataMember(Name="dimensionThermodynamicTemperature", EmitDefaultValue=false)]
        public int? DimensionThermodynamicTemperature { get; set; }

        /// <summary>
        /// The Amount of substance value of the dimension
        /// </summary>
        /// <value>The Amount of substance value of the dimension</value>
        [DataMember(Name="dimensionAmountOfSubstance", EmitDefaultValue=false)]
        public int? DimensionAmountOfSubstance { get; set; }

        /// <summary>
        /// The Luminous intensity value of the dimension
        /// </summary>
        /// <value>The Luminous intensity value of the dimension</value>
        [DataMember(Name="dimensionLuminousIntensity", EmitDefaultValue=false)]
        public int? DimensionLuminousIntensity { get; set; }

        /// <summary>
        /// List of codes of the properties which are parameters of the function for a dynamic property.  Only applicable for dynamic properties (IsDynamic)
        /// </summary>
        /// <value>List of codes of the properties which are parameters of the function for a dynamic property.  Only applicable for dynamic properties (IsDynamic)</value>
        [DataMember(Name="dynamicParameterPropertyCodes", EmitDefaultValue=false)]
        public List<string> DynamicParameterPropertyCodes { get; set; }

        /// <summary>
        /// Illustrate possible use or values of the Property
        /// </summary>
        /// <value>Illustrate possible use or values of the Property</value>
        [DataMember(Name="example", EmitDefaultValue=false)]
        public string Example { get; set; }

        /// <summary>
        /// True if the value of this property is dependent on other properties (as provided in DynamicParameterPropertyCodes)
        /// </summary>
        /// <value>True if the value of this property is dependent on other properties (as provided in DynamicParameterPropertyCodes)</value>
        [DataMember(Name="isDynamic", EmitDefaultValue=false)]
        public bool? IsDynamic { get; set; }

        /// <summary>
        /// Maximum value of the property, exclusive
        /// </summary>
        /// <value>Maximum value of the property, exclusive</value>
        [DataMember(Name="maxExclusive", EmitDefaultValue=false)]
        public double? MaxExclusive { get; set; }

        /// <summary>
        /// Maximum value of the property, inclusive
        /// </summary>
        /// <value>Maximum value of the property, inclusive</value>
        [DataMember(Name="maxInclusive", EmitDefaultValue=false)]
        public double? MaxInclusive { get; set; }

        /// <summary>
        /// Description of the method of measurement
        /// </summary>
        /// <value>Description of the method of measurement</value>
        [DataMember(Name="methodOfMeasurement", EmitDefaultValue=false)]
        public string MethodOfMeasurement { get; set; }

        /// <summary>
        /// Minimum value of the property, exclusive
        /// </summary>
        /// <value>Minimum value of the property, exclusive</value>
        [DataMember(Name="minExclusive", EmitDefaultValue=false)]
        public double? MinExclusive { get; set; }

        /// <summary>
        /// Minimum value of the property, inclusive
        /// </summary>
        /// <value>Minimum value of the property, inclusive</value>
        [DataMember(Name="minInclusive", EmitDefaultValue=false)]
        public double? MinInclusive { get; set; }

        /// <summary>
        /// An XML Schema Regular expression for the property value.  See for explanation: https://www.regular-expressions.info/xml.html.
        /// </summary>
        /// <value>An XML Schema Regular expression for the property value.  See for explanation: https://www.regular-expressions.info/xml.html.</value>
        [DataMember(Name="pattern", EmitDefaultValue=false)]
        public string Pattern { get; set; }

        /// <summary>
        /// The quantity in plain text
        /// </summary>
        /// <value>The quantity in plain text</value>
        [DataMember(Name="physicalQuantity", EmitDefaultValue=false)]
        public string PhysicalQuantity { get; set; }

        /// <summary>
        /// List of possible values
        /// </summary>
        /// <value>List of possible values</value>
        [DataMember(Name="possibleValues", EmitDefaultValue=false)]
        public List<PropertyValueContractV2> PossibleValues { get; set; }

        /// <summary>
        /// Indicates kind of value: Single, Range (2 values expected), List (multiple values expected), Complex (use in combination with \&quot;ConnectedProperties\&quot;), ComplexList
        /// </summary>
        /// <value>Indicates kind of value: Single, Range (2 values expected), List (multiple values expected), Complex (use in combination with \&quot;ConnectedProperties\&quot;), ComplexList</value>
        [DataMember(Name="propertyValueKind", EmitDefaultValue=false)]
        public string PropertyValueKind { get; set; }

        /// <summary>
        /// List of relations with other properties
        /// </summary>
        /// <value>List of relations with other properties</value>
        [DataMember(Name="propertyRelations", EmitDefaultValue=false)]
        public List<PropertyRelationContractV2> PropertyRelations { get; set; }

        /// <summary>
        /// The text type, e.g. UTF-8
        /// </summary>
        /// <value>The text type, e.g. UTF-8</value>
        [DataMember(Name="textFormat", EmitDefaultValue=false)]
        public string TextFormat { get; set; }

        /// <summary>
        /// Multiple references to Unit
        /// </summary>
        /// <value>Multiple references to Unit</value>
        [DataMember(Name="units", EmitDefaultValue=false)]
        public List<string> Units { get; set; }

        /// <summary>
        /// Date of activation
        /// </summary>
        /// <value>Date of activation</value>
        [DataMember(Name="activationDateUtc", EmitDefaultValue=false)]
        public DateTime? ActivationDateUtc { get; set; }

        /// <summary>
        /// Code used originally by the domain
        /// </summary>
        /// <value>Code used originally by the domain</value>
        [DataMember(Name="code", EmitDefaultValue=false)]
        public string Code { get; set; }

        /// <summary>
        /// Language code of the creator
        /// </summary>
        /// <value>Language code of the creator</value>
        [DataMember(Name="creatorLanguageCode", EmitDefaultValue=false)]
        public string CreatorLanguageCode { get; set; }

        /// <summary>
        /// List of countries where used
        /// </summary>
        /// <value>List of countries where used</value>
        [DataMember(Name="countriesOfUse", EmitDefaultValue=false)]
        public List<string> CountriesOfUse { get; set; }

        /// <summary>
        /// Country of origin
        /// </summary>
        /// <value>Country of origin</value>
        [DataMember(Name="countryOfOrigin", EmitDefaultValue=false)]
        public string CountryOfOrigin { get; set; }

        /// <summary>
        /// Date of deactivation
        /// </summary>
        /// <value>Date of deactivation</value>
        [DataMember(Name="deActivationDateUtc", EmitDefaultValue=false)]
        public DateTime? DeActivationDateUtc { get; set; }

        /// <summary>
        /// Definition
        /// </summary>
        /// <value>Definition</value>
        [DataMember(Name="definition", EmitDefaultValue=false)]
        public string Definition { get; set; }

        /// <summary>
        /// Explanation of the deprecation
        /// </summary>
        /// <value>Explanation of the deprecation</value>
        [DataMember(Name="deprecationExplanation", EmitDefaultValue=false)]
        public string DeprecationExplanation { get; set; }

        /// <summary>
        /// Reference to a(n official) document
        /// </summary>
        /// <value>Reference to a(n official) document</value>
        [DataMember(Name="documentReference", EmitDefaultValue=false)]
        public string DocumentReference { get; set; }

        /// <summary>
        /// Name
        /// </summary>
        /// <value>Name</value>
        [DataMember(Name="name", EmitDefaultValue=false)]
        public string Name { get; set; }

        /// <summary>
        /// Unique identification
        /// </summary>
        /// <value>Unique identification</value>
        [DataMember(Name="namespaceUri", EmitDefaultValue=false)]
        public string NamespaceUri { get; set; }

        /// <summary>
        /// List of codes of the replaced items
        /// </summary>
        /// <value>List of codes of the replaced items</value>
        [DataMember(Name="replacedObjectCodes", EmitDefaultValue=false)]
        public List<string> ReplacedObjectCodes { get; set; }

        /// <summary>
        /// List of codes of the replacing items
        /// </summary>
        /// <value>List of codes of the replacing items</value>
        [DataMember(Name="replacingObjectCodes", EmitDefaultValue=false)]
        public List<string> ReplacingObjectCodes { get; set; }

        /// <summary>
        /// Date of the revision
        /// </summary>
        /// <value>Date of the revision</value>
        [DataMember(Name="revisionDateUtc", EmitDefaultValue=false)]
        public DateTime? RevisionDateUtc { get; set; }

        /// <summary>
        /// Revision number
        /// </summary>
        /// <value>Revision number</value>
        [DataMember(Name="revisionNumber", EmitDefaultValue=false)]
        public int? RevisionNumber { get; set; }

        /// <summary>
        /// Status, can be: Preview, Active or Inactive
        /// </summary>
        /// <value>Status, can be: Preview, Active or Inactive</value>
        [DataMember(Name="status", EmitDefaultValue=false)]
        public string Status { get; set; }

        /// <summary>
        /// List of subdivisions (e.g. states) where used
        /// </summary>
        /// <value>List of subdivisions (e.g. states) where used</value>
        [DataMember(Name="subdivisionsOfUse", EmitDefaultValue=false)]
        public List<string> SubdivisionsOfUse { get; set; }

        /// <summary>
        /// Alternative unique global identification
        /// </summary>
        /// <value>Alternative unique global identification</value>
        [DataMember(Name="uid", EmitDefaultValue=false)]
        public string Uid { get; set; }

        /// <summary>
        /// Date of the version
        /// </summary>
        /// <value>Date of the version</value>
        [DataMember(Name="versionDateUtc", EmitDefaultValue=false)]
        public DateTime? VersionDateUtc { get; set; }

        /// <summary>
        /// Version number
        /// </summary>
        /// <value>Version number</value>
        [DataMember(Name="versionNumber", EmitDefaultValue=false)]
        public int? VersionNumber { get; set; }

        /// <summary>
        /// URI of a visual representation
        /// </summary>
        /// <value>URI of a visual representation</value>
        [DataMember(Name="visualRepresentationUri", EmitDefaultValue=false)]
        public string VisualRepresentationUri { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            var sb = new StringBuilder();
            sb.Append("class PropertyContractV2 {\n");
            sb.Append("  Description: ").Append(Description).Append("\n");
            sb.Append("  ConnectedPropertyCodes: ").Append(ConnectedPropertyCodes).Append("\n");
            sb.Append("  DataType: ").Append(DataType).Append("\n");
            sb.Append("  Dimension: ").Append(Dimension).Append("\n");
            sb.Append("  DimensionLength: ").Append(DimensionLength).Append("\n");
            sb.Append("  DimensionMass: ").Append(DimensionMass).Append("\n");
            sb.Append("  DimensionTime: ").Append(DimensionTime).Append("\n");
            sb.Append("  DimensionElectricCurrent: ").Append(DimensionElectricCurrent).Append("\n");
            sb.Append("  DimensionThermodynamicTemperature: ").Append(DimensionThermodynamicTemperature).Append("\n");
            sb.Append("  DimensionAmountOfSubstance: ").Append(DimensionAmountOfSubstance).Append("\n");
            sb.Append("  DimensionLuminousIntensity: ").Append(DimensionLuminousIntensity).Append("\n");
            sb.Append("  DynamicParameterPropertyCodes: ").Append(DynamicParameterPropertyCodes).Append("\n");
            sb.Append("  Example: ").Append(Example).Append("\n");
            sb.Append("  IsDynamic: ").Append(IsDynamic).Append("\n");
            sb.Append("  MaxExclusive: ").Append(MaxExclusive).Append("\n");
            sb.Append("  MaxInclusive: ").Append(MaxInclusive).Append("\n");
            sb.Append("  MethodOfMeasurement: ").Append(MethodOfMeasurement).Append("\n");
            sb.Append("  MinExclusive: ").Append(MinExclusive).Append("\n");
            sb.Append("  MinInclusive: ").Append(MinInclusive).Append("\n");
            sb.Append("  Pattern: ").Append(Pattern).Append("\n");
            sb.Append("  PhysicalQuantity: ").Append(PhysicalQuantity).Append("\n");
            sb.Append("  PossibleValues: ").Append(PossibleValues).Append("\n");
            sb.Append("  PropertyValueKind: ").Append(PropertyValueKind).Append("\n");
            sb.Append("  PropertyRelations: ").Append(PropertyRelations).Append("\n");
            sb.Append("  TextFormat: ").Append(TextFormat).Append("\n");
            sb.Append("  Units: ").Append(Units).Append("\n");
            sb.Append("  ActivationDateUtc: ").Append(ActivationDateUtc).Append("\n");
            sb.Append("  Code: ").Append(Code).Append("\n");
            sb.Append("  CreatorLanguageCode: ").Append(CreatorLanguageCode).Append("\n");
            sb.Append("  CountriesOfUse: ").Append(CountriesOfUse).Append("\n");
            sb.Append("  CountryOfOrigin: ").Append(CountryOfOrigin).Append("\n");
            sb.Append("  DeActivationDateUtc: ").Append(DeActivationDateUtc).Append("\n");
            sb.Append("  Definition: ").Append(Definition).Append("\n");
            sb.Append("  DeprecationExplanation: ").Append(DeprecationExplanation).Append("\n");
            sb.Append("  DocumentReference: ").Append(DocumentReference).Append("\n");
            sb.Append("  Name: ").Append(Name).Append("\n");
            sb.Append("  NamespaceUri: ").Append(NamespaceUri).Append("\n");
            sb.Append("  ReplacedObjectCodes: ").Append(ReplacedObjectCodes).Append("\n");
            sb.Append("  ReplacingObjectCodes: ").Append(ReplacingObjectCodes).Append("\n");
            sb.Append("  RevisionDateUtc: ").Append(RevisionDateUtc).Append("\n");
            sb.Append("  RevisionNumber: ").Append(RevisionNumber).Append("\n");
            sb.Append("  Status: ").Append(Status).Append("\n");
            sb.Append("  SubdivisionsOfUse: ").Append(SubdivisionsOfUse).Append("\n");
            sb.Append("  Uid: ").Append(Uid).Append("\n");
            sb.Append("  VersionDateUtc: ").Append(VersionDateUtc).Append("\n");
            sb.Append("  VersionNumber: ").Append(VersionNumber).Append("\n");
            sb.Append("  VisualRepresentationUri: ").Append(VisualRepresentationUri).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }
  
        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return JsonConvert.SerializeObject(this, Formatting.Indented);
        }

        /// <summary>
        /// Returns true if objects are equal
        /// </summary>
        /// <param name="input">Object to be compared</param>
        /// <returns>Boolean</returns>
        public override bool Equals(object input)
        {
            return this.Equals(input as PropertyContractV2);
        }

        /// <summary>
        /// Returns true if PropertyContractV2 instances are equal
        /// </summary>
        /// <param name="input">Instance of PropertyContractV2 to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PropertyContractV2 input)
        {
            if (input == null)
                return false;

            return 
                (
                    this.Description == input.Description ||
                    (this.Description != null &&
                    this.Description.Equals(input.Description))
                ) && 
                (
                    this.ConnectedPropertyCodes == input.ConnectedPropertyCodes ||
                    this.ConnectedPropertyCodes != null &&
                    input.ConnectedPropertyCodes != null &&
                    this.ConnectedPropertyCodes.SequenceEqual(input.ConnectedPropertyCodes)
                ) && 
                (
                    this.DataType == input.DataType ||
                    (this.DataType != null &&
                    this.DataType.Equals(input.DataType))
                ) && 
                (
                    this.Dimension == input.Dimension ||
                    (this.Dimension != null &&
                    this.Dimension.Equals(input.Dimension))
                ) && 
                (
                    this.DimensionLength == input.DimensionLength ||
                    (this.DimensionLength != null &&
                    this.DimensionLength.Equals(input.DimensionLength))
                ) && 
                (
                    this.DimensionMass == input.DimensionMass ||
                    (this.DimensionMass != null &&
                    this.DimensionMass.Equals(input.DimensionMass))
                ) && 
                (
                    this.DimensionTime == input.DimensionTime ||
                    (this.DimensionTime != null &&
                    this.DimensionTime.Equals(input.DimensionTime))
                ) && 
                (
                    this.DimensionElectricCurrent == input.DimensionElectricCurrent ||
                    (this.DimensionElectricCurrent != null &&
                    this.DimensionElectricCurrent.Equals(input.DimensionElectricCurrent))
                ) && 
                (
                    this.DimensionThermodynamicTemperature == input.DimensionThermodynamicTemperature ||
                    (this.DimensionThermodynamicTemperature != null &&
                    this.DimensionThermodynamicTemperature.Equals(input.DimensionThermodynamicTemperature))
                ) && 
                (
                    this.DimensionAmountOfSubstance == input.DimensionAmountOfSubstance ||
                    (this.DimensionAmountOfSubstance != null &&
                    this.DimensionAmountOfSubstance.Equals(input.DimensionAmountOfSubstance))
                ) && 
                (
                    this.DimensionLuminousIntensity == input.DimensionLuminousIntensity ||
                    (this.DimensionLuminousIntensity != null &&
                    this.DimensionLuminousIntensity.Equals(input.DimensionLuminousIntensity))
                ) && 
                (
                    this.DynamicParameterPropertyCodes == input.DynamicParameterPropertyCodes ||
                    this.DynamicParameterPropertyCodes != null &&
                    input.DynamicParameterPropertyCodes != null &&
                    this.DynamicParameterPropertyCodes.SequenceEqual(input.DynamicParameterPropertyCodes)
                ) && 
                (
                    this.Example == input.Example ||
                    (this.Example != null &&
                    this.Example.Equals(input.Example))
                ) && 
                (
                    this.IsDynamic == input.IsDynamic ||
                    (this.IsDynamic != null &&
                    this.IsDynamic.Equals(input.IsDynamic))
                ) && 
                (
                    this.MaxExclusive == input.MaxExclusive ||
                    (this.MaxExclusive != null &&
                    this.MaxExclusive.Equals(input.MaxExclusive))
                ) && 
                (
                    this.MaxInclusive == input.MaxInclusive ||
                    (this.MaxInclusive != null &&
                    this.MaxInclusive.Equals(input.MaxInclusive))
                ) && 
                (
                    this.MethodOfMeasurement == input.MethodOfMeasurement ||
                    (this.MethodOfMeasurement != null &&
                    this.MethodOfMeasurement.Equals(input.MethodOfMeasurement))
                ) && 
                (
                    this.MinExclusive == input.MinExclusive ||
                    (this.MinExclusive != null &&
                    this.MinExclusive.Equals(input.MinExclusive))
                ) && 
                (
                    this.MinInclusive == input.MinInclusive ||
                    (this.MinInclusive != null &&
                    this.MinInclusive.Equals(input.MinInclusive))
                ) && 
                (
                    this.Pattern == input.Pattern ||
                    (this.Pattern != null &&
                    this.Pattern.Equals(input.Pattern))
                ) && 
                (
                    this.PhysicalQuantity == input.PhysicalQuantity ||
                    (this.PhysicalQuantity != null &&
                    this.PhysicalQuantity.Equals(input.PhysicalQuantity))
                ) && 
                (
                    this.PossibleValues == input.PossibleValues ||
                    this.PossibleValues != null &&
                    input.PossibleValues != null &&
                    this.PossibleValues.SequenceEqual(input.PossibleValues)
                ) && 
                (
                    this.PropertyValueKind == input.PropertyValueKind ||
                    (this.PropertyValueKind != null &&
                    this.PropertyValueKind.Equals(input.PropertyValueKind))
                ) && 
                (
                    this.PropertyRelations == input.PropertyRelations ||
                    this.PropertyRelations != null &&
                    input.PropertyRelations != null &&
                    this.PropertyRelations.SequenceEqual(input.PropertyRelations)
                ) && 
                (
                    this.TextFormat == input.TextFormat ||
                    (this.TextFormat != null &&
                    this.TextFormat.Equals(input.TextFormat))
                ) && 
                (
                    this.Units == input.Units ||
                    this.Units != null &&
                    input.Units != null &&
                    this.Units.SequenceEqual(input.Units)
                ) && 
                (
                    this.ActivationDateUtc == input.ActivationDateUtc ||
                    (this.ActivationDateUtc != null &&
                    this.ActivationDateUtc.Equals(input.ActivationDateUtc))
                ) && 
                (
                    this.Code == input.Code ||
                    (this.Code != null &&
                    this.Code.Equals(input.Code))
                ) && 
                (
                    this.CreatorLanguageCode == input.CreatorLanguageCode ||
                    (this.CreatorLanguageCode != null &&
                    this.CreatorLanguageCode.Equals(input.CreatorLanguageCode))
                ) && 
                (
                    this.CountriesOfUse == input.CountriesOfUse ||
                    this.CountriesOfUse != null &&
                    input.CountriesOfUse != null &&
                    this.CountriesOfUse.SequenceEqual(input.CountriesOfUse)
                ) && 
                (
                    this.CountryOfOrigin == input.CountryOfOrigin ||
                    (this.CountryOfOrigin != null &&
                    this.CountryOfOrigin.Equals(input.CountryOfOrigin))
                ) && 
                (
                    this.DeActivationDateUtc == input.DeActivationDateUtc ||
                    (this.DeActivationDateUtc != null &&
                    this.DeActivationDateUtc.Equals(input.DeActivationDateUtc))
                ) && 
                (
                    this.Definition == input.Definition ||
                    (this.Definition != null &&
                    this.Definition.Equals(input.Definition))
                ) && 
                (
                    this.DeprecationExplanation == input.DeprecationExplanation ||
                    (this.DeprecationExplanation != null &&
                    this.DeprecationExplanation.Equals(input.DeprecationExplanation))
                ) && 
                (
                    this.DocumentReference == input.DocumentReference ||
                    (this.DocumentReference != null &&
                    this.DocumentReference.Equals(input.DocumentReference))
                ) && 
                (
                    this.Name == input.Name ||
                    (this.Name != null &&
                    this.Name.Equals(input.Name))
                ) && 
                (
                    this.NamespaceUri == input.NamespaceUri ||
                    (this.NamespaceUri != null &&
                    this.NamespaceUri.Equals(input.NamespaceUri))
                ) && 
                (
                    this.ReplacedObjectCodes == input.ReplacedObjectCodes ||
                    this.ReplacedObjectCodes != null &&
                    input.ReplacedObjectCodes != null &&
                    this.ReplacedObjectCodes.SequenceEqual(input.ReplacedObjectCodes)
                ) && 
                (
                    this.ReplacingObjectCodes == input.ReplacingObjectCodes ||
                    this.ReplacingObjectCodes != null &&
                    input.ReplacingObjectCodes != null &&
                    this.ReplacingObjectCodes.SequenceEqual(input.ReplacingObjectCodes)
                ) && 
                (
                    this.RevisionDateUtc == input.RevisionDateUtc ||
                    (this.RevisionDateUtc != null &&
                    this.RevisionDateUtc.Equals(input.RevisionDateUtc))
                ) && 
                (
                    this.RevisionNumber == input.RevisionNumber ||
                    (this.RevisionNumber != null &&
                    this.RevisionNumber.Equals(input.RevisionNumber))
                ) && 
                (
                    this.Status == input.Status ||
                    (this.Status != null &&
                    this.Status.Equals(input.Status))
                ) && 
                (
                    this.SubdivisionsOfUse == input.SubdivisionsOfUse ||
                    this.SubdivisionsOfUse != null &&
                    input.SubdivisionsOfUse != null &&
                    this.SubdivisionsOfUse.SequenceEqual(input.SubdivisionsOfUse)
                ) && 
                (
                    this.Uid == input.Uid ||
                    (this.Uid != null &&
                    this.Uid.Equals(input.Uid))
                ) && 
                (
                    this.VersionDateUtc == input.VersionDateUtc ||
                    (this.VersionDateUtc != null &&
                    this.VersionDateUtc.Equals(input.VersionDateUtc))
                ) && 
                (
                    this.VersionNumber == input.VersionNumber ||
                    (this.VersionNumber != null &&
                    this.VersionNumber.Equals(input.VersionNumber))
                ) && 
                (
                    this.VisualRepresentationUri == input.VisualRepresentationUri ||
                    (this.VisualRepresentationUri != null &&
                    this.VisualRepresentationUri.Equals(input.VisualRepresentationUri))
                );
        }

        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;
                if (this.Description != null)
                    hashCode = hashCode * 59 + this.Description.GetHashCode();
                if (this.ConnectedPropertyCodes != null)
                    hashCode = hashCode * 59 + this.ConnectedPropertyCodes.GetHashCode();
                if (this.DataType != null)
                    hashCode = hashCode * 59 + this.DataType.GetHashCode();
                if (this.Dimension != null)
                    hashCode = hashCode * 59 + this.Dimension.GetHashCode();
                if (this.DimensionLength != null)
                    hashCode = hashCode * 59 + this.DimensionLength.GetHashCode();
                if (this.DimensionMass != null)
                    hashCode = hashCode * 59 + this.DimensionMass.GetHashCode();
                if (this.DimensionTime != null)
                    hashCode = hashCode * 59 + this.DimensionTime.GetHashCode();
                if (this.DimensionElectricCurrent != null)
                    hashCode = hashCode * 59 + this.DimensionElectricCurrent.GetHashCode();
                if (this.DimensionThermodynamicTemperature != null)
                    hashCode = hashCode * 59 + this.DimensionThermodynamicTemperature.GetHashCode();
                if (this.DimensionAmountOfSubstance != null)
                    hashCode = hashCode * 59 + this.DimensionAmountOfSubstance.GetHashCode();
                if (this.DimensionLuminousIntensity != null)
                    hashCode = hashCode * 59 + this.DimensionLuminousIntensity.GetHashCode();
                if (this.DynamicParameterPropertyCodes != null)
                    hashCode = hashCode * 59 + this.DynamicParameterPropertyCodes.GetHashCode();
                if (this.Example != null)
                    hashCode = hashCode * 59 + this.Example.GetHashCode();
                if (this.IsDynamic != null)
                    hashCode = hashCode * 59 + this.IsDynamic.GetHashCode();
                if (this.MaxExclusive != null)
                    hashCode = hashCode * 59 + this.MaxExclusive.GetHashCode();
                if (this.MaxInclusive != null)
                    hashCode = hashCode * 59 + this.MaxInclusive.GetHashCode();
                if (this.MethodOfMeasurement != null)
                    hashCode = hashCode * 59 + this.MethodOfMeasurement.GetHashCode();
                if (this.MinExclusive != null)
                    hashCode = hashCode * 59 + this.MinExclusive.GetHashCode();
                if (this.MinInclusive != null)
                    hashCode = hashCode * 59 + this.MinInclusive.GetHashCode();
                if (this.Pattern != null)
                    hashCode = hashCode * 59 + this.Pattern.GetHashCode();
                if (this.PhysicalQuantity != null)
                    hashCode = hashCode * 59 + this.PhysicalQuantity.GetHashCode();
                if (this.PossibleValues != null)
                    hashCode = hashCode * 59 + this.PossibleValues.GetHashCode();
                if (this.PropertyValueKind != null)
                    hashCode = hashCode * 59 + this.PropertyValueKind.GetHashCode();
                if (this.PropertyRelations != null)
                    hashCode = hashCode * 59 + this.PropertyRelations.GetHashCode();
                if (this.TextFormat != null)
                    hashCode = hashCode * 59 + this.TextFormat.GetHashCode();
                if (this.Units != null)
                    hashCode = hashCode * 59 + this.Units.GetHashCode();
                if (this.ActivationDateUtc != null)
                    hashCode = hashCode * 59 + this.ActivationDateUtc.GetHashCode();
                if (this.Code != null)
                    hashCode = hashCode * 59 + this.Code.GetHashCode();
                if (this.CreatorLanguageCode != null)
                    hashCode = hashCode * 59 + this.CreatorLanguageCode.GetHashCode();
                if (this.CountriesOfUse != null)
                    hashCode = hashCode * 59 + this.CountriesOfUse.GetHashCode();
                if (this.CountryOfOrigin != null)
                    hashCode = hashCode * 59 + this.CountryOfOrigin.GetHashCode();
                if (this.DeActivationDateUtc != null)
                    hashCode = hashCode * 59 + this.DeActivationDateUtc.GetHashCode();
                if (this.Definition != null)
                    hashCode = hashCode * 59 + this.Definition.GetHashCode();
                if (this.DeprecationExplanation != null)
                    hashCode = hashCode * 59 + this.DeprecationExplanation.GetHashCode();
                if (this.DocumentReference != null)
                    hashCode = hashCode * 59 + this.DocumentReference.GetHashCode();
                if (this.Name != null)
                    hashCode = hashCode * 59 + this.Name.GetHashCode();
                if (this.NamespaceUri != null)
                    hashCode = hashCode * 59 + this.NamespaceUri.GetHashCode();
                if (this.ReplacedObjectCodes != null)
                    hashCode = hashCode * 59 + this.ReplacedObjectCodes.GetHashCode();
                if (this.ReplacingObjectCodes != null)
                    hashCode = hashCode * 59 + this.ReplacingObjectCodes.GetHashCode();
                if (this.RevisionDateUtc != null)
                    hashCode = hashCode * 59 + this.RevisionDateUtc.GetHashCode();
                if (this.RevisionNumber != null)
                    hashCode = hashCode * 59 + this.RevisionNumber.GetHashCode();
                if (this.Status != null)
                    hashCode = hashCode * 59 + this.Status.GetHashCode();
                if (this.SubdivisionsOfUse != null)
                    hashCode = hashCode * 59 + this.SubdivisionsOfUse.GetHashCode();
                if (this.Uid != null)
                    hashCode = hashCode * 59 + this.Uid.GetHashCode();
                if (this.VersionDateUtc != null)
                    hashCode = hashCode * 59 + this.VersionDateUtc.GetHashCode();
                if (this.VersionNumber != null)
                    hashCode = hashCode * 59 + this.VersionNumber.GetHashCode();
                if (this.VisualRepresentationUri != null)
                    hashCode = hashCode * 59 + this.VisualRepresentationUri.GetHashCode();
                return hashCode;
            }
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }
}
