ghostcrawl 2.3.5 → 2.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +59 -12
- data/_generated/models/arrival_body.rb +325 -0
- data/_generated/models/arrival_body_profile_id_member1.rb +62 -0
- data/_generated/models/arrival_body_referrer_shape.rb +8 -0
- data/_generated/models/arrival_body_session_id_member1.rb +62 -0
- data/_generated/models/close_popups_body.rb +264 -0
- data/_generated/models/close_popups_body_keep_host_member1.rb +62 -0
- data/_generated/models/close_popups_body_profile_id_member1.rb +62 -0
- data/_generated/models/models.rb +18 -0
- data/_generated/models/mouse_body.rb +264 -0
- data/_generated/models/mouse_body_ops.rb +62 -0
- data/_generated/models/mouse_body_profile_id_member1.rb +62 -0
- data/_generated/models/mouse_body_session_id_member1.rb +62 -0
- data/_generated/models/scrape_request.rb +6 -6
- data/_generated/models/scrape_request_engine.rb +1 -1
- data/_generated/models/session_create_request.rb +3 -3
- data/_generated/models/tab_visit_body.rb +285 -0
- data/_generated/models/tab_visit_body_profile_id_member1.rb +62 -0
- data/_generated/models/tab_visit_body_session_id_member1.rb +62 -0
- data/_generated/models/touch_body.rb +264 -0
- data/_generated/models/touch_body_ops.rb +62 -0
- data/_generated/models/touch_body_profile_id_member1.rb +62 -0
- data/_generated/models/touch_body_session_id_member1.rb +62 -0
- data/_generated/v1/cdp/frame/frame_request_builder.rb +2 -2
- data/_generated/v1/crawl_runs/item/with_run_item_request_builder.rb +3 -3
- data/_generated/v1/page/arrival/arrival.rb +0 -0
- data/_generated/v1/page/arrival/arrival_request_builder.rb +74 -0
- data/_generated/v1/page/close_popups/close_popups.rb +0 -0
- data/_generated/v1/page/close_popups/close_popups_request_builder.rb +74 -0
- data/_generated/v1/page/mouse/mouse.rb +0 -0
- data/_generated/v1/page/mouse/mouse_request_builder.rb +74 -0
- data/_generated/v1/page/page_request_builder.rb +30 -0
- data/_generated/v1/page/tab_visit/tab_visit.rb +0 -0
- data/_generated/v1/page/tab_visit/tab_visit_request_builder.rb +74 -0
- data/_generated/v1/page/touch/touch.rb +0 -0
- data/_generated/v1/page/touch/touch_request_builder.rb +74 -0
- data/_generated/v1/profiles/item/with_name_item_request_builder.rb +2 -2
- data/_generated/v1/schedules/item/runs/runs_request_builder.rb +2 -2
- data/_generated/v1/search/jobs/item/with_job_item_request_builder.rb +2 -2
- data/_generated/v1/sessions/item/takeover/takeover_request_builder.rb +2 -2
- data/_generated/v1/sessions/sessions_request_builder.rb +3 -3
- data/lib/ghostcrawl/client.rb +1001 -46
- data/lib/ghostcrawl/error_codes.rb +26 -25
- data/lib/ghostcrawl/errors.rb +35 -2
- data/lib/ghostcrawl/version.rb +1 -1
- metadata +30 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1ca2e5f99edce3e0b89c6ad0a7e1ed63986aa6b245a2922fff7c78ffd38e889a
|
|
4
|
+
data.tar.gz: af59a3c94cddcb19bbed60104f2968e69814a1c7b841704fc38bc208ba352f27
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1ac0ada6958436c82ca2702adc62777c03b19ec97b6a9abe7cfc76729d29a709a8463ba33677b014efbe458c5c4b89deb63284c58c66c0aa308de9a0d682aab0
|
|
7
|
+
data.tar.gz: d25f8c83429447f05404d6e4a48aaea9d04581c8b80425c8dfdea8bf07e44680bd26ba45075642891ba32f90519785fc944ec19dae56d1f24f524cf15bc09c79
|
data/README.md
CHANGED
|
@@ -9,37 +9,67 @@ Collect web data at scale — scrape, crawl, search, and extract structured data
|
|
|
9
9
|
gem install ghostcrawl
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
With Bundler:
|
|
13
13
|
|
|
14
|
-
```
|
|
15
|
-
|
|
14
|
+
```bash
|
|
15
|
+
bundle add ghostcrawl
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
(equivalently, add `gem "ghostcrawl", "~> 2.3"` to your `Gemfile` and run `bundle install`).
|
|
19
|
+
|
|
20
|
+
Requires Ruby 3.0+. Current version: **2.3.7**.
|
|
19
21
|
|
|
20
22
|
## Quickstart
|
|
21
23
|
|
|
22
24
|
```ruby
|
|
23
25
|
require "ghostcrawl"
|
|
24
26
|
|
|
25
|
-
# Token from constructor or GHOSTCRAWL_API_KEY env var
|
|
27
|
+
# Token from the constructor or the GHOSTCRAWL_API_KEY env var.
|
|
26
28
|
client = GhostCrawl::Client.new(token: "gck_live_YOUR_KEY")
|
|
27
29
|
|
|
28
|
-
# Scrape a URL
|
|
30
|
+
# Scrape a URL. The result is typed AND hash-accessible: read result.markdown,
|
|
31
|
+
# result["markdown"], or result[:markdown] interchangeably.
|
|
29
32
|
result = client.scrape(url: "https://example.com", format: "markdown")
|
|
30
|
-
puts result
|
|
33
|
+
puts result.markdown # typed field accessor
|
|
34
|
+
puts result["content"] # cross-format rendered output (hash access)
|
|
35
|
+
puts result.status_code # 200
|
|
36
|
+
|
|
37
|
+
# Web search. wait: true (the default) blocks until results are ready — on a cold
|
|
38
|
+
# rotation the SDK owns a bounded client-side poll for you, so you write no loop.
|
|
39
|
+
results = client.search(query: "latest AI research", engine: "google", limit: 10)
|
|
40
|
+
puts results.results.length # typed accessor (or results["results"])
|
|
31
41
|
|
|
32
42
|
# Start a crawl run and wait for it to finish — the server blocks until the run
|
|
33
43
|
# is terminal (no client-side poll-with-sleep loop).
|
|
34
44
|
run = client.crawl_runs.start(url: "https://example.com", max_depth: 2, max_pages: 50,
|
|
35
45
|
wait: true, timeout: 300)
|
|
36
|
-
puts "#{run
|
|
46
|
+
puts "#{run.run_id} → #{run.status}"
|
|
47
|
+
```
|
|
37
48
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
49
|
+
## Concurrency
|
|
50
|
+
|
|
51
|
+
The Ruby client is **blocking by design** — one idiomatic client, no separate
|
|
52
|
+
async twin. To run several requests at once, use threads: each call releases the
|
|
53
|
+
GIL while it waits on the network, so plain `Thread.new` + `join` gives you real
|
|
54
|
+
parallelism for I/O-bound work.
|
|
55
|
+
|
|
56
|
+
```ruby
|
|
57
|
+
require "ghostcrawl"
|
|
58
|
+
|
|
59
|
+
client = GhostCrawl::Client.new(token: "gck_live_YOUR_KEY")
|
|
60
|
+
|
|
61
|
+
urls = %w[https://example.com https://example.org https://example.net]
|
|
62
|
+
results = urls.map do |u|
|
|
63
|
+
Thread.new { client.scrape(url: u) }
|
|
64
|
+
end.map(&:join).map(&:value)
|
|
65
|
+
|
|
66
|
+
results.each { |r| puts "#{r.url} → #{r.status_code}" }
|
|
41
67
|
```
|
|
42
68
|
|
|
69
|
+
For large batches, cap the fan-out with a fixed-size worker pool (e.g. slice the
|
|
70
|
+
work into groups) or the `concurrent-ruby` gem's thread pool — the client itself
|
|
71
|
+
is thread-safe to share across threads.
|
|
72
|
+
|
|
43
73
|
## Authentication
|
|
44
74
|
|
|
45
75
|
```ruby
|
|
@@ -213,6 +243,23 @@ client = GhostCrawl::Client.new(
|
|
|
213
243
|
| Recordings | `client.recordings` | list, get\_recording, delete |
|
|
214
244
|
| Key-Value Store | `client.kv` | get, set, delete |
|
|
215
245
|
|
|
246
|
+
## Account & session persona
|
|
247
|
+
|
|
248
|
+
`me` returns your account profile — including `max_concurrency`, the number of
|
|
249
|
+
sessions your plan may run at once. `usage` reports the current billing window.
|
|
250
|
+
`session_persona(session_id)` returns a running session's customer-safe persona: a
|
|
251
|
+
display-only whitelist of `device_class`, `os_class`, `browser_class`, and `locale`
|
|
252
|
+
(never any raw or internal detail).
|
|
253
|
+
|
|
254
|
+
```ruby
|
|
255
|
+
me = client.me
|
|
256
|
+
puts me["max_concurrency"] # concurrent-session ceiling for your plan
|
|
257
|
+
|
|
258
|
+
persona = client.session_persona(session_id)
|
|
259
|
+
puts [persona["device_class"], persona["os_class"],
|
|
260
|
+
persona["browser_class"], persona["locale"]].join(" ")
|
|
261
|
+
```
|
|
262
|
+
|
|
216
263
|
## License
|
|
217
264
|
|
|
218
|
-
|
|
265
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
require 'microsoft_kiota_abstractions'
|
|
2
|
+
require_relative '../ghostcrawl'
|
|
3
|
+
require_relative './models'
|
|
4
|
+
|
|
5
|
+
module GhostCrawl
|
|
6
|
+
module Models
|
|
7
|
+
class ArrivalBody
|
|
8
|
+
include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
|
|
9
|
+
##
|
|
10
|
+
# Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
|
|
11
|
+
@additional_data
|
|
12
|
+
##
|
|
13
|
+
# The dest_url property
|
|
14
|
+
@dest_url
|
|
15
|
+
##
|
|
16
|
+
# The profile_id property
|
|
17
|
+
@profile_id
|
|
18
|
+
##
|
|
19
|
+
# The referrer_shape property
|
|
20
|
+
@referrer_shape
|
|
21
|
+
##
|
|
22
|
+
# The session_id property
|
|
23
|
+
@session_id
|
|
24
|
+
##
|
|
25
|
+
# The source_title property
|
|
26
|
+
@source_title
|
|
27
|
+
##
|
|
28
|
+
# The source_url property
|
|
29
|
+
@source_url
|
|
30
|
+
##
|
|
31
|
+
## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
|
|
32
|
+
## @return a i_dictionary
|
|
33
|
+
##
|
|
34
|
+
def additional_data
|
|
35
|
+
return @additional_data
|
|
36
|
+
end
|
|
37
|
+
##
|
|
38
|
+
## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
|
|
39
|
+
## @param value Value to set for the AdditionalData property.
|
|
40
|
+
## @return a void
|
|
41
|
+
##
|
|
42
|
+
def additional_data=(value)
|
|
43
|
+
@additional_data = value
|
|
44
|
+
end
|
|
45
|
+
##
|
|
46
|
+
## Instantiates a new ArrivalBody and sets the default values.
|
|
47
|
+
## @return a void
|
|
48
|
+
##
|
|
49
|
+
def initialize()
|
|
50
|
+
@additional_data = Hash.new
|
|
51
|
+
@referrer_shape = GhostCrawl::Models::ArrivalBodyReferrerShape[:Origin]
|
|
52
|
+
end
|
|
53
|
+
##
|
|
54
|
+
## Creates a new instance of the appropriate class based on discriminator value
|
|
55
|
+
## @param parse_node The parse node to use to read the discriminator value and create the object
|
|
56
|
+
## @return a arrival_body
|
|
57
|
+
##
|
|
58
|
+
def self.create_from_discriminator_value(parse_node)
|
|
59
|
+
raise StandardError, 'parse_node cannot be null' if parse_node.nil?
|
|
60
|
+
return ArrivalBody.new
|
|
61
|
+
end
|
|
62
|
+
##
|
|
63
|
+
## Gets the dest_url property value. The dest_url property
|
|
64
|
+
## @return a string
|
|
65
|
+
##
|
|
66
|
+
def dest_url
|
|
67
|
+
return @dest_url
|
|
68
|
+
end
|
|
69
|
+
##
|
|
70
|
+
## Sets the dest_url property value. The dest_url property
|
|
71
|
+
## @param value Value to set for the dest_url property.
|
|
72
|
+
## @return a void
|
|
73
|
+
##
|
|
74
|
+
def dest_url=(value)
|
|
75
|
+
@dest_url = value
|
|
76
|
+
end
|
|
77
|
+
##
|
|
78
|
+
## The deserialization information for the current model
|
|
79
|
+
## @return a i_dictionary
|
|
80
|
+
##
|
|
81
|
+
def get_field_deserializers()
|
|
82
|
+
return {
|
|
83
|
+
"dest_url" => lambda {|n| @dest_url = n.get_string_value() },
|
|
84
|
+
"profile_id" => lambda {|n| @profile_id = n.get_object_value(lambda {|pn| ArrivalBody::ArrivalBodyProfileId.create_from_discriminator_value(pn) }) },
|
|
85
|
+
"referrer_shape" => lambda {|n| @referrer_shape = n.get_enum_value(GhostCrawl::Models::ArrivalBodyReferrerShape) },
|
|
86
|
+
"session_id" => lambda {|n| @session_id = n.get_object_value(lambda {|pn| ArrivalBody::ArrivalBodySessionId.create_from_discriminator_value(pn) }) },
|
|
87
|
+
"source_title" => lambda {|n| @source_title = n.get_string_value() },
|
|
88
|
+
"source_url" => lambda {|n| @source_url = n.get_string_value() },
|
|
89
|
+
}
|
|
90
|
+
end
|
|
91
|
+
##
|
|
92
|
+
## Gets the profile_id property value. The profile_id property
|
|
93
|
+
## @return a arrival_body_profile_id
|
|
94
|
+
##
|
|
95
|
+
def profile_id
|
|
96
|
+
return @profile_id
|
|
97
|
+
end
|
|
98
|
+
##
|
|
99
|
+
## Sets the profile_id property value. The profile_id property
|
|
100
|
+
## @param value Value to set for the profile_id property.
|
|
101
|
+
## @return a void
|
|
102
|
+
##
|
|
103
|
+
def profile_id=(value)
|
|
104
|
+
@profile_id = value
|
|
105
|
+
end
|
|
106
|
+
##
|
|
107
|
+
## Gets the referrer_shape property value. The referrer_shape property
|
|
108
|
+
## @return a arrival_body_referrer_shape
|
|
109
|
+
##
|
|
110
|
+
def referrer_shape
|
|
111
|
+
return @referrer_shape
|
|
112
|
+
end
|
|
113
|
+
##
|
|
114
|
+
## Sets the referrer_shape property value. The referrer_shape property
|
|
115
|
+
## @param value Value to set for the referrer_shape property.
|
|
116
|
+
## @return a void
|
|
117
|
+
##
|
|
118
|
+
def referrer_shape=(value)
|
|
119
|
+
@referrer_shape = value
|
|
120
|
+
end
|
|
121
|
+
##
|
|
122
|
+
## Serializes information the current object
|
|
123
|
+
## @param writer Serialization writer to use to serialize this model
|
|
124
|
+
## @return a void
|
|
125
|
+
##
|
|
126
|
+
def serialize(writer)
|
|
127
|
+
raise StandardError, 'writer cannot be null' if writer.nil?
|
|
128
|
+
writer.write_string_value("dest_url", @dest_url)
|
|
129
|
+
writer.write_object_value("profile_id", @profile_id)
|
|
130
|
+
writer.write_enum_value("referrer_shape", @referrer_shape)
|
|
131
|
+
writer.write_object_value("session_id", @session_id)
|
|
132
|
+
writer.write_string_value("source_title", @source_title)
|
|
133
|
+
writer.write_string_value("source_url", @source_url)
|
|
134
|
+
writer.write_additional_data(@additional_data)
|
|
135
|
+
end
|
|
136
|
+
##
|
|
137
|
+
## Gets the session_id property value. The session_id property
|
|
138
|
+
## @return a arrival_body_session_id
|
|
139
|
+
##
|
|
140
|
+
def session_id
|
|
141
|
+
return @session_id
|
|
142
|
+
end
|
|
143
|
+
##
|
|
144
|
+
## Sets the session_id property value. The session_id property
|
|
145
|
+
## @param value Value to set for the session_id property.
|
|
146
|
+
## @return a void
|
|
147
|
+
##
|
|
148
|
+
def session_id=(value)
|
|
149
|
+
@session_id = value
|
|
150
|
+
end
|
|
151
|
+
##
|
|
152
|
+
## Gets the source_title property value. The source_title property
|
|
153
|
+
## @return a string
|
|
154
|
+
##
|
|
155
|
+
def source_title
|
|
156
|
+
return @source_title
|
|
157
|
+
end
|
|
158
|
+
##
|
|
159
|
+
## Sets the source_title property value. The source_title property
|
|
160
|
+
## @param value Value to set for the source_title property.
|
|
161
|
+
## @return a void
|
|
162
|
+
##
|
|
163
|
+
def source_title=(value)
|
|
164
|
+
@source_title = value
|
|
165
|
+
end
|
|
166
|
+
##
|
|
167
|
+
## Gets the source_url property value. The source_url property
|
|
168
|
+
## @return a string
|
|
169
|
+
##
|
|
170
|
+
def source_url
|
|
171
|
+
return @source_url
|
|
172
|
+
end
|
|
173
|
+
##
|
|
174
|
+
## Sets the source_url property value. The source_url property
|
|
175
|
+
## @param value Value to set for the source_url property.
|
|
176
|
+
## @return a void
|
|
177
|
+
##
|
|
178
|
+
def source_url=(value)
|
|
179
|
+
@source_url = value
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
##
|
|
183
|
+
# Composed type wrapper for classes ArrivalBodyProfileIdMember1, string
|
|
184
|
+
class ArrivalBodyProfileId
|
|
185
|
+
include MicrosoftKiotaAbstractions::Parsable
|
|
186
|
+
##
|
|
187
|
+
# Composed type representation for type ArrivalBodyProfileIdMember1
|
|
188
|
+
@arrival_body_profile_id_member1
|
|
189
|
+
##
|
|
190
|
+
# Composed type representation for type string
|
|
191
|
+
@string
|
|
192
|
+
##
|
|
193
|
+
## Gets the ArrivalBody_profile_idMember1 property value. Composed type representation for type ArrivalBodyProfileIdMember1
|
|
194
|
+
## @return a arrival_body_profile_id_member1
|
|
195
|
+
##
|
|
196
|
+
def arrival_body_profile_id_member1
|
|
197
|
+
return @arrival_body_profile_id_member1
|
|
198
|
+
end
|
|
199
|
+
##
|
|
200
|
+
## Sets the ArrivalBody_profile_idMember1 property value. Composed type representation for type ArrivalBodyProfileIdMember1
|
|
201
|
+
## @param value Value to set for the ArrivalBody_profile_idMember1 property.
|
|
202
|
+
## @return a void
|
|
203
|
+
##
|
|
204
|
+
def arrival_body_profile_id_member1=(value)
|
|
205
|
+
@arrival_body_profile_id_member1 = value
|
|
206
|
+
end
|
|
207
|
+
##
|
|
208
|
+
## Creates a new instance of the appropriate class based on discriminator value
|
|
209
|
+
## @param parse_node The parse node to use to read the discriminator value and create the object
|
|
210
|
+
## @return a arrival_body_profile_id
|
|
211
|
+
##
|
|
212
|
+
def self.create_from_discriminator_value(parse_node)
|
|
213
|
+
raise StandardError, 'parse_node cannot be null' if parse_node.nil?
|
|
214
|
+
return ArrivalBodyProfileId.new
|
|
215
|
+
end
|
|
216
|
+
##
|
|
217
|
+
## The deserialization information for the current model
|
|
218
|
+
## @return a i_dictionary
|
|
219
|
+
##
|
|
220
|
+
def get_field_deserializers()
|
|
221
|
+
return {
|
|
222
|
+
"ArrivalBody_profile_idMember1" => lambda {|n| @arrival_body_profile_id_member1 = n.get_object_value(lambda {|pn| GhostCrawl::Models::ArrivalBodyProfileIdMember1.create_from_discriminator_value(pn) }) },
|
|
223
|
+
"string" => lambda {|n| @string = n.get_string_value() },
|
|
224
|
+
}
|
|
225
|
+
end
|
|
226
|
+
##
|
|
227
|
+
## Serializes information the current object
|
|
228
|
+
## @param writer Serialization writer to use to serialize this model
|
|
229
|
+
## @return a void
|
|
230
|
+
##
|
|
231
|
+
def serialize(writer)
|
|
232
|
+
raise StandardError, 'writer cannot be null' if writer.nil?
|
|
233
|
+
writer.write_object_value("ArrivalBody_profile_idMember1", @arrival_body_profile_id_member1)
|
|
234
|
+
writer.write_string_value("string", @string)
|
|
235
|
+
end
|
|
236
|
+
##
|
|
237
|
+
## Gets the string property value. Composed type representation for type string
|
|
238
|
+
## @return a string
|
|
239
|
+
##
|
|
240
|
+
def string
|
|
241
|
+
return @string
|
|
242
|
+
end
|
|
243
|
+
##
|
|
244
|
+
## Sets the string property value. Composed type representation for type string
|
|
245
|
+
## @param value Value to set for the string property.
|
|
246
|
+
## @return a void
|
|
247
|
+
##
|
|
248
|
+
def string=(value)
|
|
249
|
+
@string = value
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
##
|
|
254
|
+
# Composed type wrapper for classes ArrivalBodySessionIdMember1, string
|
|
255
|
+
class ArrivalBodySessionId
|
|
256
|
+
include MicrosoftKiotaAbstractions::Parsable
|
|
257
|
+
##
|
|
258
|
+
# Composed type representation for type ArrivalBodySessionIdMember1
|
|
259
|
+
@arrival_body_session_id_member1
|
|
260
|
+
##
|
|
261
|
+
# Composed type representation for type string
|
|
262
|
+
@string
|
|
263
|
+
##
|
|
264
|
+
## Gets the ArrivalBody_session_idMember1 property value. Composed type representation for type ArrivalBodySessionIdMember1
|
|
265
|
+
## @return a arrival_body_session_id_member1
|
|
266
|
+
##
|
|
267
|
+
def arrival_body_session_id_member1
|
|
268
|
+
return @arrival_body_session_id_member1
|
|
269
|
+
end
|
|
270
|
+
##
|
|
271
|
+
## Sets the ArrivalBody_session_idMember1 property value. Composed type representation for type ArrivalBodySessionIdMember1
|
|
272
|
+
## @param value Value to set for the ArrivalBody_session_idMember1 property.
|
|
273
|
+
## @return a void
|
|
274
|
+
##
|
|
275
|
+
def arrival_body_session_id_member1=(value)
|
|
276
|
+
@arrival_body_session_id_member1 = value
|
|
277
|
+
end
|
|
278
|
+
##
|
|
279
|
+
## Creates a new instance of the appropriate class based on discriminator value
|
|
280
|
+
## @param parse_node The parse node to use to read the discriminator value and create the object
|
|
281
|
+
## @return a arrival_body_session_id
|
|
282
|
+
##
|
|
283
|
+
def self.create_from_discriminator_value(parse_node)
|
|
284
|
+
raise StandardError, 'parse_node cannot be null' if parse_node.nil?
|
|
285
|
+
return ArrivalBodySessionId.new
|
|
286
|
+
end
|
|
287
|
+
##
|
|
288
|
+
## The deserialization information for the current model
|
|
289
|
+
## @return a i_dictionary
|
|
290
|
+
##
|
|
291
|
+
def get_field_deserializers()
|
|
292
|
+
return {
|
|
293
|
+
"ArrivalBody_session_idMember1" => lambda {|n| @arrival_body_session_id_member1 = n.get_object_value(lambda {|pn| GhostCrawl::Models::ArrivalBodySessionIdMember1.create_from_discriminator_value(pn) }) },
|
|
294
|
+
"string" => lambda {|n| @string = n.get_string_value() },
|
|
295
|
+
}
|
|
296
|
+
end
|
|
297
|
+
##
|
|
298
|
+
## Serializes information the current object
|
|
299
|
+
## @param writer Serialization writer to use to serialize this model
|
|
300
|
+
## @return a void
|
|
301
|
+
##
|
|
302
|
+
def serialize(writer)
|
|
303
|
+
raise StandardError, 'writer cannot be null' if writer.nil?
|
|
304
|
+
writer.write_object_value("ArrivalBody_session_idMember1", @arrival_body_session_id_member1)
|
|
305
|
+
writer.write_string_value("string", @string)
|
|
306
|
+
end
|
|
307
|
+
##
|
|
308
|
+
## Gets the string property value. Composed type representation for type string
|
|
309
|
+
## @return a string
|
|
310
|
+
##
|
|
311
|
+
def string
|
|
312
|
+
return @string
|
|
313
|
+
end
|
|
314
|
+
##
|
|
315
|
+
## Sets the string property value. Composed type representation for type string
|
|
316
|
+
## @param value Value to set for the string property.
|
|
317
|
+
## @return a void
|
|
318
|
+
##
|
|
319
|
+
def string=(value)
|
|
320
|
+
@string = value
|
|
321
|
+
end
|
|
322
|
+
end
|
|
323
|
+
end
|
|
324
|
+
end
|
|
325
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
require 'microsoft_kiota_abstractions'
|
|
2
|
+
require_relative '../ghostcrawl'
|
|
3
|
+
require_relative './models'
|
|
4
|
+
|
|
5
|
+
module GhostCrawl
|
|
6
|
+
module Models
|
|
7
|
+
class ArrivalBodyProfileIdMember1
|
|
8
|
+
include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
|
|
9
|
+
##
|
|
10
|
+
# Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
|
|
11
|
+
@additional_data
|
|
12
|
+
##
|
|
13
|
+
## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
|
|
14
|
+
## @return a i_dictionary
|
|
15
|
+
##
|
|
16
|
+
def additional_data
|
|
17
|
+
return @additional_data
|
|
18
|
+
end
|
|
19
|
+
##
|
|
20
|
+
## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
|
|
21
|
+
## @param value Value to set for the AdditionalData property.
|
|
22
|
+
## @return a void
|
|
23
|
+
##
|
|
24
|
+
def additional_data=(value)
|
|
25
|
+
@additional_data = value
|
|
26
|
+
end
|
|
27
|
+
##
|
|
28
|
+
## Instantiates a new ArrivalBodyProfileIdMember1 and sets the default values.
|
|
29
|
+
## @return a void
|
|
30
|
+
##
|
|
31
|
+
def initialize()
|
|
32
|
+
@additional_data = Hash.new
|
|
33
|
+
end
|
|
34
|
+
##
|
|
35
|
+
## Creates a new instance of the appropriate class based on discriminator value
|
|
36
|
+
## @param parse_node The parse node to use to read the discriminator value and create the object
|
|
37
|
+
## @return a arrival_body_profile_id_member1
|
|
38
|
+
##
|
|
39
|
+
def self.create_from_discriminator_value(parse_node)
|
|
40
|
+
raise StandardError, 'parse_node cannot be null' if parse_node.nil?
|
|
41
|
+
return ArrivalBodyProfileIdMember1.new
|
|
42
|
+
end
|
|
43
|
+
##
|
|
44
|
+
## The deserialization information for the current model
|
|
45
|
+
## @return a i_dictionary
|
|
46
|
+
##
|
|
47
|
+
def get_field_deserializers()
|
|
48
|
+
return {
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
##
|
|
52
|
+
## Serializes information the current object
|
|
53
|
+
## @param writer Serialization writer to use to serialize this model
|
|
54
|
+
## @return a void
|
|
55
|
+
##
|
|
56
|
+
def serialize(writer)
|
|
57
|
+
raise StandardError, 'writer cannot be null' if writer.nil?
|
|
58
|
+
writer.write_additional_data(@additional_data)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
require 'microsoft_kiota_abstractions'
|
|
2
|
+
require_relative '../ghostcrawl'
|
|
3
|
+
require_relative './models'
|
|
4
|
+
|
|
5
|
+
module GhostCrawl
|
|
6
|
+
module Models
|
|
7
|
+
class ArrivalBodySessionIdMember1
|
|
8
|
+
include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
|
|
9
|
+
##
|
|
10
|
+
# Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
|
|
11
|
+
@additional_data
|
|
12
|
+
##
|
|
13
|
+
## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
|
|
14
|
+
## @return a i_dictionary
|
|
15
|
+
##
|
|
16
|
+
def additional_data
|
|
17
|
+
return @additional_data
|
|
18
|
+
end
|
|
19
|
+
##
|
|
20
|
+
## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
|
|
21
|
+
## @param value Value to set for the AdditionalData property.
|
|
22
|
+
## @return a void
|
|
23
|
+
##
|
|
24
|
+
def additional_data=(value)
|
|
25
|
+
@additional_data = value
|
|
26
|
+
end
|
|
27
|
+
##
|
|
28
|
+
## Instantiates a new ArrivalBodySessionIdMember1 and sets the default values.
|
|
29
|
+
## @return a void
|
|
30
|
+
##
|
|
31
|
+
def initialize()
|
|
32
|
+
@additional_data = Hash.new
|
|
33
|
+
end
|
|
34
|
+
##
|
|
35
|
+
## Creates a new instance of the appropriate class based on discriminator value
|
|
36
|
+
## @param parse_node The parse node to use to read the discriminator value and create the object
|
|
37
|
+
## @return a arrival_body_session_id_member1
|
|
38
|
+
##
|
|
39
|
+
def self.create_from_discriminator_value(parse_node)
|
|
40
|
+
raise StandardError, 'parse_node cannot be null' if parse_node.nil?
|
|
41
|
+
return ArrivalBodySessionIdMember1.new
|
|
42
|
+
end
|
|
43
|
+
##
|
|
44
|
+
## The deserialization information for the current model
|
|
45
|
+
## @return a i_dictionary
|
|
46
|
+
##
|
|
47
|
+
def get_field_deserializers()
|
|
48
|
+
return {
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
##
|
|
52
|
+
## Serializes information the current object
|
|
53
|
+
## @param writer Serialization writer to use to serialize this model
|
|
54
|
+
## @return a void
|
|
55
|
+
##
|
|
56
|
+
def serialize(writer)
|
|
57
|
+
raise StandardError, 'writer cannot be null' if writer.nil?
|
|
58
|
+
writer.write_additional_data(@additional_data)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|