athenian 2.1.81
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/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +60 -0
- data/LICENSE.txt +21 -0
- data/README.md +76 -0
- data/Rakefile +10 -0
- data/athenian.gemspec +35 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/docs/AcceptedInvitation.md +22 -0
- data/docs/Account.md +26 -0
- data/docs/AccountStatus.md +26 -0
- data/docs/AccountUserChangeRequest.md +22 -0
- data/docs/AlignApi.md +367 -0
- data/docs/CalculatedCodeCheckHistogram.md +28 -0
- data/docs/CalculatedCodeCheckMetrics.md +32 -0
- data/docs/CalculatedCodeCheckMetricsItem.md +26 -0
- data/docs/CalculatedDeploymentMetric.md +24 -0
- data/docs/CalculatedDeveloperMetrics.md +28 -0
- data/docs/CalculatedDeveloperMetricsItem.md +22 -0
- data/docs/CalculatedJIRAHistogram.md +28 -0
- data/docs/CalculatedJIRAMetricValues.md +26 -0
- data/docs/CalculatedLinearMetricValues.md +26 -0
- data/docs/CalculatedLinearMetricValuesConfidenceMinsInner.md +49 -0
- data/docs/CalculatedLinearMetricValuesValuesInner.md +51 -0
- data/docs/CalculatedPullRequestHistogram.md +28 -0
- data/docs/CalculatedPullRequestHistogramFrequenciesInner.md +49 -0
- data/docs/CalculatedPullRequestMetrics.md +32 -0
- data/docs/CalculatedPullRequestMetricsItem.md +22 -0
- data/docs/CalculatedReleaseMetric.md +30 -0
- data/docs/CodeBypassingPRsMeasurement.md +26 -0
- data/docs/CodeCheckHistogramDefinition.md +24 -0
- data/docs/CodeCheckHistogramsRequest.md +32 -0
- data/docs/CodeCheckMetricID.md +15 -0
- data/docs/CodeCheckMetricsRequest.md +34 -0
- data/docs/CodeCheckRunStatistics.md +40 -0
- data/docs/CodeCheckRunStatisticsMeanExecutionTime.md +15 -0
- data/docs/CodeCheckRunStatisticsMedianExecutionTime.md +15 -0
- data/docs/CodeCheckRunStatisticsStddevExecutionTime.md +15 -0
- data/docs/CodeFilter.md +34 -0
- data/docs/Commit.md +36 -0
- data/docs/CommitSignature.md +26 -0
- data/docs/CommitsList.md +20 -0
- data/docs/CommitsListInclude.md +20 -0
- data/docs/Contributor.md +26 -0
- data/docs/ContributorIdentity.md +20 -0
- data/docs/CreateTokenRequest.md +20 -0
- data/docs/CreatedIdentifier.md +18 -0
- data/docs/CreatedToken.md +20 -0
- data/docs/Datasource.md +15 -0
- data/docs/DeleteEventsCacheRequest.md +22 -0
- data/docs/DeployedComponent.md +20 -0
- data/docs/DeployedPullRequest.md +32 -0
- data/docs/DeployedPullRequestAllOf.md +18 -0
- data/docs/DeployedRelease.md +40 -0
- data/docs/DeploymentAnalysis.md +22 -0
- data/docs/DeploymentAnalysisCode.md +28 -0
- data/docs/DeploymentConclusion.md +15 -0
- data/docs/DeploymentMetricID.md +15 -0
- data/docs/DeploymentMetricsRequest.md +32 -0
- data/docs/DeploymentModifyLabelsRequest.md +20 -0
- data/docs/DeploymentNotification.md +32 -0
- data/docs/DeploymentWith.md +22 -0
- data/docs/DeveloperMetricID.md +15 -0
- data/docs/DeveloperMetricsRequest.md +30 -0
- data/docs/DeveloperSummary.md +26 -0
- data/docs/DeveloperUpdates.md +28 -0
- data/docs/DiffReleasesRequest.md +20 -0
- data/docs/DiffedReleases.md +20 -0
- data/docs/DiffedReleasesInclude.md +20 -0
- data/docs/EventsApi.md +370 -0
- data/docs/FilterApi.md +832 -0
- data/docs/FilterCodeChecksRequest.md +36 -0
- data/docs/FilterCommitsRequest.md +34 -0
- data/docs/FilterContributorsRequest.md +28 -0
- data/docs/FilterDeploymentsRequest.md +42 -0
- data/docs/FilterEnvironmentsRequest.md +26 -0
- data/docs/FilterJIRACommon.md +30 -0
- data/docs/FilterJIRAStuff.md +40 -0
- data/docs/FilterJIRAStuffWith.md +22 -0
- data/docs/FilterLabelsRequest.md +20 -0
- data/docs/FilterPullRequestsRequest.md +48 -0
- data/docs/FilterReleasesRequest.md +34 -0
- data/docs/FilterRepositoriesRequest.md +28 -0
- data/docs/FilteredCodeCheckRun.md +30 -0
- data/docs/FilteredCodeCheckRunPrsStats.md +40 -0
- data/docs/FilteredCodeCheckRunTotalStats.md +40 -0
- data/docs/FilteredCodeCheckRuns.md +20 -0
- data/docs/FilteredDeployment.md +38 -0
- data/docs/FilteredDeployments.md +20 -0
- data/docs/FilteredDeploymentsInclude.md +20 -0
- data/docs/FilteredEnvironment.md +24 -0
- data/docs/FilteredJIRAStuff.md +32 -0
- data/docs/FilteredLabel.md +24 -0
- data/docs/FilteredRelease.md +42 -0
- data/docs/ForSetCodeChecks.md +32 -0
- data/docs/ForSetCodeChecksJira.md +32 -0
- data/docs/ForSetDeployments.md +38 -0
- data/docs/ForSetDevelopers.md +30 -0
- data/docs/ForSetPullRequests.md +36 -0
- data/docs/GenericError.md +26 -0
- data/docs/GetApi.md +305 -0
- data/docs/GetDeploymentLabels200Response.md +18 -0
- data/docs/GetJIRAIssuesInclude.md +15 -0
- data/docs/GetJIRAIssuesRequest.md +22 -0
- data/docs/GetJIRAIssuesResponse.md +20 -0
- data/docs/GetJIRAIssuesResponseInclude.md +20 -0
- data/docs/GetPullRequestsRequest.md +22 -0
- data/docs/GetReleasesRequest.md +20 -0
- data/docs/GoalMetricParams.md +18 -0
- data/docs/GoalMetricParamsThreshold.md +49 -0
- data/docs/GoalTemplate.md +28 -0
- data/docs/GoalTemplateCreateRequest.md +26 -0
- data/docs/GoalTemplateMetric.md +51 -0
- data/docs/GoalTemplateUpdateRequest.md +24 -0
- data/docs/HistogramScale.md +15 -0
- data/docs/HistogramsApi.md +226 -0
- data/docs/IncludedDeployments.md +18 -0
- data/docs/IncludedJIRAIssues.md +18 -0
- data/docs/IncludedNativeUser.md +18 -0
- data/docs/IncludedNativeUsers.md +18 -0
- data/docs/InstallationProgress.md +26 -0
- data/docs/IntegrationsApi.md +157 -0
- data/docs/Interquartile.md +20 -0
- data/docs/InvalidRequestError.md +28 -0
- data/docs/InvalidRequestErrorAllOf.md +18 -0
- data/docs/InvitationCheckResult.md +22 -0
- data/docs/InvitationLink.md +18 -0
- data/docs/InvitedUser.md +20 -0
- data/docs/JIRAComment.md +22 -0
- data/docs/JIRAEpic.md +58 -0
- data/docs/JIRAEpicAllOf.md +22 -0
- data/docs/JIRAEpicChild.md +56 -0
- data/docs/JIRAEpicChildAllOf.md +20 -0
- data/docs/JIRAEpicIssueCommon.md +52 -0
- data/docs/JIRAFilter.md +32 -0
- data/docs/JIRAFilterReturn.md +15 -0
- data/docs/JIRAFilterWith.md +22 -0
- data/docs/JIRAHistogramDefinition.md +24 -0
- data/docs/JIRAHistogramsRequest.md +44 -0
- data/docs/JIRAInstallation.md +20 -0
- data/docs/JIRAIssue.md +56 -0
- data/docs/JIRAIssueAllOf.md +20 -0
- data/docs/JIRAIssueType.md +30 -0
- data/docs/JIRALabel.md +24 -0
- data/docs/JIRAMetricID.md +15 -0
- data/docs/JIRAMetricsRequest.md +50 -0
- data/docs/JIRAPriority.md +24 -0
- data/docs/JIRAProject.md +30 -0
- data/docs/JIRAProjectsRequest.md +20 -0
- data/docs/JIRAStatus.md +22 -0
- data/docs/JIRAStatusCategory.md +15 -0
- data/docs/JIRAUser.md +24 -0
- data/docs/LinkedJIRAIssue.md +26 -0
- data/docs/ListedToken.md +22 -0
- data/docs/LogicalDeploymentRules.md +20 -0
- data/docs/LogicalPRRules.md +20 -0
- data/docs/LogicalRepository.md +26 -0
- data/docs/LogicalRepositoryGetRequest.md +20 -0
- data/docs/LogicalRepositoryRequest.md +28 -0
- data/docs/MappedJIRAIdentity.md +24 -0
- data/docs/MappedJIRAIdentityChange.md +20 -0
- data/docs/MatchIdentitiesRequest.md +20 -0
- data/docs/MatchedIdentity.md +22 -0
- data/docs/MatchedIdentityTo.md +15 -0
- data/docs/MetricsApi.md +518 -0
- data/docs/NotifiedDeploymentsInner.md +20 -0
- data/docs/NotifyDeployments200Response.md +18 -0
- data/docs/Organization.md +22 -0
- data/docs/PaginatePullRequestsRequest.md +20 -0
- data/docs/PaginationApi.md +82 -0
- data/docs/PatchTokenRequest.md +18 -0
- data/docs/ProductFeature.md +20 -0
- data/docs/ProductFeatureParameters.md +51 -0
- data/docs/PullRequest.md +74 -0
- data/docs/PullRequestEvent.md +15 -0
- data/docs/PullRequestHistogramDefinition.md +24 -0
- data/docs/PullRequestHistogramsRequest.md +34 -0
- data/docs/PullRequestLabel.md +22 -0
- data/docs/PullRequestMetricID.md +15 -0
- data/docs/PullRequestMetricsRequest.md +36 -0
- data/docs/PullRequestNumbers.md +20 -0
- data/docs/PullRequestPaginationPlan.md +18 -0
- data/docs/PullRequestParticipant.md +20 -0
- data/docs/PullRequestSet.md +20 -0
- data/docs/PullRequestSetInclude.md +20 -0
- data/docs/PullRequestStage.md +15 -0
- data/docs/PullRequestWith.md +30 -0
- data/docs/RegistrationApi.md +420 -0
- data/docs/ReleaseDiff.md +22 -0
- data/docs/ReleaseMatchRequest.md +28 -0
- data/docs/ReleaseMatchSetting.md +26 -0
- data/docs/ReleaseMatchStrategy.md +15 -0
- data/docs/ReleaseMetricID.md +15 -0
- data/docs/ReleaseMetricsRequest.md +42 -0
- data/docs/ReleaseMetricsRequestForInner.md +49 -0
- data/docs/ReleaseNames.md +20 -0
- data/docs/ReleaseNotification.md +28 -0
- data/docs/ReleaseNotificationStatus.md +15 -0
- data/docs/ReleasePair.md +20 -0
- data/docs/ReleaseSet.md +20 -0
- data/docs/ReleaseSetInclude.md +22 -0
- data/docs/ReleaseWith.md +22 -0
- data/docs/ReleasedPullRequest.md +30 -0
- data/docs/ReleasedPullRequestAuthor.md +15 -0
- data/docs/ReposetApi.md +363 -0
- data/docs/RepositorySetCreateRequest.md +22 -0
- data/docs/RepositorySetListItem.md +26 -0
- data/docs/RepositorySetWithName.md +22 -0
- data/docs/SecurityApi.md +290 -0
- data/docs/SetMappedJIRAIdentitiesRequest.md +20 -0
- data/docs/SettingsApi.md +942 -0
- data/docs/Share.md +22 -0
- data/docs/StageTimings.md +26 -0
- data/docs/TableFetchingProgress.md +22 -0
- data/docs/Team.md +24 -0
- data/docs/TeamApi.md +440 -0
- data/docs/TeamCreateRequest.md +24 -0
- data/docs/TeamUpdateRequest.md +22 -0
- data/docs/User.md +34 -0
- data/docs/UserApi.md +431 -0
- data/docs/VersionApi.md +67 -0
- data/docs/Versions.md +20 -0
- data/docs/WithBothJiraAndJiragroups.md +20 -0
- data/docs/WorkType.md +22 -0
- data/docs/WorkTypeGetRequest.md +20 -0
- data/docs/WorkTypePutRequest.md +20 -0
- data/docs/WorkTypeRule.md +20 -0
- data/generator/generate_api.sh +37 -0
- data/generator/generator_config.yml +10 -0
- data/generator/openapi.yaml +11297 -0
- data/generator/openapi_generated.yaml +11139 -0
- data/generator/template/api_info.mustache +6 -0
- data/generator/template_data.json +3 -0
- data/lib/athenian/api/align_api.rb +335 -0
- data/lib/athenian/api/events_api.rb +334 -0
- data/lib/athenian/api/filter_api.rb +701 -0
- data/lib/athenian/api/get_api.rb +266 -0
- data/lib/athenian/api/histograms_api.rb +217 -0
- data/lib/athenian/api/integrations_api.rb +150 -0
- data/lib/athenian/api/metrics_api.rb +481 -0
- data/lib/athenian/api/pagination_api.rb +81 -0
- data/lib/athenian/api/registration_api.rb +395 -0
- data/lib/athenian/api/reposet_api.rb +332 -0
- data/lib/athenian/api/security_api.rb +271 -0
- data/lib/athenian/api/settings_api.rb +820 -0
- data/lib/athenian/api/team_api.rb +396 -0
- data/lib/athenian/api/user_api.rb +381 -0
- data/lib/athenian/api/version_api.rb +74 -0
- data/lib/athenian/api_client.rb +389 -0
- data/lib/athenian/api_error.rb +55 -0
- data/lib/athenian/configuration.rb +294 -0
- data/lib/athenian/models/accepted_invitation.rb +241 -0
- data/lib/athenian/models/account.rb +283 -0
- data/lib/athenian/models/account_status.rb +281 -0
- data/lib/athenian/models/account_user_change_request.rb +285 -0
- data/lib/athenian/models/calculated_code_check_histogram.rb +318 -0
- data/lib/athenian/models/calculated_code_check_metrics.rb +386 -0
- data/lib/athenian/models/calculated_code_check_metrics_item.rb +291 -0
- data/lib/athenian/models/calculated_deployment_metric.rb +268 -0
- data/lib/athenian/models/calculated_developer_metrics.rb +340 -0
- data/lib/athenian/models/calculated_developer_metrics_item.rb +252 -0
- data/lib/athenian/models/calculated_jira_histogram.rb +313 -0
- data/lib/athenian/models/calculated_jira_metric_values.rb +266 -0
- data/lib/athenian/models/calculated_linear_metric_values.rb +273 -0
- data/lib/athenian/models/calculated_linear_metric_values_confidence_mins_inner.rb +101 -0
- data/lib/athenian/models/calculated_linear_metric_values_values_inner.rb +102 -0
- data/lib/athenian/models/calculated_pull_request_histogram.rb +318 -0
- data/lib/athenian/models/calculated_pull_request_histogram_frequencies_inner.rb +101 -0
- data/lib/athenian/models/calculated_pull_request_metrics.rb +391 -0
- data/lib/athenian/models/calculated_pull_request_metrics_item.rb +247 -0
- data/lib/athenian/models/calculated_release_metric.rb +301 -0
- data/lib/athenian/models/code_bypassing_prs_measurement.rb +357 -0
- data/lib/athenian/models/code_check_histogram_definition.rb +303 -0
- data/lib/athenian/models/code_check_histograms_request.rb +365 -0
- data/lib/athenian/models/code_check_metric_id.rb +55 -0
- data/lib/athenian/models/code_check_metrics_request.rb +401 -0
- data/lib/athenian/models/code_check_run_statistics.rb +448 -0
- data/lib/athenian/models/code_check_run_statistics_mean_execution_time.rb +224 -0
- data/lib/athenian/models/code_check_run_statistics_median_execution_time.rb +224 -0
- data/lib/athenian/models/code_check_run_statistics_stddev_execution_time.rb +224 -0
- data/lib/athenian/models/code_filter.rb +351 -0
- data/lib/athenian/models/commit.rb +405 -0
- data/lib/athenian/models/commit_signature.rb +266 -0
- data/lib/athenian/models/commits_list.rb +236 -0
- data/lib/athenian/models/commits_list_include.rb +242 -0
- data/lib/athenian/models/contributor.rb +261 -0
- data/lib/athenian/models/contributor_identity.rb +230 -0
- data/lib/athenian/models/create_token_request.rb +235 -0
- data/lib/athenian/models/created_identifier.rb +220 -0
- data/lib/athenian/models/created_token.rb +236 -0
- data/lib/athenian/models/datasource.rb +37 -0
- data/lib/athenian/models/delete_events_cache_request.rb +277 -0
- data/lib/athenian/models/deployed_component.rb +255 -0
- data/lib/athenian/models/deployed_pull_request.rb +326 -0
- data/lib/athenian/models/deployed_pull_request_all_of.rb +220 -0
- data/lib/athenian/models/deployed_release.rb +488 -0
- data/lib/athenian/models/deployment_analysis.rb +244 -0
- data/lib/athenian/models/deployment_analysis_code.rb +303 -0
- data/lib/athenian/models/deployment_conclusion.rb +38 -0
- data/lib/athenian/models/deployment_metric_id.rb +52 -0
- data/lib/athenian/models/deployment_metrics_request.rb +391 -0
- data/lib/athenian/models/deployment_modify_labels_request.rb +227 -0
- data/lib/athenian/models/deployment_notification.rb +390 -0
- data/lib/athenian/models/deployment_with.rb +233 -0
- data/lib/athenian/models/developer_metric_id.rb +51 -0
- data/lib/athenian/models/developer_metrics_request.rb +355 -0
- data/lib/athenian/models/developer_summary.rb +271 -0
- data/lib/athenian/models/developer_updates.rb +356 -0
- data/lib/athenian/models/diff_releases_request.rb +237 -0
- data/lib/athenian/models/diffed_releases.rb +237 -0
- data/lib/athenian/models/diffed_releases_include.rb +242 -0
- data/lib/athenian/models/filter_code_checks_request.rb +356 -0
- data/lib/athenian/models/filter_commits_request.rb +385 -0
- data/lib/athenian/models/filter_contributors_request.rb +331 -0
- data/lib/athenian/models/filter_deployments_request.rb +383 -0
- data/lib/athenian/models/filter_environments_request.rb +294 -0
- data/lib/athenian/models/filter_jira_common.rb +318 -0
- data/lib/athenian/models/filter_jira_stuff.rb +373 -0
- data/lib/athenian/models/filter_jira_stuff_with.rb +248 -0
- data/lib/athenian/models/filter_labels_request.rb +233 -0
- data/lib/athenian/models/filter_pull_requests_request.rb +456 -0
- data/lib/athenian/models/filter_releases_request.rb +339 -0
- data/lib/athenian/models/filter_repositories_request.rb +307 -0
- data/lib/athenian/models/filtered_code_check_run.rb +306 -0
- data/lib/athenian/models/filtered_code_check_run_prs_stats.rb +454 -0
- data/lib/athenian/models/filtered_code_check_run_total_stats.rb +454 -0
- data/lib/athenian/models/filtered_code_check_runs.rb +240 -0
- data/lib/athenian/models/filtered_deployment.rb +436 -0
- data/lib/athenian/models/filtered_deployments.rb +237 -0
- data/lib/athenian/models/filtered_deployments_include.rb +243 -0
- data/lib/athenian/models/filtered_environment.rb +283 -0
- data/lib/athenian/models/filtered_jira_stuff.rb +334 -0
- data/lib/athenian/models/filtered_label.rb +298 -0
- data/lib/athenian/models/filtered_release.rb +483 -0
- data/lib/athenian/models/for_set_code_checks.rb +334 -0
- data/lib/athenian/models/for_set_code_checks_jira.rb +306 -0
- data/lib/athenian/models/for_set_deployments.rb +343 -0
- data/lib/athenian/models/for_set_developers.rb +288 -0
- data/lib/athenian/models/for_set_pull_requests.rb +371 -0
- data/lib/athenian/models/generic_error.rb +270 -0
- data/lib/athenian/models/get_deployment_labels200_response.rb +220 -0
- data/lib/athenian/models/get_jira_issues_include.rb +39 -0
- data/lib/athenian/models/get_jira_issues_request.rb +269 -0
- data/lib/athenian/models/get_jira_issues_response.rb +231 -0
- data/lib/athenian/models/get_jira_issues_response_include.rb +229 -0
- data/lib/athenian/models/get_pull_requests_request.rb +284 -0
- data/lib/athenian/models/get_releases_request.rb +238 -0
- data/lib/athenian/models/goal_metric_params.rb +215 -0
- data/lib/athenian/models/goal_metric_params_threshold.rb +101 -0
- data/lib/athenian/models/goal_template.rb +305 -0
- data/lib/athenian/models/goal_template_create_request.rb +290 -0
- data/lib/athenian/models/goal_template_metric.rb +102 -0
- data/lib/athenian/models/goal_template_update_request.rb +275 -0
- data/lib/athenian/models/histogram_scale.rb +37 -0
- data/lib/athenian/models/included_deployments.rb +218 -0
- data/lib/athenian/models/included_jira_issues.rb +218 -0
- data/lib/athenian/models/included_native_user.rb +220 -0
- data/lib/athenian/models/included_native_users.rb +223 -0
- data/lib/athenian/models/installation_progress.rb +283 -0
- data/lib/athenian/models/interquartile.rb +234 -0
- data/lib/athenian/models/invalid_request_error.rb +288 -0
- data/lib/athenian/models/invalid_request_error_all_of.rb +215 -0
- data/lib/athenian/models/invitation_check_result.rb +274 -0
- data/lib/athenian/models/invitation_link.rb +221 -0
- data/lib/athenian/models/invited_user.rb +235 -0
- data/lib/athenian/models/jira_comment.rb +250 -0
- data/lib/athenian/models/jira_epic.rb +487 -0
- data/lib/athenian/models/jira_epic_all_of.rb +247 -0
- data/lib/athenian/models/jira_epic_child.rb +475 -0
- data/lib/athenian/models/jira_epic_child_all_of.rb +235 -0
- data/lib/athenian/models/jira_epic_issue_common.rb +437 -0
- data/lib/athenian/models/jira_filter.rb +300 -0
- data/lib/athenian/models/jira_filter_return.rb +44 -0
- data/lib/athenian/models/jira_filter_with.rb +242 -0
- data/lib/athenian/models/jira_histogram_definition.rb +303 -0
- data/lib/athenian/models/jira_histograms_request.rb +436 -0
- data/lib/athenian/models/jira_installation.rb +238 -0
- data/lib/athenian/models/jira_issue.rb +471 -0
- data/lib/athenian/models/jira_issue_all_of.rb +232 -0
- data/lib/athenian/models/jira_issue_type.rb +330 -0
- data/lib/athenian/models/jira_label.rb +260 -0
- data/lib/athenian/models/jira_metric_id.rb +48 -0
- data/lib/athenian/models/jira_metrics_request.rb +495 -0
- data/lib/athenian/models/jira_priority.rb +306 -0
- data/lib/athenian/models/jira_project.rb +307 -0
- data/lib/athenian/models/jira_projects_request.rb +238 -0
- data/lib/athenian/models/jira_status.rb +272 -0
- data/lib/athenian/models/jira_status_category.rb +39 -0
- data/lib/athenian/models/jira_user.rb +294 -0
- data/lib/athenian/models/linked_jira_issue.rb +273 -0
- data/lib/athenian/models/listed_token.rb +251 -0
- data/lib/athenian/models/logical_deployment_rules.rb +228 -0
- data/lib/athenian/models/logical_pr_rules.rb +228 -0
- data/lib/athenian/models/logical_repository.rb +303 -0
- data/lib/athenian/models/logical_repository_get_request.rb +236 -0
- data/lib/athenian/models/logical_repository_request.rb +318 -0
- data/lib/athenian/models/mapped_jira_identity.rb +289 -0
- data/lib/athenian/models/mapped_jira_identity_change.rb +232 -0
- data/lib/athenian/models/match_identities_request.rb +237 -0
- data/lib/athenian/models/matched_identity.rb +277 -0
- data/lib/athenian/models/matched_identity_to.rb +224 -0
- data/lib/athenian/models/notified_deployments_inner.rb +235 -0
- data/lib/athenian/models/notify_deployments200_response.rb +222 -0
- data/lib/athenian/models/organization.rb +248 -0
- data/lib/athenian/models/paginate_pull_requests_request.rb +254 -0
- data/lib/athenian/models/patch_token_request.rb +216 -0
- data/lib/athenian/models/product_feature.rb +234 -0
- data/lib/athenian/models/product_feature_parameters.rb +102 -0
- data/lib/athenian/models/pull_request.rb +727 -0
- data/lib/athenian/models/pull_request_event.rb +45 -0
- data/lib/athenian/models/pull_request_histogram_definition.rb +303 -0
- data/lib/athenian/models/pull_request_histograms_request.rb +380 -0
- data/lib/athenian/models/pull_request_label.rb +265 -0
- data/lib/athenian/models/pull_request_metric_id.rb +105 -0
- data/lib/athenian/models/pull_request_metrics_request.rb +416 -0
- data/lib/athenian/models/pull_request_numbers.rb +237 -0
- data/lib/athenian/models/pull_request_pagination_plan.rb +218 -0
- data/lib/athenian/models/pull_request_participant.rb +259 -0
- data/lib/athenian/models/pull_request_set.rb +237 -0
- data/lib/athenian/models/pull_request_set_include.rb +242 -0
- data/lib/athenian/models/pull_request_stage.rb +43 -0
- data/lib/athenian/models/pull_request_with.rb +290 -0
- data/lib/athenian/models/release_diff.rb +251 -0
- data/lib/athenian/models/release_match_request.rb +304 -0
- data/lib/athenian/models/release_match_setting.rb +292 -0
- data/lib/athenian/models/release_match_strategy.rb +39 -0
- data/lib/athenian/models/release_metric_id.rb +60 -0
- data/lib/athenian/models/release_metrics_request.rb +448 -0
- data/lib/athenian/models/release_metrics_request_for_inner.rb +101 -0
- data/lib/athenian/models/release_names.rb +238 -0
- data/lib/athenian/models/release_notification.rb +322 -0
- data/lib/athenian/models/release_notification_status.rb +38 -0
- data/lib/athenian/models/release_pair.rb +236 -0
- data/lib/athenian/models/release_set.rb +227 -0
- data/lib/athenian/models/release_set_include.rb +255 -0
- data/lib/athenian/models/release_with.rb +233 -0
- data/lib/athenian/models/released_pull_request.rb +303 -0
- data/lib/athenian/models/released_pull_request_author.rb +224 -0
- data/lib/athenian/models/repository_set_create_request.rb +252 -0
- data/lib/athenian/models/repository_set_list_item.rb +271 -0
- data/lib/athenian/models/repository_set_with_name.rb +235 -0
- data/lib/athenian/models/set_mapped_jira_identities_request.rb +238 -0
- data/lib/athenian/models/share.rb +251 -0
- data/lib/athenian/models/stage_timings.rb +335 -0
- data/lib/athenian/models/table_fetching_progress.rb +289 -0
- data/lib/athenian/models/team.rb +264 -0
- data/lib/athenian/models/team_create_request.rb +264 -0
- data/lib/athenian/models/team_update_request.rb +249 -0
- data/lib/athenian/models/user.rb +313 -0
- data/lib/athenian/models/versions.rb +233 -0
- data/lib/athenian/models/with_both_jira_and_jiragroups.rb +226 -0
- data/lib/athenian/models/work_type.rb +292 -0
- data/lib/athenian/models/work_type_get_request.rb +255 -0
- data/lib/athenian/models/work_type_put_request.rb +235 -0
- data/lib/athenian/models/work_type_rule.rb +255 -0
- data/lib/athenian/version.rb +12 -0
- data/lib/athenian.rb +255 -0
- data/spec/api/align_api_spec.rb +89 -0
- data/spec/api/events_api_spec.rb +88 -0
- data/spec/api/filter_api_spec.rb +153 -0
- data/spec/api/get_api_spec.rb +76 -0
- data/spec/api/histograms_api_spec.rb +65 -0
- data/spec/api/integrations_api_spec.rb +55 -0
- data/spec/api/metrics_api_spec.rb +109 -0
- data/spec/api/pagination_api_spec.rb +43 -0
- data/spec/api/registration_api_spec.rb +98 -0
- data/spec/api/reposet_api_spec.rb +88 -0
- data/spec/api/security_api_spec.rb +77 -0
- data/spec/api/settings_api_spec.rb +175 -0
- data/spec/api/team_api_spec.rb +100 -0
- data/spec/api/user_api_spec.rb +97 -0
- data/spec/api/version_api_spec.rb +42 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/configuration_spec.rb +39 -0
- data/spec/models/accepted_invitation_spec.rb +43 -0
- data/spec/models/account_spec.rb +55 -0
- data/spec/models/account_status_spec.rb +55 -0
- data/spec/models/account_user_change_request_spec.rb +47 -0
- data/spec/models/calculated_code_check_histogram_spec.rb +61 -0
- data/spec/models/calculated_code_check_metrics_item_spec.rb +55 -0
- data/spec/models/calculated_code_check_metrics_spec.rb +73 -0
- data/spec/models/calculated_deployment_metric_spec.rb +49 -0
- data/spec/models/calculated_developer_metrics_item_spec.rb +43 -0
- data/spec/models/calculated_developer_metrics_spec.rb +61 -0
- data/spec/models/calculated_jira_histogram_spec.rb +61 -0
- data/spec/models/calculated_jira_metric_values_spec.rb +55 -0
- data/spec/models/calculated_linear_metric_values_confidence_mins_inner_spec.rb +28 -0
- data/spec/models/calculated_linear_metric_values_spec.rb +55 -0
- data/spec/models/calculated_linear_metric_values_values_inner_spec.rb +28 -0
- data/spec/models/calculated_pull_request_histogram_frequencies_inner_spec.rb +28 -0
- data/spec/models/calculated_pull_request_histogram_spec.rb +61 -0
- data/spec/models/calculated_pull_request_metrics_item_spec.rb +43 -0
- data/spec/models/calculated_pull_request_metrics_spec.rb +73 -0
- data/spec/models/calculated_release_metric_spec.rb +67 -0
- data/spec/models/code_bypassing_prs_measurement_spec.rb +55 -0
- data/spec/models/code_check_histogram_definition_spec.rb +49 -0
- data/spec/models/code_check_histograms_request_spec.rb +73 -0
- data/spec/models/code_check_metric_id_spec.rb +25 -0
- data/spec/models/code_check_metrics_request_spec.rb +79 -0
- data/spec/models/code_check_run_statistics_mean_execution_time_spec.rb +25 -0
- data/spec/models/code_check_run_statistics_median_execution_time_spec.rb +25 -0
- data/spec/models/code_check_run_statistics_spec.rb +97 -0
- data/spec/models/code_check_run_statistics_stddev_execution_time_spec.rb +25 -0
- data/spec/models/code_filter_spec.rb +79 -0
- data/spec/models/commit_signature_spec.rb +55 -0
- data/spec/models/commit_spec.rb +85 -0
- data/spec/models/commits_list_include_spec.rb +37 -0
- data/spec/models/commits_list_spec.rb +37 -0
- data/spec/models/contributor_identity_spec.rb +37 -0
- data/spec/models/contributor_spec.rb +55 -0
- data/spec/models/create_token_request_spec.rb +37 -0
- data/spec/models/created_identifier_spec.rb +31 -0
- data/spec/models/created_token_spec.rb +37 -0
- data/spec/models/datasource_spec.rb +25 -0
- data/spec/models/delete_events_cache_request_spec.rb +47 -0
- data/spec/models/deployed_component_spec.rb +37 -0
- data/spec/models/deployed_pull_request_all_of_spec.rb +31 -0
- data/spec/models/deployed_pull_request_spec.rb +73 -0
- data/spec/models/deployed_release_spec.rb +97 -0
- data/spec/models/deployment_analysis_code_spec.rb +61 -0
- data/spec/models/deployment_analysis_spec.rb +43 -0
- data/spec/models/deployment_conclusion_spec.rb +25 -0
- data/spec/models/deployment_metric_id_spec.rb +25 -0
- data/spec/models/deployment_metrics_request_spec.rb +73 -0
- data/spec/models/deployment_modify_labels_request_spec.rb +37 -0
- data/spec/models/deployment_notification_spec.rb +73 -0
- data/spec/models/deployment_with_spec.rb +43 -0
- data/spec/models/developer_metric_id_spec.rb +25 -0
- data/spec/models/developer_metrics_request_spec.rb +67 -0
- data/spec/models/developer_summary_spec.rb +55 -0
- data/spec/models/developer_updates_spec.rb +61 -0
- data/spec/models/diff_releases_request_spec.rb +37 -0
- data/spec/models/diffed_releases_include_spec.rb +37 -0
- data/spec/models/diffed_releases_spec.rb +37 -0
- data/spec/models/filter_code_checks_request_spec.rb +85 -0
- data/spec/models/filter_commits_request_spec.rb +83 -0
- data/spec/models/filter_contributors_request_spec.rb +65 -0
- data/spec/models/filter_deployments_request_spec.rb +103 -0
- data/spec/models/filter_environments_request_spec.rb +55 -0
- data/spec/models/filter_jira_common_spec.rb +67 -0
- data/spec/models/filter_jira_stuff_spec.rb +97 -0
- data/spec/models/filter_jira_stuff_with_spec.rb +43 -0
- data/spec/models/filter_labels_request_spec.rb +37 -0
- data/spec/models/filter_pull_requests_request_spec.rb +121 -0
- data/spec/models/filter_releases_request_spec.rb +79 -0
- data/spec/models/filter_repositories_request_spec.rb +61 -0
- data/spec/models/filtered_code_check_run_prs_stats_spec.rb +97 -0
- data/spec/models/filtered_code_check_run_spec.rb +67 -0
- data/spec/models/filtered_code_check_run_total_stats_spec.rb +97 -0
- data/spec/models/filtered_code_check_runs_spec.rb +37 -0
- data/spec/models/filtered_deployment_spec.rb +91 -0
- data/spec/models/filtered_deployments_include_spec.rb +37 -0
- data/spec/models/filtered_deployments_spec.rb +37 -0
- data/spec/models/filtered_environment_spec.rb +49 -0
- data/spec/models/filtered_jira_stuff_spec.rb +73 -0
- data/spec/models/filtered_label_spec.rb +49 -0
- data/spec/models/filtered_release_spec.rb +103 -0
- data/spec/models/for_set_code_checks_jira_spec.rb +73 -0
- data/spec/models/for_set_code_checks_spec.rb +73 -0
- data/spec/models/for_set_deployments_spec.rb +91 -0
- data/spec/models/for_set_developers_spec.rb +67 -0
- data/spec/models/for_set_pull_requests_spec.rb +85 -0
- data/spec/models/generic_error_spec.rb +55 -0
- data/spec/models/get_deployment_labels200_response_spec.rb +31 -0
- data/spec/models/get_jira_issues_include_spec.rb +25 -0
- data/spec/models/get_jira_issues_request_spec.rb +43 -0
- data/spec/models/get_jira_issues_response_include_spec.rb +37 -0
- data/spec/models/get_jira_issues_response_spec.rb +37 -0
- data/spec/models/get_pull_requests_request_spec.rb +43 -0
- data/spec/models/get_releases_request_spec.rb +37 -0
- data/spec/models/goal_metric_params_spec.rb +31 -0
- data/spec/models/goal_metric_params_threshold_spec.rb +28 -0
- data/spec/models/goal_template_create_request_spec.rb +55 -0
- data/spec/models/goal_template_metric_spec.rb +28 -0
- data/spec/models/goal_template_spec.rb +61 -0
- data/spec/models/goal_template_update_request_spec.rb +49 -0
- data/spec/models/histogram_scale_spec.rb +25 -0
- data/spec/models/included_deployments_spec.rb +31 -0
- data/spec/models/included_jira_issues_spec.rb +31 -0
- data/spec/models/included_native_user_spec.rb +31 -0
- data/spec/models/included_native_users_spec.rb +31 -0
- data/spec/models/installation_progress_spec.rb +55 -0
- data/spec/models/interquartile_spec.rb +37 -0
- data/spec/models/invalid_request_error_all_of_spec.rb +31 -0
- data/spec/models/invalid_request_error_spec.rb +61 -0
- data/spec/models/invitation_check_result_spec.rb +47 -0
- data/spec/models/invitation_link_spec.rb +31 -0
- data/spec/models/invited_user_spec.rb +37 -0
- data/spec/models/jira_comment_spec.rb +43 -0
- data/spec/models/jira_epic_all_of_spec.rb +43 -0
- data/spec/models/jira_epic_child_all_of_spec.rb +37 -0
- data/spec/models/jira_epic_child_spec.rb +145 -0
- data/spec/models/jira_epic_issue_common_spec.rb +133 -0
- data/spec/models/jira_epic_spec.rb +151 -0
- data/spec/models/jira_filter_return_spec.rb +25 -0
- data/spec/models/jira_filter_spec.rb +73 -0
- data/spec/models/jira_filter_with_spec.rb +43 -0
- data/spec/models/jira_histogram_definition_spec.rb +49 -0
- data/spec/models/jira_histograms_request_spec.rb +109 -0
- data/spec/models/jira_installation_spec.rb +37 -0
- data/spec/models/jira_issue_all_of_spec.rb +37 -0
- data/spec/models/jira_issue_spec.rb +145 -0
- data/spec/models/jira_issue_type_spec.rb +67 -0
- data/spec/models/jira_label_spec.rb +49 -0
- data/spec/models/jira_metric_id_spec.rb +25 -0
- data/spec/models/jira_metrics_request_spec.rb +127 -0
- data/spec/models/jira_priority_spec.rb +49 -0
- data/spec/models/jira_project_spec.rb +67 -0
- data/spec/models/jira_projects_request_spec.rb +37 -0
- data/spec/models/jira_status_category_spec.rb +25 -0
- data/spec/models/jira_status_spec.rb +43 -0
- data/spec/models/jira_user_spec.rb +53 -0
- data/spec/models/linked_jira_issue_spec.rb +55 -0
- data/spec/models/listed_token_spec.rb +43 -0
- data/spec/models/logical_deployment_rules_spec.rb +37 -0
- data/spec/models/logical_pr_rules_spec.rb +37 -0
- data/spec/models/logical_repository_get_request_spec.rb +37 -0
- data/spec/models/logical_repository_request_spec.rb +61 -0
- data/spec/models/logical_repository_spec.rb +55 -0
- data/spec/models/mapped_jira_identity_change_spec.rb +37 -0
- data/spec/models/mapped_jira_identity_spec.rb +49 -0
- data/spec/models/match_identities_request_spec.rb +37 -0
- data/spec/models/matched_identity_spec.rb +43 -0
- data/spec/models/matched_identity_to_spec.rb +25 -0
- data/spec/models/notified_deployments_inner_spec.rb +37 -0
- data/spec/models/notify_deployments200_response_spec.rb +31 -0
- data/spec/models/organization_spec.rb +43 -0
- data/spec/models/paginate_pull_requests_request_spec.rb +37 -0
- data/spec/models/patch_token_request_spec.rb +31 -0
- data/spec/models/product_feature_parameters_spec.rb +28 -0
- data/spec/models/product_feature_spec.rb +37 -0
- data/spec/models/pull_request_event_spec.rb +25 -0
- data/spec/models/pull_request_histogram_definition_spec.rb +49 -0
- data/spec/models/pull_request_histograms_request_spec.rb +79 -0
- data/spec/models/pull_request_label_spec.rb +43 -0
- data/spec/models/pull_request_metric_id_spec.rb +25 -0
- data/spec/models/pull_request_metrics_request_spec.rb +85 -0
- data/spec/models/pull_request_numbers_spec.rb +37 -0
- data/spec/models/pull_request_pagination_plan_spec.rb +31 -0
- data/spec/models/pull_request_participant_spec.rb +41 -0
- data/spec/models/pull_request_set_include_spec.rb +37 -0
- data/spec/models/pull_request_set_spec.rb +37 -0
- data/spec/models/pull_request_spec.rb +199 -0
- data/spec/models/pull_request_stage_spec.rb +25 -0
- data/spec/models/pull_request_with_spec.rb +67 -0
- data/spec/models/release_diff_spec.rb +43 -0
- data/spec/models/release_match_request_spec.rb +61 -0
- data/spec/models/release_match_setting_spec.rb +55 -0
- data/spec/models/release_match_strategy_spec.rb +25 -0
- data/spec/models/release_metric_id_spec.rb +25 -0
- data/spec/models/release_metrics_request_for_inner_spec.rb +28 -0
- data/spec/models/release_metrics_request_spec.rb +103 -0
- data/spec/models/release_names_spec.rb +37 -0
- data/spec/models/release_notification_spec.rb +61 -0
- data/spec/models/release_notification_status_spec.rb +25 -0
- data/spec/models/release_pair_spec.rb +37 -0
- data/spec/models/release_set_include_spec.rb +43 -0
- data/spec/models/release_set_spec.rb +37 -0
- data/spec/models/release_with_spec.rb +43 -0
- data/spec/models/released_pull_request_author_spec.rb +25 -0
- data/spec/models/released_pull_request_spec.rb +67 -0
- data/spec/models/repository_set_create_request_spec.rb +43 -0
- data/spec/models/repository_set_list_item_spec.rb +55 -0
- data/spec/models/repository_set_with_name_spec.rb +43 -0
- data/spec/models/set_mapped_jira_identities_request_spec.rb +37 -0
- data/spec/models/share_spec.rb +43 -0
- data/spec/models/stage_timings_spec.rb +55 -0
- data/spec/models/table_fetching_progress_spec.rb +43 -0
- data/spec/models/team_create_request_spec.rb +49 -0
- data/spec/models/team_spec.rb +49 -0
- data/spec/models/team_update_request_spec.rb +43 -0
- data/spec/models/user_spec.rb +79 -0
- data/spec/models/versions_spec.rb +37 -0
- data/spec/models/with_both_jira_and_jiragroups_spec.rb +37 -0
- data/spec/models/work_type_get_request_spec.rb +37 -0
- data/spec/models/work_type_put_request_spec.rb +37 -0
- data/spec/models/work_type_rule_spec.rb +37 -0
- data/spec/models/work_type_spec.rb +43 -0
- data/spec/spec_helper.rb +108 -0
- metadata +1000 -0
|
@@ -0,0 +1,727 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
This is an automatically generated file. DO NOT EDIT.
|
|
3
|
+
|
|
4
|
+
Generated from version 2.1.81 of the OpenAPI specification at
|
|
5
|
+
https://github.com/athenianco/api-spec/releases/tag/2.1.81.
|
|
6
|
+
Generated by: https://openapi-generator.tech
|
|
7
|
+
OpenAPI Generator version: 6.4.0
|
|
8
|
+
=end
|
|
9
|
+
|
|
10
|
+
require 'date'
|
|
11
|
+
require 'time'
|
|
12
|
+
|
|
13
|
+
module Athenian
|
|
14
|
+
# Details of a pull request. All the attributes, stats and events correspond to \"today\", not `date_to`, *except for the PR stages `wip`, `reviewing`, `merging`, `releasing`*, which correspond to `date_to`.
|
|
15
|
+
class PullRequest
|
|
16
|
+
# PR is/was open in this repository.
|
|
17
|
+
attr_accessor :repository
|
|
18
|
+
|
|
19
|
+
# PR number.
|
|
20
|
+
attr_accessor :number
|
|
21
|
+
|
|
22
|
+
# Title of the PR.
|
|
23
|
+
attr_accessor :title
|
|
24
|
+
|
|
25
|
+
# Overall number of lines added.
|
|
26
|
+
attr_accessor :size_added
|
|
27
|
+
|
|
28
|
+
# Overall number of lines removed.
|
|
29
|
+
attr_accessor :size_removed
|
|
30
|
+
|
|
31
|
+
# Number of files changed in this PR.
|
|
32
|
+
attr_accessor :files_changed
|
|
33
|
+
|
|
34
|
+
# When this PR was created.
|
|
35
|
+
attr_accessor :created
|
|
36
|
+
|
|
37
|
+
# When this PR was last updated.
|
|
38
|
+
attr_accessor :updated
|
|
39
|
+
|
|
40
|
+
# When this PR was last closed.
|
|
41
|
+
attr_accessor :closed
|
|
42
|
+
|
|
43
|
+
# Number of *regular* (not review) comments in this PR.
|
|
44
|
+
attr_accessor :comments
|
|
45
|
+
|
|
46
|
+
# Number of commits in this PR.
|
|
47
|
+
attr_accessor :commits
|
|
48
|
+
|
|
49
|
+
# When was the first time the author of this PR requested a review.
|
|
50
|
+
attr_accessor :review_requested
|
|
51
|
+
|
|
52
|
+
# When the first review of this PR happened.
|
|
53
|
+
attr_accessor :first_review
|
|
54
|
+
|
|
55
|
+
# When this PR was approved.
|
|
56
|
+
attr_accessor :approved
|
|
57
|
+
|
|
58
|
+
# Number of review comments this PR received. A review comment is left at a specific line in a specific file. In other words: review summaries are *not* considered review comments; refer to `reviews`. Comments by the PR author are considered as `comments`, not as `review_comments`.
|
|
59
|
+
attr_accessor :review_comments
|
|
60
|
+
|
|
61
|
+
# Number of times this PR was reviewed. Reviews by the PR author are not taken into account.
|
|
62
|
+
attr_accessor :reviews
|
|
63
|
+
|
|
64
|
+
# When this PR was merged.
|
|
65
|
+
attr_accessor :merged
|
|
66
|
+
|
|
67
|
+
# PR was merged with these failed check runs.
|
|
68
|
+
attr_accessor :merged_with_failed_check_runs
|
|
69
|
+
|
|
70
|
+
# When this PR was released.
|
|
71
|
+
attr_accessor :released
|
|
72
|
+
|
|
73
|
+
# URL of the earliest release that includes this merged PR.
|
|
74
|
+
attr_accessor :release_url
|
|
75
|
+
|
|
76
|
+
# List of deployments that contain this PR.
|
|
77
|
+
attr_accessor :deployments
|
|
78
|
+
|
|
79
|
+
attr_accessor :stage_timings
|
|
80
|
+
|
|
81
|
+
# List of PR events which happened until `date_to`. `date_from` does not matter.
|
|
82
|
+
attr_accessor :events_time_machine
|
|
83
|
+
|
|
84
|
+
# List of PR stages as of `date_to` (normally, of length 1).
|
|
85
|
+
attr_accessor :stages_time_machine
|
|
86
|
+
|
|
87
|
+
# List of PR events that ever happened.
|
|
88
|
+
attr_accessor :events_now
|
|
89
|
+
|
|
90
|
+
# List of current PR stages (normally, of length 1).
|
|
91
|
+
attr_accessor :stages_now
|
|
92
|
+
|
|
93
|
+
# List of developers related to this PR.
|
|
94
|
+
attr_accessor :participants
|
|
95
|
+
|
|
96
|
+
# List of PR labels.
|
|
97
|
+
attr_accessor :labels
|
|
98
|
+
|
|
99
|
+
# List of linked JIRA issues.
|
|
100
|
+
attr_accessor :jira
|
|
101
|
+
|
|
102
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
103
|
+
def self.attribute_map
|
|
104
|
+
{
|
|
105
|
+
:'repository' => :'repository',
|
|
106
|
+
:'number' => :'number',
|
|
107
|
+
:'title' => :'title',
|
|
108
|
+
:'size_added' => :'size_added',
|
|
109
|
+
:'size_removed' => :'size_removed',
|
|
110
|
+
:'files_changed' => :'files_changed',
|
|
111
|
+
:'created' => :'created',
|
|
112
|
+
:'updated' => :'updated',
|
|
113
|
+
:'closed' => :'closed',
|
|
114
|
+
:'comments' => :'comments',
|
|
115
|
+
:'commits' => :'commits',
|
|
116
|
+
:'review_requested' => :'review_requested',
|
|
117
|
+
:'first_review' => :'first_review',
|
|
118
|
+
:'approved' => :'approved',
|
|
119
|
+
:'review_comments' => :'review_comments',
|
|
120
|
+
:'reviews' => :'reviews',
|
|
121
|
+
:'merged' => :'merged',
|
|
122
|
+
:'merged_with_failed_check_runs' => :'merged_with_failed_check_runs',
|
|
123
|
+
:'released' => :'released',
|
|
124
|
+
:'release_url' => :'release_url',
|
|
125
|
+
:'deployments' => :'deployments',
|
|
126
|
+
:'stage_timings' => :'stage_timings',
|
|
127
|
+
:'events_time_machine' => :'events_time_machine',
|
|
128
|
+
:'stages_time_machine' => :'stages_time_machine',
|
|
129
|
+
:'events_now' => :'events_now',
|
|
130
|
+
:'stages_now' => :'stages_now',
|
|
131
|
+
:'participants' => :'participants',
|
|
132
|
+
:'labels' => :'labels',
|
|
133
|
+
:'jira' => :'jira'
|
|
134
|
+
}
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Returns all the JSON keys this model knows about
|
|
138
|
+
def self.acceptable_attributes
|
|
139
|
+
attribute_map.values
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Attribute type mapping.
|
|
143
|
+
def self.openapi_types
|
|
144
|
+
{
|
|
145
|
+
:'repository' => :'String',
|
|
146
|
+
:'number' => :'Integer',
|
|
147
|
+
:'title' => :'String',
|
|
148
|
+
:'size_added' => :'Integer',
|
|
149
|
+
:'size_removed' => :'Integer',
|
|
150
|
+
:'files_changed' => :'Integer',
|
|
151
|
+
:'created' => :'Time',
|
|
152
|
+
:'updated' => :'Time',
|
|
153
|
+
:'closed' => :'Time',
|
|
154
|
+
:'comments' => :'Integer',
|
|
155
|
+
:'commits' => :'Integer',
|
|
156
|
+
:'review_requested' => :'Time',
|
|
157
|
+
:'first_review' => :'Time',
|
|
158
|
+
:'approved' => :'Time',
|
|
159
|
+
:'review_comments' => :'Integer',
|
|
160
|
+
:'reviews' => :'Integer',
|
|
161
|
+
:'merged' => :'Time',
|
|
162
|
+
:'merged_with_failed_check_runs' => :'Array<String>',
|
|
163
|
+
:'released' => :'Time',
|
|
164
|
+
:'release_url' => :'String',
|
|
165
|
+
:'deployments' => :'Array<String>',
|
|
166
|
+
:'stage_timings' => :'StageTimings',
|
|
167
|
+
:'events_time_machine' => :'Array<PullRequestEvent>',
|
|
168
|
+
:'stages_time_machine' => :'Array<PullRequestStage>',
|
|
169
|
+
:'events_now' => :'Array<PullRequestEvent>',
|
|
170
|
+
:'stages_now' => :'Array<PullRequestStage>',
|
|
171
|
+
:'participants' => :'Array<PullRequestParticipant>',
|
|
172
|
+
:'labels' => :'Array<PullRequestLabel>',
|
|
173
|
+
:'jira' => :'Array<LinkedJIRAIssue>'
|
|
174
|
+
}
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# List of attributes with nullable: true
|
|
178
|
+
def self.openapi_nullable
|
|
179
|
+
Set.new([
|
|
180
|
+
])
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Initializes the object
|
|
184
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
185
|
+
def initialize(attributes = {})
|
|
186
|
+
if (!attributes.is_a?(Hash))
|
|
187
|
+
fail ArgumentError, 'The input argument (attributes) must be a hash in `Athenian::PullRequest` initialize method'
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
191
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
192
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
193
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Athenian::PullRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
194
|
+
end
|
|
195
|
+
h[k.to_sym] = v
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if attributes.key?(:'repository')
|
|
199
|
+
self.repository = attributes[:'repository']
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.key?(:'number')
|
|
203
|
+
self.number = attributes[:'number']
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if attributes.key?(:'title')
|
|
207
|
+
self.title = attributes[:'title']
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if attributes.key?(:'size_added')
|
|
211
|
+
self.size_added = attributes[:'size_added']
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if attributes.key?(:'size_removed')
|
|
215
|
+
self.size_removed = attributes[:'size_removed']
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if attributes.key?(:'files_changed')
|
|
219
|
+
self.files_changed = attributes[:'files_changed']
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
if attributes.key?(:'created')
|
|
223
|
+
self.created = attributes[:'created']
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if attributes.key?(:'updated')
|
|
227
|
+
self.updated = attributes[:'updated']
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'closed')
|
|
231
|
+
self.closed = attributes[:'closed']
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if attributes.key?(:'comments')
|
|
235
|
+
self.comments = attributes[:'comments']
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if attributes.key?(:'commits')
|
|
239
|
+
self.commits = attributes[:'commits']
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if attributes.key?(:'review_requested')
|
|
243
|
+
self.review_requested = attributes[:'review_requested']
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
if attributes.key?(:'first_review')
|
|
247
|
+
self.first_review = attributes[:'first_review']
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
if attributes.key?(:'approved')
|
|
251
|
+
self.approved = attributes[:'approved']
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
if attributes.key?(:'review_comments')
|
|
255
|
+
self.review_comments = attributes[:'review_comments']
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
if attributes.key?(:'reviews')
|
|
259
|
+
self.reviews = attributes[:'reviews']
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
if attributes.key?(:'merged')
|
|
263
|
+
self.merged = attributes[:'merged']
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
if attributes.key?(:'merged_with_failed_check_runs')
|
|
267
|
+
if (value = attributes[:'merged_with_failed_check_runs']).is_a?(Array)
|
|
268
|
+
self.merged_with_failed_check_runs = value
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
if attributes.key?(:'released')
|
|
273
|
+
self.released = attributes[:'released']
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
if attributes.key?(:'release_url')
|
|
277
|
+
self.release_url = attributes[:'release_url']
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
if attributes.key?(:'deployments')
|
|
281
|
+
if (value = attributes[:'deployments']).is_a?(Array)
|
|
282
|
+
self.deployments = value
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
if attributes.key?(:'stage_timings')
|
|
287
|
+
self.stage_timings = attributes[:'stage_timings']
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
if attributes.key?(:'events_time_machine')
|
|
291
|
+
if (value = attributes[:'events_time_machine']).is_a?(Array)
|
|
292
|
+
self.events_time_machine = value
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
if attributes.key?(:'stages_time_machine')
|
|
297
|
+
if (value = attributes[:'stages_time_machine']).is_a?(Array)
|
|
298
|
+
self.stages_time_machine = value
|
|
299
|
+
end
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
if attributes.key?(:'events_now')
|
|
303
|
+
if (value = attributes[:'events_now']).is_a?(Array)
|
|
304
|
+
self.events_now = value
|
|
305
|
+
end
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
if attributes.key?(:'stages_now')
|
|
309
|
+
if (value = attributes[:'stages_now']).is_a?(Array)
|
|
310
|
+
self.stages_now = value
|
|
311
|
+
end
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
if attributes.key?(:'participants')
|
|
315
|
+
if (value = attributes[:'participants']).is_a?(Array)
|
|
316
|
+
self.participants = value
|
|
317
|
+
end
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
if attributes.key?(:'labels')
|
|
321
|
+
if (value = attributes[:'labels']).is_a?(Array)
|
|
322
|
+
self.labels = value
|
|
323
|
+
end
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
if attributes.key?(:'jira')
|
|
327
|
+
if (value = attributes[:'jira']).is_a?(Array)
|
|
328
|
+
self.jira = value
|
|
329
|
+
end
|
|
330
|
+
end
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
334
|
+
# @return Array for valid properties with the reasons
|
|
335
|
+
def list_invalid_properties
|
|
336
|
+
invalid_properties = Array.new
|
|
337
|
+
if @repository.nil?
|
|
338
|
+
invalid_properties.push('invalid value for "repository", repository cannot be nil.')
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
if @number.nil?
|
|
342
|
+
invalid_properties.push('invalid value for "number", number cannot be nil.')
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
if @number < 1
|
|
346
|
+
invalid_properties.push('invalid value for "number", must be greater than or equal to 1.')
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
if @title.nil?
|
|
350
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
if @size_added.nil?
|
|
354
|
+
invalid_properties.push('invalid value for "size_added", size_added cannot be nil.')
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
if @size_added < 0
|
|
358
|
+
invalid_properties.push('invalid value for "size_added", must be greater than or equal to 0.')
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
if @size_removed.nil?
|
|
362
|
+
invalid_properties.push('invalid value for "size_removed", size_removed cannot be nil.')
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
if @size_removed < 0
|
|
366
|
+
invalid_properties.push('invalid value for "size_removed", must be greater than or equal to 0.')
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
if @files_changed.nil?
|
|
370
|
+
invalid_properties.push('invalid value for "files_changed", files_changed cannot be nil.')
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
if @files_changed < 0
|
|
374
|
+
invalid_properties.push('invalid value for "files_changed", must be greater than or equal to 0.')
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
if @created.nil?
|
|
378
|
+
invalid_properties.push('invalid value for "created", created cannot be nil.')
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
if @updated.nil?
|
|
382
|
+
invalid_properties.push('invalid value for "updated", updated cannot be nil.')
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
if @comments.nil?
|
|
386
|
+
invalid_properties.push('invalid value for "comments", comments cannot be nil.')
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
if @comments < 0
|
|
390
|
+
invalid_properties.push('invalid value for "comments", must be greater than or equal to 0.')
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
if @commits.nil?
|
|
394
|
+
invalid_properties.push('invalid value for "commits", commits cannot be nil.')
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
if @commits < 0
|
|
398
|
+
invalid_properties.push('invalid value for "commits", must be greater than or equal to 0.')
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
if !@review_comments.nil? && @review_comments < 0
|
|
402
|
+
invalid_properties.push('invalid value for "review_comments", must be greater than or equal to 0.')
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
if !@reviews.nil? && @reviews < 0
|
|
406
|
+
invalid_properties.push('invalid value for "reviews", must be greater than or equal to 0.')
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
if @stage_timings.nil?
|
|
410
|
+
invalid_properties.push('invalid value for "stage_timings", stage_timings cannot be nil.')
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
if @events_now.nil?
|
|
414
|
+
invalid_properties.push('invalid value for "events_now", events_now cannot be nil.')
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
if @stages_now.nil?
|
|
418
|
+
invalid_properties.push('invalid value for "stages_now", stages_now cannot be nil.')
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
if @participants.nil?
|
|
422
|
+
invalid_properties.push('invalid value for "participants", participants cannot be nil.')
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
invalid_properties
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
# Check to see if the all the properties in the model are valid
|
|
429
|
+
# @return true if the model is valid
|
|
430
|
+
def valid?
|
|
431
|
+
return false if @repository.nil?
|
|
432
|
+
return false if @number.nil?
|
|
433
|
+
return false if @number < 1
|
|
434
|
+
return false if @title.nil?
|
|
435
|
+
return false if @size_added.nil?
|
|
436
|
+
return false if @size_added < 0
|
|
437
|
+
return false if @size_removed.nil?
|
|
438
|
+
return false if @size_removed < 0
|
|
439
|
+
return false if @files_changed.nil?
|
|
440
|
+
return false if @files_changed < 0
|
|
441
|
+
return false if @created.nil?
|
|
442
|
+
return false if @updated.nil?
|
|
443
|
+
return false if @comments.nil?
|
|
444
|
+
return false if @comments < 0
|
|
445
|
+
return false if @commits.nil?
|
|
446
|
+
return false if @commits < 0
|
|
447
|
+
return false if !@review_comments.nil? && @review_comments < 0
|
|
448
|
+
return false if !@reviews.nil? && @reviews < 0
|
|
449
|
+
return false if @stage_timings.nil?
|
|
450
|
+
return false if @events_now.nil?
|
|
451
|
+
return false if @stages_now.nil?
|
|
452
|
+
return false if @participants.nil?
|
|
453
|
+
true
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
# Custom attribute writer method with validation
|
|
457
|
+
# @param [Object] number Value to be assigned
|
|
458
|
+
def number=(number)
|
|
459
|
+
if number.nil?
|
|
460
|
+
fail ArgumentError, 'number cannot be nil'
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
if number < 1
|
|
464
|
+
fail ArgumentError, 'invalid value for "number", must be greater than or equal to 1.'
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
@number = number
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# Custom attribute writer method with validation
|
|
471
|
+
# @param [Object] size_added Value to be assigned
|
|
472
|
+
def size_added=(size_added)
|
|
473
|
+
if size_added.nil?
|
|
474
|
+
fail ArgumentError, 'size_added cannot be nil'
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
if size_added < 0
|
|
478
|
+
fail ArgumentError, 'invalid value for "size_added", must be greater than or equal to 0.'
|
|
479
|
+
end
|
|
480
|
+
|
|
481
|
+
@size_added = size_added
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
# Custom attribute writer method with validation
|
|
485
|
+
# @param [Object] size_removed Value to be assigned
|
|
486
|
+
def size_removed=(size_removed)
|
|
487
|
+
if size_removed.nil?
|
|
488
|
+
fail ArgumentError, 'size_removed cannot be nil'
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
if size_removed < 0
|
|
492
|
+
fail ArgumentError, 'invalid value for "size_removed", must be greater than or equal to 0.'
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
@size_removed = size_removed
|
|
496
|
+
end
|
|
497
|
+
|
|
498
|
+
# Custom attribute writer method with validation
|
|
499
|
+
# @param [Object] files_changed Value to be assigned
|
|
500
|
+
def files_changed=(files_changed)
|
|
501
|
+
if files_changed.nil?
|
|
502
|
+
fail ArgumentError, 'files_changed cannot be nil'
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
if files_changed < 0
|
|
506
|
+
fail ArgumentError, 'invalid value for "files_changed", must be greater than or equal to 0.'
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
@files_changed = files_changed
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
# Custom attribute writer method with validation
|
|
513
|
+
# @param [Object] comments Value to be assigned
|
|
514
|
+
def comments=(comments)
|
|
515
|
+
if comments.nil?
|
|
516
|
+
fail ArgumentError, 'comments cannot be nil'
|
|
517
|
+
end
|
|
518
|
+
|
|
519
|
+
if comments < 0
|
|
520
|
+
fail ArgumentError, 'invalid value for "comments", must be greater than or equal to 0.'
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
@comments = comments
|
|
524
|
+
end
|
|
525
|
+
|
|
526
|
+
# Custom attribute writer method with validation
|
|
527
|
+
# @param [Object] commits Value to be assigned
|
|
528
|
+
def commits=(commits)
|
|
529
|
+
if commits.nil?
|
|
530
|
+
fail ArgumentError, 'commits cannot be nil'
|
|
531
|
+
end
|
|
532
|
+
|
|
533
|
+
if commits < 0
|
|
534
|
+
fail ArgumentError, 'invalid value for "commits", must be greater than or equal to 0.'
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
@commits = commits
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
# Custom attribute writer method with validation
|
|
541
|
+
# @param [Object] review_comments Value to be assigned
|
|
542
|
+
def review_comments=(review_comments)
|
|
543
|
+
if !review_comments.nil? && review_comments < 0
|
|
544
|
+
fail ArgumentError, 'invalid value for "review_comments", must be greater than or equal to 0.'
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
@review_comments = review_comments
|
|
548
|
+
end
|
|
549
|
+
|
|
550
|
+
# Custom attribute writer method with validation
|
|
551
|
+
# @param [Object] reviews Value to be assigned
|
|
552
|
+
def reviews=(reviews)
|
|
553
|
+
if !reviews.nil? && reviews < 0
|
|
554
|
+
fail ArgumentError, 'invalid value for "reviews", must be greater than or equal to 0.'
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
@reviews = reviews
|
|
558
|
+
end
|
|
559
|
+
|
|
560
|
+
# Checks equality by comparing each attribute.
|
|
561
|
+
# @param [Object] Object to be compared
|
|
562
|
+
def ==(o)
|
|
563
|
+
return true if self.equal?(o)
|
|
564
|
+
self.class == o.class &&
|
|
565
|
+
repository == o.repository &&
|
|
566
|
+
number == o.number &&
|
|
567
|
+
title == o.title &&
|
|
568
|
+
size_added == o.size_added &&
|
|
569
|
+
size_removed == o.size_removed &&
|
|
570
|
+
files_changed == o.files_changed &&
|
|
571
|
+
created == o.created &&
|
|
572
|
+
updated == o.updated &&
|
|
573
|
+
closed == o.closed &&
|
|
574
|
+
comments == o.comments &&
|
|
575
|
+
commits == o.commits &&
|
|
576
|
+
review_requested == o.review_requested &&
|
|
577
|
+
first_review == o.first_review &&
|
|
578
|
+
approved == o.approved &&
|
|
579
|
+
review_comments == o.review_comments &&
|
|
580
|
+
reviews == o.reviews &&
|
|
581
|
+
merged == o.merged &&
|
|
582
|
+
merged_with_failed_check_runs == o.merged_with_failed_check_runs &&
|
|
583
|
+
released == o.released &&
|
|
584
|
+
release_url == o.release_url &&
|
|
585
|
+
deployments == o.deployments &&
|
|
586
|
+
stage_timings == o.stage_timings &&
|
|
587
|
+
events_time_machine == o.events_time_machine &&
|
|
588
|
+
stages_time_machine == o.stages_time_machine &&
|
|
589
|
+
events_now == o.events_now &&
|
|
590
|
+
stages_now == o.stages_now &&
|
|
591
|
+
participants == o.participants &&
|
|
592
|
+
labels == o.labels &&
|
|
593
|
+
jira == o.jira
|
|
594
|
+
end
|
|
595
|
+
|
|
596
|
+
# @see the `==` method
|
|
597
|
+
# @param [Object] Object to be compared
|
|
598
|
+
def eql?(o)
|
|
599
|
+
self == o
|
|
600
|
+
end
|
|
601
|
+
|
|
602
|
+
# Calculates hash code according to all attributes.
|
|
603
|
+
# @return [Integer] Hash code
|
|
604
|
+
def hash
|
|
605
|
+
[repository, number, title, size_added, size_removed, files_changed, created, updated, closed, comments, commits, review_requested, first_review, approved, review_comments, reviews, merged, merged_with_failed_check_runs, released, release_url, deployments, stage_timings, events_time_machine, stages_time_machine, events_now, stages_now, participants, labels, jira].hash
|
|
606
|
+
end
|
|
607
|
+
|
|
608
|
+
# Builds the object from hash
|
|
609
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
610
|
+
# @return [Object] Returns the model itself
|
|
611
|
+
def self.build_from_hash(attributes)
|
|
612
|
+
new.build_from_hash(attributes)
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
# Builds the object from hash
|
|
616
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
617
|
+
# @return [Object] Returns the model itself
|
|
618
|
+
def build_from_hash(attributes)
|
|
619
|
+
return nil unless attributes.is_a?(Hash)
|
|
620
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
621
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
622
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
623
|
+
self.send("#{key}=", nil)
|
|
624
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
625
|
+
# check to ensure the input is an array given that the attribute
|
|
626
|
+
# is documented as an array but the input is not
|
|
627
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
628
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
629
|
+
end
|
|
630
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
631
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
632
|
+
end
|
|
633
|
+
end
|
|
634
|
+
|
|
635
|
+
self
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
# Deserializes the data based on type
|
|
639
|
+
# @param string type Data type
|
|
640
|
+
# @param string value Value to be deserialized
|
|
641
|
+
# @return [Object] Deserialized data
|
|
642
|
+
def _deserialize(type, value)
|
|
643
|
+
case type.to_sym
|
|
644
|
+
when :Time
|
|
645
|
+
Time.parse(value)
|
|
646
|
+
when :Date
|
|
647
|
+
Date.parse(value)
|
|
648
|
+
when :String
|
|
649
|
+
value.to_s
|
|
650
|
+
when :Integer
|
|
651
|
+
value.to_i
|
|
652
|
+
when :Float
|
|
653
|
+
value.to_f
|
|
654
|
+
when :Boolean
|
|
655
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
656
|
+
true
|
|
657
|
+
else
|
|
658
|
+
false
|
|
659
|
+
end
|
|
660
|
+
when :Object
|
|
661
|
+
# generic object (usually a Hash), return directly
|
|
662
|
+
value
|
|
663
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
664
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
665
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
666
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
667
|
+
k_type = Regexp.last_match[:k_type]
|
|
668
|
+
v_type = Regexp.last_match[:v_type]
|
|
669
|
+
{}.tap do |hash|
|
|
670
|
+
value.each do |k, v|
|
|
671
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
672
|
+
end
|
|
673
|
+
end
|
|
674
|
+
else # model
|
|
675
|
+
# models (e.g. Pet) or oneOf
|
|
676
|
+
klass = Athenian.const_get(type)
|
|
677
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
678
|
+
end
|
|
679
|
+
end
|
|
680
|
+
|
|
681
|
+
# Returns the string representation of the object
|
|
682
|
+
# @return [String] String presentation of the object
|
|
683
|
+
def to_s
|
|
684
|
+
to_hash.to_s
|
|
685
|
+
end
|
|
686
|
+
|
|
687
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
688
|
+
# @return [Hash] Returns the object in the form of hash
|
|
689
|
+
def to_body
|
|
690
|
+
to_hash
|
|
691
|
+
end
|
|
692
|
+
|
|
693
|
+
# Returns the object in the form of hash
|
|
694
|
+
# @return [Hash] Returns the object in the form of hash
|
|
695
|
+
def to_hash
|
|
696
|
+
hash = {}
|
|
697
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
698
|
+
value = self.send(attr)
|
|
699
|
+
if value.nil?
|
|
700
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
701
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
702
|
+
end
|
|
703
|
+
|
|
704
|
+
hash[param] = _to_hash(value)
|
|
705
|
+
end
|
|
706
|
+
hash
|
|
707
|
+
end
|
|
708
|
+
|
|
709
|
+
# Outputs non-array value in the form of hash
|
|
710
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
711
|
+
# @param [Object] value Any valid value
|
|
712
|
+
# @return [Hash] Returns the value in the form of hash
|
|
713
|
+
def _to_hash(value)
|
|
714
|
+
if value.is_a?(Array)
|
|
715
|
+
value.compact.map { |v| _to_hash(v) }
|
|
716
|
+
elsif value.is_a?(Hash)
|
|
717
|
+
{}.tap do |hash|
|
|
718
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
719
|
+
end
|
|
720
|
+
elsif value.respond_to? :to_hash
|
|
721
|
+
value.to_hash
|
|
722
|
+
else
|
|
723
|
+
value
|
|
724
|
+
end
|
|
725
|
+
end
|
|
726
|
+
end
|
|
727
|
+
end
|