/// <summary> /// Returns a JSON representation of this instance. /// </summary> /// <returns>JObject</returns> public SetType(dynamic data) : base((object)data) { if (data == null) { return; } this.ElementType = FieldTypeFactory.Create(data); }
/// <summary> /// Initializes this instance with JSON data from an API response. /// </summary> /// <param name="data">JSON object</param> public FieldDefinition(dynamic data) { if (data == null) { return; } TextInputHint?inputHint; this.Type = FieldTypeFactory.Create(data.type); this.Name = data.name; this.Label = new LocalizedString(data.label); this.Required = data.required; this.InputHint = Helper.TryGetEnumByEnumMemberAttribute <TextInputHint?>((string)data.inputHint, out inputHint) ? inputHint : null; }