shortcut_client_ruby 0.0.2
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 +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +2303 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/bin/update.rb +34 -0
- data/config.json +7 -0
- data/docs/BasicWorkspaceInfo.md +8 -0
- data/docs/Branch.md +17 -0
- data/docs/Category.md +15 -0
- data/docs/Commit.md +19 -0
- data/docs/CreateCategory.md +10 -0
- data/docs/CreateCategoryParams.md +9 -0
- data/docs/CreateCommentComment.md +11 -0
- data/docs/CreateEntityTemplate.md +9 -0
- data/docs/CreateEpic.md +23 -0
- data/docs/CreateEpicComment.md +11 -0
- data/docs/CreateGroup.md +14 -0
- data/docs/CreateIteration.md +13 -0
- data/docs/CreateLabelParams.md +10 -0
- data/docs/CreateLinkedFile.md +15 -0
- data/docs/CreateMilestone.md +12 -0
- data/docs/CreateOrDeleteStoryReaction.md +7 -0
- data/docs/CreateProject.md +17 -0
- data/docs/CreateStories.md +7 -0
- data/docs/CreateStoryComment.md +11 -0
- data/docs/CreateStoryCommentParams.md +11 -0
- data/docs/CreateStoryContents.md +27 -0
- data/docs/CreateStoryLink.md +9 -0
- data/docs/CreateStoryLinkParams.md +9 -0
- data/docs/CreateStoryParams.md +33 -0
- data/docs/CreateTask.md +12 -0
- data/docs/CreateTaskParams.md +12 -0
- data/docs/DefaultApi.md +5632 -0
- data/docs/DeleteStories.md +7 -0
- data/docs/EntityTemplate.md +14 -0
- data/docs/EntityTemplateTask.md +10 -0
- data/docs/Epic.md +44 -0
- data/docs/EpicSearchResults.md +10 -0
- data/docs/EpicSlim.md +43 -0
- data/docs/EpicState.md +15 -0
- data/docs/EpicStats.md +19 -0
- data/docs/EpicWorkflow.md +12 -0
- data/docs/GetEpicStories.md +7 -0
- data/docs/GetExternalLinkStoriesParams.md +7 -0
- data/docs/GetIterationStories.md +7 -0
- data/docs/GetLabelStories.md +7 -0
- data/docs/GetMember.md +7 -0
- data/docs/GetProjectStories.md +7 -0
- data/docs/Group.md +22 -0
- data/docs/History.md +15 -0
- data/docs/HistoryActionBranchCreate.md +11 -0
- data/docs/HistoryActionBranchMerge.md +11 -0
- data/docs/HistoryActionBranchPush.md +11 -0
- data/docs/HistoryActionLabelCreate.md +11 -0
- data/docs/HistoryActionLabelDelete.md +10 -0
- data/docs/HistoryActionLabelUpdate.md +9 -0
- data/docs/HistoryActionProjectUpdate.md +11 -0
- data/docs/HistoryActionPullRequest.md +12 -0
- data/docs/HistoryActionStoryCommentCreate.md +12 -0
- data/docs/HistoryActionStoryCreate.md +30 -0
- data/docs/HistoryActionStoryDelete.md +11 -0
- data/docs/HistoryActionStoryLinkCreate.md +12 -0
- data/docs/HistoryActionStoryLinkDelete.md +12 -0
- data/docs/HistoryActionStoryLinkUpdate.md +13 -0
- data/docs/HistoryActionStoryUpdate.md +13 -0
- data/docs/HistoryActionTaskCreate.md +15 -0
- data/docs/HistoryActionTaskDelete.md +10 -0
- data/docs/HistoryActionTaskUpdate.md +13 -0
- data/docs/HistoryChangesStory.md +30 -0
- data/docs/HistoryChangesStoryLink.md +9 -0
- data/docs/HistoryChangesTask.md +10 -0
- data/docs/HistoryReferenceBranch.md +10 -0
- data/docs/HistoryReferenceCommit.md +10 -0
- data/docs/HistoryReferenceEpic.md +10 -0
- data/docs/HistoryReferenceGeneral.md +9 -0
- data/docs/HistoryReferenceGroup.md +9 -0
- data/docs/HistoryReferenceIteration.md +10 -0
- data/docs/HistoryReferenceLabel.md +10 -0
- data/docs/HistoryReferenceProject.md +10 -0
- data/docs/HistoryReferenceStory.md +11 -0
- data/docs/HistoryReferenceStoryTask.md +9 -0
- data/docs/HistoryReferenceWorkflowState.md +10 -0
- data/docs/Icon.md +11 -0
- data/docs/Identity.md +9 -0
- data/docs/Iteration.md +24 -0
- data/docs/IterationSlim.md +23 -0
- data/docs/IterationStats.md +17 -0
- data/docs/Label.md +17 -0
- data/docs/LabelSlim.md +16 -0
- data/docs/LabelStats.md +21 -0
- data/docs/LinkedFile.md +22 -0
- data/docs/ListEpics.md +7 -0
- data/docs/ListGroupStories.md +8 -0
- data/docs/ListLabels.md +7 -0
- data/docs/ListMembers.md +7 -0
- data/docs/MaxSearchResultsExceededError.md +9 -0
- data/docs/Member.md +17 -0
- data/docs/MemberInfo.md +10 -0
- data/docs/Milestone.md +23 -0
- data/docs/MilestoneStats.md +9 -0
- data/docs/Profile.md +15 -0
- data/docs/Project.md +25 -0
- data/docs/ProjectStats.md +9 -0
- data/docs/PullRequest.md +28 -0
- data/docs/PullRequestLabel.md +11 -0
- data/docs/Repository.md +15 -0
- data/docs/Search.md +10 -0
- data/docs/SearchResults.md +8 -0
- data/docs/SearchStories.md +34 -0
- data/docs/Story.md +56 -0
- data/docs/StoryComment.md +20 -0
- data/docs/StoryContents.md +25 -0
- data/docs/StoryContentsTask.md +11 -0
- data/docs/StoryHistoryChangeAddsRemovesInt.md +8 -0
- data/docs/StoryHistoryChangeAddsRemovesUuid.md +8 -0
- data/docs/StoryHistoryChangeOldNewBool.md +8 -0
- data/docs/StoryHistoryChangeOldNewInt.md +8 -0
- data/docs/StoryHistoryChangeOldNewStr.md +8 -0
- data/docs/StoryHistoryChangeOldNewUuid.md +8 -0
- data/docs/StoryLink.md +14 -0
- data/docs/StoryReaction.md +8 -0
- data/docs/StorySearchResults.md +10 -0
- data/docs/StorySlim.md +54 -0
- data/docs/StoryStats.md +7 -0
- data/docs/Task.md +20 -0
- data/docs/ThreadedComment.md +19 -0
- data/docs/TypedStoryLink.md +15 -0
- data/docs/UnusableEntitlementError.md +9 -0
- data/docs/UpdateCategory.md +9 -0
- data/docs/UpdateComment.md +7 -0
- data/docs/UpdateEntityTemplate.md +8 -0
- data/docs/UpdateEpic.md +23 -0
- data/docs/UpdateFile.md +12 -0
- data/docs/UpdateGroup.md +15 -0
- data/docs/UpdateIteration.md +13 -0
- data/docs/UpdateLabel.md +10 -0
- data/docs/UpdateLinkedFile.md +14 -0
- data/docs/UpdateMilestone.md +14 -0
- data/docs/UpdateProject.md +15 -0
- data/docs/UpdateStories.md +27 -0
- data/docs/UpdateStory.md +32 -0
- data/docs/UpdateStoryComment.md +7 -0
- data/docs/UpdateStoryContents.md +27 -0
- data/docs/UpdateStoryLink.md +9 -0
- data/docs/UpdateTask.md +11 -0
- data/docs/UploadedFile.md +23 -0
- data/docs/V3FilesBody.md +11 -0
- data/docs/Workflow.md +17 -0
- data/docs/WorkflowState.md +18 -0
- data/git_push.sh +55 -0
- data/lib/shortcut/client/ruby/version.rb +9 -0
- data/lib/shortcut/client/ruby.rb +12 -0
- data/lib/shortcut_client_ruby/api/default_api.rb +6091 -0
- data/lib/shortcut_client_ruby/api_client.rb +388 -0
- data/lib/shortcut_client_ruby/api_error.rb +57 -0
- data/lib/shortcut_client_ruby/configuration.rb +205 -0
- data/lib/shortcut_client_ruby/models/basic_workspace_info.rb +227 -0
- data/lib/shortcut_client_ruby/models/branch.rb +371 -0
- data/lib/shortcut_client_ruby/models/category.rb +335 -0
- data/lib/shortcut_client_ruby/models/commit.rb +398 -0
- data/lib/shortcut_client_ruby/models/create_category.rb +281 -0
- data/lib/shortcut_client_ruby/models/create_category_params.rb +233 -0
- data/lib/shortcut_client_ruby/models/create_comment_comment.rb +252 -0
- data/lib/shortcut_client_ruby/models/create_entity_template.rb +237 -0
- data/lib/shortcut_client_ruby/models/create_epic.rb +416 -0
- data/lib/shortcut_client_ruby/models/create_epic_comment.rb +252 -0
- data/lib/shortcut_client_ruby/models/create_group.rb +325 -0
- data/lib/shortcut_client_ruby/models/create_iteration.rb +288 -0
- data/lib/shortcut_client_ruby/models/create_label_params.rb +243 -0
- data/lib/shortcut_client_ruby/models/create_linked_file.rb +336 -0
- data/lib/shortcut_client_ruby/models/create_milestone.rb +298 -0
- data/lib/shortcut_client_ruby/models/create_or_delete_story_reaction.rb +212 -0
- data/lib/shortcut_client_ruby/models/create_project.rb +319 -0
- data/lib/shortcut_client_ruby/models/create_stories.rb +214 -0
- data/lib/shortcut_client_ruby/models/create_story_comment.rb +252 -0
- data/lib/shortcut_client_ruby/models/create_story_comment_params.rb +253 -0
- data/lib/shortcut_client_ruby/models/create_story_contents.rb +433 -0
- data/lib/shortcut_client_ruby/models/create_story_link.rb +276 -0
- data/lib/shortcut_client_ruby/models/create_story_link_params.rb +267 -0
- data/lib/shortcut_client_ruby/models/create_story_params.rb +532 -0
- data/lib/shortcut_client_ruby/models/create_task.rb +264 -0
- data/lib/shortcut_client_ruby/models/create_task_params.rb +265 -0
- data/lib/shortcut_client_ruby/models/delete_stories.rb +214 -0
- data/lib/shortcut_client_ruby/models/entity_template.rb +317 -0
- data/lib/shortcut_client_ruby/models/entity_template_task.rb +245 -0
- data/lib/shortcut_client_ruby/models/epic.rb +799 -0
- data/lib/shortcut_client_ruby/models/epic_search_results.rb +257 -0
- data/lib/shortcut_client_ruby/models/epic_slim.rb +777 -0
- data/lib/shortcut_client_ruby/models/epic_state.rb +328 -0
- data/lib/shortcut_client_ruby/models/epic_stats.rb +384 -0
- data/lib/shortcut_client_ruby/models/epic_workflow.rb +290 -0
- data/lib/shortcut_client_ruby/models/get_epic_stories.rb +207 -0
- data/lib/shortcut_client_ruby/models/get_external_link_stories_params.rb +212 -0
- data/lib/shortcut_client_ruby/models/get_iteration_stories.rb +207 -0
- data/lib/shortcut_client_ruby/models/get_label_stories.rb +207 -0
- data/lib/shortcut_client_ruby/models/get_member.rb +207 -0
- data/lib/shortcut_client_ruby/models/get_project_stories.rb +207 -0
- data/lib/shortcut_client_ruby/models/group.rb +479 -0
- data/lib/shortcut_client_ruby/models/history.rb +347 -0
- data/lib/shortcut_client_ruby/models/history_action_branch_create.rb +307 -0
- data/lib/shortcut_client_ruby/models/history_action_branch_merge.rb +307 -0
- data/lib/shortcut_client_ruby/models/history_action_branch_push.rb +307 -0
- data/lib/shortcut_client_ruby/models/history_action_label_create.rb +307 -0
- data/lib/shortcut_client_ruby/models/history_action_label_delete.rb +292 -0
- data/lib/shortcut_client_ruby/models/history_action_label_update.rb +277 -0
- data/lib/shortcut_client_ruby/models/history_action_project_update.rb +307 -0
- data/lib/shortcut_client_ruby/models/history_action_pull_request.rb +322 -0
- data/lib/shortcut_client_ruby/models/history_action_story_comment_create.rb +322 -0
- data/lib/shortcut_client_ruby/models/history_action_story_create.rb +527 -0
- data/lib/shortcut_client_ruby/models/history_action_story_delete.rb +319 -0
- data/lib/shortcut_client_ruby/models/history_action_story_link_create.rb +334 -0
- data/lib/shortcut_client_ruby/models/history_action_story_link_delete.rb +336 -0
- data/lib/shortcut_client_ruby/models/history_action_story_link_update.rb +348 -0
- data/lib/shortcut_client_ruby/models/history_action_story_update.rb +343 -0
- data/lib/shortcut_client_ruby/models/history_action_task_create.rb +353 -0
- data/lib/shortcut_client_ruby/models/history_action_task_delete.rb +292 -0
- data/lib/shortcut_client_ruby/models/history_action_task_update.rb +331 -0
- data/lib/shortcut_client_ruby/models/history_changes_story.rb +414 -0
- data/lib/shortcut_client_ruby/models/history_changes_story_link.rb +225 -0
- data/lib/shortcut_client_ruby/models/history_changes_task.rb +234 -0
- data/lib/shortcut_client_ruby/models/history_reference_branch.rb +258 -0
- data/lib/shortcut_client_ruby/models/history_reference_commit.rb +258 -0
- data/lib/shortcut_client_ruby/models/history_reference_epic.rb +258 -0
- data/lib/shortcut_client_ruby/models/history_reference_general.rb +243 -0
- data/lib/shortcut_client_ruby/models/history_reference_group.rb +243 -0
- data/lib/shortcut_client_ruby/models/history_reference_iteration.rb +258 -0
- data/lib/shortcut_client_ruby/models/history_reference_label.rb +258 -0
- data/lib/shortcut_client_ruby/models/history_reference_project.rb +258 -0
- data/lib/shortcut_client_ruby/models/history_reference_story.rb +307 -0
- data/lib/shortcut_client_ruby/models/history_reference_story_task.rb +243 -0
- data/lib/shortcut_client_ruby/models/history_reference_workflow_state.rb +292 -0
- data/lib/shortcut_client_ruby/models/icon.rb +273 -0
- data/lib/shortcut_client_ruby/models/identity.rb +245 -0
- data/lib/shortcut_client_ruby/models/iteration.rb +481 -0
- data/lib/shortcut_client_ruby/models/iteration_slim.rb +466 -0
- data/lib/shortcut_client_ruby/models/iteration_stats.rb +353 -0
- data/lib/shortcut_client_ruby/models/label.rb +362 -0
- data/lib/shortcut_client_ruby/models/label_slim.rb +353 -0
- data/lib/shortcut_client_ruby/models/label_stats.rb +423 -0
- data/lib/shortcut_client_ruby/models/linked_file.rb +450 -0
- data/lib/shortcut_client_ruby/models/list_epics.rb +207 -0
- data/lib/shortcut_client_ruby/models/list_group_stories.rb +217 -0
- data/lib/shortcut_client_ruby/models/list_labels.rb +207 -0
- data/lib/shortcut_client_ruby/models/list_members.rb +207 -0
- data/lib/shortcut_client_ruby/models/max_search_results_exceeded_error.rb +289 -0
- data/lib/shortcut_client_ruby/models/member.rb +395 -0
- data/lib/shortcut_client_ruby/models/member_info.rb +253 -0
- data/lib/shortcut_client_ruby/models/milestone.rb +453 -0
- data/lib/shortcut_client_ruby/models/milestone_stats.rb +233 -0
- data/lib/shortcut_client_ruby/models/profile.rb +330 -0
- data/lib/shortcut_client_ruby/models/project.rb +490 -0
- data/lib/shortcut_client_ruby/models/project_stats.rb +243 -0
- data/lib/shortcut_client_ruby/models/pull_request.rb +518 -0
- data/lib/shortcut_client_ruby/models/pull_request_label.rb +269 -0
- data/lib/shortcut_client_ruby/models/repository.rb +340 -0
- data/lib/shortcut_client_ruby/models/search.rb +275 -0
- data/lib/shortcut_client_ruby/models/search_results.rb +226 -0
- data/lib/shortcut_client_ruby/models/search_stories.rb +529 -0
- data/lib/shortcut_client_ruby/models/story.rb +985 -0
- data/lib/shortcut_client_ruby/models/story_comment.rb +419 -0
- data/lib/shortcut_client_ruby/models/story_contents.rb +404 -0
- data/lib/shortcut_client_ruby/models/story_contents_task.rb +255 -0
- data/lib/shortcut_client_ruby/models/story_history_change_adds_removes_int.rb +222 -0
- data/lib/shortcut_client_ruby/models/story_history_change_adds_removes_uuid.rb +222 -0
- data/lib/shortcut_client_ruby/models/story_history_change_old_new_bool.rb +218 -0
- data/lib/shortcut_client_ruby/models/story_history_change_old_new_int.rb +218 -0
- data/lib/shortcut_client_ruby/models/story_history_change_old_new_str.rb +218 -0
- data/lib/shortcut_client_ruby/models/story_history_change_old_new_uuid.rb +218 -0
- data/lib/shortcut_client_ruby/models/story_link.rb +318 -0
- data/lib/shortcut_client_ruby/models/story_reaction.rb +230 -0
- data/lib/shortcut_client_ruby/models/story_search_results.rb +257 -0
- data/lib/shortcut_client_ruby/models/story_slim.rb +944 -0
- data/lib/shortcut_client_ruby/models/story_stats.rb +213 -0
- data/lib/shortcut_client_ruby/models/task.rb +418 -0
- data/lib/shortcut_client_ruby/models/threaded_comment.rb +402 -0
- data/lib/shortcut_client_ruby/models/typed_story_link.rb +333 -0
- data/lib/shortcut_client_ruby/models/unusable_entitlement_error.rb +276 -0
- data/lib/shortcut_client_ruby/models/update_category.rb +228 -0
- data/lib/shortcut_client_ruby/models/update_comment.rb +212 -0
- data/lib/shortcut_client_ruby/models/update_entity_template.rb +217 -0
- data/lib/shortcut_client_ruby/models/update_epic.rb +413 -0
- data/lib/shortcut_client_ruby/models/update_file.rb +257 -0
- data/lib/shortcut_client_ruby/models/update_group.rb +328 -0
- data/lib/shortcut_client_ruby/models/update_iteration.rb +273 -0
- data/lib/shortcut_client_ruby/models/update_label.rb +238 -0
- data/lib/shortcut_client_ruby/models/update_linked_file.rb +311 -0
- data/lib/shortcut_client_ruby/models/update_milestone.rb +315 -0
- data/lib/shortcut_client_ruby/models/update_project.rb +289 -0
- data/lib/shortcut_client_ruby/models/update_stories.rb +480 -0
- data/lib/shortcut_client_ruby/models/update_story.rb +529 -0
- data/lib/shortcut_client_ruby/models/update_story_comment.rb +212 -0
- data/lib/shortcut_client_ruby/models/update_story_contents.rb +434 -0
- data/lib/shortcut_client_ruby/models/update_story_link.rb +261 -0
- data/lib/shortcut_client_ruby/models/update_task.rb +249 -0
- data/lib/shortcut_client_ruby/models/uploaded_file.rb +466 -0
- data/lib/shortcut_client_ruby/models/v3_files_body.rb +252 -0
- data/lib/shortcut_client_ruby/models/workflow.rb +367 -0
- data/lib/shortcut_client_ruby/models/workflow_state.rb +374 -0
- data/lib/shortcut_client_ruby/version.rb +14 -0
- data/lib/shortcut_client_ruby.rb +181 -0
- data/shortcut-client-ruby.gemspec +36 -0
- data/shortcut_client_ruby.gemspec +38 -0
- data/spec/api/default_api_spec.rb +1310 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +41 -0
- data/spec/models/basic_workspace_info_spec.rb +46 -0
- data/spec/models/branch_spec.rb +100 -0
- data/spec/models/category_spec.rb +88 -0
- data/spec/models/commit_spec.rb +112 -0
- data/spec/models/create_category_params_spec.rb +52 -0
- data/spec/models/create_category_spec.rb +62 -0
- data/spec/models/create_comment_comment_spec.rb +64 -0
- data/spec/models/create_entity_template_spec.rb +52 -0
- data/spec/models/create_epic_comment_spec.rb +64 -0
- data/spec/models/create_epic_spec.rb +140 -0
- data/spec/models/create_group_spec.rb +86 -0
- data/spec/models/create_iteration_spec.rb +76 -0
- data/spec/models/create_label_params_spec.rb +58 -0
- data/spec/models/create_linked_file_spec.rb +92 -0
- data/spec/models/create_milestone_spec.rb +74 -0
- data/spec/models/create_or_delete_story_reaction_spec.rb +40 -0
- data/spec/models/create_project_spec.rb +100 -0
- data/spec/models/create_stories_spec.rb +40 -0
- data/spec/models/create_story_comment_params_spec.rb +64 -0
- data/spec/models/create_story_comment_spec.rb +64 -0
- data/spec/models/create_story_contents_spec.rb +160 -0
- data/spec/models/create_story_link_params_spec.rb +56 -0
- data/spec/models/create_story_link_spec.rb +56 -0
- data/spec/models/create_story_params_spec.rb +200 -0
- data/spec/models/create_task_params_spec.rb +70 -0
- data/spec/models/create_task_spec.rb +70 -0
- data/spec/models/delete_stories_spec.rb +40 -0
- data/spec/models/entity_template_spec.rb +82 -0
- data/spec/models/entity_template_task_spec.rb +58 -0
- data/spec/models/epic_search_results_spec.rb +58 -0
- data/spec/models/epic_slim_spec.rb +256 -0
- data/spec/models/epic_spec.rb +262 -0
- data/spec/models/epic_state_spec.rb +88 -0
- data/spec/models/epic_stats_spec.rb +112 -0
- data/spec/models/epic_workflow_spec.rb +70 -0
- data/spec/models/get_epic_stories_spec.rb +40 -0
- data/spec/models/get_external_link_stories_params_spec.rb +40 -0
- data/spec/models/get_iteration_stories_spec.rb +40 -0
- data/spec/models/get_label_stories_spec.rb +40 -0
- data/spec/models/get_member_spec.rb +40 -0
- data/spec/models/get_project_stories_spec.rb +40 -0
- data/spec/models/group_spec.rb +134 -0
- data/spec/models/history_action_branch_create_spec.rb +68 -0
- data/spec/models/history_action_branch_merge_spec.rb +68 -0
- data/spec/models/history_action_branch_push_spec.rb +68 -0
- data/spec/models/history_action_label_create_spec.rb +68 -0
- data/spec/models/history_action_label_delete_spec.rb +62 -0
- data/spec/models/history_action_label_update_spec.rb +56 -0
- data/spec/models/history_action_project_update_spec.rb +68 -0
- data/spec/models/history_action_pull_request_spec.rb +74 -0
- data/spec/models/history_action_story_comment_create_spec.rb +74 -0
- data/spec/models/history_action_story_create_spec.rb +186 -0
- data/spec/models/history_action_story_delete_spec.rb +72 -0
- data/spec/models/history_action_story_link_create_spec.rb +78 -0
- data/spec/models/history_action_story_link_delete_spec.rb +78 -0
- data/spec/models/history_action_story_link_update_spec.rb +84 -0
- data/spec/models/history_action_story_update_spec.rb +84 -0
- data/spec/models/history_action_task_create_spec.rb +92 -0
- data/spec/models/history_action_task_delete_spec.rb +62 -0
- data/spec/models/history_action_task_update_spec.rb +80 -0
- data/spec/models/history_changes_story_link_spec.rb +52 -0
- data/spec/models/history_changes_story_spec.rb +178 -0
- data/spec/models/history_changes_task_spec.rb +58 -0
- data/spec/models/history_reference_branch_spec.rb +58 -0
- data/spec/models/history_reference_commit_spec.rb +58 -0
- data/spec/models/history_reference_epic_spec.rb +58 -0
- data/spec/models/history_reference_general_spec.rb +52 -0
- data/spec/models/history_reference_group_spec.rb +52 -0
- data/spec/models/history_reference_iteration_spec.rb +58 -0
- data/spec/models/history_reference_label_spec.rb +58 -0
- data/spec/models/history_reference_project_spec.rb +58 -0
- data/spec/models/history_reference_story_spec.rb +68 -0
- data/spec/models/history_reference_story_task_spec.rb +52 -0
- data/spec/models/history_reference_workflow_state_spec.rb +62 -0
- data/spec/models/history_spec.rb +92 -0
- data/spec/models/icon_spec.rb +64 -0
- data/spec/models/identity_spec.rb +52 -0
- data/spec/models/iteration_slim_spec.rb +136 -0
- data/spec/models/iteration_spec.rb +142 -0
- data/spec/models/iteration_stats_spec.rb +100 -0
- data/spec/models/label_slim_spec.rb +94 -0
- data/spec/models/label_spec.rb +100 -0
- data/spec/models/label_stats_spec.rb +124 -0
- data/spec/models/linked_file_spec.rb +130 -0
- data/spec/models/list_epics_spec.rb +40 -0
- data/spec/models/list_group_stories_spec.rb +46 -0
- data/spec/models/list_labels_spec.rb +40 -0
- data/spec/models/list_members_spec.rb +40 -0
- data/spec/models/max_search_results_exceeded_error_spec.rb +60 -0
- data/spec/models/member_info_spec.rb +58 -0
- data/spec/models/member_spec.rb +104 -0
- data/spec/models/milestone_spec.rb +136 -0
- data/spec/models/milestone_stats_spec.rb +52 -0
- data/spec/models/profile_spec.rb +88 -0
- data/spec/models/project_spec.rb +148 -0
- data/spec/models/project_stats_spec.rb +52 -0
- data/spec/models/pull_request_label_spec.rb +64 -0
- data/spec/models/pull_request_spec.rb +166 -0
- data/spec/models/repository_spec.rb +88 -0
- data/spec/models/search_results_spec.rb +46 -0
- data/spec/models/search_spec.rb +62 -0
- data/spec/models/search_stories_spec.rb +210 -0
- data/spec/models/story_comment_spec.rb +118 -0
- data/spec/models/story_contents_spec.rb +148 -0
- data/spec/models/story_contents_task_spec.rb +64 -0
- data/spec/models/story_history_change_adds_removes_int_spec.rb +46 -0
- data/spec/models/story_history_change_adds_removes_uuid_spec.rb +46 -0
- data/spec/models/story_history_change_old_new_bool_spec.rb +46 -0
- data/spec/models/story_history_change_old_new_int_spec.rb +46 -0
- data/spec/models/story_history_change_old_new_str_spec.rb +46 -0
- data/spec/models/story_history_change_old_new_uuid_spec.rb +46 -0
- data/spec/models/story_link_spec.rb +82 -0
- data/spec/models/story_reaction_spec.rb +46 -0
- data/spec/models/story_search_results_spec.rb +58 -0
- data/spec/models/story_slim_spec.rb +322 -0
- data/spec/models/story_spec.rb +334 -0
- data/spec/models/story_stats_spec.rb +40 -0
- data/spec/models/task_spec.rb +118 -0
- data/spec/models/threaded_comment_spec.rb +112 -0
- data/spec/models/typed_story_link_spec.rb +88 -0
- data/spec/models/unusable_entitlement_error_spec.rb +56 -0
- data/spec/models/update_category_spec.rb +52 -0
- data/spec/models/update_comment_spec.rb +40 -0
- data/spec/models/update_entity_template_spec.rb +46 -0
- data/spec/models/update_epic_spec.rb +140 -0
- data/spec/models/update_file_spec.rb +70 -0
- data/spec/models/update_group_spec.rb +92 -0
- data/spec/models/update_iteration_spec.rb +76 -0
- data/spec/models/update_label_spec.rb +58 -0
- data/spec/models/update_linked_file_spec.rb +86 -0
- data/spec/models/update_milestone_spec.rb +86 -0
- data/spec/models/update_project_spec.rb +88 -0
- data/spec/models/update_stories_spec.rb +168 -0
- data/spec/models/update_story_comment_spec.rb +40 -0
- data/spec/models/update_story_contents_spec.rb +160 -0
- data/spec/models/update_story_link_spec.rb +56 -0
- data/spec/models/update_story_spec.rb +198 -0
- data/spec/models/update_task_spec.rb +64 -0
- data/spec/models/uploaded_file_spec.rb +136 -0
- data/spec/models/v3_files_body_spec.rb +64 -0
- data/spec/models/workflow_spec.rb +100 -0
- data/spec/models/workflow_state_spec.rb +106 -0
- data/spec/spec_helper.rb +110 -0
- metadata +701 -0
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Shortcut API
|
|
3
|
+
|
|
4
|
+
#Shortcut API
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 3.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 3.0.35
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
module Shortcut
|
|
15
|
+
class UpdateEpic
|
|
16
|
+
# The Epic's description.
|
|
17
|
+
attr_accessor :description
|
|
18
|
+
|
|
19
|
+
# A true/false boolean indicating whether the Epic is in archived state.
|
|
20
|
+
attr_accessor :archived
|
|
21
|
+
|
|
22
|
+
# An array of Labels attached to the Epic.
|
|
23
|
+
attr_accessor :labels
|
|
24
|
+
|
|
25
|
+
# A manual override for the time/date the Epic was completed.
|
|
26
|
+
attr_accessor :completed_at_override
|
|
27
|
+
|
|
28
|
+
# The Epic's name.
|
|
29
|
+
attr_accessor :name
|
|
30
|
+
|
|
31
|
+
# The Epic's planned start date.
|
|
32
|
+
attr_accessor :planned_start_date
|
|
33
|
+
|
|
34
|
+
# `Deprecated` The Epic's state (to do, in progress, or done); will be ignored when `epic_state_id` is set.
|
|
35
|
+
attr_accessor :state
|
|
36
|
+
|
|
37
|
+
# The ID of the Milestone this Epic is related to.
|
|
38
|
+
attr_accessor :milestone_id
|
|
39
|
+
|
|
40
|
+
# The ID of the member that requested the epic.
|
|
41
|
+
attr_accessor :requested_by_id
|
|
42
|
+
|
|
43
|
+
# The ID of the Epic State.
|
|
44
|
+
attr_accessor :epic_state_id
|
|
45
|
+
|
|
46
|
+
# A manual override for the time/date the Epic was started.
|
|
47
|
+
attr_accessor :started_at_override
|
|
48
|
+
|
|
49
|
+
# The ID of the group to associate with the epic.
|
|
50
|
+
attr_accessor :group_id
|
|
51
|
+
|
|
52
|
+
# An array of UUIDs for any Members you want to add as Followers on this Epic.
|
|
53
|
+
attr_accessor :follower_ids
|
|
54
|
+
|
|
55
|
+
# An array of UUIDs for any members you want to add as Owners on this Epic.
|
|
56
|
+
attr_accessor :owner_ids
|
|
57
|
+
|
|
58
|
+
# The ID of the Epic we want to move this Epic before.
|
|
59
|
+
attr_accessor :before_id
|
|
60
|
+
|
|
61
|
+
# The ID of the Epic we want to move this Epic after.
|
|
62
|
+
attr_accessor :after_id
|
|
63
|
+
|
|
64
|
+
# The Epic's deadline.
|
|
65
|
+
attr_accessor :deadline
|
|
66
|
+
|
|
67
|
+
class EnumAttributeValidator
|
|
68
|
+
attr_reader :datatype
|
|
69
|
+
attr_reader :allowable_values
|
|
70
|
+
|
|
71
|
+
def initialize(datatype, allowable_values)
|
|
72
|
+
@allowable_values = allowable_values.map do |value|
|
|
73
|
+
case datatype.to_s
|
|
74
|
+
when /Integer/i
|
|
75
|
+
value.to_i
|
|
76
|
+
when /Float/i
|
|
77
|
+
value.to_f
|
|
78
|
+
else
|
|
79
|
+
value
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def valid?(value)
|
|
85
|
+
!value || allowable_values.include?(value)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
90
|
+
def self.attribute_map
|
|
91
|
+
{
|
|
92
|
+
:'description' => :'description',
|
|
93
|
+
:'archived' => :'archived',
|
|
94
|
+
:'labels' => :'labels',
|
|
95
|
+
:'completed_at_override' => :'completed_at_override',
|
|
96
|
+
:'name' => :'name',
|
|
97
|
+
:'planned_start_date' => :'planned_start_date',
|
|
98
|
+
:'state' => :'state',
|
|
99
|
+
:'milestone_id' => :'milestone_id',
|
|
100
|
+
:'requested_by_id' => :'requested_by_id',
|
|
101
|
+
:'epic_state_id' => :'epic_state_id',
|
|
102
|
+
:'started_at_override' => :'started_at_override',
|
|
103
|
+
:'group_id' => :'group_id',
|
|
104
|
+
:'follower_ids' => :'follower_ids',
|
|
105
|
+
:'owner_ids' => :'owner_ids',
|
|
106
|
+
:'before_id' => :'before_id',
|
|
107
|
+
:'after_id' => :'after_id',
|
|
108
|
+
:'deadline' => :'deadline'
|
|
109
|
+
}
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Attribute type mapping.
|
|
113
|
+
def self.openapi_types
|
|
114
|
+
{
|
|
115
|
+
:'description' => :'Object',
|
|
116
|
+
:'archived' => :'Object',
|
|
117
|
+
:'labels' => :'Object',
|
|
118
|
+
:'completed_at_override' => :'Object',
|
|
119
|
+
:'name' => :'Object',
|
|
120
|
+
:'planned_start_date' => :'Object',
|
|
121
|
+
:'state' => :'Object',
|
|
122
|
+
:'milestone_id' => :'Object',
|
|
123
|
+
:'requested_by_id' => :'Object',
|
|
124
|
+
:'epic_state_id' => :'Object',
|
|
125
|
+
:'started_at_override' => :'Object',
|
|
126
|
+
:'group_id' => :'Object',
|
|
127
|
+
:'follower_ids' => :'Object',
|
|
128
|
+
:'owner_ids' => :'Object',
|
|
129
|
+
:'before_id' => :'Object',
|
|
130
|
+
:'after_id' => :'Object',
|
|
131
|
+
:'deadline' => :'Object'
|
|
132
|
+
}
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# List of attributes with nullable: true
|
|
136
|
+
def self.openapi_nullable
|
|
137
|
+
Set.new([
|
|
138
|
+
:'completed_at_override',
|
|
139
|
+
:'planned_start_date',
|
|
140
|
+
:'milestone_id',
|
|
141
|
+
:'started_at_override',
|
|
142
|
+
:'group_id',
|
|
143
|
+
:'deadline'
|
|
144
|
+
])
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Initializes the object
|
|
148
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
149
|
+
def initialize(attributes = {})
|
|
150
|
+
if (!attributes.is_a?(Hash))
|
|
151
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shortcut::UpdateEpic` initialize method"
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
155
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
156
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
157
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shortcut::UpdateEpic`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
158
|
+
end
|
|
159
|
+
h[k.to_sym] = v
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'description')
|
|
163
|
+
self.description = attributes[:'description']
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'archived')
|
|
167
|
+
self.archived = attributes[:'archived']
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'labels')
|
|
171
|
+
if (value = attributes[:'labels']).is_a?(Array)
|
|
172
|
+
self.labels = value
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'completed_at_override')
|
|
177
|
+
self.completed_at_override = attributes[:'completed_at_override']
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'name')
|
|
181
|
+
self.name = attributes[:'name']
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'planned_start_date')
|
|
185
|
+
self.planned_start_date = attributes[:'planned_start_date']
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if attributes.key?(:'state')
|
|
189
|
+
self.state = attributes[:'state']
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if attributes.key?(:'milestone_id')
|
|
193
|
+
self.milestone_id = attributes[:'milestone_id']
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if attributes.key?(:'requested_by_id')
|
|
197
|
+
self.requested_by_id = attributes[:'requested_by_id']
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if attributes.key?(:'epic_state_id')
|
|
201
|
+
self.epic_state_id = attributes[:'epic_state_id']
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if attributes.key?(:'started_at_override')
|
|
205
|
+
self.started_at_override = attributes[:'started_at_override']
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if attributes.key?(:'group_id')
|
|
209
|
+
self.group_id = attributes[:'group_id']
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if attributes.key?(:'follower_ids')
|
|
213
|
+
if (value = attributes[:'follower_ids']).is_a?(Array)
|
|
214
|
+
self.follower_ids = value
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if attributes.key?(:'owner_ids')
|
|
219
|
+
if (value = attributes[:'owner_ids']).is_a?(Array)
|
|
220
|
+
self.owner_ids = value
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if attributes.key?(:'before_id')
|
|
225
|
+
self.before_id = attributes[:'before_id']
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
if attributes.key?(:'after_id')
|
|
229
|
+
self.after_id = attributes[:'after_id']
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
if attributes.key?(:'deadline')
|
|
233
|
+
self.deadline = attributes[:'deadline']
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
238
|
+
# @return Array for valid properties with the reasons
|
|
239
|
+
def list_invalid_properties
|
|
240
|
+
invalid_properties = Array.new
|
|
241
|
+
invalid_properties
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Check to see if the all the properties in the model are valid
|
|
245
|
+
# @return true if the model is valid
|
|
246
|
+
def valid?
|
|
247
|
+
state_validator = EnumAttributeValidator.new('Object', ['in progress', 'to do', 'done'])
|
|
248
|
+
return false unless state_validator.valid?(@state)
|
|
249
|
+
true
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
253
|
+
# @param [Object] state Object to be assigned
|
|
254
|
+
def state=(state)
|
|
255
|
+
validator = EnumAttributeValidator.new('Object', ['in progress', 'to do', 'done'])
|
|
256
|
+
unless validator.valid?(state)
|
|
257
|
+
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
258
|
+
end
|
|
259
|
+
@state = state
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Checks equality by comparing each attribute.
|
|
263
|
+
# @param [Object] Object to be compared
|
|
264
|
+
def ==(o)
|
|
265
|
+
return true if self.equal?(o)
|
|
266
|
+
self.class == o.class &&
|
|
267
|
+
description == o.description &&
|
|
268
|
+
archived == o.archived &&
|
|
269
|
+
labels == o.labels &&
|
|
270
|
+
completed_at_override == o.completed_at_override &&
|
|
271
|
+
name == o.name &&
|
|
272
|
+
planned_start_date == o.planned_start_date &&
|
|
273
|
+
state == o.state &&
|
|
274
|
+
milestone_id == o.milestone_id &&
|
|
275
|
+
requested_by_id == o.requested_by_id &&
|
|
276
|
+
epic_state_id == o.epic_state_id &&
|
|
277
|
+
started_at_override == o.started_at_override &&
|
|
278
|
+
group_id == o.group_id &&
|
|
279
|
+
follower_ids == o.follower_ids &&
|
|
280
|
+
owner_ids == o.owner_ids &&
|
|
281
|
+
before_id == o.before_id &&
|
|
282
|
+
after_id == o.after_id &&
|
|
283
|
+
deadline == o.deadline
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# @see the `==` method
|
|
287
|
+
# @param [Object] Object to be compared
|
|
288
|
+
def eql?(o)
|
|
289
|
+
self == o
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Calculates hash code according to all attributes.
|
|
293
|
+
# @return [Integer] Hash code
|
|
294
|
+
def hash
|
|
295
|
+
[description, archived, labels, completed_at_override, name, planned_start_date, state, milestone_id, requested_by_id, epic_state_id, started_at_override, group_id, follower_ids, owner_ids, before_id, after_id, deadline].hash
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Builds the object from hash
|
|
299
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
300
|
+
# @return [Object] Returns the model itself
|
|
301
|
+
def self.build_from_hash(attributes)
|
|
302
|
+
new.build_from_hash(attributes)
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# Builds the object from hash
|
|
306
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
307
|
+
# @return [Object] Returns the model itself
|
|
308
|
+
def build_from_hash(attributes)
|
|
309
|
+
return nil unless attributes.is_a?(Hash)
|
|
310
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
311
|
+
if type =~ /\AArray<(.*)>/i
|
|
312
|
+
# check to ensure the input is an array given that the attribute
|
|
313
|
+
# is documented as an array but the input is not
|
|
314
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
315
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
316
|
+
end
|
|
317
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
318
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
319
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
320
|
+
self.send("#{key}=", nil)
|
|
321
|
+
end
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
self
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# Deserializes the data based on type
|
|
328
|
+
# @param string type Data type
|
|
329
|
+
# @param string value Value to be deserialized
|
|
330
|
+
# @return [Object] Deserialized data
|
|
331
|
+
def _deserialize(type, value)
|
|
332
|
+
case type.to_sym
|
|
333
|
+
when :DateTime
|
|
334
|
+
DateTime.parse(value)
|
|
335
|
+
when :Date
|
|
336
|
+
Date.parse(value)
|
|
337
|
+
when :String
|
|
338
|
+
value.to_s
|
|
339
|
+
when :Integer
|
|
340
|
+
value.to_i
|
|
341
|
+
when :Float
|
|
342
|
+
value.to_f
|
|
343
|
+
when :Boolean
|
|
344
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
345
|
+
true
|
|
346
|
+
else
|
|
347
|
+
false
|
|
348
|
+
end
|
|
349
|
+
when :Object
|
|
350
|
+
# generic object (usually a Hash), return directly
|
|
351
|
+
value
|
|
352
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
353
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
354
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
355
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
356
|
+
k_type = Regexp.last_match[:k_type]
|
|
357
|
+
v_type = Regexp.last_match[:v_type]
|
|
358
|
+
{}.tap do |hash|
|
|
359
|
+
value.each do |k, v|
|
|
360
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
361
|
+
end
|
|
362
|
+
end
|
|
363
|
+
else # model
|
|
364
|
+
Shortcut.const_get(type).build_from_hash(value)
|
|
365
|
+
end
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
# Returns the string representation of the object
|
|
369
|
+
# @return [String] String presentation of the object
|
|
370
|
+
def to_s
|
|
371
|
+
to_hash.to_s
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
375
|
+
# @return [Hash] Returns the object in the form of hash
|
|
376
|
+
def to_body
|
|
377
|
+
to_hash
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
# Returns the object in the form of hash
|
|
381
|
+
# @return [Hash] Returns the object in the form of hash
|
|
382
|
+
def to_hash
|
|
383
|
+
hash = {}
|
|
384
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
385
|
+
value = self.send(attr)
|
|
386
|
+
if value.nil?
|
|
387
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
388
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
hash[param] = _to_hash(value)
|
|
392
|
+
end
|
|
393
|
+
hash
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
# Outputs non-array value in the form of hash
|
|
397
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
398
|
+
# @param [Object] value Any valid value
|
|
399
|
+
# @return [Hash] Returns the value in the form of hash
|
|
400
|
+
def _to_hash(value)
|
|
401
|
+
if value.is_a?(Array)
|
|
402
|
+
value.compact.map { |v| _to_hash(v) }
|
|
403
|
+
elsif value.is_a?(Hash)
|
|
404
|
+
{}.tap do |hash|
|
|
405
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
406
|
+
end
|
|
407
|
+
elsif value.respond_to? :to_hash
|
|
408
|
+
value.to_hash
|
|
409
|
+
else
|
|
410
|
+
value
|
|
411
|
+
end
|
|
412
|
+
end end
|
|
413
|
+
end
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Shortcut API
|
|
3
|
+
|
|
4
|
+
#Shortcut API
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 3.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 3.0.35
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
module Shortcut
|
|
15
|
+
class UpdateFile
|
|
16
|
+
# The description of the file.
|
|
17
|
+
attr_accessor :description
|
|
18
|
+
|
|
19
|
+
# The time/date that the file was uploaded.
|
|
20
|
+
attr_accessor :created_at
|
|
21
|
+
|
|
22
|
+
# The time/date that the file was last updated.
|
|
23
|
+
attr_accessor :updated_at
|
|
24
|
+
|
|
25
|
+
# The name of the file.
|
|
26
|
+
attr_accessor :name
|
|
27
|
+
|
|
28
|
+
# The unique ID assigned to the Member who uploaded the file to Shortcut.
|
|
29
|
+
attr_accessor :uploader_id
|
|
30
|
+
|
|
31
|
+
# An additional ID that you may wish to assign to the file.
|
|
32
|
+
attr_accessor :external_id
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'description' => :'description',
|
|
38
|
+
:'created_at' => :'created_at',
|
|
39
|
+
:'updated_at' => :'updated_at',
|
|
40
|
+
:'name' => :'name',
|
|
41
|
+
:'uploader_id' => :'uploader_id',
|
|
42
|
+
:'external_id' => :'external_id'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'description' => :'Object',
|
|
50
|
+
:'created_at' => :'Object',
|
|
51
|
+
:'updated_at' => :'Object',
|
|
52
|
+
:'name' => :'Object',
|
|
53
|
+
:'uploader_id' => :'Object',
|
|
54
|
+
:'external_id' => :'Object'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# List of attributes with nullable: true
|
|
59
|
+
def self.openapi_nullable
|
|
60
|
+
Set.new([
|
|
61
|
+
])
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Initializes the object
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
def initialize(attributes = {})
|
|
67
|
+
if (!attributes.is_a?(Hash))
|
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shortcut::UpdateFile` initialize method"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
73
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shortcut::UpdateFile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
75
|
+
end
|
|
76
|
+
h[k.to_sym] = v
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'description')
|
|
80
|
+
self.description = attributes[:'description']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'created_at')
|
|
84
|
+
self.created_at = attributes[:'created_at']
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'updated_at')
|
|
88
|
+
self.updated_at = attributes[:'updated_at']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'name')
|
|
92
|
+
self.name = attributes[:'name']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'uploader_id')
|
|
96
|
+
self.uploader_id = attributes[:'uploader_id']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'external_id')
|
|
100
|
+
self.external_id = attributes[:'external_id']
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
105
|
+
# @return Array for valid properties with the reasons
|
|
106
|
+
def list_invalid_properties
|
|
107
|
+
invalid_properties = Array.new
|
|
108
|
+
invalid_properties
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Check to see if the all the properties in the model are valid
|
|
112
|
+
# @return true if the model is valid
|
|
113
|
+
def valid?
|
|
114
|
+
true
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Checks equality by comparing each attribute.
|
|
118
|
+
# @param [Object] Object to be compared
|
|
119
|
+
def ==(o)
|
|
120
|
+
return true if self.equal?(o)
|
|
121
|
+
self.class == o.class &&
|
|
122
|
+
description == o.description &&
|
|
123
|
+
created_at == o.created_at &&
|
|
124
|
+
updated_at == o.updated_at &&
|
|
125
|
+
name == o.name &&
|
|
126
|
+
uploader_id == o.uploader_id &&
|
|
127
|
+
external_id == o.external_id
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# @see the `==` method
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def eql?(o)
|
|
133
|
+
self == o
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Calculates hash code according to all attributes.
|
|
137
|
+
# @return [Integer] Hash code
|
|
138
|
+
def hash
|
|
139
|
+
[description, created_at, updated_at, name, uploader_id, external_id].hash
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Builds the object from hash
|
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
144
|
+
# @return [Object] Returns the model itself
|
|
145
|
+
def self.build_from_hash(attributes)
|
|
146
|
+
new.build_from_hash(attributes)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Builds the object from hash
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
# @return [Object] Returns the model itself
|
|
152
|
+
def build_from_hash(attributes)
|
|
153
|
+
return nil unless attributes.is_a?(Hash)
|
|
154
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
155
|
+
if type =~ /\AArray<(.*)>/i
|
|
156
|
+
# check to ensure the input is an array given that the attribute
|
|
157
|
+
# is documented as an array but the input is not
|
|
158
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
159
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
160
|
+
end
|
|
161
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
162
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
163
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
164
|
+
self.send("#{key}=", nil)
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
self
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Deserializes the data based on type
|
|
172
|
+
# @param string type Data type
|
|
173
|
+
# @param string value Value to be deserialized
|
|
174
|
+
# @return [Object] Deserialized data
|
|
175
|
+
def _deserialize(type, value)
|
|
176
|
+
case type.to_sym
|
|
177
|
+
when :DateTime
|
|
178
|
+
DateTime.parse(value)
|
|
179
|
+
when :Date
|
|
180
|
+
Date.parse(value)
|
|
181
|
+
when :String
|
|
182
|
+
value.to_s
|
|
183
|
+
when :Integer
|
|
184
|
+
value.to_i
|
|
185
|
+
when :Float
|
|
186
|
+
value.to_f
|
|
187
|
+
when :Boolean
|
|
188
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
189
|
+
true
|
|
190
|
+
else
|
|
191
|
+
false
|
|
192
|
+
end
|
|
193
|
+
when :Object
|
|
194
|
+
# generic object (usually a Hash), return directly
|
|
195
|
+
value
|
|
196
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
197
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
198
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
199
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
200
|
+
k_type = Regexp.last_match[:k_type]
|
|
201
|
+
v_type = Regexp.last_match[:v_type]
|
|
202
|
+
{}.tap do |hash|
|
|
203
|
+
value.each do |k, v|
|
|
204
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
else # model
|
|
208
|
+
Shortcut.const_get(type).build_from_hash(value)
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Returns the string representation of the object
|
|
213
|
+
# @return [String] String presentation of the object
|
|
214
|
+
def to_s
|
|
215
|
+
to_hash.to_s
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
219
|
+
# @return [Hash] Returns the object in the form of hash
|
|
220
|
+
def to_body
|
|
221
|
+
to_hash
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Returns the object in the form of hash
|
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
|
226
|
+
def to_hash
|
|
227
|
+
hash = {}
|
|
228
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
229
|
+
value = self.send(attr)
|
|
230
|
+
if value.nil?
|
|
231
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
232
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
hash[param] = _to_hash(value)
|
|
236
|
+
end
|
|
237
|
+
hash
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Outputs non-array value in the form of hash
|
|
241
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
242
|
+
# @param [Object] value Any valid value
|
|
243
|
+
# @return [Hash] Returns the value in the form of hash
|
|
244
|
+
def _to_hash(value)
|
|
245
|
+
if value.is_a?(Array)
|
|
246
|
+
value.compact.map { |v| _to_hash(v) }
|
|
247
|
+
elsif value.is_a?(Hash)
|
|
248
|
+
{}.tap do |hash|
|
|
249
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
250
|
+
end
|
|
251
|
+
elsif value.respond_to? :to_hash
|
|
252
|
+
value.to_hash
|
|
253
|
+
else
|
|
254
|
+
value
|
|
255
|
+
end
|
|
256
|
+
end end
|
|
257
|
+
end
|