class Azure::CognitiveServices::WebSearch::V1_0::Models::Computation
Defines an expression and its answer
Attributes
@return [String] The math or conversion expression. If the query contains a request to convert units of measure (for example, meters to feet), this field contains the from units and value contains the to units. If the query contains a mathematical expression such as 2+2, this field contains the expression and value contains the answer. Note that mathematical expressions may be normalized. For example, if the query was sqrt(4^2+8^2), the normalized expression may be sqrt((4^2)+(8^2)). If the user's query is a math question and the textDecorations query parameter is set to true, the expression string may include formatting markers. For example, if the user's query is log(2), the normalized expression includes the subscript markers. For more information, see Hit Highlighting.
@return [String] The expression's answer.
Private Class Methods
Mapper for Computation
class as Ruby Hash. This will be used for serialization/deserialization.
# File lib/1.0/generated/azure_cognitiveservices_websearch/models/computation.rb, line 44 def self.mapper() { client_side_validation: true, required: false, serialized_name: 'Computation', type: { name: 'Composite', class_name: 'Computation', model_properties: { _type: { client_side_validation: true, required: true, serialized_name: '_type', type: { name: 'String' } }, id: { client_side_validation: true, required: false, read_only: true, serialized_name: 'id', type: { name: 'String' } }, web_search_url: { client_side_validation: true, required: false, read_only: true, serialized_name: 'webSearchUrl', type: { name: 'String' } }, follow_up_queries: { client_side_validation: true, required: false, read_only: true, serialized_name: 'followUpQueries', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'QueryElementType', type: { name: 'Composite', class_name: 'Query' } } } }, expression: { client_side_validation: true, required: true, serialized_name: 'expression', type: { name: 'String' } }, value: { client_side_validation: true, required: true, serialized_name: 'value', type: { name: 'String' } } } } } end
# File lib/1.0/generated/azure_cognitiveservices_websearch/models/computation.rb, line 16 def initialize @_type = "Computation" end