azure_cognitiveservices_autosuggest 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest.rb +46 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/autosuggest_client.rb +700 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/action.rb +380 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/answer.rb +131 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/creative_work.rb +371 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/error.rb +109 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/error_code.rb +20 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/error_response.rb +154 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/identifiable.rb +62 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/query_context.rb +136 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/response.rb +150 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/response_base.rb +55 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/response_format.rb +16 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/safe_search.rb +17 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/scenario_type.rb +21 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/search_action.rb +407 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/search_kind.rb +20 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/search_results_answer.rb +146 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/suggestions.rb +166 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/suggestions_suggestion_group.rb +80 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/models/thing.rb +144 -0
- data/lib/1.0/generated/azure_cognitiveservices_autosuggest/module_definition.rb +9 -0
- data/lib/azure_cognitiveservices_autosuggest.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/autosuggest_latest_profile_client.rb +38 -0
- data/lib/profiles/latest/autosuggest_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/autosuggest_profile_module.rb +133 -0
- data/lib/version.rb +7 -0
- metadata +148 -0
@@ -0,0 +1,20 @@
|
|
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::Autosuggest::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for ErrorCode
|
10
|
+
#
|
11
|
+
module ErrorCode
|
12
|
+
None = "None"
|
13
|
+
ServerError = "ServerError"
|
14
|
+
InvalidRequest = "InvalidRequest"
|
15
|
+
RateLimitExceeded = "RateLimitExceeded"
|
16
|
+
InvalidAuthorization = "InvalidAuthorization"
|
17
|
+
InsufficientAuthorization = "InsufficientAuthorization"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,154 @@
|
|
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::Autosuggest::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The top-level response that represents a failed request.
|
10
|
+
#
|
11
|
+
class ErrorResponse < Response
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
|
16
|
+
def initialize
|
17
|
+
@_type = "ErrorResponse"
|
18
|
+
end
|
19
|
+
|
20
|
+
attr_accessor :_type
|
21
|
+
|
22
|
+
# @return [Array<Error>] A list of errors that describe the reasons why
|
23
|
+
# the request failed.
|
24
|
+
attr_accessor :errors
|
25
|
+
|
26
|
+
|
27
|
+
#
|
28
|
+
# Mapper for ErrorResponse 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: 'ErrorResponse',
|
36
|
+
type: {
|
37
|
+
name: 'Composite',
|
38
|
+
class_name: 'ErrorResponse',
|
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
|
+
read_link: {
|
58
|
+
client_side_validation: true,
|
59
|
+
required: false,
|
60
|
+
read_only: true,
|
61
|
+
serialized_name: 'readLink',
|
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
|
+
potential_action: {
|
76
|
+
client_side_validation: true,
|
77
|
+
required: false,
|
78
|
+
read_only: true,
|
79
|
+
serialized_name: 'potentialAction',
|
80
|
+
type: {
|
81
|
+
name: 'Sequence',
|
82
|
+
element: {
|
83
|
+
client_side_validation: true,
|
84
|
+
required: false,
|
85
|
+
serialized_name: 'ActionElementType',
|
86
|
+
type: {
|
87
|
+
name: 'Composite',
|
88
|
+
class_name: 'Action'
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
},
|
93
|
+
immediate_action: {
|
94
|
+
client_side_validation: true,
|
95
|
+
required: false,
|
96
|
+
read_only: true,
|
97
|
+
serialized_name: 'immediateAction',
|
98
|
+
type: {
|
99
|
+
name: 'Sequence',
|
100
|
+
element: {
|
101
|
+
client_side_validation: true,
|
102
|
+
required: false,
|
103
|
+
serialized_name: 'ActionElementType',
|
104
|
+
type: {
|
105
|
+
name: 'Composite',
|
106
|
+
class_name: 'Action'
|
107
|
+
}
|
108
|
+
}
|
109
|
+
}
|
110
|
+
},
|
111
|
+
preferred_clickthrough_url: {
|
112
|
+
client_side_validation: true,
|
113
|
+
required: false,
|
114
|
+
read_only: true,
|
115
|
+
serialized_name: 'preferredClickthroughUrl',
|
116
|
+
type: {
|
117
|
+
name: 'String'
|
118
|
+
}
|
119
|
+
},
|
120
|
+
adaptive_card: {
|
121
|
+
client_side_validation: true,
|
122
|
+
required: false,
|
123
|
+
read_only: true,
|
124
|
+
serialized_name: 'adaptiveCard',
|
125
|
+
type: {
|
126
|
+
name: 'String'
|
127
|
+
}
|
128
|
+
},
|
129
|
+
errors: {
|
130
|
+
client_side_validation: true,
|
131
|
+
required: true,
|
132
|
+
serialized_name: 'errors',
|
133
|
+
type: {
|
134
|
+
name: 'Sequence',
|
135
|
+
element: {
|
136
|
+
client_side_validation: true,
|
137
|
+
required: false,
|
138
|
+
serialized_name: 'ErrorElementType',
|
139
|
+
type: {
|
140
|
+
name: 'Composite',
|
141
|
+
polymorphic_discriminator: '_type',
|
142
|
+
uber_parent: 'Error',
|
143
|
+
class_name: 'Error'
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
@@ -0,0 +1,62 @@
|
|
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::Autosuggest::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines the identity of a resource.
|
10
|
+
#
|
11
|
+
class Identifiable < ResponseBase
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
|
16
|
+
def initialize
|
17
|
+
@_type = "Identifiable"
|
18
|
+
end
|
19
|
+
|
20
|
+
attr_accessor :_type
|
21
|
+
|
22
|
+
# @return [String] A String identifier.
|
23
|
+
attr_accessor :id
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for Identifiable class as Ruby Hash.
|
28
|
+
# This will be used for serialization/deserialization.
|
29
|
+
#
|
30
|
+
def self.mapper()
|
31
|
+
{
|
32
|
+
client_side_validation: true,
|
33
|
+
required: false,
|
34
|
+
serialized_name: 'Identifiable',
|
35
|
+
type: {
|
36
|
+
name: 'Composite',
|
37
|
+
class_name: 'Identifiable',
|
38
|
+
model_properties: {
|
39
|
+
_type: {
|
40
|
+
client_side_validation: true,
|
41
|
+
required: true,
|
42
|
+
serialized_name: '_type',
|
43
|
+
type: {
|
44
|
+
name: 'String'
|
45
|
+
}
|
46
|
+
},
|
47
|
+
id: {
|
48
|
+
client_side_validation: true,
|
49
|
+
required: false,
|
50
|
+
read_only: true,
|
51
|
+
serialized_name: 'id',
|
52
|
+
type: {
|
53
|
+
name: 'String'
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,136 @@
|
|
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::Autosuggest::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
|
+
@@discriminatorMap = Hash.new
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
@_type = "QueryContext"
|
19
|
+
end
|
20
|
+
|
21
|
+
attr_accessor :_type
|
22
|
+
|
23
|
+
# @return [String] The query string as specified in the request.
|
24
|
+
attr_accessor :original_query
|
25
|
+
|
26
|
+
# @return [String] The query string used by Bing to perform the query.
|
27
|
+
# Bing uses the altered query string if the original query string
|
28
|
+
# contained spelling mistakes. For example, if the query string is
|
29
|
+
# "saling downwind", the altered query string will be "sailing downwind".
|
30
|
+
# This field is included only if the original query string contains a
|
31
|
+
# spelling mistake.
|
32
|
+
attr_accessor :altered_query
|
33
|
+
|
34
|
+
# @return [String] The query string to use to force Bing to use the
|
35
|
+
# original string. For example, if the query string is "saling downwind",
|
36
|
+
# the override query string will be "+saling downwind". Remember to
|
37
|
+
# encode the query string which results in "%2Bsaling+downwind". This
|
38
|
+
# field is included only if the original query string contains a spelling
|
39
|
+
# mistake.
|
40
|
+
attr_accessor :alteration_override_query
|
41
|
+
|
42
|
+
# @return [Boolean] A Boolean value that indicates whether the specified
|
43
|
+
# query has adult intent. The value is true if the query has adult
|
44
|
+
# intent; otherwise, false.
|
45
|
+
attr_accessor :adult_intent
|
46
|
+
|
47
|
+
# @return [Boolean] A Boolean value that indicates whether Bing requires
|
48
|
+
# the user's location to provide accurate results. If you specified the
|
49
|
+
# user's location by using the X-MSEdge-ClientIP and X-Search-Location
|
50
|
+
# headers, you can ignore this field. For location aware queries, such as
|
51
|
+
# "today's weather" or "restaurants near me" that need the user's
|
52
|
+
# location to provide accurate results, this field is set to true. For
|
53
|
+
# location aware queries that include the location (for example, "Seattle
|
54
|
+
# weather"), this field is set to false. This field is also set to false
|
55
|
+
# for queries that are not location aware, such as "best sellers".
|
56
|
+
attr_accessor :ask_user_for_location
|
57
|
+
|
58
|
+
# @return [Boolean]
|
59
|
+
attr_accessor :is_transactional
|
60
|
+
|
61
|
+
|
62
|
+
#
|
63
|
+
# Mapper for QueryContext class as Ruby Hash.
|
64
|
+
# This will be used for serialization/deserialization.
|
65
|
+
#
|
66
|
+
def self.mapper()
|
67
|
+
{
|
68
|
+
client_side_validation: true,
|
69
|
+
required: false,
|
70
|
+
serialized_name: 'QueryContext',
|
71
|
+
type: {
|
72
|
+
name: 'Composite',
|
73
|
+
polymorphic_discriminator: '_type',
|
74
|
+
uber_parent: 'QueryContext',
|
75
|
+
class_name: 'QueryContext',
|
76
|
+
model_properties: {
|
77
|
+
original_query: {
|
78
|
+
client_side_validation: true,
|
79
|
+
required: true,
|
80
|
+
serialized_name: 'originalQuery',
|
81
|
+
type: {
|
82
|
+
name: 'String'
|
83
|
+
}
|
84
|
+
},
|
85
|
+
altered_query: {
|
86
|
+
client_side_validation: true,
|
87
|
+
required: false,
|
88
|
+
read_only: true,
|
89
|
+
serialized_name: 'alteredQuery',
|
90
|
+
type: {
|
91
|
+
name: 'String'
|
92
|
+
}
|
93
|
+
},
|
94
|
+
alteration_override_query: {
|
95
|
+
client_side_validation: true,
|
96
|
+
required: false,
|
97
|
+
read_only: true,
|
98
|
+
serialized_name: 'alterationOverrideQuery',
|
99
|
+
type: {
|
100
|
+
name: 'String'
|
101
|
+
}
|
102
|
+
},
|
103
|
+
adult_intent: {
|
104
|
+
client_side_validation: true,
|
105
|
+
required: false,
|
106
|
+
read_only: true,
|
107
|
+
serialized_name: 'adultIntent',
|
108
|
+
type: {
|
109
|
+
name: 'Boolean'
|
110
|
+
}
|
111
|
+
},
|
112
|
+
ask_user_for_location: {
|
113
|
+
client_side_validation: true,
|
114
|
+
required: false,
|
115
|
+
read_only: true,
|
116
|
+
serialized_name: 'askUserForLocation',
|
117
|
+
type: {
|
118
|
+
name: 'Boolean'
|
119
|
+
}
|
120
|
+
},
|
121
|
+
is_transactional: {
|
122
|
+
client_side_validation: true,
|
123
|
+
required: false,
|
124
|
+
read_only: true,
|
125
|
+
serialized_name: 'isTransactional',
|
126
|
+
type: {
|
127
|
+
name: 'Boolean'
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
131
|
+
}
|
132
|
+
}
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
@@ -0,0 +1,150 @@
|
|
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::Autosuggest::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines a response. All schemas that could be returned at the root of a
|
10
|
+
# response should inherit from this
|
11
|
+
#
|
12
|
+
class Response < Identifiable
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
@_type = "Response"
|
19
|
+
end
|
20
|
+
|
21
|
+
attr_accessor :_type
|
22
|
+
|
23
|
+
# @return [String] The URL that returns this resource.
|
24
|
+
attr_accessor :read_link
|
25
|
+
|
26
|
+
# @return [String] The URL To Bing's search result for this item.
|
27
|
+
attr_accessor :web_search_url
|
28
|
+
|
29
|
+
# @return [Array<Action>]
|
30
|
+
attr_accessor :potential_action
|
31
|
+
|
32
|
+
# @return [Array<Action>]
|
33
|
+
attr_accessor :immediate_action
|
34
|
+
|
35
|
+
# @return [String]
|
36
|
+
attr_accessor :preferred_clickthrough_url
|
37
|
+
|
38
|
+
# @return [String]
|
39
|
+
attr_accessor :adaptive_card
|
40
|
+
|
41
|
+
|
42
|
+
#
|
43
|
+
# Mapper for Response 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: 'Response',
|
51
|
+
type: {
|
52
|
+
name: 'Composite',
|
53
|
+
class_name: 'Response',
|
54
|
+
model_properties: {
|
55
|
+
_type: {
|
56
|
+
client_side_validation: true,
|
57
|
+
required: true,
|
58
|
+
serialized_name: '_type',
|
59
|
+
type: {
|
60
|
+
name: 'String'
|
61
|
+
}
|
62
|
+
},
|
63
|
+
id: {
|
64
|
+
client_side_validation: true,
|
65
|
+
required: false,
|
66
|
+
read_only: true,
|
67
|
+
serialized_name: 'id',
|
68
|
+
type: {
|
69
|
+
name: 'String'
|
70
|
+
}
|
71
|
+
},
|
72
|
+
read_link: {
|
73
|
+
client_side_validation: true,
|
74
|
+
required: false,
|
75
|
+
read_only: true,
|
76
|
+
serialized_name: 'readLink',
|
77
|
+
type: {
|
78
|
+
name: 'String'
|
79
|
+
}
|
80
|
+
},
|
81
|
+
web_search_url: {
|
82
|
+
client_side_validation: true,
|
83
|
+
required: false,
|
84
|
+
read_only: true,
|
85
|
+
serialized_name: 'webSearchUrl',
|
86
|
+
type: {
|
87
|
+
name: 'String'
|
88
|
+
}
|
89
|
+
},
|
90
|
+
potential_action: {
|
91
|
+
client_side_validation: true,
|
92
|
+
required: false,
|
93
|
+
read_only: true,
|
94
|
+
serialized_name: 'potentialAction',
|
95
|
+
type: {
|
96
|
+
name: 'Sequence',
|
97
|
+
element: {
|
98
|
+
client_side_validation: true,
|
99
|
+
required: false,
|
100
|
+
serialized_name: 'ActionElementType',
|
101
|
+
type: {
|
102
|
+
name: 'Composite',
|
103
|
+
class_name: 'Action'
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}
|
107
|
+
},
|
108
|
+
immediate_action: {
|
109
|
+
client_side_validation: true,
|
110
|
+
required: false,
|
111
|
+
read_only: true,
|
112
|
+
serialized_name: 'immediateAction',
|
113
|
+
type: {
|
114
|
+
name: 'Sequence',
|
115
|
+
element: {
|
116
|
+
client_side_validation: true,
|
117
|
+
required: false,
|
118
|
+
serialized_name: 'ActionElementType',
|
119
|
+
type: {
|
120
|
+
name: 'Composite',
|
121
|
+
class_name: 'Action'
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
},
|
126
|
+
preferred_clickthrough_url: {
|
127
|
+
client_side_validation: true,
|
128
|
+
required: false,
|
129
|
+
read_only: true,
|
130
|
+
serialized_name: 'preferredClickthroughUrl',
|
131
|
+
type: {
|
132
|
+
name: 'String'
|
133
|
+
}
|
134
|
+
},
|
135
|
+
adaptive_card: {
|
136
|
+
client_side_validation: true,
|
137
|
+
required: false,
|
138
|
+
read_only: true,
|
139
|
+
serialized_name: 'adaptiveCard',
|
140
|
+
type: {
|
141
|
+
name: 'String'
|
142
|
+
}
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|