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,385 @@
|
|
|
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
|
+
# Filter for listing commits.
|
|
15
|
+
class FilterCommitsRequest
|
|
16
|
+
# Session account ID.
|
|
17
|
+
attr_accessor :account
|
|
18
|
+
|
|
19
|
+
# Commits must be made later than or equal to this date.
|
|
20
|
+
attr_accessor :date_from
|
|
21
|
+
|
|
22
|
+
# Commits must be made earlier than or equal to this date.
|
|
23
|
+
attr_accessor :date_to
|
|
24
|
+
|
|
25
|
+
# Local time zone offset in minutes, used to adjust `date_from` and `date_to`.
|
|
26
|
+
attr_accessor :timezone
|
|
27
|
+
|
|
28
|
+
# Set of repositories. An empty list raises a bad response 400. Duplicates are automatically ignored.
|
|
29
|
+
attr_accessor :_in
|
|
30
|
+
|
|
31
|
+
# A set of developers. An empty list disables the filter and includes everybody. Duplicates are automatically ignored.
|
|
32
|
+
attr_accessor :with_author
|
|
33
|
+
|
|
34
|
+
# A set of developers. An empty list disables the filter and includes everybody. Duplicates are automatically ignored.
|
|
35
|
+
attr_accessor :with_committer
|
|
36
|
+
|
|
37
|
+
# Main trait of the commits - the core of the filter. * bypassing_prs: select commits that were pushed without creating a PR * everything: select all the commits matched by the filters * no_pr_merges: select all the commits but PR merges by noreply@github.com
|
|
38
|
+
attr_accessor :property
|
|
39
|
+
|
|
40
|
+
# Consider only commits that are accessible from the head of the default branch. For example, if your workflow includes PR-ing feature branches, you rebase and merge them and don't delete afterward, `bypassing_prs` will report the commits in those feature branches unless you set `only_default_branch` to `true`.
|
|
41
|
+
attr_accessor :only_default_branch
|
|
42
|
+
|
|
43
|
+
class EnumAttributeValidator
|
|
44
|
+
attr_reader :datatype
|
|
45
|
+
attr_reader :allowable_values
|
|
46
|
+
|
|
47
|
+
def initialize(datatype, allowable_values)
|
|
48
|
+
@allowable_values = allowable_values.map do |value|
|
|
49
|
+
case datatype.to_s
|
|
50
|
+
when /Integer/i
|
|
51
|
+
value.to_i
|
|
52
|
+
when /Float/i
|
|
53
|
+
value.to_f
|
|
54
|
+
else
|
|
55
|
+
value
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def valid?(value)
|
|
61
|
+
!value || allowable_values.include?(value)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
66
|
+
def self.attribute_map
|
|
67
|
+
{
|
|
68
|
+
:'account' => :'account',
|
|
69
|
+
:'date_from' => :'date_from',
|
|
70
|
+
:'date_to' => :'date_to',
|
|
71
|
+
:'timezone' => :'timezone',
|
|
72
|
+
:'_in' => :'in',
|
|
73
|
+
:'with_author' => :'with_author',
|
|
74
|
+
:'with_committer' => :'with_committer',
|
|
75
|
+
:'property' => :'property',
|
|
76
|
+
:'only_default_branch' => :'only_default_branch'
|
|
77
|
+
}
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Returns all the JSON keys this model knows about
|
|
81
|
+
def self.acceptable_attributes
|
|
82
|
+
attribute_map.values
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Attribute type mapping.
|
|
86
|
+
def self.openapi_types
|
|
87
|
+
{
|
|
88
|
+
:'account' => :'Integer',
|
|
89
|
+
:'date_from' => :'Date',
|
|
90
|
+
:'date_to' => :'Date',
|
|
91
|
+
:'timezone' => :'Integer',
|
|
92
|
+
:'_in' => :'Array<String>',
|
|
93
|
+
:'with_author' => :'Array<String>',
|
|
94
|
+
:'with_committer' => :'Array<String>',
|
|
95
|
+
:'property' => :'String',
|
|
96
|
+
:'only_default_branch' => :'Boolean'
|
|
97
|
+
}
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# List of attributes with nullable: true
|
|
101
|
+
def self.openapi_nullable
|
|
102
|
+
Set.new([
|
|
103
|
+
])
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Initializes the object
|
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
108
|
+
def initialize(attributes = {})
|
|
109
|
+
if (!attributes.is_a?(Hash))
|
|
110
|
+
fail ArgumentError, 'The input argument (attributes) must be a hash in `Athenian::FilterCommitsRequest` initialize method'
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
114
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
115
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
116
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Athenian::FilterCommitsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
117
|
+
end
|
|
118
|
+
h[k.to_sym] = v
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'account')
|
|
122
|
+
self.account = attributes[:'account']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'date_from')
|
|
126
|
+
self.date_from = attributes[:'date_from']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'date_to')
|
|
130
|
+
self.date_to = attributes[:'date_to']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'timezone')
|
|
134
|
+
self.timezone = attributes[:'timezone']
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'_in')
|
|
138
|
+
if (value = attributes[:'_in']).is_a?(Array)
|
|
139
|
+
self._in = value
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'with_author')
|
|
144
|
+
if (value = attributes[:'with_author']).is_a?(Array)
|
|
145
|
+
self.with_author = value
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'with_committer')
|
|
150
|
+
if (value = attributes[:'with_committer']).is_a?(Array)
|
|
151
|
+
self.with_committer = value
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'property')
|
|
156
|
+
self.property = attributes[:'property']
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'only_default_branch')
|
|
160
|
+
self.only_default_branch = attributes[:'only_default_branch']
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
165
|
+
# @return Array for valid properties with the reasons
|
|
166
|
+
def list_invalid_properties
|
|
167
|
+
invalid_properties = Array.new
|
|
168
|
+
if @account.nil?
|
|
169
|
+
invalid_properties.push('invalid value for "account", account cannot be nil.')
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if @date_from.nil?
|
|
173
|
+
invalid_properties.push('invalid value for "date_from", date_from cannot be nil.')
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if @date_to.nil?
|
|
177
|
+
invalid_properties.push('invalid value for "date_to", date_to cannot be nil.')
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if !@timezone.nil? && @timezone > 780
|
|
181
|
+
invalid_properties.push('invalid value for "timezone", must be smaller than or equal to 780.')
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if !@timezone.nil? && @timezone < -720
|
|
185
|
+
invalid_properties.push('invalid value for "timezone", must be greater than or equal to -720.')
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if @_in.nil?
|
|
189
|
+
invalid_properties.push('invalid value for "_in", _in cannot be nil.')
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if @property.nil?
|
|
193
|
+
invalid_properties.push('invalid value for "property", property cannot be nil.')
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
invalid_properties
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Check to see if the all the properties in the model are valid
|
|
200
|
+
# @return true if the model is valid
|
|
201
|
+
def valid?
|
|
202
|
+
return false if @account.nil?
|
|
203
|
+
return false if @date_from.nil?
|
|
204
|
+
return false if @date_to.nil?
|
|
205
|
+
return false if !@timezone.nil? && @timezone > 780
|
|
206
|
+
return false if !@timezone.nil? && @timezone < -720
|
|
207
|
+
return false if @_in.nil?
|
|
208
|
+
return false if @property.nil?
|
|
209
|
+
property_validator = EnumAttributeValidator.new('String', ['bypassing_prs', 'everything', 'no_pr_merges'])
|
|
210
|
+
return false unless property_validator.valid?(@property)
|
|
211
|
+
true
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Custom attribute writer method with validation
|
|
215
|
+
# @param [Object] timezone Value to be assigned
|
|
216
|
+
def timezone=(timezone)
|
|
217
|
+
if !timezone.nil? && timezone > 780
|
|
218
|
+
fail ArgumentError, 'invalid value for "timezone", must be smaller than or equal to 780.'
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
if !timezone.nil? && timezone < -720
|
|
222
|
+
fail ArgumentError, 'invalid value for "timezone", must be greater than or equal to -720.'
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
@timezone = timezone
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
229
|
+
# @param [Object] property Object to be assigned
|
|
230
|
+
def property=(property)
|
|
231
|
+
validator = EnumAttributeValidator.new('String', ['bypassing_prs', 'everything', 'no_pr_merges'])
|
|
232
|
+
unless validator.valid?(property)
|
|
233
|
+
fail ArgumentError, "invalid value for \"property\", must be one of #{validator.allowable_values}."
|
|
234
|
+
end
|
|
235
|
+
@property = property
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Checks equality by comparing each attribute.
|
|
239
|
+
# @param [Object] Object to be compared
|
|
240
|
+
def ==(o)
|
|
241
|
+
return true if self.equal?(o)
|
|
242
|
+
self.class == o.class &&
|
|
243
|
+
account == o.account &&
|
|
244
|
+
date_from == o.date_from &&
|
|
245
|
+
date_to == o.date_to &&
|
|
246
|
+
timezone == o.timezone &&
|
|
247
|
+
_in == o._in &&
|
|
248
|
+
with_author == o.with_author &&
|
|
249
|
+
with_committer == o.with_committer &&
|
|
250
|
+
property == o.property &&
|
|
251
|
+
only_default_branch == o.only_default_branch
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# @see the `==` method
|
|
255
|
+
# @param [Object] Object to be compared
|
|
256
|
+
def eql?(o)
|
|
257
|
+
self == o
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Calculates hash code according to all attributes.
|
|
261
|
+
# @return [Integer] Hash code
|
|
262
|
+
def hash
|
|
263
|
+
[account, date_from, date_to, timezone, _in, with_author, with_committer, property, only_default_branch].hash
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Builds the object from hash
|
|
267
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
268
|
+
# @return [Object] Returns the model itself
|
|
269
|
+
def self.build_from_hash(attributes)
|
|
270
|
+
new.build_from_hash(attributes)
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Builds the object from hash
|
|
274
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
275
|
+
# @return [Object] Returns the model itself
|
|
276
|
+
def build_from_hash(attributes)
|
|
277
|
+
return nil unless attributes.is_a?(Hash)
|
|
278
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
279
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
280
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
281
|
+
self.send("#{key}=", nil)
|
|
282
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
283
|
+
# check to ensure the input is an array given that the attribute
|
|
284
|
+
# is documented as an array but the input is not
|
|
285
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
286
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
287
|
+
end
|
|
288
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
289
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
290
|
+
end
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
self
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Deserializes the data based on type
|
|
297
|
+
# @param string type Data type
|
|
298
|
+
# @param string value Value to be deserialized
|
|
299
|
+
# @return [Object] Deserialized data
|
|
300
|
+
def _deserialize(type, value)
|
|
301
|
+
case type.to_sym
|
|
302
|
+
when :Time
|
|
303
|
+
Time.parse(value)
|
|
304
|
+
when :Date
|
|
305
|
+
Date.parse(value)
|
|
306
|
+
when :String
|
|
307
|
+
value.to_s
|
|
308
|
+
when :Integer
|
|
309
|
+
value.to_i
|
|
310
|
+
when :Float
|
|
311
|
+
value.to_f
|
|
312
|
+
when :Boolean
|
|
313
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
314
|
+
true
|
|
315
|
+
else
|
|
316
|
+
false
|
|
317
|
+
end
|
|
318
|
+
when :Object
|
|
319
|
+
# generic object (usually a Hash), return directly
|
|
320
|
+
value
|
|
321
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
322
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
323
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
324
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
325
|
+
k_type = Regexp.last_match[:k_type]
|
|
326
|
+
v_type = Regexp.last_match[:v_type]
|
|
327
|
+
{}.tap do |hash|
|
|
328
|
+
value.each do |k, v|
|
|
329
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
330
|
+
end
|
|
331
|
+
end
|
|
332
|
+
else # model
|
|
333
|
+
# models (e.g. Pet) or oneOf
|
|
334
|
+
klass = Athenian.const_get(type)
|
|
335
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
336
|
+
end
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# Returns the string representation of the object
|
|
340
|
+
# @return [String] String presentation of the object
|
|
341
|
+
def to_s
|
|
342
|
+
to_hash.to_s
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
346
|
+
# @return [Hash] Returns the object in the form of hash
|
|
347
|
+
def to_body
|
|
348
|
+
to_hash
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
# Returns the object in the form of hash
|
|
352
|
+
# @return [Hash] Returns the object in the form of hash
|
|
353
|
+
def to_hash
|
|
354
|
+
hash = {}
|
|
355
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
356
|
+
value = self.send(attr)
|
|
357
|
+
if value.nil?
|
|
358
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
359
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
hash[param] = _to_hash(value)
|
|
363
|
+
end
|
|
364
|
+
hash
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
# Outputs non-array value in the form of hash
|
|
368
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
369
|
+
# @param [Object] value Any valid value
|
|
370
|
+
# @return [Hash] Returns the value in the form of hash
|
|
371
|
+
def _to_hash(value)
|
|
372
|
+
if value.is_a?(Array)
|
|
373
|
+
value.compact.map { |v| _to_hash(v) }
|
|
374
|
+
elsif value.is_a?(Hash)
|
|
375
|
+
{}.tap do |hash|
|
|
376
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
377
|
+
end
|
|
378
|
+
elsif value.respond_to? :to_hash
|
|
379
|
+
value.to_hash
|
|
380
|
+
else
|
|
381
|
+
value
|
|
382
|
+
end
|
|
383
|
+
end
|
|
384
|
+
end
|
|
385
|
+
end
|
|
@@ -0,0 +1,331 @@
|
|
|
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
|
+
# Filters for `/filter/contributors`.
|
|
15
|
+
class FilterContributorsRequest
|
|
16
|
+
# Session account ID.
|
|
17
|
+
attr_accessor :account
|
|
18
|
+
|
|
19
|
+
# Updates must be later than or equal to this date. An update is any action that influences the stage assignment.
|
|
20
|
+
attr_accessor :date_from
|
|
21
|
+
|
|
22
|
+
# Updates must be earlier than or equal to this date. An update is any action that influences the stage assignment.
|
|
23
|
+
attr_accessor :date_to
|
|
24
|
+
|
|
25
|
+
# Local time zone offset in minutes, used to adjust `date_from` and `date_to`.
|
|
26
|
+
attr_accessor :timezone
|
|
27
|
+
|
|
28
|
+
# Set of repositories. An empty list raises a bad response 400. Duplicates are automatically ignored.
|
|
29
|
+
attr_accessor :_in
|
|
30
|
+
|
|
31
|
+
# Filter by contribution type. A `null` or an empty list select all.
|
|
32
|
+
attr_accessor :as
|
|
33
|
+
|
|
34
|
+
class EnumAttributeValidator
|
|
35
|
+
attr_reader :datatype
|
|
36
|
+
attr_reader :allowable_values
|
|
37
|
+
|
|
38
|
+
def initialize(datatype, allowable_values)
|
|
39
|
+
@allowable_values = allowable_values.map do |value|
|
|
40
|
+
case datatype.to_s
|
|
41
|
+
when /Integer/i
|
|
42
|
+
value.to_i
|
|
43
|
+
when /Float/i
|
|
44
|
+
value.to_f
|
|
45
|
+
else
|
|
46
|
+
value
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def valid?(value)
|
|
52
|
+
!value || allowable_values.include?(value)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
57
|
+
def self.attribute_map
|
|
58
|
+
{
|
|
59
|
+
:'account' => :'account',
|
|
60
|
+
:'date_from' => :'date_from',
|
|
61
|
+
:'date_to' => :'date_to',
|
|
62
|
+
:'timezone' => :'timezone',
|
|
63
|
+
:'_in' => :'in',
|
|
64
|
+
:'as' => :'as'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Returns all the JSON keys this model knows about
|
|
69
|
+
def self.acceptable_attributes
|
|
70
|
+
attribute_map.values
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Attribute type mapping.
|
|
74
|
+
def self.openapi_types
|
|
75
|
+
{
|
|
76
|
+
:'account' => :'Integer',
|
|
77
|
+
:'date_from' => :'Date',
|
|
78
|
+
:'date_to' => :'Date',
|
|
79
|
+
:'timezone' => :'Integer',
|
|
80
|
+
:'_in' => :'Array<String>',
|
|
81
|
+
:'as' => :'Array<String>'
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# List of attributes with nullable: true
|
|
86
|
+
def self.openapi_nullable
|
|
87
|
+
Set.new([
|
|
88
|
+
])
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Initializes the object
|
|
92
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
93
|
+
def initialize(attributes = {})
|
|
94
|
+
if (!attributes.is_a?(Hash))
|
|
95
|
+
fail ArgumentError, 'The input argument (attributes) must be a hash in `Athenian::FilterContributorsRequest` initialize method'
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
99
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
100
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
101
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Athenian::FilterContributorsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
102
|
+
end
|
|
103
|
+
h[k.to_sym] = v
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'account')
|
|
107
|
+
self.account = attributes[:'account']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'date_from')
|
|
111
|
+
self.date_from = attributes[:'date_from']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'date_to')
|
|
115
|
+
self.date_to = attributes[:'date_to']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'timezone')
|
|
119
|
+
self.timezone = attributes[:'timezone']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'_in')
|
|
123
|
+
if (value = attributes[:'_in']).is_a?(Array)
|
|
124
|
+
self._in = value
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'as')
|
|
129
|
+
if (value = attributes[:'as']).is_a?(Array)
|
|
130
|
+
self.as = value
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
136
|
+
# @return Array for valid properties with the reasons
|
|
137
|
+
def list_invalid_properties
|
|
138
|
+
invalid_properties = Array.new
|
|
139
|
+
if @account.nil?
|
|
140
|
+
invalid_properties.push('invalid value for "account", account cannot be nil.')
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if @date_from.nil?
|
|
144
|
+
invalid_properties.push('invalid value for "date_from", date_from cannot be nil.')
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if @date_to.nil?
|
|
148
|
+
invalid_properties.push('invalid value for "date_to", date_to cannot be nil.')
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if !@timezone.nil? && @timezone > 780
|
|
152
|
+
invalid_properties.push('invalid value for "timezone", must be smaller than or equal to 780.')
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if !@timezone.nil? && @timezone < -720
|
|
156
|
+
invalid_properties.push('invalid value for "timezone", must be greater than or equal to -720.')
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
invalid_properties
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Check to see if the all the properties in the model are valid
|
|
163
|
+
# @return true if the model is valid
|
|
164
|
+
def valid?
|
|
165
|
+
return false if @account.nil?
|
|
166
|
+
return false if @date_from.nil?
|
|
167
|
+
return false if @date_to.nil?
|
|
168
|
+
return false if !@timezone.nil? && @timezone > 780
|
|
169
|
+
return false if !@timezone.nil? && @timezone < -720
|
|
170
|
+
true
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Custom attribute writer method with validation
|
|
174
|
+
# @param [Object] timezone Value to be assigned
|
|
175
|
+
def timezone=(timezone)
|
|
176
|
+
if !timezone.nil? && timezone > 780
|
|
177
|
+
fail ArgumentError, 'invalid value for "timezone", must be smaller than or equal to 780.'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if !timezone.nil? && timezone < -720
|
|
181
|
+
fail ArgumentError, 'invalid value for "timezone", must be greater than or equal to -720.'
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
@timezone = timezone
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Checks equality by comparing each attribute.
|
|
188
|
+
# @param [Object] Object to be compared
|
|
189
|
+
def ==(o)
|
|
190
|
+
return true if self.equal?(o)
|
|
191
|
+
self.class == o.class &&
|
|
192
|
+
account == o.account &&
|
|
193
|
+
date_from == o.date_from &&
|
|
194
|
+
date_to == o.date_to &&
|
|
195
|
+
timezone == o.timezone &&
|
|
196
|
+
_in == o._in &&
|
|
197
|
+
as == o.as
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# @see the `==` method
|
|
201
|
+
# @param [Object] Object to be compared
|
|
202
|
+
def eql?(o)
|
|
203
|
+
self == o
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Calculates hash code according to all attributes.
|
|
207
|
+
# @return [Integer] Hash code
|
|
208
|
+
def hash
|
|
209
|
+
[account, date_from, date_to, timezone, _in, as].hash
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Builds the object from hash
|
|
213
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
214
|
+
# @return [Object] Returns the model itself
|
|
215
|
+
def self.build_from_hash(attributes)
|
|
216
|
+
new.build_from_hash(attributes)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Builds the object from hash
|
|
220
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
221
|
+
# @return [Object] Returns the model itself
|
|
222
|
+
def build_from_hash(attributes)
|
|
223
|
+
return nil unless attributes.is_a?(Hash)
|
|
224
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
225
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
226
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
227
|
+
self.send("#{key}=", nil)
|
|
228
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
229
|
+
# check to ensure the input is an array given that the attribute
|
|
230
|
+
# is documented as an array but the input is not
|
|
231
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
232
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
233
|
+
end
|
|
234
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
235
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
self
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Deserializes the data based on type
|
|
243
|
+
# @param string type Data type
|
|
244
|
+
# @param string value Value to be deserialized
|
|
245
|
+
# @return [Object] Deserialized data
|
|
246
|
+
def _deserialize(type, value)
|
|
247
|
+
case type.to_sym
|
|
248
|
+
when :Time
|
|
249
|
+
Time.parse(value)
|
|
250
|
+
when :Date
|
|
251
|
+
Date.parse(value)
|
|
252
|
+
when :String
|
|
253
|
+
value.to_s
|
|
254
|
+
when :Integer
|
|
255
|
+
value.to_i
|
|
256
|
+
when :Float
|
|
257
|
+
value.to_f
|
|
258
|
+
when :Boolean
|
|
259
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
260
|
+
true
|
|
261
|
+
else
|
|
262
|
+
false
|
|
263
|
+
end
|
|
264
|
+
when :Object
|
|
265
|
+
# generic object (usually a Hash), return directly
|
|
266
|
+
value
|
|
267
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
268
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
269
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
270
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
271
|
+
k_type = Regexp.last_match[:k_type]
|
|
272
|
+
v_type = Regexp.last_match[:v_type]
|
|
273
|
+
{}.tap do |hash|
|
|
274
|
+
value.each do |k, v|
|
|
275
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
276
|
+
end
|
|
277
|
+
end
|
|
278
|
+
else # model
|
|
279
|
+
# models (e.g. Pet) or oneOf
|
|
280
|
+
klass = Athenian.const_get(type)
|
|
281
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Returns the string representation of the object
|
|
286
|
+
# @return [String] String presentation of the object
|
|
287
|
+
def to_s
|
|
288
|
+
to_hash.to_s
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
292
|
+
# @return [Hash] Returns the object in the form of hash
|
|
293
|
+
def to_body
|
|
294
|
+
to_hash
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# Returns the object in the form of hash
|
|
298
|
+
# @return [Hash] Returns the object in the form of hash
|
|
299
|
+
def to_hash
|
|
300
|
+
hash = {}
|
|
301
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
302
|
+
value = self.send(attr)
|
|
303
|
+
if value.nil?
|
|
304
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
305
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
hash[param] = _to_hash(value)
|
|
309
|
+
end
|
|
310
|
+
hash
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Outputs non-array value in the form of hash
|
|
314
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
315
|
+
# @param [Object] value Any valid value
|
|
316
|
+
# @return [Hash] Returns the value in the form of hash
|
|
317
|
+
def _to_hash(value)
|
|
318
|
+
if value.is_a?(Array)
|
|
319
|
+
value.compact.map { |v| _to_hash(v) }
|
|
320
|
+
elsif value.is_a?(Hash)
|
|
321
|
+
{}.tap do |hash|
|
|
322
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
323
|
+
end
|
|
324
|
+
elsif value.respond_to? :to_hash
|
|
325
|
+
value.to_hash
|
|
326
|
+
else
|
|
327
|
+
value
|
|
328
|
+
end
|
|
329
|
+
end
|
|
330
|
+
end
|
|
331
|
+
end
|