azure_cognitiveservices_websearch 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/1.0/generated/azure_cognitiveservices_websearch.rb +69 -0
  4. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/answer.rb +90 -0
  5. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/answer_type.rb +22 -0
  6. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/article.rb +163 -0
  7. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/computation.rb +119 -0
  8. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/creative_work.rb +160 -0
  9. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/error.rb +116 -0
  10. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/error_code.rb +20 -0
  11. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/error_response.rb +89 -0
  12. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/error_sub_code.rb +25 -0
  13. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/freshness.rb +17 -0
  14. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/identifiable.rb +62 -0
  15. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/image_object.rb +199 -0
  16. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/images.rb +210 -0
  17. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/intangible.rb +115 -0
  18. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/media_object.rb +200 -0
  19. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/news.rb +148 -0
  20. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/news_article.rb +159 -0
  21. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/places.rb +135 -0
  22. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/query.rb +100 -0
  23. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/query_context.rb +126 -0
  24. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_group.rb +56 -0
  25. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_item.rb +116 -0
  26. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/ranking_ranking_response.rb +79 -0
  27. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/related_searches_related_search_answer.rb +135 -0
  28. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/response.rb +72 -0
  29. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/response_base.rb +71 -0
  30. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/safe_search.rb +17 -0
  31. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/search_response.rb +212 -0
  32. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/search_results_answer.rb +126 -0
  33. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/spell_suggestions.rb +141 -0
  34. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/structured_value.rb +115 -0
  35. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/text_format.rb +16 -0
  36. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/thing.rb +131 -0
  37. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/time_zone.rb +157 -0
  38. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/time_zone_time_zone_information.rb +70 -0
  39. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/video_object.rb +295 -0
  40. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/videos.rb +189 -0
  41. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/web_meta_tag.rb +59 -0
  42. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/web_page.rb +251 -0
  43. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/web_web_answer.rb +149 -0
  44. data/lib/1.0/generated/azure_cognitiveservices_websearch/models/web_web_grouping.rb +66 -0
  45. data/lib/1.0/generated/azure_cognitiveservices_websearch/module_definition.rb +9 -0
  46. data/lib/1.0/generated/azure_cognitiveservices_websearch/web.rb +775 -0
  47. data/lib/1.0/generated/azure_cognitiveservices_websearch/web_search_client.rb +127 -0
  48. data/lib/azure_cognitiveservices_websearch.rb +6 -0
  49. data/lib/module_definition.rb +7 -0
  50. data/lib/profiles/latest/modules/websearch_profile_module.rb +223 -0
  51. data/lib/profiles/latest/websearch_latest_profile_client.rb +38 -0
  52. data/lib/profiles/latest/websearch_module_definition.rb +8 -0
  53. data/lib/version.rb +7 -0
  54. metadata +171 -0
@@ -0,0 +1,135 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::WebSearch::V1_0
7
+ module Models
8
+ #
9
+ # Defines a local entity answer.
10
+ #
11
+ class Places < SearchResultsAnswer
12
+
13
+ include MsRestAzure
14
+
15
+
16
+ def initialize
17
+ @_type = "Places"
18
+ end
19
+
20
+ attr_accessor :_type
21
+
22
+ # @return [Array<Thing>] A list of local entities, such as restaurants or
23
+ # hotels.
24
+ attr_accessor :value
25
+
26
+
27
+ #
28
+ # Mapper for Places class as Ruby Hash.
29
+ # This will be used for serialization/deserialization.
30
+ #
31
+ def self.mapper()
32
+ {
33
+ client_side_validation: true,
34
+ required: false,
35
+ serialized_name: 'Places',
36
+ type: {
37
+ name: 'Composite',
38
+ class_name: 'Places',
39
+ model_properties: {
40
+ _type: {
41
+ client_side_validation: true,
42
+ required: true,
43
+ serialized_name: '_type',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ },
48
+ id: {
49
+ client_side_validation: true,
50
+ required: false,
51
+ read_only: true,
52
+ serialized_name: 'id',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ },
57
+ web_search_url: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ read_only: true,
61
+ serialized_name: 'webSearchUrl',
62
+ type: {
63
+ name: 'String'
64
+ }
65
+ },
66
+ follow_up_queries: {
67
+ client_side_validation: true,
68
+ required: false,
69
+ read_only: true,
70
+ serialized_name: 'followUpQueries',
71
+ type: {
72
+ name: 'Sequence',
73
+ element: {
74
+ client_side_validation: true,
75
+ required: false,
76
+ serialized_name: 'QueryElementType',
77
+ type: {
78
+ name: 'Composite',
79
+ class_name: 'Query'
80
+ }
81
+ }
82
+ }
83
+ },
84
+ query_context: {
85
+ client_side_validation: true,
86
+ required: false,
87
+ read_only: true,
88
+ serialized_name: 'queryContext',
89
+ type: {
90
+ name: 'Composite',
91
+ class_name: 'QueryContext'
92
+ }
93
+ },
94
+ total_estimated_matches: {
95
+ client_side_validation: true,
96
+ required: false,
97
+ read_only: true,
98
+ serialized_name: 'totalEstimatedMatches',
99
+ type: {
100
+ name: 'Number'
101
+ }
102
+ },
103
+ is_family_friendly: {
104
+ client_side_validation: true,
105
+ required: false,
106
+ read_only: true,
107
+ serialized_name: 'isFamilyFriendly',
108
+ type: {
109
+ name: 'Boolean'
110
+ }
111
+ },
112
+ value: {
113
+ client_side_validation: true,
114
+ required: true,
115
+ serialized_name: 'value',
116
+ type: {
117
+ name: 'Sequence',
118
+ element: {
119
+ client_side_validation: true,
120
+ required: false,
121
+ serialized_name: 'ThingElementType',
122
+ type: {
123
+ name: 'Composite',
124
+ class_name: 'Thing'
125
+ }
126
+ }
127
+ }
128
+ }
129
+ }
130
+ }
131
+ }
132
+ end
133
+ end
134
+ end
135
+ end
@@ -0,0 +1,100 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::WebSearch::V1_0
7
+ module Models
8
+ #
9
+ # Defines a search query.
10
+ #
11
+ class Query
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The query string. Use this string as the query term in
16
+ # a new search request.
17
+ attr_accessor :text
18
+
19
+ # @return [String] The display version of the query term. This version of
20
+ # the query term may contain special characters that highlight the search
21
+ # term found in the query string. The string contains the highlighting
22
+ # characters only if the query enabled hit highlighting
23
+ attr_accessor :display_text
24
+
25
+ # @return [String] The URL that takes the user to the Bing search results
26
+ # page for the query.Only related search results include this field.
27
+ attr_accessor :web_search_url
28
+
29
+ # @return [String]
30
+ attr_accessor :search_link
31
+
32
+ # @return [ImageObject]
33
+ attr_accessor :thumbnail
34
+
35
+
36
+ #
37
+ # Mapper for Query class as Ruby Hash.
38
+ # This will be used for serialization/deserialization.
39
+ #
40
+ def self.mapper()
41
+ {
42
+ client_side_validation: true,
43
+ required: false,
44
+ serialized_name: 'Query',
45
+ type: {
46
+ name: 'Composite',
47
+ class_name: 'Query',
48
+ model_properties: {
49
+ text: {
50
+ client_side_validation: true,
51
+ required: true,
52
+ serialized_name: 'text',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ },
57
+ display_text: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ read_only: true,
61
+ serialized_name: 'displayText',
62
+ type: {
63
+ name: 'String'
64
+ }
65
+ },
66
+ web_search_url: {
67
+ client_side_validation: true,
68
+ required: false,
69
+ read_only: true,
70
+ serialized_name: 'webSearchUrl',
71
+ type: {
72
+ name: 'String'
73
+ }
74
+ },
75
+ search_link: {
76
+ client_side_validation: true,
77
+ required: false,
78
+ read_only: true,
79
+ serialized_name: 'searchLink',
80
+ type: {
81
+ name: 'String'
82
+ }
83
+ },
84
+ thumbnail: {
85
+ client_side_validation: true,
86
+ required: false,
87
+ read_only: true,
88
+ serialized_name: 'thumbnail',
89
+ type: {
90
+ name: 'Composite',
91
+ class_name: 'ImageObject'
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ end
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,126 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::WebSearch::V1_0
7
+ module Models
8
+ #
9
+ # Defines the query context that Bing used for the request.
10
+ #
11
+ class QueryContext
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The query string as specified in the request.
16
+ attr_accessor :original_query
17
+
18
+ # @return [String] The query string used by Bing to perform the query.
19
+ # Bing uses the altered query string if the original query string
20
+ # contained spelling mistakes. For example, if the query string is
21
+ # "saling downwind", the altered query string will be "sailing downwind".
22
+ # This field is included only if the original query string contains a
23
+ # spelling mistake.
24
+ attr_accessor :altered_query
25
+
26
+ # @return [String] The query string to use to force Bing to use the
27
+ # original string. For example, if the query string is "saling downwind",
28
+ # the override query string will be "+saling downwind". Remember to
29
+ # encode the query string which results in "%2Bsaling+downwind". This
30
+ # field is included only if the original query string contains a spelling
31
+ # mistake.
32
+ attr_accessor :alteration_override_query
33
+
34
+ # @return [Boolean] A Boolean value that indicates whether the specified
35
+ # query has adult intent. The value is true if the query has adult
36
+ # intent; otherwise, false.
37
+ attr_accessor :adult_intent
38
+
39
+ # @return [Boolean] A Boolean value that indicates whether Bing requires
40
+ # the user's location to provide accurate results. If you specified the
41
+ # user's location by using the X-MSEdge-ClientIP and X-Search-Location
42
+ # headers, you can ignore this field. For location aware queries, such as
43
+ # "today's weather" or "restaurants near me" that need the user's
44
+ # location to provide accurate results, this field is set to true. For
45
+ # location aware queries that include the location (for example, "Seattle
46
+ # weather"), this field is set to false. This field is also set to false
47
+ # for queries that are not location aware, such as "best sellers".
48
+ attr_accessor :ask_user_for_location
49
+
50
+ # @return [Boolean]
51
+ attr_accessor :is_transactional
52
+
53
+
54
+ #
55
+ # Mapper for QueryContext class as Ruby Hash.
56
+ # This will be used for serialization/deserialization.
57
+ #
58
+ def self.mapper()
59
+ {
60
+ client_side_validation: true,
61
+ required: false,
62
+ serialized_name: 'QueryContext',
63
+ type: {
64
+ name: 'Composite',
65
+ class_name: 'QueryContext',
66
+ model_properties: {
67
+ original_query: {
68
+ client_side_validation: true,
69
+ required: true,
70
+ serialized_name: 'originalQuery',
71
+ type: {
72
+ name: 'String'
73
+ }
74
+ },
75
+ altered_query: {
76
+ client_side_validation: true,
77
+ required: false,
78
+ read_only: true,
79
+ serialized_name: 'alteredQuery',
80
+ type: {
81
+ name: 'String'
82
+ }
83
+ },
84
+ alteration_override_query: {
85
+ client_side_validation: true,
86
+ required: false,
87
+ read_only: true,
88
+ serialized_name: 'alterationOverrideQuery',
89
+ type: {
90
+ name: 'String'
91
+ }
92
+ },
93
+ adult_intent: {
94
+ client_side_validation: true,
95
+ required: false,
96
+ read_only: true,
97
+ serialized_name: 'adultIntent',
98
+ type: {
99
+ name: 'Boolean'
100
+ }
101
+ },
102
+ ask_user_for_location: {
103
+ client_side_validation: true,
104
+ required: false,
105
+ read_only: true,
106
+ serialized_name: 'askUserForLocation',
107
+ type: {
108
+ name: 'Boolean'
109
+ }
110
+ },
111
+ is_transactional: {
112
+ client_side_validation: true,
113
+ required: false,
114
+ read_only: true,
115
+ serialized_name: 'isTransactional',
116
+ type: {
117
+ name: 'Boolean'
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
123
+ end
124
+ end
125
+ end
126
+ end
@@ -0,0 +1,56 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::WebSearch::V1_0
7
+ module Models
8
+ #
9
+ # Defines a search results group, such as mainline.
10
+ #
11
+ class RankingRankingGroup
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<RankingRankingItem>] A list of search result items to
16
+ # display in the group.
17
+ attr_accessor :items
18
+
19
+
20
+ #
21
+ # Mapper for RankingRankingGroup class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ client_side_validation: true,
27
+ required: false,
28
+ serialized_name: 'Ranking/RankingGroup',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'RankingRankingGroup',
32
+ model_properties: {
33
+ items: {
34
+ client_side_validation: true,
35
+ required: true,
36
+ serialized_name: 'items',
37
+ type: {
38
+ name: 'Sequence',
39
+ element: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'RankingRankingItemElementType',
43
+ type: {
44
+ name: 'Composite',
45
+ class_name: 'RankingRankingItem'
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,116 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::WebSearch::V1_0
7
+ module Models
8
+ #
9
+ # Defines a search result item to display
10
+ #
11
+ class RankingRankingItem
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [AnswerType] The answer that contains the item to display. Use
16
+ # the type to find the answer in the SearchResponse object. The type is
17
+ # the name of a SearchResponse field. Possible values include:
18
+ # 'WebPages', 'Images', 'SpellSuggestions', 'News', 'RelatedSearches',
19
+ # 'Videos', 'Computation', 'TimeZone'. Default value: 'WebPages' .
20
+ attr_accessor :answer_type
21
+
22
+ # @return [Integer] A zero-based index of the item in the answer.If the
23
+ # item does not include this field, display all items in the answer. For
24
+ # example, display all news articles in the News answer.
25
+ attr_accessor :result_index
26
+
27
+ # @return [Identifiable] The ID that identifies either an answer to
28
+ # display or an item of an answer to display. If the ID identifies an
29
+ # answer, display all items of the answer.
30
+ attr_accessor :value
31
+
32
+ # @return [Integer]
33
+ attr_accessor :html_index
34
+
35
+ # @return [Integer]
36
+ attr_accessor :textual_index
37
+
38
+ # @return [Integer]
39
+ attr_accessor :screenshot_index
40
+
41
+
42
+ #
43
+ # Mapper for RankingRankingItem class as Ruby Hash.
44
+ # This will be used for serialization/deserialization.
45
+ #
46
+ def self.mapper()
47
+ {
48
+ client_side_validation: true,
49
+ required: false,
50
+ serialized_name: 'Ranking/RankingItem',
51
+ type: {
52
+ name: 'Composite',
53
+ class_name: 'RankingRankingItem',
54
+ model_properties: {
55
+ answer_type: {
56
+ client_side_validation: true,
57
+ required: true,
58
+ serialized_name: 'answerType',
59
+ default_value: 'WebPages',
60
+ type: {
61
+ name: 'String'
62
+ }
63
+ },
64
+ result_index: {
65
+ client_side_validation: true,
66
+ required: false,
67
+ read_only: true,
68
+ serialized_name: 'resultIndex',
69
+ type: {
70
+ name: 'Number'
71
+ }
72
+ },
73
+ value: {
74
+ client_side_validation: true,
75
+ required: false,
76
+ read_only: true,
77
+ serialized_name: 'value',
78
+ type: {
79
+ name: 'Composite',
80
+ class_name: 'Identifiable'
81
+ }
82
+ },
83
+ html_index: {
84
+ client_side_validation: true,
85
+ required: false,
86
+ read_only: true,
87
+ serialized_name: 'htmlIndex',
88
+ type: {
89
+ name: 'Number'
90
+ }
91
+ },
92
+ textual_index: {
93
+ client_side_validation: true,
94
+ required: false,
95
+ read_only: true,
96
+ serialized_name: 'textualIndex',
97
+ type: {
98
+ name: 'Number'
99
+ }
100
+ },
101
+ screenshot_index: {
102
+ client_side_validation: true,
103
+ required: false,
104
+ read_only: true,
105
+ serialized_name: 'screenshotIndex',
106
+ type: {
107
+ name: 'Number'
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ end
114
+ end
115
+ end
116
+ end