Class: Azure::CognitiveServices::CustomSearch::V1_0::Models::QueryContext
- Inherits:
-
Object
- Object
- Azure::CognitiveServices::CustomSearch::V1_0::Models::QueryContext
- 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
-
#adult_intent ⇒ Boolean
query has adult intent.
-
#alteration_override_query ⇒ String
original string.
-
#altered_query ⇒ String
Bing uses the altered query string if the original query string contained spelling mistakes.
-
#original_query ⇒ String
The query string as specified in the request.
Class Method Summary collapse
-
.mapper ⇒ Object
Mapper for QueryContext class as Ruby Hash.
Instance Attribute Details
#adult_intent ⇒ Boolean
query has adult intent. The value is true if the query has adult intent; otherwise, false.
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_query ⇒ String
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.
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_query ⇒ String
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.
24 25 26 |
# File 'lib/1.0/generated/azure_cognitiveservices_customsearch/models/query_context.rb', line 24 def altered_query @altered_query end |
#original_query ⇒ String
Returns 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
.mapper ⇒ Object
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 |