Class: ContextDev::Models::AIAIQueryResponse::DataExtracted

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/ai_ai_query_response.rb

Defined Under Namespace

Modules: DatapointValue

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(datapoint_name: nil, datapoint_value: nil) ⇒ Object

Some parameter documentations has been truncated, see ContextDev::Models::AIAIQueryResponse::DataExtracted for more details.

Parameters:

  • datapoint_name (String) (defaults to: nil)

    Name of the extracted data point

  • datapoint_value (String, Float, Boolean, Array<String>, Array<Float>, Array<Object>) (defaults to: nil)

    Value of the extracted data point. Can be a primitive type, an array of primitiv



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/context_dev/models/ai_ai_query_response.rb', line 41

class DataExtracted < ContextDev::Internal::Type::BaseModel
  # @!attribute datapoint_name
  #   Name of the extracted data point
  #
  #   @return [String, nil]
  optional :datapoint_name, String

  # @!attribute datapoint_value
  #   Value of the extracted data point. Can be a primitive type, an array of
  #   primitives, or an array of objects when datapoint_list_type is 'object'.
  #
  #   @return [String, Float, Boolean, Array<String>, Array<Float>, Array<Object>, nil]
  optional :datapoint_value,
           union: -> { ContextDev::Models::AIAIQueryResponse::DataExtracted::DatapointValue }

  # @!method initialize(datapoint_name: nil, datapoint_value: nil)
  #   Some parameter documentations has been truncated, see
  #   {ContextDev::Models::AIAIQueryResponse::DataExtracted} for more details.
  #
  #   @param datapoint_name [String] Name of the extracted data point
  #
  #   @param datapoint_value [String, Float, Boolean, Array<String>, Array<Float>, Array<Object>] Value of the extracted data point. Can be a primitive type, an array of primitiv

  # Value of the extracted data point. Can be a primitive type, an array of
  # primitives, or an array of objects when datapoint_list_type is 'object'.
  #
  # @see ContextDev::Models::AIAIQueryResponse::DataExtracted#datapoint_value
  module DatapointValue
    extend ContextDev::Internal::Type::Union

    variant String

    variant Float

    variant ContextDev::Internal::Type::Boolean

    variant -> { ContextDev::Models::AIAIQueryResponse::DataExtracted::DatapointValue::StringArray }

    variant -> { ContextDev::Models::AIAIQueryResponse::DataExtracted::DatapointValue::FloatArray }

    variant -> { ContextDev::Models::AIAIQueryResponse::DataExtracted::DatapointValue::UnionMember5Array }

    # @!method self.variants
    #   @return [Array(String, Float, Boolean, Array<String>, Array<Float>, Array<Object>)]

    # @type [ContextDev::Internal::Type::Converter]
    StringArray = ContextDev::Internal::Type::ArrayOf[String]

    # @type [ContextDev::Internal::Type::Converter]
    FloatArray = ContextDev::Internal::Type::ArrayOf[Float]

    # @type [ContextDev::Internal::Type::Converter]
    UnionMember5Array = ContextDev::Internal::Type::ArrayOf[ContextDev::Internal::Type::Unknown]
  end
end

Instance Attribute Details

#datapoint_nameString?

Name of the extracted data point

Returns:

  • (String, nil)


46
# File 'lib/context_dev/models/ai_ai_query_response.rb', line 46

optional :datapoint_name, String

#datapoint_valueString, ...

Value of the extracted data point. Can be a primitive type, an array of primitives, or an array of objects when datapoint_list_type is ‘object’.

Returns:

  • (String, Float, Boolean, Array<String>, Array<Float>, Array<Object>, nil)


53
54
# File 'lib/context_dev/models/ai_ai_query_response.rb', line 53

optional :datapoint_value,
union: -> { ContextDev::Models::AIAIQueryResponse::DataExtracted::DatapointValue }