azure_cognitiveservices_newssearch 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_newssearch.rb +52 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/answer.rb +89 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/article.rb +182 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/creative_work.rb +182 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/error.rb +116 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/error_code.rb +20 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/error_response.rb +89 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/error_sub_code.rb +25 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/freshness.rb +17 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/identifiable.rb +62 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/image_object.rb +209 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/media_object.rb +206 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/news.rb +129 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/news_article.rb +228 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/news_topic.rb +164 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/organization.rb +123 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/query.rb +104 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/response.rb +72 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/response_base.rb +61 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/safe_search.rb +17 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/search_results_answer.rb +100 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/text_format.rb +16 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/thing.rb +142 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/trending_topics.rb +107 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/models/video_object.rb +305 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/module_definition.rb +9 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/news_operations.rb +2326 -0
- data/lib/1.0/generated/azure_cognitiveservices_newssearch/news_search_client.rb +127 -0
- data/lib/azure_cognitiveservices_newssearch.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/modules/newssearch_profile_module.rb +155 -0
- data/lib/profiles/latest/newssearch_latest_profile_client.rb +38 -0
- data/lib/profiles/latest/newssearch_module_definition.rb +8 -0
- data/lib/version.rb +7 -0
- metadata +154 -0
@@ -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::NewsSearch::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines the error that occurred.
|
10
|
+
#
|
11
|
+
class Error
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [ErrorCode] The error code that identifies the category of
|
16
|
+
# error. Possible values include: 'None', 'ServerError',
|
17
|
+
# 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization',
|
18
|
+
# 'InsufficientAuthorization'. Default value: 'None' .
|
19
|
+
attr_accessor :code
|
20
|
+
|
21
|
+
# @return [ErrorSubCode] The error code that further helps to identify
|
22
|
+
# the error. Possible values include: 'UnexpectedError', 'ResourceError',
|
23
|
+
# 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue',
|
24
|
+
# 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing',
|
25
|
+
# 'AuthorizationRedundancy', 'AuthorizationDisabled',
|
26
|
+
# 'AuthorizationExpired'
|
27
|
+
attr_accessor :sub_code
|
28
|
+
|
29
|
+
# @return [String] A description of the error.
|
30
|
+
attr_accessor :message
|
31
|
+
|
32
|
+
# @return [String] A description that provides additional information
|
33
|
+
# about the error.
|
34
|
+
attr_accessor :more_details
|
35
|
+
|
36
|
+
# @return [String] The parameter in the request that caused the error.
|
37
|
+
attr_accessor :parameter
|
38
|
+
|
39
|
+
# @return [String] The parameter's value in the request that was not
|
40
|
+
# valid.
|
41
|
+
attr_accessor :value
|
42
|
+
|
43
|
+
|
44
|
+
#
|
45
|
+
# Mapper for Error class as Ruby Hash.
|
46
|
+
# This will be used for serialization/deserialization.
|
47
|
+
#
|
48
|
+
def self.mapper()
|
49
|
+
{
|
50
|
+
client_side_validation: true,
|
51
|
+
required: false,
|
52
|
+
serialized_name: 'Error',
|
53
|
+
type: {
|
54
|
+
name: 'Composite',
|
55
|
+
class_name: 'Error',
|
56
|
+
model_properties: {
|
57
|
+
code: {
|
58
|
+
client_side_validation: true,
|
59
|
+
required: true,
|
60
|
+
serialized_name: 'code',
|
61
|
+
default_value: 'None',
|
62
|
+
type: {
|
63
|
+
name: 'String'
|
64
|
+
}
|
65
|
+
},
|
66
|
+
sub_code: {
|
67
|
+
client_side_validation: true,
|
68
|
+
required: false,
|
69
|
+
read_only: true,
|
70
|
+
serialized_name: 'subCode',
|
71
|
+
type: {
|
72
|
+
name: 'String'
|
73
|
+
}
|
74
|
+
},
|
75
|
+
message: {
|
76
|
+
client_side_validation: true,
|
77
|
+
required: true,
|
78
|
+
serialized_name: 'message',
|
79
|
+
type: {
|
80
|
+
name: 'String'
|
81
|
+
}
|
82
|
+
},
|
83
|
+
more_details: {
|
84
|
+
client_side_validation: true,
|
85
|
+
required: false,
|
86
|
+
read_only: true,
|
87
|
+
serialized_name: 'moreDetails',
|
88
|
+
type: {
|
89
|
+
name: 'String'
|
90
|
+
}
|
91
|
+
},
|
92
|
+
parameter: {
|
93
|
+
client_side_validation: true,
|
94
|
+
required: false,
|
95
|
+
read_only: true,
|
96
|
+
serialized_name: 'parameter',
|
97
|
+
type: {
|
98
|
+
name: 'String'
|
99
|
+
}
|
100
|
+
},
|
101
|
+
value: {
|
102
|
+
client_side_validation: true,
|
103
|
+
required: false,
|
104
|
+
read_only: true,
|
105
|
+
serialized_name: 'value',
|
106
|
+
type: {
|
107
|
+
name: 'String'
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
@@ -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::NewsSearch::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::NewsSearch::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::NewsSearch::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,17 @@
|
|
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::NewsSearch::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for Freshness
|
10
|
+
#
|
11
|
+
module Freshness
|
12
|
+
Day = "Day"
|
13
|
+
Week = "Week"
|
14
|
+
Month = "Month"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
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::NewsSearch::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,209 @@
|
|
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::NewsSearch::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines an image
|
10
|
+
#
|
11
|
+
class ImageObject < MediaObject
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
|
16
|
+
def initialize
|
17
|
+
@_type = "ImageObject"
|
18
|
+
end
|
19
|
+
|
20
|
+
attr_accessor :_type
|
21
|
+
|
22
|
+
# @return [ImageObject] The URL to a thumbnail of the image
|
23
|
+
attr_accessor :thumbnail
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for ImageObject 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: 'ImageObject',
|
35
|
+
type: {
|
36
|
+
name: 'Composite',
|
37
|
+
class_name: 'ImageObject',
|
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
|
+
web_search_url: {
|
57
|
+
client_side_validation: true,
|
58
|
+
required: false,
|
59
|
+
read_only: true,
|
60
|
+
serialized_name: 'webSearchUrl',
|
61
|
+
type: {
|
62
|
+
name: 'String'
|
63
|
+
}
|
64
|
+
},
|
65
|
+
name: {
|
66
|
+
client_side_validation: true,
|
67
|
+
required: false,
|
68
|
+
read_only: true,
|
69
|
+
serialized_name: 'name',
|
70
|
+
type: {
|
71
|
+
name: 'String'
|
72
|
+
}
|
73
|
+
},
|
74
|
+
url: {
|
75
|
+
client_side_validation: true,
|
76
|
+
required: false,
|
77
|
+
read_only: true,
|
78
|
+
serialized_name: 'url',
|
79
|
+
type: {
|
80
|
+
name: 'String'
|
81
|
+
}
|
82
|
+
},
|
83
|
+
image: {
|
84
|
+
client_side_validation: true,
|
85
|
+
required: false,
|
86
|
+
read_only: true,
|
87
|
+
serialized_name: 'image',
|
88
|
+
type: {
|
89
|
+
name: 'Composite',
|
90
|
+
class_name: 'ImageObject'
|
91
|
+
}
|
92
|
+
},
|
93
|
+
description: {
|
94
|
+
client_side_validation: true,
|
95
|
+
required: false,
|
96
|
+
read_only: true,
|
97
|
+
serialized_name: 'description',
|
98
|
+
type: {
|
99
|
+
name: 'String'
|
100
|
+
}
|
101
|
+
},
|
102
|
+
alternate_name: {
|
103
|
+
client_side_validation: true,
|
104
|
+
required: false,
|
105
|
+
read_only: true,
|
106
|
+
serialized_name: 'alternateName',
|
107
|
+
type: {
|
108
|
+
name: 'String'
|
109
|
+
}
|
110
|
+
},
|
111
|
+
bing_id: {
|
112
|
+
client_side_validation: true,
|
113
|
+
required: false,
|
114
|
+
read_only: true,
|
115
|
+
serialized_name: 'bingId',
|
116
|
+
type: {
|
117
|
+
name: 'String'
|
118
|
+
}
|
119
|
+
},
|
120
|
+
thumbnail_url: {
|
121
|
+
client_side_validation: true,
|
122
|
+
required: false,
|
123
|
+
read_only: true,
|
124
|
+
serialized_name: 'thumbnailUrl',
|
125
|
+
type: {
|
126
|
+
name: 'String'
|
127
|
+
}
|
128
|
+
},
|
129
|
+
provider: {
|
130
|
+
client_side_validation: true,
|
131
|
+
required: false,
|
132
|
+
read_only: true,
|
133
|
+
serialized_name: 'provider',
|
134
|
+
type: {
|
135
|
+
name: 'Sequence',
|
136
|
+
element: {
|
137
|
+
client_side_validation: true,
|
138
|
+
required: false,
|
139
|
+
serialized_name: 'ThingElementType',
|
140
|
+
type: {
|
141
|
+
name: 'Composite',
|
142
|
+
class_name: 'Thing'
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
146
|
+
},
|
147
|
+
date_published: {
|
148
|
+
client_side_validation: true,
|
149
|
+
required: false,
|
150
|
+
read_only: true,
|
151
|
+
serialized_name: 'datePublished',
|
152
|
+
type: {
|
153
|
+
name: 'String'
|
154
|
+
}
|
155
|
+
},
|
156
|
+
video: {
|
157
|
+
client_side_validation: true,
|
158
|
+
required: false,
|
159
|
+
read_only: true,
|
160
|
+
serialized_name: 'video',
|
161
|
+
type: {
|
162
|
+
name: 'Composite',
|
163
|
+
class_name: 'VideoObject'
|
164
|
+
}
|
165
|
+
},
|
166
|
+
content_url: {
|
167
|
+
client_side_validation: true,
|
168
|
+
required: false,
|
169
|
+
read_only: true,
|
170
|
+
serialized_name: 'contentUrl',
|
171
|
+
type: {
|
172
|
+
name: 'String'
|
173
|
+
}
|
174
|
+
},
|
175
|
+
width: {
|
176
|
+
client_side_validation: true,
|
177
|
+
required: false,
|
178
|
+
read_only: true,
|
179
|
+
serialized_name: 'width',
|
180
|
+
type: {
|
181
|
+
name: 'Number'
|
182
|
+
}
|
183
|
+
},
|
184
|
+
height: {
|
185
|
+
client_side_validation: true,
|
186
|
+
required: false,
|
187
|
+
read_only: true,
|
188
|
+
serialized_name: 'height',
|
189
|
+
type: {
|
190
|
+
name: 'Number'
|
191
|
+
}
|
192
|
+
},
|
193
|
+
thumbnail: {
|
194
|
+
client_side_validation: true,
|
195
|
+
required: false,
|
196
|
+
read_only: true,
|
197
|
+
serialized_name: 'thumbnail',
|
198
|
+
type: {
|
199
|
+
name: 'Composite',
|
200
|
+
class_name: 'ImageObject'
|
201
|
+
}
|
202
|
+
}
|
203
|
+
}
|
204
|
+
}
|
205
|
+
}
|
206
|
+
end
|
207
|
+
end
|
208
|
+
end
|
209
|
+
end
|