radiomanager_client 1.0.1

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.
Files changed (454) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +297 -0
  4. data/Rakefile +8 -0
  5. data/docs/Block.md +15 -0
  6. data/docs/BlockApi.md +233 -0
  7. data/docs/BlockRelations.md +10 -0
  8. data/docs/BlockRelationsBroadcast.md +11 -0
  9. data/docs/BlockRelationsBroadcastParams.md +8 -0
  10. data/docs/BlockRelationsItems.md +11 -0
  11. data/docs/BlockRelationsItemsParams.md +8 -0
  12. data/docs/BlockRelationsProgram.md +11 -0
  13. data/docs/BlockResult.md +18 -0
  14. data/docs/BlockResults.md +17 -0
  15. data/docs/Broadcast.md +29 -0
  16. data/docs/BroadcastApi.md +641 -0
  17. data/docs/BroadcastDataInput.md +31 -0
  18. data/docs/BroadcastFieldValues.md +8 -0
  19. data/docs/BroadcastInputOnly.md +9 -0
  20. data/docs/BroadcastOutputOnly.md +12 -0
  21. data/docs/BroadcastRelations.md +13 -0
  22. data/docs/BroadcastRelationsBlocks.md +11 -0
  23. data/docs/BroadcastRelationsItems.md +11 -0
  24. data/docs/BroadcastRelationsItemsParams.md +8 -0
  25. data/docs/BroadcastRelationsModelType.md +11 -0
  26. data/docs/BroadcastRelationsPresenters.md +11 -0
  27. data/docs/BroadcastRelationsTags.md +11 -0
  28. data/docs/BroadcastResult.md +40 -0
  29. data/docs/BroadcastResults.md +17 -0
  30. data/docs/Campaign.md +14 -0
  31. data/docs/CampaignApi.md +302 -0
  32. data/docs/CampaignDataInput.md +14 -0
  33. data/docs/CampaignOutputOnly.md +13 -0
  34. data/docs/CampaignRelations.md +9 -0
  35. data/docs/CampaignRelationsItems.md +11 -0
  36. data/docs/CampaignRelationsItemsParams.md +8 -0
  37. data/docs/CampaignResult.md +22 -0
  38. data/docs/CampaignResults.md +17 -0
  39. data/docs/Contact.md +13 -0
  40. data/docs/ContactApi.md +300 -0
  41. data/docs/ContactDataInput.md +13 -0
  42. data/docs/ContactFieldValues.md +8 -0
  43. data/docs/ContactOutputOnly.md +12 -0
  44. data/docs/ContactRelations.md +10 -0
  45. data/docs/ContactRelationsItems.md +11 -0
  46. data/docs/ContactRelationsTags.md +11 -0
  47. data/docs/ContactRelationsTagsParams.md +8 -0
  48. data/docs/ContactResult.md +21 -0
  49. data/docs/ContactResults.md +17 -0
  50. data/docs/Data.md +9 -0
  51. data/docs/Data1.md +9 -0
  52. data/docs/EPGBroadcast.md +10 -0
  53. data/docs/ExternalMessageApi.md +63 -0
  54. data/docs/ExternalMessageQueueData.md +14 -0
  55. data/docs/Forbidden.md +9 -0
  56. data/docs/Genre.md +11 -0
  57. data/docs/GenreApi.md +131 -0
  58. data/docs/GenreOutputOnly.md +8 -0
  59. data/docs/GenreRelations.md +9 -0
  60. data/docs/GenreRelationsBroadcasts.md +11 -0
  61. data/docs/GenreRelationsBroadcastsParams.md +8 -0
  62. data/docs/GenreRelationsPrograms.md +11 -0
  63. data/docs/GenreResult.md +14 -0
  64. data/docs/GenreResults.md +17 -0
  65. data/docs/ImportItem.md +18 -0
  66. data/docs/ImportItemFieldValues.md +8 -0
  67. data/docs/InlineResponse202.md +8 -0
  68. data/docs/InternalServerError.md +9 -0
  69. data/docs/InviteUserData.md +9 -0
  70. data/docs/InviteUserSuccess.md +8 -0
  71. data/docs/Item.md +23 -0
  72. data/docs/ItemApi.md +553 -0
  73. data/docs/ItemDataInput.md +26 -0
  74. data/docs/ItemInputOnly.md +10 -0
  75. data/docs/ItemOutputOnly.md +16 -0
  76. data/docs/ItemRelations.md +14 -0
  77. data/docs/ItemRelationsBlock.md +11 -0
  78. data/docs/ItemRelationsCampaign.md +11 -0
  79. data/docs/ItemRelationsContacts.md +11 -0
  80. data/docs/ItemRelationsContactsParams.md +8 -0
  81. data/docs/ItemRelationsProgram.md +11 -0
  82. data/docs/ItemRelationsTags.md +11 -0
  83. data/docs/ItemResult.md +39 -0
  84. data/docs/ItemResults.md +16 -0
  85. data/docs/ModelType.md +15 -0
  86. data/docs/ModelTypeApi.md +139 -0
  87. data/docs/ModelTypeOptions.md +8 -0
  88. data/docs/ModelTypeOutputOnly.md +8 -0
  89. data/docs/ModelTypeRelations.md +13 -0
  90. data/docs/ModelTypeRelationsBroadcasts.md +11 -0
  91. data/docs/ModelTypeRelationsCampaigns.md +11 -0
  92. data/docs/ModelTypeRelationsCampaignsParams.md +8 -0
  93. data/docs/ModelTypeRelationsContacts.md +11 -0
  94. data/docs/ModelTypeRelationsItems.md +11 -0
  95. data/docs/ModelTypeRelationsPresenters.md +11 -0
  96. data/docs/ModelTypeRelationsPrograms.md +11 -0
  97. data/docs/ModelTypeResult.md +22 -0
  98. data/docs/ModelTypeResults.md +17 -0
  99. data/docs/NotFound.md +9 -0
  100. data/docs/PostSuccess.md +9 -0
  101. data/docs/Presenter.md +13 -0
  102. data/docs/PresenterApi.md +300 -0
  103. data/docs/PresenterDataInput.md +13 -0
  104. data/docs/PresenterOutputOnly.md +12 -0
  105. data/docs/PresenterRelations.md +10 -0
  106. data/docs/PresenterRelationsBroadcasts.md +11 -0
  107. data/docs/PresenterRelationsPrograms.md +11 -0
  108. data/docs/PresenterRelationsProgramsParams.md +8 -0
  109. data/docs/PresenterResult.md +21 -0
  110. data/docs/PresenterResults.md +17 -0
  111. data/docs/Program.md +20 -0
  112. data/docs/ProgramApi.md +308 -0
  113. data/docs/ProgramDataInput.md +22 -0
  114. data/docs/ProgramFieldValues.md +8 -0
  115. data/docs/ProgramInputOnly.md +9 -0
  116. data/docs/ProgramOutputOnly.md +12 -0
  117. data/docs/ProgramRelations.md +13 -0
  118. data/docs/ProgramRelationsBlocks.md +11 -0
  119. data/docs/ProgramRelationsBroadcasts.md +11 -0
  120. data/docs/ProgramRelationsItems.md +11 -0
  121. data/docs/ProgramRelationsItemsParams.md +8 -0
  122. data/docs/ProgramRelationsPresenters.md +11 -0
  123. data/docs/ProgramRelationsTags.md +11 -0
  124. data/docs/ProgramResult.md +31 -0
  125. data/docs/ProgramResults.md +17 -0
  126. data/docs/ReadOnly.md +9 -0
  127. data/docs/RelationsPlaceholder.md +11 -0
  128. data/docs/StringApi.md +66 -0
  129. data/docs/Success.md +8 -0
  130. data/docs/Tag.md +8 -0
  131. data/docs/TagApi.md +302 -0
  132. data/docs/TagDataInput.md +8 -0
  133. data/docs/TagOutputOnly.md +12 -0
  134. data/docs/TagRelations.md +11 -0
  135. data/docs/TagRelationsBroadcasts.md +11 -0
  136. data/docs/TagRelationsBroadcastsParams.md +8 -0
  137. data/docs/TagRelationsContacts.md +11 -0
  138. data/docs/TagRelationsItems.md +11 -0
  139. data/docs/TagRelationsPrograms.md +11 -0
  140. data/docs/TagResult.md +17 -0
  141. data/docs/TagResults.md +16 -0
  142. data/docs/TextString.md +12 -0
  143. data/docs/TooManyRequests.md +8 -0
  144. data/docs/UnprocessableEntity.md +8 -0
  145. data/docs/UserApi.md +231 -0
  146. data/docs/UserResult.md +19 -0
  147. data/docs/UserResultSettings.md +13 -0
  148. data/docs/UserResults.md +17 -0
  149. data/docs/VisualResult.md +8 -0
  150. data/docs/VisualSlideApi.md +106 -0
  151. data/git_push.sh +55 -0
  152. data/lib/radiomanager_client.rb +185 -0
  153. data/lib/radiomanager_client/api/block_api.rb +257 -0
  154. data/lib/radiomanager_client/api/broadcast_api.rb +668 -0
  155. data/lib/radiomanager_client/api/campaign_api.rb +331 -0
  156. data/lib/radiomanager_client/api/contact_api.rb +328 -0
  157. data/lib/radiomanager_client/api/external_message_api.rb +78 -0
  158. data/lib/radiomanager_client/api/genre_api.rb +153 -0
  159. data/lib/radiomanager_client/api/item_api.rb +576 -0
  160. data/lib/radiomanager_client/api/model_type_api.rb +168 -0
  161. data/lib/radiomanager_client/api/presenter_api.rb +328 -0
  162. data/lib/radiomanager_client/api/program_api.rb +340 -0
  163. data/lib/radiomanager_client/api/string_api.rb +85 -0
  164. data/lib/radiomanager_client/api/tag_api.rb +331 -0
  165. data/lib/radiomanager_client/api/user_api.rb +255 -0
  166. data/lib/radiomanager_client/api/visual_slide_api.rb +121 -0
  167. data/lib/radiomanager_client/api_client.rb +389 -0
  168. data/lib/radiomanager_client/api_error.rb +38 -0
  169. data/lib/radiomanager_client/configuration.rb +209 -0
  170. data/lib/radiomanager_client/models/block.rb +293 -0
  171. data/lib/radiomanager_client/models/block_relations.rb +206 -0
  172. data/lib/radiomanager_client/models/block_relations_broadcast.rb +215 -0
  173. data/lib/radiomanager_client/models/block_relations_broadcast_params.rb +188 -0
  174. data/lib/radiomanager_client/models/block_relations_items.rb +215 -0
  175. data/lib/radiomanager_client/models/block_relations_items_params.rb +188 -0
  176. data/lib/radiomanager_client/models/block_relations_program.rb +215 -0
  177. data/lib/radiomanager_client/models/block_result.rb +320 -0
  178. data/lib/radiomanager_client/models/block_results.rb +271 -0
  179. data/lib/radiomanager_client/models/broadcast.rb +428 -0
  180. data/lib/radiomanager_client/models/broadcast_data_input.rb +450 -0
  181. data/lib/radiomanager_client/models/broadcast_field_values.rb +188 -0
  182. data/lib/radiomanager_client/models/broadcast_input_only.rb +201 -0
  183. data/lib/radiomanager_client/models/broadcast_output_only.rb +244 -0
  184. data/lib/radiomanager_client/models/broadcast_relations.rb +233 -0
  185. data/lib/radiomanager_client/models/broadcast_relations_blocks.rb +215 -0
  186. data/lib/radiomanager_client/models/broadcast_relations_items.rb +215 -0
  187. data/lib/radiomanager_client/models/broadcast_relations_items_params.rb +188 -0
  188. data/lib/radiomanager_client/models/broadcast_relations_model_type.rb +215 -0
  189. data/lib/radiomanager_client/models/broadcast_relations_presenters.rb +215 -0
  190. data/lib/radiomanager_client/models/broadcast_relations_tags.rb +215 -0
  191. data/lib/radiomanager_client/models/broadcast_result.rb +547 -0
  192. data/lib/radiomanager_client/models/broadcast_results.rb +271 -0
  193. data/lib/radiomanager_client/models/campaign.rb +259 -0
  194. data/lib/radiomanager_client/models/campaign_data_input.rb +259 -0
  195. data/lib/radiomanager_client/models/campaign_output_only.rb +255 -0
  196. data/lib/radiomanager_client/models/campaign_relations.rb +197 -0
  197. data/lib/radiomanager_client/models/campaign_relations_items.rb +215 -0
  198. data/lib/radiomanager_client/models/campaign_relations_items_params.rb +188 -0
  199. data/lib/radiomanager_client/models/campaign_result.rb +353 -0
  200. data/lib/radiomanager_client/models/campaign_results.rb +271 -0
  201. data/lib/radiomanager_client/models/contact.rb +248 -0
  202. data/lib/radiomanager_client/models/contact_data_input.rb +248 -0
  203. data/lib/radiomanager_client/models/contact_field_values.rb +188 -0
  204. data/lib/radiomanager_client/models/contact_output_only.rb +224 -0
  205. data/lib/radiomanager_client/models/contact_relations.rb +206 -0
  206. data/lib/radiomanager_client/models/contact_relations_items.rb +215 -0
  207. data/lib/radiomanager_client/models/contact_relations_tags.rb +215 -0
  208. data/lib/radiomanager_client/models/contact_relations_tags_params.rb +188 -0
  209. data/lib/radiomanager_client/models/contact_result.rb +320 -0
  210. data/lib/radiomanager_client/models/contact_results.rb +271 -0
  211. data/lib/radiomanager_client/models/data.rb +199 -0
  212. data/lib/radiomanager_client/models/data_1.rb +199 -0
  213. data/lib/radiomanager_client/models/epg_broadcast.rb +227 -0
  214. data/lib/radiomanager_client/models/external_message_queue_data.rb +333 -0
  215. data/lib/radiomanager_client/models/forbidden.rb +209 -0
  216. data/lib/radiomanager_client/models/genre.rb +225 -0
  217. data/lib/radiomanager_client/models/genre_output_only.rb +188 -0
  218. data/lib/radiomanager_client/models/genre_relations.rb +197 -0
  219. data/lib/radiomanager_client/models/genre_relations_broadcasts.rb +215 -0
  220. data/lib/radiomanager_client/models/genre_relations_broadcasts_params.rb +188 -0
  221. data/lib/radiomanager_client/models/genre_relations_programs.rb +215 -0
  222. data/lib/radiomanager_client/models/genre_result.rb +252 -0
  223. data/lib/radiomanager_client/models/genre_results.rb +271 -0
  224. data/lib/radiomanager_client/models/import_item.rb +292 -0
  225. data/lib/radiomanager_client/models/import_item_field_values.rb +188 -0
  226. data/lib/radiomanager_client/models/inline_response_202.rb +188 -0
  227. data/lib/radiomanager_client/models/internal_server_error.rb +209 -0
  228. data/lib/radiomanager_client/models/invite_user_data.rb +207 -0
  229. data/lib/radiomanager_client/models/invite_user_success.rb +188 -0
  230. data/lib/radiomanager_client/models/item.rb +366 -0
  231. data/lib/radiomanager_client/models/item_data_input.rb +397 -0
  232. data/lib/radiomanager_client/models/item_input_only.rb +210 -0
  233. data/lib/radiomanager_client/models/item_output_only.rb +260 -0
  234. data/lib/radiomanager_client/models/item_relations.rb +242 -0
  235. data/lib/radiomanager_client/models/item_relations_block.rb +215 -0
  236. data/lib/radiomanager_client/models/item_relations_campaign.rb +215 -0
  237. data/lib/radiomanager_client/models/item_relations_contacts.rb +215 -0
  238. data/lib/radiomanager_client/models/item_relations_contacts_params.rb +188 -0
  239. data/lib/radiomanager_client/models/item_relations_program.rb +215 -0
  240. data/lib/radiomanager_client/models/item_relations_tags.rb +215 -0
  241. data/lib/radiomanager_client/models/item_result.rb +510 -0
  242. data/lib/radiomanager_client/models/item_results.rb +262 -0
  243. data/lib/radiomanager_client/models/model_type.rb +289 -0
  244. data/lib/radiomanager_client/models/model_type_options.rb +188 -0
  245. data/lib/radiomanager_client/models/model_type_output_only.rb +188 -0
  246. data/lib/radiomanager_client/models/model_type_relations.rb +233 -0
  247. data/lib/radiomanager_client/models/model_type_relations_broadcasts.rb +215 -0
  248. data/lib/radiomanager_client/models/model_type_relations_campaigns.rb +215 -0
  249. data/lib/radiomanager_client/models/model_type_relations_campaigns_params.rb +188 -0
  250. data/lib/radiomanager_client/models/model_type_relations_contacts.rb +215 -0
  251. data/lib/radiomanager_client/models/model_type_relations_items.rb +215 -0
  252. data/lib/radiomanager_client/models/model_type_relations_presenters.rb +215 -0
  253. data/lib/radiomanager_client/models/model_type_relations_programs.rb +215 -0
  254. data/lib/radiomanager_client/models/model_type_result.rb +352 -0
  255. data/lib/radiomanager_client/models/model_type_results.rb +271 -0
  256. data/lib/radiomanager_client/models/not_found.rb +209 -0
  257. data/lib/radiomanager_client/models/post_success.rb +204 -0
  258. data/lib/radiomanager_client/models/presenter.rb +240 -0
  259. data/lib/radiomanager_client/models/presenter_data_input.rb +240 -0
  260. data/lib/radiomanager_client/models/presenter_output_only.rb +244 -0
  261. data/lib/radiomanager_client/models/presenter_relations.rb +206 -0
  262. data/lib/radiomanager_client/models/presenter_relations_broadcasts.rb +215 -0
  263. data/lib/radiomanager_client/models/presenter_relations_programs.rb +215 -0
  264. data/lib/radiomanager_client/models/presenter_relations_programs_params.rb +188 -0
  265. data/lib/radiomanager_client/models/presenter_result.rb +332 -0
  266. data/lib/radiomanager_client/models/presenter_results.rb +271 -0
  267. data/lib/radiomanager_client/models/program.rb +306 -0
  268. data/lib/radiomanager_client/models/program_data_input.rb +328 -0
  269. data/lib/radiomanager_client/models/program_field_values.rb +188 -0
  270. data/lib/radiomanager_client/models/program_input_only.rb +201 -0
  271. data/lib/radiomanager_client/models/program_output_only.rb +244 -0
  272. data/lib/radiomanager_client/models/program_relations.rb +233 -0
  273. data/lib/radiomanager_client/models/program_relations_blocks.rb +215 -0
  274. data/lib/radiomanager_client/models/program_relations_broadcasts.rb +215 -0
  275. data/lib/radiomanager_client/models/program_relations_items.rb +215 -0
  276. data/lib/radiomanager_client/models/program_relations_items_params.rb +188 -0
  277. data/lib/radiomanager_client/models/program_relations_presenters.rb +215 -0
  278. data/lib/radiomanager_client/models/program_relations_tags.rb +215 -0
  279. data/lib/radiomanager_client/models/program_result.rb +425 -0
  280. data/lib/radiomanager_client/models/program_results.rb +271 -0
  281. data/lib/radiomanager_client/models/read_only.rb +209 -0
  282. data/lib/radiomanager_client/models/relations_placeholder.rb +239 -0
  283. data/lib/radiomanager_client/models/success.rb +194 -0
  284. data/lib/radiomanager_client/models/tag.rb +193 -0
  285. data/lib/radiomanager_client/models/tag_data_input.rb +193 -0
  286. data/lib/radiomanager_client/models/tag_output_only.rb +229 -0
  287. data/lib/radiomanager_client/models/tag_relations.rb +215 -0
  288. data/lib/radiomanager_client/models/tag_relations_broadcasts.rb +215 -0
  289. data/lib/radiomanager_client/models/tag_relations_broadcasts_params.rb +188 -0
  290. data/lib/radiomanager_client/models/tag_relations_contacts.rb +215 -0
  291. data/lib/radiomanager_client/models/tag_relations_items.rb +215 -0
  292. data/lib/radiomanager_client/models/tag_relations_programs.rb +215 -0
  293. data/lib/radiomanager_client/models/tag_result.rb +279 -0
  294. data/lib/radiomanager_client/models/tag_results.rb +262 -0
  295. data/lib/radiomanager_client/models/text_string.rb +239 -0
  296. data/lib/radiomanager_client/models/too_many_requests.rb +193 -0
  297. data/lib/radiomanager_client/models/unprocessable_entity.rb +196 -0
  298. data/lib/radiomanager_client/models/user_result.rb +307 -0
  299. data/lib/radiomanager_client/models/user_result_settings.rb +233 -0
  300. data/lib/radiomanager_client/models/user_results.rb +271 -0
  301. data/lib/radiomanager_client/models/visual_result.rb +188 -0
  302. data/lib/radiomanager_client/version.rb +15 -0
  303. data/radiomanager_client-1.0.0.gem +0 -0
  304. data/radiomanager_client.gemspec +46 -0
  305. data/spec/api/block_api_spec.rb +88 -0
  306. data/spec/api/broadcast_api_spec.rb +180 -0
  307. data/spec/api/campaign_api_spec.rb +102 -0
  308. data/spec/api/contact_api_spec.rb +101 -0
  309. data/spec/api/external_message_api_spec.rb +47 -0
  310. data/spec/api/genre_api_spec.rb +64 -0
  311. data/spec/api/item_api_spec.rb +163 -0
  312. data/spec/api/model_type_api_spec.rb +68 -0
  313. data/spec/api/presenter_api_spec.rb +101 -0
  314. data/spec/api/program_api_spec.rb +105 -0
  315. data/spec/api/string_api_spec.rb +48 -0
  316. data/spec/api/tag_api_spec.rb +102 -0
  317. data/spec/api/user_api_spec.rb +84 -0
  318. data/spec/api/visual_slide_api_spec.rb +57 -0
  319. data/spec/api_client_spec.rb +226 -0
  320. data/spec/configuration_spec.rb +42 -0
  321. data/spec/models/block_relations_broadcast_params_spec.rb +42 -0
  322. data/spec/models/block_relations_broadcast_spec.rb +60 -0
  323. data/spec/models/block_relations_items_params_spec.rb +42 -0
  324. data/spec/models/block_relations_items_spec.rb +60 -0
  325. data/spec/models/block_relations_program_spec.rb +60 -0
  326. data/spec/models/block_relations_spec.rb +54 -0
  327. data/spec/models/block_result_spec.rb +102 -0
  328. data/spec/models/block_results_spec.rb +96 -0
  329. data/spec/models/block_spec.rb +84 -0
  330. data/spec/models/broadcast_data_input_spec.rb +184 -0
  331. data/spec/models/broadcast_field_values_spec.rb +42 -0
  332. data/spec/models/broadcast_input_only_spec.rb +48 -0
  333. data/spec/models/broadcast_output_only_spec.rb +66 -0
  334. data/spec/models/broadcast_relations_blocks_spec.rb +60 -0
  335. data/spec/models/broadcast_relations_items_params_spec.rb +42 -0
  336. data/spec/models/broadcast_relations_items_spec.rb +60 -0
  337. data/spec/models/broadcast_relations_model_type_spec.rb +60 -0
  338. data/spec/models/broadcast_relations_presenters_spec.rb +60 -0
  339. data/spec/models/broadcast_relations_spec.rb +72 -0
  340. data/spec/models/broadcast_relations_tags_spec.rb +60 -0
  341. data/spec/models/broadcast_result_spec.rb +238 -0
  342. data/spec/models/broadcast_results_spec.rb +96 -0
  343. data/spec/models/broadcast_spec.rb +172 -0
  344. data/spec/models/campaign_data_input_spec.rb +78 -0
  345. data/spec/models/campaign_output_only_spec.rb +72 -0
  346. data/spec/models/campaign_relations_items_params_spec.rb +42 -0
  347. data/spec/models/campaign_relations_items_spec.rb +60 -0
  348. data/spec/models/campaign_relations_spec.rb +48 -0
  349. data/spec/models/campaign_result_spec.rb +126 -0
  350. data/spec/models/campaign_results_spec.rb +96 -0
  351. data/spec/models/campaign_spec.rb +78 -0
  352. data/spec/models/contact_data_input_spec.rb +72 -0
  353. data/spec/models/contact_field_values_spec.rb +42 -0
  354. data/spec/models/contact_output_only_spec.rb +66 -0
  355. data/spec/models/contact_relations_items_spec.rb +60 -0
  356. data/spec/models/contact_relations_spec.rb +54 -0
  357. data/spec/models/contact_relations_tags_params_spec.rb +42 -0
  358. data/spec/models/contact_relations_tags_spec.rb +60 -0
  359. data/spec/models/contact_result_spec.rb +120 -0
  360. data/spec/models/contact_results_spec.rb +96 -0
  361. data/spec/models/contact_spec.rb +72 -0
  362. data/spec/models/data_1_spec.rb +48 -0
  363. data/spec/models/data_spec.rb +48 -0
  364. data/spec/models/epg_broadcast_spec.rb +54 -0
  365. data/spec/models/external_message_queue_data_spec.rb +78 -0
  366. data/spec/models/forbidden_spec.rb +48 -0
  367. data/spec/models/genre_output_only_spec.rb +42 -0
  368. data/spec/models/genre_relations_broadcasts_params_spec.rb +42 -0
  369. data/spec/models/genre_relations_broadcasts_spec.rb +60 -0
  370. data/spec/models/genre_relations_programs_spec.rb +60 -0
  371. data/spec/models/genre_relations_spec.rb +48 -0
  372. data/spec/models/genre_result_spec.rb +78 -0
  373. data/spec/models/genre_results_spec.rb +96 -0
  374. data/spec/models/genre_spec.rb +60 -0
  375. data/spec/models/import_item_field_values_spec.rb +42 -0
  376. data/spec/models/import_item_spec.rb +102 -0
  377. data/spec/models/inline_response_202_spec.rb +42 -0
  378. data/spec/models/internal_server_error_spec.rb +48 -0
  379. data/spec/models/invite_user_data_spec.rb +48 -0
  380. data/spec/models/invite_user_success_spec.rb +42 -0
  381. data/spec/models/item_data_input_spec.rb +154 -0
  382. data/spec/models/item_input_only_spec.rb +54 -0
  383. data/spec/models/item_output_only_spec.rb +90 -0
  384. data/spec/models/item_relations_block_spec.rb +60 -0
  385. data/spec/models/item_relations_campaign_spec.rb +60 -0
  386. data/spec/models/item_relations_contacts_params_spec.rb +42 -0
  387. data/spec/models/item_relations_contacts_spec.rb +60 -0
  388. data/spec/models/item_relations_program_spec.rb +60 -0
  389. data/spec/models/item_relations_spec.rb +78 -0
  390. data/spec/models/item_relations_tags_spec.rb +60 -0
  391. data/spec/models/item_result_spec.rb +232 -0
  392. data/spec/models/item_results_spec.rb +90 -0
  393. data/spec/models/item_spec.rb +136 -0
  394. data/spec/models/model_type_options_spec.rb +42 -0
  395. data/spec/models/model_type_output_only_spec.rb +42 -0
  396. data/spec/models/model_type_relations_broadcasts_spec.rb +60 -0
  397. data/spec/models/model_type_relations_campaigns_params_spec.rb +42 -0
  398. data/spec/models/model_type_relations_campaigns_spec.rb +60 -0
  399. data/spec/models/model_type_relations_contacts_spec.rb +60 -0
  400. data/spec/models/model_type_relations_items_spec.rb +60 -0
  401. data/spec/models/model_type_relations_presenters_spec.rb +60 -0
  402. data/spec/models/model_type_relations_programs_spec.rb +60 -0
  403. data/spec/models/model_type_relations_spec.rb +72 -0
  404. data/spec/models/model_type_result_spec.rb +130 -0
  405. data/spec/models/model_type_results_spec.rb +96 -0
  406. data/spec/models/model_type_spec.rb +88 -0
  407. data/spec/models/not_found_spec.rb +48 -0
  408. data/spec/models/post_success_spec.rb +48 -0
  409. data/spec/models/presenter_data_input_spec.rb +72 -0
  410. data/spec/models/presenter_output_only_spec.rb +66 -0
  411. data/spec/models/presenter_relations_broadcasts_spec.rb +60 -0
  412. data/spec/models/presenter_relations_programs_params_spec.rb +42 -0
  413. data/spec/models/presenter_relations_programs_spec.rb +60 -0
  414. data/spec/models/presenter_relations_spec.rb +54 -0
  415. data/spec/models/presenter_result_spec.rb +120 -0
  416. data/spec/models/presenter_results_spec.rb +96 -0
  417. data/spec/models/presenter_spec.rb +72 -0
  418. data/spec/models/program_data_input_spec.rb +126 -0
  419. data/spec/models/program_field_values_spec.rb +42 -0
  420. data/spec/models/program_input_only_spec.rb +48 -0
  421. data/spec/models/program_output_only_spec.rb +66 -0
  422. data/spec/models/program_relations_blocks_spec.rb +60 -0
  423. data/spec/models/program_relations_broadcasts_spec.rb +60 -0
  424. data/spec/models/program_relations_items_params_spec.rb +42 -0
  425. data/spec/models/program_relations_items_spec.rb +60 -0
  426. data/spec/models/program_relations_presenters_spec.rb +60 -0
  427. data/spec/models/program_relations_spec.rb +72 -0
  428. data/spec/models/program_relations_tags_spec.rb +60 -0
  429. data/spec/models/program_result_spec.rb +180 -0
  430. data/spec/models/program_results_spec.rb +96 -0
  431. data/spec/models/program_spec.rb +114 -0
  432. data/spec/models/read_only_spec.rb +48 -0
  433. data/spec/models/relations_placeholder_spec.rb +60 -0
  434. data/spec/models/success_spec.rb +42 -0
  435. data/spec/models/tag_data_input_spec.rb +42 -0
  436. data/spec/models/tag_output_only_spec.rb +66 -0
  437. data/spec/models/tag_relations_broadcasts_params_spec.rb +42 -0
  438. data/spec/models/tag_relations_broadcasts_spec.rb +60 -0
  439. data/spec/models/tag_relations_contacts_spec.rb +60 -0
  440. data/spec/models/tag_relations_items_spec.rb +60 -0
  441. data/spec/models/tag_relations_programs_spec.rb +60 -0
  442. data/spec/models/tag_relations_spec.rb +60 -0
  443. data/spec/models/tag_result_spec.rb +96 -0
  444. data/spec/models/tag_results_spec.rb +90 -0
  445. data/spec/models/tag_spec.rb +42 -0
  446. data/spec/models/text_string_spec.rb +66 -0
  447. data/spec/models/too_many_requests_spec.rb +42 -0
  448. data/spec/models/unprocessable_entity_spec.rb +42 -0
  449. data/spec/models/user_result_settings_spec.rb +72 -0
  450. data/spec/models/user_result_spec.rb +108 -0
  451. data/spec/models/user_results_spec.rb +96 -0
  452. data/spec/models/visual_result_spec.rb +42 -0
  453. data/spec/spec_helper.rb +111 -0
  454. metadata +825 -0
@@ -0,0 +1,428 @@
1
+ =begin
2
+ #RadioManager
3
+
4
+ #RadioManager
5
+
6
+ OpenAPI spec version: 2.0
7
+ Contact: support@pluxbox.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module RadioManagerClient
16
+
17
+ class Broadcast
18
+ attr_accessor :program_id
19
+
20
+ attr_accessor :model_type_id
21
+
22
+ attr_accessor :station_id
23
+
24
+ attr_accessor :field_values
25
+
26
+ attr_accessor :title
27
+
28
+ attr_accessor :start
29
+
30
+ attr_accessor :stop
31
+
32
+ attr_accessor :genre_id
33
+
34
+ attr_accessor :description
35
+
36
+ attr_accessor :short_name
37
+
38
+ attr_accessor :medium_name
39
+
40
+ attr_accessor :website
41
+
42
+ attr_accessor :email
43
+
44
+ attr_accessor :recommended
45
+
46
+ attr_accessor :language
47
+
48
+ attr_accessor :published
49
+
50
+ attr_accessor :repetition_uid
51
+
52
+ attr_accessor :repetition_type
53
+
54
+ attr_accessor :repetition_end
55
+
56
+ attr_accessor :repetition_start
57
+
58
+ attr_accessor :repetition_days
59
+
60
+ attr_accessor :pty_code_id
61
+
62
+ class EnumAttributeValidator
63
+ attr_reader :datatype
64
+ attr_reader :allowable_values
65
+
66
+ def initialize(datatype, allowable_values)
67
+ @allowable_values = allowable_values.map do |value|
68
+ case datatype.to_s
69
+ when /Integer/i
70
+ value.to_i
71
+ when /Float/i
72
+ value.to_f
73
+ else
74
+ value
75
+ end
76
+ end
77
+ end
78
+
79
+ def valid?(value)
80
+ !value || allowable_values.include?(value)
81
+ end
82
+ end
83
+
84
+ # Attribute mapping from ruby-style variable name to JSON key.
85
+ def self.attribute_map
86
+ {
87
+ :'program_id' => :'program_id',
88
+ :'model_type_id' => :'model_type_id',
89
+ :'station_id' => :'station_id',
90
+ :'field_values' => :'field_values',
91
+ :'title' => :'title',
92
+ :'start' => :'start',
93
+ :'stop' => :'stop',
94
+ :'genre_id' => :'genre_id',
95
+ :'description' => :'description',
96
+ :'short_name' => :'short_name',
97
+ :'medium_name' => :'medium_name',
98
+ :'website' => :'website',
99
+ :'email' => :'email',
100
+ :'recommended' => :'recommended',
101
+ :'language' => :'language',
102
+ :'published' => :'published',
103
+ :'repetition_uid' => :'repetition_uid',
104
+ :'repetition_type' => :'repetition_type',
105
+ :'repetition_end' => :'repetition_end',
106
+ :'repetition_start' => :'repetition_start',
107
+ :'repetition_days' => :'repetition_days',
108
+ :'pty_code_id' => :'pty_code_id'
109
+ }
110
+ end
111
+
112
+ # Attribute type mapping.
113
+ def self.swagger_types
114
+ {
115
+ :'program_id' => :'Integer',
116
+ :'model_type_id' => :'Integer',
117
+ :'station_id' => :'Integer',
118
+ :'field_values' => :'BroadcastFieldValues',
119
+ :'title' => :'String',
120
+ :'start' => :'DateTime',
121
+ :'stop' => :'DateTime',
122
+ :'genre_id' => :'Integer',
123
+ :'description' => :'String',
124
+ :'short_name' => :'String',
125
+ :'medium_name' => :'String',
126
+ :'website' => :'String',
127
+ :'email' => :'String',
128
+ :'recommended' => :'BOOLEAN',
129
+ :'language' => :'String',
130
+ :'published' => :'BOOLEAN',
131
+ :'repetition_uid' => :'String',
132
+ :'repetition_type' => :'String',
133
+ :'repetition_end' => :'DateTime',
134
+ :'repetition_start' => :'DateTime',
135
+ :'repetition_days' => :'Array<BOOLEAN>',
136
+ :'pty_code_id' => :'Integer'
137
+ }
138
+ end
139
+
140
+ # Initializes the object
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ def initialize(attributes = {})
143
+ return unless attributes.is_a?(Hash)
144
+
145
+ # convert string to symbol for hash key
146
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
147
+
148
+ if attributes.has_key?(:'program_id')
149
+ self.program_id = attributes[:'program_id']
150
+ end
151
+
152
+ if attributes.has_key?(:'model_type_id')
153
+ self.model_type_id = attributes[:'model_type_id']
154
+ end
155
+
156
+ if attributes.has_key?(:'station_id')
157
+ self.station_id = attributes[:'station_id']
158
+ end
159
+
160
+ if attributes.has_key?(:'field_values')
161
+ self.field_values = attributes[:'field_values']
162
+ end
163
+
164
+ if attributes.has_key?(:'title')
165
+ self.title = attributes[:'title']
166
+ end
167
+
168
+ if attributes.has_key?(:'start')
169
+ self.start = attributes[:'start']
170
+ end
171
+
172
+ if attributes.has_key?(:'stop')
173
+ self.stop = attributes[:'stop']
174
+ end
175
+
176
+ if attributes.has_key?(:'genre_id')
177
+ self.genre_id = attributes[:'genre_id']
178
+ end
179
+
180
+ if attributes.has_key?(:'description')
181
+ self.description = attributes[:'description']
182
+ end
183
+
184
+ if attributes.has_key?(:'short_name')
185
+ self.short_name = attributes[:'short_name']
186
+ end
187
+
188
+ if attributes.has_key?(:'medium_name')
189
+ self.medium_name = attributes[:'medium_name']
190
+ end
191
+
192
+ if attributes.has_key?(:'website')
193
+ self.website = attributes[:'website']
194
+ end
195
+
196
+ if attributes.has_key?(:'email')
197
+ self.email = attributes[:'email']
198
+ end
199
+
200
+ if attributes.has_key?(:'recommended')
201
+ self.recommended = attributes[:'recommended']
202
+ end
203
+
204
+ if attributes.has_key?(:'language')
205
+ self.language = attributes[:'language']
206
+ end
207
+
208
+ if attributes.has_key?(:'published')
209
+ self.published = attributes[:'published']
210
+ end
211
+
212
+ if attributes.has_key?(:'repetition_uid')
213
+ self.repetition_uid = attributes[:'repetition_uid']
214
+ end
215
+
216
+ if attributes.has_key?(:'repetition_type')
217
+ self.repetition_type = attributes[:'repetition_type']
218
+ end
219
+
220
+ if attributes.has_key?(:'repetition_end')
221
+ self.repetition_end = attributes[:'repetition_end']
222
+ end
223
+
224
+ if attributes.has_key?(:'repetition_start')
225
+ self.repetition_start = attributes[:'repetition_start']
226
+ end
227
+
228
+ if attributes.has_key?(:'repetition_days')
229
+ if (value = attributes[:'repetition_days']).is_a?(Array)
230
+ self.repetition_days = value
231
+ end
232
+ end
233
+
234
+ if attributes.has_key?(:'pty_code_id')
235
+ self.pty_code_id = attributes[:'pty_code_id']
236
+ end
237
+
238
+ end
239
+
240
+ # Show invalid properties with the reasons. Usually used together with valid?
241
+ # @return Array for valid properies with the reasons
242
+ def list_invalid_properties
243
+ invalid_properties = Array.new
244
+ if !@pty_code_id.nil? && @pty_code_id < 1
245
+ invalid_properties.push("invalid value for 'pty_code_id', must be greater than or equal to 1.")
246
+ end
247
+
248
+ return invalid_properties
249
+ end
250
+
251
+ # Check to see if the all the properties in the model are valid
252
+ # @return true if the model is valid
253
+ def valid?
254
+ repetition_type_validator = EnumAttributeValidator.new('String', ["1 week", "2 weeks", "4 weeks", "1 month"])
255
+ return false unless repetition_type_validator.valid?(@repetition_type)
256
+ return false if !@pty_code_id.nil? && @pty_code_id < 1
257
+ return true
258
+ end
259
+
260
+ # Custom attribute writer method checking allowed values (enum).
261
+ # @param [Object] repetition_type Object to be assigned
262
+ def repetition_type=(repetition_type)
263
+ validator = EnumAttributeValidator.new('String', ["1 week", "2 weeks", "4 weeks", "1 month"])
264
+ unless validator.valid?(repetition_type)
265
+ fail ArgumentError, "invalid value for 'repetition_type', must be one of #{validator.allowable_values}."
266
+ end
267
+ @repetition_type = repetition_type
268
+ end
269
+
270
+ # Custom attribute writer method with validation
271
+ # @param [Object] pty_code_id Value to be assigned
272
+ def pty_code_id=(pty_code_id)
273
+
274
+ if !pty_code_id.nil? && pty_code_id < 1
275
+ fail ArgumentError, "invalid value for 'pty_code_id', must be greater than or equal to 1."
276
+ end
277
+
278
+ @pty_code_id = pty_code_id
279
+ end
280
+
281
+ # Checks equality by comparing each attribute.
282
+ # @param [Object] Object to be compared
283
+ def ==(o)
284
+ return true if self.equal?(o)
285
+ self.class == o.class &&
286
+ program_id == o.program_id &&
287
+ model_type_id == o.model_type_id &&
288
+ station_id == o.station_id &&
289
+ field_values == o.field_values &&
290
+ title == o.title &&
291
+ start == o.start &&
292
+ stop == o.stop &&
293
+ genre_id == o.genre_id &&
294
+ description == o.description &&
295
+ short_name == o.short_name &&
296
+ medium_name == o.medium_name &&
297
+ website == o.website &&
298
+ email == o.email &&
299
+ recommended == o.recommended &&
300
+ language == o.language &&
301
+ published == o.published &&
302
+ repetition_uid == o.repetition_uid &&
303
+ repetition_type == o.repetition_type &&
304
+ repetition_end == o.repetition_end &&
305
+ repetition_start == o.repetition_start &&
306
+ repetition_days == o.repetition_days &&
307
+ pty_code_id == o.pty_code_id
308
+ end
309
+
310
+ # @see the `==` method
311
+ # @param [Object] Object to be compared
312
+ def eql?(o)
313
+ self == o
314
+ end
315
+
316
+ # Calculates hash code according to all attributes.
317
+ # @return [Fixnum] Hash code
318
+ def hash
319
+ [program_id, model_type_id, station_id, field_values, title, start, stop, genre_id, description, short_name, medium_name, website, email, recommended, language, published, repetition_uid, repetition_type, repetition_end, repetition_start, repetition_days, pty_code_id].hash
320
+ end
321
+
322
+ # Builds the object from hash
323
+ # @param [Hash] attributes Model attributes in the form of hash
324
+ # @return [Object] Returns the model itself
325
+ def build_from_hash(attributes)
326
+ return nil unless attributes.is_a?(Hash)
327
+ self.class.swagger_types.each_pair do |key, type|
328
+ if type =~ /\AArray<(.*)>/i
329
+ # check to ensure the input is an array given that the the attribute
330
+ # is documented as an array but the input is not
331
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
332
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
333
+ end
334
+ elsif !attributes[self.class.attribute_map[key]].nil?
335
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
336
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
337
+ end
338
+
339
+ self
340
+ end
341
+
342
+ # Deserializes the data based on type
343
+ # @param string type Data type
344
+ # @param string value Value to be deserialized
345
+ # @return [Object] Deserialized data
346
+ def _deserialize(type, value)
347
+ case type.to_sym
348
+ when :DateTime
349
+ DateTime.parse(value)
350
+ when :Date
351
+ Date.parse(value)
352
+ when :String
353
+ value.to_s
354
+ when :Integer
355
+ value.to_i
356
+ when :Float
357
+ value.to_f
358
+ when :BOOLEAN
359
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
360
+ true
361
+ else
362
+ false
363
+ end
364
+ when :Object
365
+ # generic object (usually a Hash), return directly
366
+ value
367
+ when /\AArray<(?<inner_type>.+)>\z/
368
+ inner_type = Regexp.last_match[:inner_type]
369
+ value.map { |v| _deserialize(inner_type, v) }
370
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
371
+ k_type = Regexp.last_match[:k_type]
372
+ v_type = Regexp.last_match[:v_type]
373
+ {}.tap do |hash|
374
+ value.each do |k, v|
375
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
376
+ end
377
+ end
378
+ else # model
379
+ temp_model = RadioManagerClient.const_get(type).new
380
+ temp_model.build_from_hash(value)
381
+ end
382
+ end
383
+
384
+ # Returns the string representation of the object
385
+ # @return [String] String presentation of the object
386
+ def to_s
387
+ to_hash.to_s
388
+ end
389
+
390
+ # to_body is an alias to to_hash (backward compatibility)
391
+ # @return [Hash] Returns the object in the form of hash
392
+ def to_body
393
+ to_hash
394
+ end
395
+
396
+ # Returns the object in the form of hash
397
+ # @return [Hash] Returns the object in the form of hash
398
+ def to_hash
399
+ hash = {}
400
+ self.class.attribute_map.each_pair do |attr, param|
401
+ value = self.send(attr)
402
+ next if value.nil?
403
+ hash[param] = _to_hash(value)
404
+ end
405
+ hash
406
+ end
407
+
408
+ # Outputs non-array value in the form of hash
409
+ # For object, use to_hash. Otherwise, just return the value
410
+ # @param [Object] value Any valid value
411
+ # @return [Hash] Returns the value in the form of hash
412
+ def _to_hash(value)
413
+ if value.is_a?(Array)
414
+ value.compact.map{ |v| _to_hash(v) }
415
+ elsif value.is_a?(Hash)
416
+ {}.tap do |hash|
417
+ value.each { |k, v| hash[k] = _to_hash(v) }
418
+ end
419
+ elsif value.respond_to? :to_hash
420
+ value.to_hash
421
+ else
422
+ value
423
+ end
424
+ end
425
+
426
+ end
427
+
428
+ end
@@ -0,0 +1,450 @@
1
+ =begin
2
+ #RadioManager
3
+
4
+ #RadioManager
5
+
6
+ OpenAPI spec version: 2.0
7
+ Contact: support@pluxbox.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module RadioManagerClient
16
+
17
+ class BroadcastDataInput
18
+ attr_accessor :program_id
19
+
20
+ attr_accessor :model_type_id
21
+
22
+ attr_accessor :station_id
23
+
24
+ attr_accessor :field_values
25
+
26
+ attr_accessor :title
27
+
28
+ attr_accessor :start
29
+
30
+ attr_accessor :stop
31
+
32
+ attr_accessor :genre_id
33
+
34
+ attr_accessor :description
35
+
36
+ attr_accessor :short_name
37
+
38
+ attr_accessor :medium_name
39
+
40
+ attr_accessor :website
41
+
42
+ attr_accessor :email
43
+
44
+ attr_accessor :recommended
45
+
46
+ attr_accessor :language
47
+
48
+ attr_accessor :published
49
+
50
+ attr_accessor :repetition_uid
51
+
52
+ attr_accessor :repetition_type
53
+
54
+ attr_accessor :repetition_end
55
+
56
+ attr_accessor :repetition_start
57
+
58
+ attr_accessor :repetition_days
59
+
60
+ attr_accessor :pty_code_id
61
+
62
+ attr_accessor :tags
63
+
64
+ attr_accessor :presenters
65
+
66
+ class EnumAttributeValidator
67
+ attr_reader :datatype
68
+ attr_reader :allowable_values
69
+
70
+ def initialize(datatype, allowable_values)
71
+ @allowable_values = allowable_values.map do |value|
72
+ case datatype.to_s
73
+ when /Integer/i
74
+ value.to_i
75
+ when /Float/i
76
+ value.to_f
77
+ else
78
+ value
79
+ end
80
+ end
81
+ end
82
+
83
+ def valid?(value)
84
+ !value || allowable_values.include?(value)
85
+ end
86
+ end
87
+
88
+ # Attribute mapping from ruby-style variable name to JSON key.
89
+ def self.attribute_map
90
+ {
91
+ :'program_id' => :'program_id',
92
+ :'model_type_id' => :'model_type_id',
93
+ :'station_id' => :'station_id',
94
+ :'field_values' => :'field_values',
95
+ :'title' => :'title',
96
+ :'start' => :'start',
97
+ :'stop' => :'stop',
98
+ :'genre_id' => :'genre_id',
99
+ :'description' => :'description',
100
+ :'short_name' => :'short_name',
101
+ :'medium_name' => :'medium_name',
102
+ :'website' => :'website',
103
+ :'email' => :'email',
104
+ :'recommended' => :'recommended',
105
+ :'language' => :'language',
106
+ :'published' => :'published',
107
+ :'repetition_uid' => :'repetition_uid',
108
+ :'repetition_type' => :'repetition_type',
109
+ :'repetition_end' => :'repetition_end',
110
+ :'repetition_start' => :'repetition_start',
111
+ :'repetition_days' => :'repetition_days',
112
+ :'pty_code_id' => :'pty_code_id',
113
+ :'tags' => :'tags',
114
+ :'presenters' => :'presenters'
115
+ }
116
+ end
117
+
118
+ # Attribute type mapping.
119
+ def self.swagger_types
120
+ {
121
+ :'program_id' => :'Integer',
122
+ :'model_type_id' => :'Integer',
123
+ :'station_id' => :'Integer',
124
+ :'field_values' => :'BroadcastFieldValues',
125
+ :'title' => :'String',
126
+ :'start' => :'DateTime',
127
+ :'stop' => :'DateTime',
128
+ :'genre_id' => :'Integer',
129
+ :'description' => :'String',
130
+ :'short_name' => :'String',
131
+ :'medium_name' => :'String',
132
+ :'website' => :'String',
133
+ :'email' => :'String',
134
+ :'recommended' => :'BOOLEAN',
135
+ :'language' => :'String',
136
+ :'published' => :'BOOLEAN',
137
+ :'repetition_uid' => :'String',
138
+ :'repetition_type' => :'String',
139
+ :'repetition_end' => :'DateTime',
140
+ :'repetition_start' => :'DateTime',
141
+ :'repetition_days' => :'Array<BOOLEAN>',
142
+ :'pty_code_id' => :'Integer',
143
+ :'tags' => :'Array<Integer>',
144
+ :'presenters' => :'Array<Integer>'
145
+ }
146
+ end
147
+
148
+ # Initializes the object
149
+ # @param [Hash] attributes Model attributes in the form of hash
150
+ def initialize(attributes = {})
151
+ return unless attributes.is_a?(Hash)
152
+
153
+ # convert string to symbol for hash key
154
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
155
+
156
+ if attributes.has_key?(:'program_id')
157
+ self.program_id = attributes[:'program_id']
158
+ end
159
+
160
+ if attributes.has_key?(:'model_type_id')
161
+ self.model_type_id = attributes[:'model_type_id']
162
+ end
163
+
164
+ if attributes.has_key?(:'station_id')
165
+ self.station_id = attributes[:'station_id']
166
+ end
167
+
168
+ if attributes.has_key?(:'field_values')
169
+ self.field_values = attributes[:'field_values']
170
+ end
171
+
172
+ if attributes.has_key?(:'title')
173
+ self.title = attributes[:'title']
174
+ end
175
+
176
+ if attributes.has_key?(:'start')
177
+ self.start = attributes[:'start']
178
+ end
179
+
180
+ if attributes.has_key?(:'stop')
181
+ self.stop = attributes[:'stop']
182
+ end
183
+
184
+ if attributes.has_key?(:'genre_id')
185
+ self.genre_id = attributes[:'genre_id']
186
+ end
187
+
188
+ if attributes.has_key?(:'description')
189
+ self.description = attributes[:'description']
190
+ end
191
+
192
+ if attributes.has_key?(:'short_name')
193
+ self.short_name = attributes[:'short_name']
194
+ end
195
+
196
+ if attributes.has_key?(:'medium_name')
197
+ self.medium_name = attributes[:'medium_name']
198
+ end
199
+
200
+ if attributes.has_key?(:'website')
201
+ self.website = attributes[:'website']
202
+ end
203
+
204
+ if attributes.has_key?(:'email')
205
+ self.email = attributes[:'email']
206
+ end
207
+
208
+ if attributes.has_key?(:'recommended')
209
+ self.recommended = attributes[:'recommended']
210
+ end
211
+
212
+ if attributes.has_key?(:'language')
213
+ self.language = attributes[:'language']
214
+ end
215
+
216
+ if attributes.has_key?(:'published')
217
+ self.published = attributes[:'published']
218
+ end
219
+
220
+ if attributes.has_key?(:'repetition_uid')
221
+ self.repetition_uid = attributes[:'repetition_uid']
222
+ end
223
+
224
+ if attributes.has_key?(:'repetition_type')
225
+ self.repetition_type = attributes[:'repetition_type']
226
+ end
227
+
228
+ if attributes.has_key?(:'repetition_end')
229
+ self.repetition_end = attributes[:'repetition_end']
230
+ end
231
+
232
+ if attributes.has_key?(:'repetition_start')
233
+ self.repetition_start = attributes[:'repetition_start']
234
+ end
235
+
236
+ if attributes.has_key?(:'repetition_days')
237
+ if (value = attributes[:'repetition_days']).is_a?(Array)
238
+ self.repetition_days = value
239
+ end
240
+ end
241
+
242
+ if attributes.has_key?(:'pty_code_id')
243
+ self.pty_code_id = attributes[:'pty_code_id']
244
+ end
245
+
246
+ if attributes.has_key?(:'tags')
247
+ if (value = attributes[:'tags']).is_a?(Array)
248
+ self.tags = value
249
+ end
250
+ end
251
+
252
+ if attributes.has_key?(:'presenters')
253
+ if (value = attributes[:'presenters']).is_a?(Array)
254
+ self.presenters = value
255
+ end
256
+ end
257
+
258
+ end
259
+
260
+ # Show invalid properties with the reasons. Usually used together with valid?
261
+ # @return Array for valid properies with the reasons
262
+ def list_invalid_properties
263
+ invalid_properties = Array.new
264
+ if !@pty_code_id.nil? && @pty_code_id < 1
265
+ invalid_properties.push("invalid value for 'pty_code_id', must be greater than or equal to 1.")
266
+ end
267
+
268
+ return invalid_properties
269
+ end
270
+
271
+ # Check to see if the all the properties in the model are valid
272
+ # @return true if the model is valid
273
+ def valid?
274
+ repetition_type_validator = EnumAttributeValidator.new('String', ["1 week", "2 weeks", "4 weeks", "1 month"])
275
+ return false unless repetition_type_validator.valid?(@repetition_type)
276
+ return false if !@pty_code_id.nil? && @pty_code_id < 1
277
+ return true
278
+ end
279
+
280
+ # Custom attribute writer method checking allowed values (enum).
281
+ # @param [Object] repetition_type Object to be assigned
282
+ def repetition_type=(repetition_type)
283
+ validator = EnumAttributeValidator.new('String', ["1 week", "2 weeks", "4 weeks", "1 month"])
284
+ unless validator.valid?(repetition_type)
285
+ fail ArgumentError, "invalid value for 'repetition_type', must be one of #{validator.allowable_values}."
286
+ end
287
+ @repetition_type = repetition_type
288
+ end
289
+
290
+ # Custom attribute writer method with validation
291
+ # @param [Object] pty_code_id Value to be assigned
292
+ def pty_code_id=(pty_code_id)
293
+
294
+ if !pty_code_id.nil? && pty_code_id < 1
295
+ fail ArgumentError, "invalid value for 'pty_code_id', must be greater than or equal to 1."
296
+ end
297
+
298
+ @pty_code_id = pty_code_id
299
+ end
300
+
301
+ # Checks equality by comparing each attribute.
302
+ # @param [Object] Object to be compared
303
+ def ==(o)
304
+ return true if self.equal?(o)
305
+ self.class == o.class &&
306
+ program_id == o.program_id &&
307
+ model_type_id == o.model_type_id &&
308
+ station_id == o.station_id &&
309
+ field_values == o.field_values &&
310
+ title == o.title &&
311
+ start == o.start &&
312
+ stop == o.stop &&
313
+ genre_id == o.genre_id &&
314
+ description == o.description &&
315
+ short_name == o.short_name &&
316
+ medium_name == o.medium_name &&
317
+ website == o.website &&
318
+ email == o.email &&
319
+ recommended == o.recommended &&
320
+ language == o.language &&
321
+ published == o.published &&
322
+ repetition_uid == o.repetition_uid &&
323
+ repetition_type == o.repetition_type &&
324
+ repetition_end == o.repetition_end &&
325
+ repetition_start == o.repetition_start &&
326
+ repetition_days == o.repetition_days &&
327
+ pty_code_id == o.pty_code_id &&
328
+ tags == o.tags &&
329
+ presenters == o.presenters
330
+ end
331
+
332
+ # @see the `==` method
333
+ # @param [Object] Object to be compared
334
+ def eql?(o)
335
+ self == o
336
+ end
337
+
338
+ # Calculates hash code according to all attributes.
339
+ # @return [Fixnum] Hash code
340
+ def hash
341
+ [program_id, model_type_id, station_id, field_values, title, start, stop, genre_id, description, short_name, medium_name, website, email, recommended, language, published, repetition_uid, repetition_type, repetition_end, repetition_start, repetition_days, pty_code_id, tags, presenters].hash
342
+ end
343
+
344
+ # Builds the object from hash
345
+ # @param [Hash] attributes Model attributes in the form of hash
346
+ # @return [Object] Returns the model itself
347
+ def build_from_hash(attributes)
348
+ return nil unless attributes.is_a?(Hash)
349
+ self.class.swagger_types.each_pair do |key, type|
350
+ if type =~ /\AArray<(.*)>/i
351
+ # check to ensure the input is an array given that the the attribute
352
+ # is documented as an array but the input is not
353
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
354
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
355
+ end
356
+ elsif !attributes[self.class.attribute_map[key]].nil?
357
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
358
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
359
+ end
360
+
361
+ self
362
+ end
363
+
364
+ # Deserializes the data based on type
365
+ # @param string type Data type
366
+ # @param string value Value to be deserialized
367
+ # @return [Object] Deserialized data
368
+ def _deserialize(type, value)
369
+ case type.to_sym
370
+ when :DateTime
371
+ DateTime.parse(value)
372
+ when :Date
373
+ Date.parse(value)
374
+ when :String
375
+ value.to_s
376
+ when :Integer
377
+ value.to_i
378
+ when :Float
379
+ value.to_f
380
+ when :BOOLEAN
381
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
382
+ true
383
+ else
384
+ false
385
+ end
386
+ when :Object
387
+ # generic object (usually a Hash), return directly
388
+ value
389
+ when /\AArray<(?<inner_type>.+)>\z/
390
+ inner_type = Regexp.last_match[:inner_type]
391
+ value.map { |v| _deserialize(inner_type, v) }
392
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
393
+ k_type = Regexp.last_match[:k_type]
394
+ v_type = Regexp.last_match[:v_type]
395
+ {}.tap do |hash|
396
+ value.each do |k, v|
397
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
398
+ end
399
+ end
400
+ else # model
401
+ temp_model = RadioManagerClient.const_get(type).new
402
+ temp_model.build_from_hash(value)
403
+ end
404
+ end
405
+
406
+ # Returns the string representation of the object
407
+ # @return [String] String presentation of the object
408
+ def to_s
409
+ to_hash.to_s
410
+ end
411
+
412
+ # to_body is an alias to to_hash (backward compatibility)
413
+ # @return [Hash] Returns the object in the form of hash
414
+ def to_body
415
+ to_hash
416
+ end
417
+
418
+ # Returns the object in the form of hash
419
+ # @return [Hash] Returns the object in the form of hash
420
+ def to_hash
421
+ hash = {}
422
+ self.class.attribute_map.each_pair do |attr, param|
423
+ value = self.send(attr)
424
+ next if value.nil?
425
+ hash[param] = _to_hash(value)
426
+ end
427
+ hash
428
+ end
429
+
430
+ # Outputs non-array value in the form of hash
431
+ # For object, use to_hash. Otherwise, just return the value
432
+ # @param [Object] value Any valid value
433
+ # @return [Hash] Returns the value in the form of hash
434
+ def _to_hash(value)
435
+ if value.is_a?(Array)
436
+ value.compact.map{ |v| _to_hash(v) }
437
+ elsif value.is_a?(Hash)
438
+ {}.tap do |hash|
439
+ value.each { |k, v| hash[k] = _to_hash(v) }
440
+ end
441
+ elsif value.respond_to? :to_hash
442
+ value.to_hash
443
+ else
444
+ value
445
+ end
446
+ end
447
+
448
+ end
449
+
450
+ end