azure_cognitiveservices_customsearch 0.16.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_customsearch.rb +47 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/custom_instance.rb +653 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/custom_search_client.rb +127 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/answer.rb +90 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/creative_work.rb +150 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/error.rb +116 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/error_code.rb +20 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/error_response.rb +89 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/error_sub_code.rb +25 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/identifiable.rb +62 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/query.rb +87 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/query_context.rb +94 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/response.rb +72 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/response_base.rb +56 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/safe_search.rb +17 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/search_response.rb +100 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/search_results_answer.rb +126 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/text_format.rb +16 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/thing.rb +118 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/web_meta_tag.rb +59 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/web_page.rb +228 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/models/web_web_answer.rb +149 -0
- data/lib/1.0/generated/azure_cognitiveservices_customsearch/module_definition.rb +9 -0
- data/lib/azure_cognitiveservices_customsearch.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/customsearch_latest_profile_client.rb +38 -0
- data/lib/profiles/latest/customsearch_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/customsearch_profile_module.rb +135 -0
- data/lib/version.rb +7 -0
- metadata +149 -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::CustomSearch::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,89 @@
|
|
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::CustomSearch::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
|
+
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
|
+
errors: {
|
67
|
+
client_side_validation: true,
|
68
|
+
required: true,
|
69
|
+
serialized_name: 'errors',
|
70
|
+
type: {
|
71
|
+
name: 'Sequence',
|
72
|
+
element: {
|
73
|
+
client_side_validation: true,
|
74
|
+
required: false,
|
75
|
+
serialized_name: 'ErrorElementType',
|
76
|
+
type: {
|
77
|
+
name: 'Composite',
|
78
|
+
class_name: 'Error'
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,25 @@
|
|
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::CustomSearch::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for ErrorSubCode
|
10
|
+
#
|
11
|
+
module ErrorSubCode
|
12
|
+
UnexpectedError = "UnexpectedError"
|
13
|
+
ResourceError = "ResourceError"
|
14
|
+
NotImplemented = "NotImplemented"
|
15
|
+
ParameterMissing = "ParameterMissing"
|
16
|
+
ParameterInvalidValue = "ParameterInvalidValue"
|
17
|
+
HttpNotAllowed = "HttpNotAllowed"
|
18
|
+
Blocked = "Blocked"
|
19
|
+
AuthorizationMissing = "AuthorizationMissing"
|
20
|
+
AuthorizationRedundancy = "AuthorizationRedundancy"
|
21
|
+
AuthorizationDisabled = "AuthorizationDisabled"
|
22
|
+
AuthorizationExpired = "AuthorizationExpired"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
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::CustomSearch::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,87 @@
|
|
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::CustomSearch::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
|
+
|
33
|
+
#
|
34
|
+
# Mapper for Query class as Ruby Hash.
|
35
|
+
# This will be used for serialization/deserialization.
|
36
|
+
#
|
37
|
+
def self.mapper()
|
38
|
+
{
|
39
|
+
client_side_validation: true,
|
40
|
+
required: false,
|
41
|
+
serialized_name: 'Query',
|
42
|
+
type: {
|
43
|
+
name: 'Composite',
|
44
|
+
class_name: 'Query',
|
45
|
+
model_properties: {
|
46
|
+
text: {
|
47
|
+
client_side_validation: true,
|
48
|
+
required: true,
|
49
|
+
serialized_name: 'text',
|
50
|
+
type: {
|
51
|
+
name: 'String'
|
52
|
+
}
|
53
|
+
},
|
54
|
+
display_text: {
|
55
|
+
client_side_validation: true,
|
56
|
+
required: false,
|
57
|
+
read_only: true,
|
58
|
+
serialized_name: 'displayText',
|
59
|
+
type: {
|
60
|
+
name: 'String'
|
61
|
+
}
|
62
|
+
},
|
63
|
+
web_search_url: {
|
64
|
+
client_side_validation: true,
|
65
|
+
required: false,
|
66
|
+
read_only: true,
|
67
|
+
serialized_name: 'webSearchUrl',
|
68
|
+
type: {
|
69
|
+
name: 'String'
|
70
|
+
}
|
71
|
+
},
|
72
|
+
search_link: {
|
73
|
+
client_side_validation: true,
|
74
|
+
required: false,
|
75
|
+
read_only: true,
|
76
|
+
serialized_name: 'searchLink',
|
77
|
+
type: {
|
78
|
+
name: 'String'
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,94 @@
|
|
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::CustomSearch::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
|
+
|
40
|
+
#
|
41
|
+
# Mapper for QueryContext class as Ruby Hash.
|
42
|
+
# This will be used for serialization/deserialization.
|
43
|
+
#
|
44
|
+
def self.mapper()
|
45
|
+
{
|
46
|
+
client_side_validation: true,
|
47
|
+
required: false,
|
48
|
+
serialized_name: 'QueryContext',
|
49
|
+
type: {
|
50
|
+
name: 'Composite',
|
51
|
+
class_name: 'QueryContext',
|
52
|
+
model_properties: {
|
53
|
+
original_query: {
|
54
|
+
client_side_validation: true,
|
55
|
+
required: true,
|
56
|
+
serialized_name: 'originalQuery',
|
57
|
+
type: {
|
58
|
+
name: 'String'
|
59
|
+
}
|
60
|
+
},
|
61
|
+
altered_query: {
|
62
|
+
client_side_validation: true,
|
63
|
+
required: false,
|
64
|
+
read_only: true,
|
65
|
+
serialized_name: 'alteredQuery',
|
66
|
+
type: {
|
67
|
+
name: 'String'
|
68
|
+
}
|
69
|
+
},
|
70
|
+
alteration_override_query: {
|
71
|
+
client_side_validation: true,
|
72
|
+
required: false,
|
73
|
+
read_only: true,
|
74
|
+
serialized_name: 'alterationOverrideQuery',
|
75
|
+
type: {
|
76
|
+
name: 'String'
|
77
|
+
}
|
78
|
+
},
|
79
|
+
adult_intent: {
|
80
|
+
client_side_validation: true,
|
81
|
+
required: false,
|
82
|
+
read_only: true,
|
83
|
+
serialized_name: 'adultIntent',
|
84
|
+
type: {
|
85
|
+
name: 'Boolean'
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,72 @@
|
|
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::CustomSearch::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 To Bing's search result for this item.
|
24
|
+
attr_accessor :web_search_url
|
25
|
+
|
26
|
+
|
27
|
+
#
|
28
|
+
# Mapper for Response 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: 'Response',
|
36
|
+
type: {
|
37
|
+
name: 'Composite',
|
38
|
+
class_name: 'Response',
|
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
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|