datadog_api_client 2.19.0 → 2.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/conftest.py +5 -0
- data/.generator/schemas/v1/openapi.yaml +430 -172
- data/.generator/schemas/v2/openapi.yaml +3146 -165
- data/.generator/src/generator/templates/api.j2 +5 -5
- data/CHANGELOG.md +48 -0
- data/examples/v1/gcp-integration/CreateGCPIntegration.rb +3 -0
- data/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.rb +25 -0
- data/examples/v1/logs-indexes/CreateLogsIndex.rb +5 -0
- data/examples/v1/logs-indexes/UpdateLogsIndex.rb +5 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +29 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +1 -1
- data/examples/v1/synthetics/TriggerCITests.rb +1 -1
- data/examples/v1/synthetics/UpdateBrowserTest.rb +2 -1
- data/examples/v1/usage-metering/GetUsageLambda.rb +5 -2
- data/examples/v2/api-management/CreateOpenAPI.rb +11 -0
- data/examples/v2/api-management/DeleteOpenAPI.rb +11 -0
- data/examples/v2/api-management/GetOpenAPI.rb +11 -0
- data/examples/v2/api-management/UpdateOpenAPI.rb +14 -0
- data/examples/v2/case-management/ArchiveCase.rb +14 -0
- data/examples/v2/case-management/AssignCase.rb +20 -0
- data/examples/v2/case-management/CreateCase.rb +33 -0
- data/examples/v2/case-management/CreateProject.rb +15 -0
- data/examples/v2/case-management/DeleteProject.rb +5 -0
- data/examples/v2/case-management/GetCase.rb +8 -0
- data/examples/v2/case-management/GetProject.rb +5 -0
- data/examples/v2/case-management/GetProjects.rb +5 -0
- data/examples/v2/case-management/SearchCases.rb +5 -0
- data/examples/v2/case-management/SearchCases_3433960044.rb +5 -0
- data/examples/v2/case-management/UnarchiveCase.rb +14 -0
- data/examples/v2/case-management/UnassignCase.rb +14 -0
- data/examples/v2/case-management/UpdatePriority.rb +17 -0
- data/examples/v2/case-management/UpdateStatus.rb +17 -0
- data/examples/v2/cloud-workload-security/CreateCSMThreatsAgentRule.rb +17 -0
- data/examples/v2/cloud-workload-security/DeleteCSMThreatsAgentRule.rb +8 -0
- data/examples/v2/cloud-workload-security/DownloadCSMThreatsPolicy.rb +5 -0
- data/examples/v2/cloud-workload-security/GetCSMThreatsAgentRule.rb +8 -0
- data/examples/v2/cloud-workload-security/ListCSMThreatsAgentRules.rb +5 -0
- data/examples/v2/cloud-workload-security/UpdateCSMThreatsAgentRule.rb +20 -0
- data/examples/v2/dora-metrics/CreateDORAIncident.rb +6 -3
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.rb +18 -0
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.rb +21 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination.rb +31 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1091442807.rb +31 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1288180912.rb +27 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_141236188.rb +32 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2184123765.rb +31 -0
- data/examples/v2/logs-custom-destinations/DeleteLogsCustomDestination.rb +8 -0
- data/examples/v2/logs-custom-destinations/GetLogsCustomDestination.rb +8 -0
- data/examples/v2/logs-custom-destinations/ListLogsCustomDestinations.rb +5 -0
- data/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.rb +18 -0
- data/examples/v2/metrics/ListMetricAssets.rb +5 -0
- data/examples/v2/okta-integration/CreateOktaAccount.rb +1 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb +19 -0
- data/examples/v2/security-monitoring/DeleteSecurityMonitoringSuppression.rb +8 -0
- data/examples/v2/security-monitoring/GetSecurityMonitoringSuppression.rb +8 -0
- data/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions.rb +5 -0
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringSuppression.rb +17 -0
- data/examples/v2/teams/GetTeamMemberships_3799131168.rb +8 -0
- data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.rb +1 -1
- data/lib/datadog_api_client/configuration.rb +4 -0
- data/lib/datadog_api_client/inflector.rb +134 -0
- data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -3
- data/lib/datadog_api_client/v1/api/organizations_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +8 -8
- data/lib/datadog_api_client/v1/models/dashboard.rb +5 -1
- data/lib/datadog_api_client/v1/models/dashboard_summary_definition.rb +2 -0
- data/lib/datadog_api_client/v1/models/gcp_account.rb +14 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +6 -0
- data/lib/datadog_api_client/v1/models/log.rb +1 -1
- data/lib/datadog_api_client/v1/models/logs_daily_limit_reset.rb +90 -0
- data/lib/datadog_api_client/v1/models/logs_index.rb +36 -1
- data/lib/datadog_api_client/v1/models/logs_index_update_request.rb +36 -1
- data/lib/datadog_api_client/v1/models/metrics_payload.rb +1 -1
- data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +1 -1
- data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +8 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +84 -4
- data/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_history_metrics.rb +2 -2
- data/lib/datadog_api_client/v1/models/slo_history_metrics_series.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_history_monitor.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_history_sli_data.rb +1 -1
- data/lib/datadog_api_client/v1/models/split_config.rb +6 -6
- data/lib/datadog_api_client/v1/models/synthetics_api_step_subtype.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +1 -1
- data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_lambda_hour.rb +1 -1
- data/lib/datadog_api_client/v1/models/usage_lambda_response.rb +1 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +83 -3
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +182 -102
- data/lib/datadog_api_client/v2/api/api_management_api.rb +319 -0
- data/lib/datadog_api_client/v2/api/case_management_api.rb +942 -0
- data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +392 -0
- data/lib/datadog_api_client/v2/api/incident_services_api.rb +15 -0
- data/lib/datadog_api_client/v2/api/logs_custom_destinations_api.rb +355 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +69 -1
- data/lib/datadog_api_client/v2/api/organizations_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +329 -0
- data/lib/datadog_api_client/v2/api/service_definition_api.rb +2 -1
- data/lib/datadog_api_client/v2/api/teams_api.rb +22 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +6 -6
- data/lib/datadog_api_client/v2/models/case.rb +150 -0
- data/lib/datadog_api_client/v2/models/case3rd_party_ticket_status.rb +28 -0
- data/lib/datadog_api_client/v2/models/case_assign.rb +119 -0
- data/lib/datadog_api_client/v2/models/case_assign_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_assign_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_attributes.rb +202 -0
- data/lib/datadog_api_client/v2/models/case_create.rb +129 -0
- data/lib/datadog_api_client/v2/models/case_create_attributes.rb +139 -0
- data/lib/datadog_api_client/v2/models/case_create_relationships.rb +116 -0
- data/lib/datadog_api_client/v2/models/case_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_empty.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_empty_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_priority.rb +31 -0
- data/lib/datadog_api_client/v2/models/case_relationships.rb +120 -0
- data/lib/datadog_api_client/v2/models/case_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/case_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/case_sortable_field.rb +28 -0
- data/lib/datadog_api_client/v2/models/case_status.rb +28 -0
- data/lib/datadog_api_client/v2/models/case_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/case_update_priority.rb +119 -0
- data/lib/datadog_api_client/v2/models/case_update_priority_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_update_priority_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_update_status.rb +119 -0
- data/lib/datadog_api_client/v2/models/case_update_status_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_update_status_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/cases_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/cases_response_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/cases_response_meta_pagination.rb +100 -0
- data/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb +1 -1
- data/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb +1 -1
- data/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb +1 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +90 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +21 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb +80 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/create_open_api_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb +82 -0
- data/lib/datadog_api_client/v2/models/create_open_api_response_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/custom_destination_attribute_tags_restriction_list_type.rb +31 -0
- data/lib/datadog_api_client/v2/models/custom_destination_create_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/custom_destination_create_request_attributes.rb +193 -0
- data/lib/datadog_api_client/v2/models/custom_destination_create_request_definition.rb +119 -0
- data/lib/datadog_api_client/v2/models/custom_destination_elasticsearch_destination_auth.rb +119 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination.rb +64 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch.rb +181 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http.rb +141 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb +141 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth.rb +63 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic.rb +140 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header.rb +140 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_attributes.rb +171 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_definition.rb +100 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination.rb +64 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch.rb +181 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http.rb +141 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb +120 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth.rb +63 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic.rb +98 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header.rb +119 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_update_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/custom_destination_update_request_attributes.rb +169 -0
- data/lib/datadog_api_client/v2/models/custom_destination_update_request_definition.rb +129 -0
- data/lib/datadog_api_client/v2/models/custom_destinations_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +31 -20
- data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +14 -1
- data/lib/datadog_api_client/v2/models/jira_issue.rb +90 -0
- data/lib/datadog_api_client/v2/models/jira_issue_result.rb +110 -0
- data/lib/datadog_api_client/v2/models/logs_archive_integration_gcs.rb +1 -12
- data/lib/datadog_api_client/v2/models/metric_asset_attributes.rb +80 -0
- data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationship.rb +90 -0
- data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationships.rb +82 -0
- data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationship.rb +90 -0
- data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationships.rb +82 -0
- data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationship.rb +90 -0
- data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationships.rb +82 -0
- data/lib/datadog_api_client/v2/models/metric_asset_response_data.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_asset_response_included.rb +65 -0
- data/lib/datadog_api_client/v2/models/metric_asset_response_relationships.rb +110 -0
- data/lib/datadog_api_client/v2/models/metric_asset_slo_relationship.rb +90 -0
- data/lib/datadog_api_client/v2/models/metric_asset_slo_relationships.rb +82 -0
- data/lib/datadog_api_client/v2/models/metric_assets_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/metric_dashboard_asset.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb +112 -0
- data/lib/datadog_api_client/v2/models/metric_dashboard_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_monitor_asset.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_monitor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_notebook_asset.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_notebook_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/metric_slo_asset.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_slo_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/nullable_user_relationship.rb +88 -0
- data/lib/datadog_api_client/v2/models/nullable_user_relationship_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/open_api_endpoint.rb +90 -0
- data/lib/datadog_api_client/v2/models/open_api_file.rb +80 -0
- data/lib/datadog_api_client/v2/models/project.rb +150 -0
- data/lib/datadog_api_client/v2/models/project_attributes.rb +90 -0
- data/lib/datadog_api_client/v2/models/project_create.rb +119 -0
- data/lib/datadog_api_client/v2/models/project_create_attributes.rb +119 -0
- data/lib/datadog_api_client/v2/models/project_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/project_relationship.rb +98 -0
- data/lib/datadog_api_client/v2/models/project_relationship_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/project_relationships.rb +90 -0
- data/lib/datadog_api_client/v2/models/project_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/project_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/projects_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression.rb +100 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +198 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +181 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +166 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_suppressions_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_user.rb +98 -0
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +1 -1
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/service_now_ticket.rb +90 -0
- data/lib/datadog_api_client/v2/models/service_now_ticket_result.rb +80 -0
- data/lib/datadog_api_client/v2/models/update_open_api_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb +82 -0
- data/lib/datadog_api_client/v2/models/update_open_api_response_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/user_relationship_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/user_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/user_team_included.rb +62 -0
- data/lib/datadog_api_client/v2/models/user_team_response.rb +16 -4
- data/lib/datadog_api_client/v2/models/users_relationship.rb +100 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +179 -3
- data/examples/v1/usage-metering/GetUsageLambda_3132428705.rb +0 -8
@@ -0,0 +1,119 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Case assign
|
21
|
+
class CaseAssign
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Case assign attributes
|
25
|
+
attr_reader :attributes
|
26
|
+
|
27
|
+
# Case resource type
|
28
|
+
attr_reader :type
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
# @!visibility private
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'attributes' => :'attributes',
|
35
|
+
:'type' => :'type'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
# @!visibility private
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'attributes' => :'CaseAssignAttributes',
|
44
|
+
:'type' => :'CaseResourceType'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
50
|
+
# @!visibility private
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAssign` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseAssign`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'attributes')
|
65
|
+
self.attributes = attributes[:'attributes']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'type')
|
69
|
+
self.type = attributes[:'type']
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Check to see if the all the properties in the model are valid
|
74
|
+
# @return true if the model is valid
|
75
|
+
# @!visibility private
|
76
|
+
def valid?
|
77
|
+
return false if @attributes.nil?
|
78
|
+
return false if @type.nil?
|
79
|
+
true
|
80
|
+
end
|
81
|
+
|
82
|
+
# Custom attribute writer method with validation
|
83
|
+
# @param attributes [Object] Object to be assigned
|
84
|
+
# @!visibility private
|
85
|
+
def attributes=(attributes)
|
86
|
+
if attributes.nil?
|
87
|
+
fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
|
88
|
+
end
|
89
|
+
@attributes = attributes
|
90
|
+
end
|
91
|
+
|
92
|
+
# Custom attribute writer method with validation
|
93
|
+
# @param type [Object] Object to be assigned
|
94
|
+
# @!visibility private
|
95
|
+
def type=(type)
|
96
|
+
if type.nil?
|
97
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
98
|
+
end
|
99
|
+
@type = type
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param o [Object] Object to be compared
|
104
|
+
# @!visibility private
|
105
|
+
def ==(o)
|
106
|
+
return true if self.equal?(o)
|
107
|
+
self.class == o.class &&
|
108
|
+
attributes == o.attributes &&
|
109
|
+
type == o.type
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculates hash code according to all attributes.
|
113
|
+
# @return [Integer] Hash code
|
114
|
+
# @!visibility private
|
115
|
+
def hash
|
116
|
+
[attributes, type].hash
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Case assign attributes
|
21
|
+
class CaseAssignAttributes
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Assignee's UUID
|
25
|
+
attr_reader :assignee_id
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
# @!visibility private
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'assignee_id' => :'assignee_id'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
# @!visibility private
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'assignee_id' => :'String'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Initializes the object
|
44
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
45
|
+
# @!visibility private
|
46
|
+
def initialize(attributes = {})
|
47
|
+
if (!attributes.is_a?(Hash))
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAssignAttributes` initialize method"
|
49
|
+
end
|
50
|
+
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseAssignAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
55
|
+
end
|
56
|
+
h[k.to_sym] = v
|
57
|
+
}
|
58
|
+
|
59
|
+
if attributes.key?(:'assignee_id')
|
60
|
+
self.assignee_id = attributes[:'assignee_id']
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Check to see if the all the properties in the model are valid
|
65
|
+
# @return true if the model is valid
|
66
|
+
# @!visibility private
|
67
|
+
def valid?
|
68
|
+
return false if @assignee_id.nil?
|
69
|
+
true
|
70
|
+
end
|
71
|
+
|
72
|
+
# Custom attribute writer method with validation
|
73
|
+
# @param assignee_id [Object] Object to be assigned
|
74
|
+
# @!visibility private
|
75
|
+
def assignee_id=(assignee_id)
|
76
|
+
if assignee_id.nil?
|
77
|
+
fail ArgumentError, 'invalid value for "assignee_id", assignee_id cannot be nil.'
|
78
|
+
end
|
79
|
+
@assignee_id = assignee_id
|
80
|
+
end
|
81
|
+
|
82
|
+
# Checks equality by comparing each attribute.
|
83
|
+
# @param o [Object] Object to be compared
|
84
|
+
# @!visibility private
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
assignee_id == o.assignee_id
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
# @!visibility private
|
94
|
+
def hash
|
95
|
+
[assignee_id].hash
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Case assign request
|
21
|
+
class CaseAssignRequest
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Case assign
|
25
|
+
attr_reader :data
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
# @!visibility private
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'data' => :'data'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
# @!visibility private
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'data' => :'CaseAssign'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Initializes the object
|
44
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
45
|
+
# @!visibility private
|
46
|
+
def initialize(attributes = {})
|
47
|
+
if (!attributes.is_a?(Hash))
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAssignRequest` initialize method"
|
49
|
+
end
|
50
|
+
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseAssignRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
55
|
+
end
|
56
|
+
h[k.to_sym] = v
|
57
|
+
}
|
58
|
+
|
59
|
+
if attributes.key?(:'data')
|
60
|
+
self.data = attributes[:'data']
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Check to see if the all the properties in the model are valid
|
65
|
+
# @return true if the model is valid
|
66
|
+
# @!visibility private
|
67
|
+
def valid?
|
68
|
+
return false if @data.nil?
|
69
|
+
true
|
70
|
+
end
|
71
|
+
|
72
|
+
# Custom attribute writer method with validation
|
73
|
+
# @param data [Object] Object to be assigned
|
74
|
+
# @!visibility private
|
75
|
+
def data=(data)
|
76
|
+
if data.nil?
|
77
|
+
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
|
78
|
+
end
|
79
|
+
@data = data
|
80
|
+
end
|
81
|
+
|
82
|
+
# Checks equality by comparing each attribute.
|
83
|
+
# @param o [Object] Object to be compared
|
84
|
+
# @!visibility private
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
data == o.data
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
# @!visibility private
|
94
|
+
def hash
|
95
|
+
[data].hash
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,202 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Case attributes
|
21
|
+
class CaseAttributes
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Timestamp of when the case was archived
|
25
|
+
attr_accessor :archived_at
|
26
|
+
|
27
|
+
# Timestamp of when the case was closed
|
28
|
+
attr_accessor :closed_at
|
29
|
+
|
30
|
+
# Timestamp of when the case was created
|
31
|
+
attr_accessor :created_at
|
32
|
+
|
33
|
+
# Description
|
34
|
+
attr_accessor :description
|
35
|
+
|
36
|
+
# Jira issue attached to case
|
37
|
+
attr_accessor :jira_issue
|
38
|
+
|
39
|
+
# Key
|
40
|
+
attr_accessor :key
|
41
|
+
|
42
|
+
# Timestamp of when the case was last modified
|
43
|
+
attr_accessor :modified_at
|
44
|
+
|
45
|
+
# Case priority
|
46
|
+
attr_accessor :priority
|
47
|
+
|
48
|
+
# ServiceNow ticket attached to case
|
49
|
+
attr_accessor :service_now_ticket
|
50
|
+
|
51
|
+
# Case status
|
52
|
+
attr_accessor :status
|
53
|
+
|
54
|
+
# Title
|
55
|
+
attr_accessor :title
|
56
|
+
|
57
|
+
# Case type
|
58
|
+
attr_accessor :type
|
59
|
+
|
60
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
61
|
+
# @!visibility private
|
62
|
+
def self.attribute_map
|
63
|
+
{
|
64
|
+
:'archived_at' => :'archived_at',
|
65
|
+
:'closed_at' => :'closed_at',
|
66
|
+
:'created_at' => :'created_at',
|
67
|
+
:'description' => :'description',
|
68
|
+
:'jira_issue' => :'jira_issue',
|
69
|
+
:'key' => :'key',
|
70
|
+
:'modified_at' => :'modified_at',
|
71
|
+
:'priority' => :'priority',
|
72
|
+
:'service_now_ticket' => :'service_now_ticket',
|
73
|
+
:'status' => :'status',
|
74
|
+
:'title' => :'title',
|
75
|
+
:'type' => :'type'
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
# Attribute type mapping.
|
80
|
+
# @!visibility private
|
81
|
+
def self.openapi_types
|
82
|
+
{
|
83
|
+
:'archived_at' => :'Time',
|
84
|
+
:'closed_at' => :'Time',
|
85
|
+
:'created_at' => :'Time',
|
86
|
+
:'description' => :'String',
|
87
|
+
:'jira_issue' => :'JiraIssue',
|
88
|
+
:'key' => :'String',
|
89
|
+
:'modified_at' => :'Time',
|
90
|
+
:'priority' => :'CasePriority',
|
91
|
+
:'service_now_ticket' => :'ServiceNowTicket',
|
92
|
+
:'status' => :'CaseStatus',
|
93
|
+
:'title' => :'String',
|
94
|
+
:'type' => :'CaseType'
|
95
|
+
}
|
96
|
+
end
|
97
|
+
|
98
|
+
# List of attributes with nullable: true
|
99
|
+
# @!visibility private
|
100
|
+
def self.openapi_nullable
|
101
|
+
Set.new([
|
102
|
+
:'archived_at',
|
103
|
+
:'closed_at',
|
104
|
+
:'jira_issue',
|
105
|
+
:'modified_at',
|
106
|
+
:'service_now_ticket',
|
107
|
+
])
|
108
|
+
end
|
109
|
+
|
110
|
+
# Initializes the object
|
111
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
112
|
+
# @!visibility private
|
113
|
+
def initialize(attributes = {})
|
114
|
+
if (!attributes.is_a?(Hash))
|
115
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAttributes` initialize method"
|
116
|
+
end
|
117
|
+
|
118
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
119
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
120
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
121
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
122
|
+
end
|
123
|
+
h[k.to_sym] = v
|
124
|
+
}
|
125
|
+
|
126
|
+
if attributes.key?(:'archived_at')
|
127
|
+
self.archived_at = attributes[:'archived_at']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.key?(:'closed_at')
|
131
|
+
self.closed_at = attributes[:'closed_at']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'created_at')
|
135
|
+
self.created_at = attributes[:'created_at']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.key?(:'description')
|
139
|
+
self.description = attributes[:'description']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.key?(:'jira_issue')
|
143
|
+
self.jira_issue = attributes[:'jira_issue']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.key?(:'key')
|
147
|
+
self.key = attributes[:'key']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.key?(:'modified_at')
|
151
|
+
self.modified_at = attributes[:'modified_at']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'priority')
|
155
|
+
self.priority = attributes[:'priority']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes.key?(:'service_now_ticket')
|
159
|
+
self.service_now_ticket = attributes[:'service_now_ticket']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.key?(:'status')
|
163
|
+
self.status = attributes[:'status']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.key?(:'title')
|
167
|
+
self.title = attributes[:'title']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.key?(:'type')
|
171
|
+
self.type = attributes[:'type']
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# Checks equality by comparing each attribute.
|
176
|
+
# @param o [Object] Object to be compared
|
177
|
+
# @!visibility private
|
178
|
+
def ==(o)
|
179
|
+
return true if self.equal?(o)
|
180
|
+
self.class == o.class &&
|
181
|
+
archived_at == o.archived_at &&
|
182
|
+
closed_at == o.closed_at &&
|
183
|
+
created_at == o.created_at &&
|
184
|
+
description == o.description &&
|
185
|
+
jira_issue == o.jira_issue &&
|
186
|
+
key == o.key &&
|
187
|
+
modified_at == o.modified_at &&
|
188
|
+
priority == o.priority &&
|
189
|
+
service_now_ticket == o.service_now_ticket &&
|
190
|
+
status == o.status &&
|
191
|
+
title == o.title &&
|
192
|
+
type == o.type
|
193
|
+
end
|
194
|
+
|
195
|
+
# Calculates hash code according to all attributes.
|
196
|
+
# @return [Integer] Hash code
|
197
|
+
# @!visibility private
|
198
|
+
def hash
|
199
|
+
[archived_at, closed_at, created_at, description, jira_issue, key, modified_at, priority, service_now_ticket, status, title, type].hash
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
@@ -0,0 +1,129 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Case creation data
|
21
|
+
class CaseCreate
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Case creation attributes
|
25
|
+
attr_reader :attributes
|
26
|
+
|
27
|
+
# Relationships formed with the case on creation
|
28
|
+
attr_accessor :relationships
|
29
|
+
|
30
|
+
# Case resource type
|
31
|
+
attr_reader :type
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
# @!visibility private
|
35
|
+
def self.attribute_map
|
36
|
+
{
|
37
|
+
:'attributes' => :'attributes',
|
38
|
+
:'relationships' => :'relationships',
|
39
|
+
:'type' => :'type'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
# @!visibility private
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'attributes' => :'CaseCreateAttributes',
|
48
|
+
:'relationships' => :'CaseCreateRelationships',
|
49
|
+
:'type' => :'CaseResourceType'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
55
|
+
# @!visibility private
|
56
|
+
def initialize(attributes = {})
|
57
|
+
if (!attributes.is_a?(Hash))
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCreate` initialize method"
|
59
|
+
end
|
60
|
+
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
63
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
65
|
+
end
|
66
|
+
h[k.to_sym] = v
|
67
|
+
}
|
68
|
+
|
69
|
+
if attributes.key?(:'attributes')
|
70
|
+
self.attributes = attributes[:'attributes']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'relationships')
|
74
|
+
self.relationships = attributes[:'relationships']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'type')
|
78
|
+
self.type = attributes[:'type']
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
# @!visibility private
|
85
|
+
def valid?
|
86
|
+
return false if @attributes.nil?
|
87
|
+
return false if @type.nil?
|
88
|
+
true
|
89
|
+
end
|
90
|
+
|
91
|
+
# Custom attribute writer method with validation
|
92
|
+
# @param attributes [Object] Object to be assigned
|
93
|
+
# @!visibility private
|
94
|
+
def attributes=(attributes)
|
95
|
+
if attributes.nil?
|
96
|
+
fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
|
97
|
+
end
|
98
|
+
@attributes = attributes
|
99
|
+
end
|
100
|
+
|
101
|
+
# Custom attribute writer method with validation
|
102
|
+
# @param type [Object] Object to be assigned
|
103
|
+
# @!visibility private
|
104
|
+
def type=(type)
|
105
|
+
if type.nil?
|
106
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
107
|
+
end
|
108
|
+
@type = type
|
109
|
+
end
|
110
|
+
|
111
|
+
# Checks equality by comparing each attribute.
|
112
|
+
# @param o [Object] Object to be compared
|
113
|
+
# @!visibility private
|
114
|
+
def ==(o)
|
115
|
+
return true if self.equal?(o)
|
116
|
+
self.class == o.class &&
|
117
|
+
attributes == o.attributes &&
|
118
|
+
relationships == o.relationships &&
|
119
|
+
type == o.type
|
120
|
+
end
|
121
|
+
|
122
|
+
# Calculates hash code according to all attributes.
|
123
|
+
# @return [Integer] Hash code
|
124
|
+
# @!visibility private
|
125
|
+
def hash
|
126
|
+
[attributes, relationships, type].hash
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|