Class: Azure::CognitiveServices::CustomSearch::V1_0::Models::QueryContext

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/1.0/generated/azure_cognitiveservices_customsearch/models/query_context.rb

Overview

Defines the query context that Bing used for the request.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#adult_intentBoolean

query has adult intent. The value is true if the query has adult intent; otherwise, false.

Returns:

  • (Boolean)

    A Boolean value that indicates whether the specified



37
38
39
# File 'lib/1.0/generated/azure_cognitiveservices_customsearch/models/query_context.rb', line 37

def adult_intent
  @adult_intent
end

#alteration_override_queryString

original string. For example, if the query string is “saling downwind”, the override query string will be “+saling downwind”. Remember to encode the query string which results in “%2Bsaling+downwind”. This field is included only if the original query string contains a spelling mistake.

Returns:

  • (String)

    The query string to use to force Bing to use the



32
33
34
# File 'lib/1.0/generated/azure_cognitiveservices_customsearch/models/query_context.rb', line 32

def alteration_override_query
  @alteration_override_query
end

#altered_queryString

Bing uses the altered query string if the original query string contained spelling mistakes. For example, if the query string is “saling downwind”, the altered query string will be “sailing downwind”. This field is included only if the original query string contains a spelling mistake.

Returns:

  • (String)

    The query string used by Bing to perform the query.



24
25
26
# File 'lib/1.0/generated/azure_cognitiveservices_customsearch/models/query_context.rb', line 24

def altered_query
  @altered_query
end

#original_queryString

Returns The query string as specified in the request.

Returns:

  • (String)

    The query string as specified in the request.



16
17
18
# File 'lib/1.0/generated/azure_cognitiveservices_customsearch/models/query_context.rb', line 16

def original_query
  @original_query
end

Class Method Details

.mapperObject

Mapper for QueryContext class as Ruby Hash. This will be used for serialization/deserialization.



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
# File 'lib/1.0/generated/azure_cognitiveservices_customsearch/models/query_context.rb', line 44

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'QueryContext',
    type: {
      name: 'Composite',
      class_name: 'QueryContext',
      model_properties: {
        original_query: {
          client_side_validation: true,
          required: true,
          serialized_name: 'originalQuery',
          type: {
            name: 'String'
          }
        },
        altered_query: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'alteredQuery',
          type: {
            name: 'String'
          }
        },
        alteration_override_query: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'alterationOverrideQuery',
          type: {
            name: 'String'
          }
        },
        adult_intent: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'adultIntent',
          type: {
            name: 'Boolean'
          }
        }
      }
    }
  }
end