mencoro 1.0.1 → 2.0.0
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 +4 -4
- data/README.md +41 -5
- data/docs/AccountApi.md +1 -1
- data/docs/AnalyticsApi.md +96 -86
- data/docs/AsyncJobResource.md +3 -1
- data/docs/AsyncJobResourceError.md +20 -0
- data/docs/BillingApi.md +1 -1
- data/docs/CitedSourceRow.md +32 -0
- data/docs/CitedSourcesResponse.md +20 -0
- data/docs/ClusterBreakdownRow.md +82 -0
- data/docs/ClustersApi.md +74 -0
- data/docs/CompetitorCoOccurrenceResponse.md +18 -0
- data/docs/CompetitorCoOccurrenceRow.md +36 -0
- data/docs/CompetitorShareOfVoice.md +20 -0
- data/docs/CreateInvitation201Response.md +4 -0
- data/docs/CreateInvitationRequest.md +3 -1
- data/docs/CreateInvitationRequestProjectAccess.md +20 -0
- data/docs/DiscoveryApi.md +1 -1
- data/docs/GetMeStats200ResponseProjects.md +1 -1
- data/docs/GetOrganizationOverview200ResponseAggregate.md +1 -1
- data/docs/GetOrganizationOverview200ResponseProjectsInner.md +8 -2
- data/docs/GetOrganizationStats200ResponseInvitations.md +1 -1
- data/docs/GetOrganizationStats200ResponseMembers.md +1 -1
- data/docs/GetOrganizationStats200ResponseProjects.md +1 -1
- data/docs/InvitationResource.md +5 -1
- data/docs/JobsApi.md +1 -1
- data/docs/KeywordListingResource.md +12 -10
- data/docs/KeywordListingResourceCarriedPositions.md +24 -0
- data/docs/KeywordListingResourceCarriedPositionsSerp.md +20 -0
- data/docs/ListProjects200Response.md +1 -1
- data/docs/MemberResource.md +5 -1
- data/docs/MembersApi.md +78 -0
- data/docs/MentionMatchResource.md +44 -0
- data/docs/MentionSampleResponse.md +46 -0
- data/docs/MentionTypeCounts.md +26 -0
- data/docs/OrganizationsApi.md +3 -3
- data/docs/PerCompetitorSentiment.md +30 -0
- data/docs/PerEngineSentiment.md +28 -0
- data/docs/PerEntityMetrics.md +32 -0
- data/docs/PositionDistributionBucket.md +20 -0
- data/docs/ProjectMentionMixResponse.md +22 -0
- data/docs/ProjectMentionSamplesResponse.md +20 -0
- data/docs/ProjectRankTrackingClusterBreakdown.md +20 -0
- data/docs/ProjectRankTrackingStats.md +96 -0
- data/docs/ProjectRankTrackingTimeSeries.md +20 -0
- data/docs/ProjectSentimentBreakdown.md +20 -0
- data/docs/ProjectedMonthlyChecksResource.md +2 -2
- data/docs/ProjectsApi.md +76 -2
- data/docs/SearchTrackedQueryMentionMatches200Response.md +20 -0
- data/docs/SearchTrackedQuerySerpMatches200Response.md +20 -0
- data/docs/SerpMatchResource.md +30 -0
- data/docs/SetMemberProjectAccessRequest.md +20 -0
- data/docs/SubscriptionResource.md +1 -1
- data/docs/TimeSeriesPoint.md +22 -0
- data/docs/TrackedQueriesApi.md +175 -3
- data/docs/TrackedQueryCountResource.md +1 -1
- data/docs/TrackedQueryMoverRow.md +58 -0
- data/docs/TrackedQueryMoversResponse.md +22 -0
- data/docs/TrackedQueryRankTrackingTimeSeries.md +20 -0
- data/docs/TrackedQueryUsageResource.md +1 -1
- data/lib/mencoro/api/account_api.rb +3 -3
- data/lib/mencoro/api/analytics_api.rb +103 -85
- data/lib/mencoro/api/billing_api.rb +3 -3
- data/lib/mencoro/api/captures_api.rb +2 -2
- data/lib/mencoro/api/clusters_api.rb +76 -1
- data/lib/mencoro/api/discovery_api.rb +3 -3
- data/lib/mencoro/api/invitations_api.rb +1 -1
- data/lib/mencoro/api/jobs_api.rb +3 -3
- data/lib/mencoro/api/members_api.rb +95 -1
- data/lib/mencoro/api/organization_operations_api.rb +1 -1
- data/lib/mencoro/api/organizations_api.rb +7 -7
- data/lib/mencoro/api/projects_api.rb +80 -5
- data/lib/mencoro/api/tracked_queries_api.rb +220 -8
- data/lib/mencoro/api_client.rb +2 -2
- data/lib/mencoro/api_error.rb +1 -1
- data/lib/mencoro/api_model_base.rb +1 -1
- data/lib/mencoro/configuration.rb +1 -1
- data/lib/mencoro/models/accepted_job_resource.rb +1 -1
- data/lib/mencoro/models/ai_response_report_resource.rb +1 -1
- data/lib/mencoro/models/ai_response_resource.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome_clusters_inner.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome_failed_inner.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome_skipped_clusters_inner.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome_successful_inner.rb +1 -1
- data/lib/mencoro/models/async_job_resource.rb +17 -7
- data/lib/mencoro/models/async_job_resource_error.rb +217 -0
- data/lib/mencoro/models/batch_change_tracked_query_check_frequency_request_data.rb +1 -1
- data/lib/mencoro/models/batch_change_tracked_query_passes_request_data.rb +1 -1
- data/lib/mencoro/models/batch_create_query_clusters_outcome.rb +1 -1
- data/lib/mencoro/models/batch_create_query_clusters_outcome_failed_inner.rb +1 -1
- data/lib/mencoro/models/batch_create_query_clusters_outcome_successful_inner.rb +1 -1
- data/lib/mencoro/models/batch_create_query_clusters_request_data.rb +1 -1
- data/lib/mencoro/models/batch_create_tracked_queries_request_data.rb +1 -1
- data/lib/mencoro/models/batch_create_tracked_queries_result_resource.rb +1 -1
- data/lib/mencoro/models/batch_create_tracked_queries_result_resource_failed_inner.rb +1 -1
- data/lib/mencoro/models/batch_create_tracked_queries_result_resource_successful_inner.rb +1 -1
- data/lib/mencoro/models/batch_force_check_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/batch_force_check_tracked_queries200_response_failed_inner.rb +1 -1
- data/lib/mencoro/models/batch_pause_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/batch_pause_tracked_queries200_response_failed_inner.rb +1 -1
- data/lib/mencoro/models/batch_pause_tracked_queries200_response_successful_inner.rb +1 -1
- data/lib/mencoro/models/batch_resume_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/batch_targets_request_data.rb +1 -1
- data/lib/mencoro/models/batch_write_outcome.rb +1 -1
- data/lib/mencoro/models/batch_write_outcome_failed_inner.rb +1 -1
- data/lib/mencoro/models/brand_profile_resource.rb +1 -1
- data/lib/mencoro/models/bulk_add_clusters_to_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/bulk_add_clusters_to_tracked_queries_request.rb +1 -1
- data/lib/mencoro/models/bulk_remove_clusters_from_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/bulk_remove_clusters_from_tracked_queries_request.rb +1 -1
- data/lib/mencoro/models/change_member_role_request.rb +1 -1
- data/lib/mencoro/models/change_tracked_query_check_frequency_request_data.rb +1 -1
- data/lib/mencoro/models/change_tracked_query_passes_request_data.rb +1 -1
- data/lib/mencoro/models/citation_resource.rb +1 -1
- data/lib/mencoro/models/cited_source_row.rb +298 -0
- data/lib/mencoro/models/cited_sources_response.rb +192 -0
- data/lib/mencoro/models/cluster_breakdown_row.rb +580 -0
- data/lib/mencoro/models/cluster_membership_request_data.rb +1 -1
- data/lib/mencoro/models/competitor_co_occurrence_response.rb +166 -0
- data/lib/mencoro/models/competitor_co_occurrence_row.rb +318 -0
- data/lib/mencoro/models/competitor_resource.rb +1 -1
- data/lib/mencoro/models/competitor_share_of_voice.rb +174 -0
- data/lib/mencoro/models/create_competitor_request.rb +1 -1
- data/lib/mencoro/models/create_invitation200_response.rb +1 -1
- data/lib/mencoro/models/create_invitation201_response.rb +60 -2
- data/lib/mencoro/models/create_invitation_request.rb +15 -5
- data/lib/mencoro/models/create_invitation_request_project_access.rb +201 -0
- data/lib/mencoro/models/create_organization201_response.rb +1 -1
- data/lib/mencoro/models/create_organization_request.rb +1 -1
- data/lib/mencoro/models/create_project_request.rb +1 -1
- data/lib/mencoro/models/create_project_request_competitors_inner.rb +1 -1
- data/lib/mencoro/models/create_query_cluster409_response.rb +1 -1
- data/lib/mencoro/models/create_query_cluster_request.rb +1 -1
- data/lib/mencoro/models/delete_query_cluster200_response.rb +1 -1
- data/lib/mencoro/models/entitlements_resource.rb +1 -1
- data/lib/mencoro/models/get_available_filters200_response.rb +1 -1
- data/lib/mencoro/models/get_available_filters200_response_clusters_inner.rb +1 -1
- data/lib/mencoro/models/get_me_stats200_response.rb +1 -1
- data/lib/mencoro/models/get_me_stats200_response_organizations.rb +1 -1
- data/lib/mencoro/models/get_me_stats200_response_projects.rb +2 -2
- data/lib/mencoro/models/get_membership_stats200_response.rb +1 -1
- data/lib/mencoro/models/get_mention_samples400_response.rb +1 -1
- data/lib/mencoro/models/get_mention_samples400_response_details_value_inner.rb +1 -1
- data/lib/mencoro/models/get_metric_glossary200_response.rb +1 -1
- data/lib/mencoro/models/get_metric_glossary200_response_metrics_inner.rb +1 -1
- data/lib/mencoro/models/get_organization_overview200_response.rb +1 -1
- data/lib/mencoro/models/get_organization_overview200_response_aggregate.rb +2 -2
- data/lib/mencoro/models/get_organization_overview200_response_projects_inner.rb +34 -3
- data/lib/mencoro/models/get_organization_stats200_response.rb +1 -1
- data/lib/mencoro/models/get_organization_stats200_response_invitations.rb +4 -7
- data/lib/mencoro/models/get_organization_stats200_response_members.rb +4 -7
- data/lib/mencoro/models/get_organization_stats200_response_projects.rb +2 -2
- data/lib/mencoro/models/get_share_of_voice_formula200_response.rb +1 -1
- data/lib/mencoro/models/get_tracking_coverage200_response.rb +1 -1
- data/lib/mencoro/models/get_tracking_coverage200_response_sample_inner.rb +1 -1
- data/lib/mencoro/models/invitation_resource.rb +64 -6
- data/lib/mencoro/models/keyword_listing_resource.rb +40 -14
- data/lib/mencoro/models/keyword_listing_resource_carried_positions.rb +187 -0
- data/lib/mencoro/models/keyword_listing_resource_carried_positions_serp.rb +192 -0
- data/lib/mencoro/models/keyword_listing_resource_mention_type_counts.rb +1 -1
- data/lib/mencoro/models/list_ai_responses200_response.rb +1 -1
- data/lib/mencoro/models/list_competitors200_response.rb +1 -1
- data/lib/mencoro/models/list_invitations200_response.rb +1 -1
- data/lib/mencoro/models/list_keyword_listings200_response.rb +1 -1
- data/lib/mencoro/models/list_members200_response.rb +1 -1
- data/lib/mencoro/models/list_organizations200_response.rb +1 -1
- data/lib/mencoro/models/list_projects200_response.rb +2 -2
- data/lib/mencoro/models/list_query_clusters200_response.rb +1 -1
- data/lib/mencoro/models/list_search_snapshots200_response.rb +1 -1
- data/lib/mencoro/models/list_shopping_snapshots200_response.rb +1 -1
- data/lib/mencoro/models/me_resource.rb +1 -1
- data/lib/mencoro/models/member_resource.rb +63 -5
- data/lib/mencoro/models/mention_match_resource.rb +432 -0
- data/lib/mencoro/models/mention_sample_response.rb +450 -0
- data/lib/mencoro/models/mention_type_counts.rb +268 -0
- data/lib/mencoro/models/operation_effect.rb +1 -1
- data/lib/mencoro/models/organization_resource.rb +1 -1
- data/lib/mencoro/models/per_competitor_sentiment.rb +304 -0
- data/lib/mencoro/models/per_engine_sentiment.rb +278 -0
- data/lib/mencoro/models/per_entity_metrics.rb +218 -0
- data/lib/mencoro/models/position_distribution_bucket.rb +190 -0
- data/lib/mencoro/models/preview_organization_operation200_response.rb +1 -1
- data/lib/mencoro/models/preview_organization_operation200_response_organization.rb +1 -1
- data/lib/mencoro/models/preview_organization_operation_request.rb +3 -3
- data/lib/mencoro/models/project_detail_resource.rb +1 -1
- data/lib/mencoro/models/project_detail_resource_competitors_inner.rb +1 -1
- data/lib/mencoro/models/project_mention_mix_response.rb +222 -0
- data/lib/mencoro/models/project_mention_samples_response.rb +192 -0
- data/lib/mencoro/models/project_rank_tracking_cluster_breakdown.rb +176 -0
- data/lib/mencoro/models/project_rank_tracking_stats.rb +718 -0
- data/lib/mencoro/models/project_rank_tracking_time_series.rb +176 -0
- data/lib/mencoro/models/project_resource.rb +1 -1
- data/lib/mencoro/models/project_sentiment_breakdown.rb +194 -0
- data/lib/mencoro/models/projected_monthly_checks_resource.rb +3 -3
- data/lib/mencoro/models/query_cluster_resource.rb +1 -1
- data/lib/mencoro/models/report_ai_response_request.rb +1 -1
- data/lib/mencoro/models/search_result_resource.rb +1 -1
- data/lib/mencoro/models/search_snapshot_resource.rb +1 -1
- data/lib/mencoro/models/search_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/search_tracked_query_mention_matches200_response.rb +158 -0
- data/lib/mencoro/models/search_tracked_query_serp_matches200_response.rb +158 -0
- data/lib/mencoro/models/serp_match_resource.rb +314 -0
- data/lib/mencoro/models/set_member_project_access_request.rb +200 -0
- data/lib/mencoro/models/shopping_offer_resource.rb +1 -1
- data/lib/mencoro/models/shopping_snapshot_resource.rb +1 -1
- data/lib/mencoro/models/start_brand_discovery_job_request.rb +1 -1
- data/lib/mencoro/models/start_brand_name_suggestion_job_request.rb +1 -1
- data/lib/mencoro/models/start_clustering_job_request_data.rb +1 -1
- data/lib/mencoro/models/start_keyword_discovery_job_request.rb +1 -1
- data/lib/mencoro/models/start_prompt_discovery_job_request.rb +1 -1
- data/lib/mencoro/models/submitted_checks_resource.rb +1 -1
- data/lib/mencoro/models/subscription_resource.rb +3 -3
- data/lib/mencoro/models/time_series_point.rb +218 -0
- data/lib/mencoro/models/tracked_query_count_resource.rb +3 -3
- data/lib/mencoro/models/tracked_query_detail_resource.rb +3 -3
- data/lib/mencoro/models/tracked_query_mover_row.rb +492 -0
- data/lib/mencoro/models/tracked_query_movers_response.rb +202 -0
- data/lib/mencoro/models/tracked_query_rank_tracking_time_series.rb +176 -0
- data/lib/mencoro/models/tracked_query_resource.rb +3 -3
- data/lib/mencoro/models/tracked_query_usage_resource.rb +2 -2
- data/lib/mencoro/models/update_organization_request.rb +1 -1
- data/lib/mencoro/models/update_project_brand_profile_request.rb +1 -1
- data/lib/mencoro/models/update_project_request.rb +1 -1
- data/lib/mencoro/version.rb +2 -2
- data/lib/mencoro.rb +32 -1
- data/mencoro.gemspec +2 -2
- data/spec/models/async_job_resource_error_spec.rb +46 -0
- data/spec/models/cited_source_row_spec.rb +78 -0
- data/spec/models/cited_sources_response_spec.rb +42 -0
- data/spec/models/cluster_breakdown_row_spec.rb +228 -0
- data/spec/models/competitor_co_occurrence_response_spec.rb +36 -0
- data/spec/models/competitor_co_occurrence_row_spec.rb +90 -0
- data/spec/models/competitor_share_of_voice_spec.rb +42 -0
- data/spec/models/create_invitation_request_project_access_spec.rb +46 -0
- data/spec/models/keyword_listing_resource_carried_positions_serp_spec.rb +42 -0
- data/spec/models/keyword_listing_resource_carried_positions_spec.rb +54 -0
- data/spec/models/mention_match_resource_spec.rb +114 -0
- data/spec/models/mention_sample_response_spec.rb +114 -0
- data/spec/models/mention_type_counts_spec.rb +60 -0
- data/spec/models/per_competitor_sentiment_spec.rb +72 -0
- data/spec/models/per_engine_sentiment_spec.rb +66 -0
- data/spec/models/per_entity_metrics_spec.rb +78 -0
- data/spec/models/position_distribution_bucket_spec.rb +42 -0
- data/spec/models/project_mention_mix_response_spec.rb +48 -0
- data/spec/models/project_mention_samples_response_spec.rb +42 -0
- data/spec/models/project_rank_tracking_cluster_breakdown_spec.rb +42 -0
- data/spec/models/project_rank_tracking_stats_spec.rb +270 -0
- data/spec/models/project_rank_tracking_time_series_spec.rb +42 -0
- data/spec/models/project_sentiment_breakdown_spec.rb +42 -0
- data/spec/models/search_tracked_query_mention_matches200_response_spec.rb +42 -0
- data/spec/models/search_tracked_query_serp_matches200_response_spec.rb +42 -0
- data/spec/models/serp_match_resource_spec.rb +72 -0
- data/spec/models/set_member_project_access_request_spec.rb +46 -0
- data/spec/models/time_series_point_spec.rb +48 -0
- data/spec/models/tracked_query_mover_row_spec.rb +156 -0
- data/spec/models/tracked_query_movers_response_spec.rb +48 -0
- data/spec/models/tracked_query_rank_tracking_time_series_spec.rb +42 -0
- data/spec/spec_helper.rb +1 -1
- metadata +235 -108
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Mencoro API
|
|
3
|
+
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@mencoro.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Mencoro
|
|
17
|
+
class MentionSampleResponse < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :tracked_query_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :ai_response_id
|
|
23
|
+
|
|
24
|
+
attr_accessor :engine
|
|
25
|
+
|
|
26
|
+
attr_accessor :competitor_id
|
|
27
|
+
|
|
28
|
+
attr_accessor :sentiment
|
|
29
|
+
|
|
30
|
+
attr_accessor :mention_type
|
|
31
|
+
|
|
32
|
+
attr_accessor :mention_position
|
|
33
|
+
|
|
34
|
+
attr_accessor :text
|
|
35
|
+
|
|
36
|
+
attr_accessor :detected_at
|
|
37
|
+
|
|
38
|
+
attr_accessor :query_text
|
|
39
|
+
|
|
40
|
+
attr_accessor :country
|
|
41
|
+
|
|
42
|
+
# Published because `competitorId` alone cannot answer the question. Own-brand AND untracked-competitor mentions both carry a null competitor id - the confusion migration Version20260608130000 was written to end - so a reader that treats a null competitor id as \"us\" silently counts a rival as the brand.
|
|
43
|
+
attr_accessor :mention_relation
|
|
44
|
+
|
|
45
|
+
attr_accessor :brand_name
|
|
46
|
+
|
|
47
|
+
attr_accessor :citations
|
|
48
|
+
|
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
50
|
+
def self.attribute_map
|
|
51
|
+
{
|
|
52
|
+
:'id' => :'id',
|
|
53
|
+
:'tracked_query_id' => :'trackedQueryId',
|
|
54
|
+
:'ai_response_id' => :'aiResponseId',
|
|
55
|
+
:'engine' => :'engine',
|
|
56
|
+
:'competitor_id' => :'competitorId',
|
|
57
|
+
:'sentiment' => :'sentiment',
|
|
58
|
+
:'mention_type' => :'mentionType',
|
|
59
|
+
:'mention_position' => :'mentionPosition',
|
|
60
|
+
:'text' => :'text',
|
|
61
|
+
:'detected_at' => :'detectedAt',
|
|
62
|
+
:'query_text' => :'queryText',
|
|
63
|
+
:'country' => :'country',
|
|
64
|
+
:'mention_relation' => :'mentionRelation',
|
|
65
|
+
:'brand_name' => :'brandName',
|
|
66
|
+
:'citations' => :'citations'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Returns attribute mapping this model knows about
|
|
71
|
+
def self.acceptable_attribute_map
|
|
72
|
+
attribute_map
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Returns all the JSON keys this model knows about
|
|
76
|
+
def self.acceptable_attributes
|
|
77
|
+
acceptable_attribute_map.values
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Attribute type mapping.
|
|
81
|
+
def self.openapi_types
|
|
82
|
+
{
|
|
83
|
+
:'id' => :'String',
|
|
84
|
+
:'tracked_query_id' => :'String',
|
|
85
|
+
:'ai_response_id' => :'String',
|
|
86
|
+
:'engine' => :'String',
|
|
87
|
+
:'competitor_id' => :'String',
|
|
88
|
+
:'sentiment' => :'String',
|
|
89
|
+
:'mention_type' => :'String',
|
|
90
|
+
:'mention_position' => :'Integer',
|
|
91
|
+
:'text' => :'String',
|
|
92
|
+
:'detected_at' => :'String',
|
|
93
|
+
:'query_text' => :'String',
|
|
94
|
+
:'country' => :'String',
|
|
95
|
+
:'mention_relation' => :'String',
|
|
96
|
+
:'brand_name' => :'String',
|
|
97
|
+
:'citations' => :'Array<CitationResource>'
|
|
98
|
+
}
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# List of attributes with nullable: true
|
|
102
|
+
def self.openapi_nullable
|
|
103
|
+
Set.new([
|
|
104
|
+
:'competitor_id',
|
|
105
|
+
:'country',
|
|
106
|
+
:'mention_relation',
|
|
107
|
+
:'brand_name',
|
|
108
|
+
])
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Initializes the object
|
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
113
|
+
def initialize(attributes = {})
|
|
114
|
+
if (!attributes.is_a?(Hash))
|
|
115
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Mencoro::MentionSampleResponse` initialize method"
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
119
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
120
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
121
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
122
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Mencoro::MentionSampleResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
123
|
+
end
|
|
124
|
+
h[k.to_sym] = v
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'id')
|
|
128
|
+
self.id = attributes[:'id']
|
|
129
|
+
else
|
|
130
|
+
self.id = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'tracked_query_id')
|
|
134
|
+
self.tracked_query_id = attributes[:'tracked_query_id']
|
|
135
|
+
else
|
|
136
|
+
self.tracked_query_id = nil
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'ai_response_id')
|
|
140
|
+
self.ai_response_id = attributes[:'ai_response_id']
|
|
141
|
+
else
|
|
142
|
+
self.ai_response_id = nil
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'engine')
|
|
146
|
+
self.engine = attributes[:'engine']
|
|
147
|
+
else
|
|
148
|
+
self.engine = nil
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'competitor_id')
|
|
152
|
+
self.competitor_id = attributes[:'competitor_id']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'sentiment')
|
|
156
|
+
self.sentiment = attributes[:'sentiment']
|
|
157
|
+
else
|
|
158
|
+
self.sentiment = nil
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'mention_type')
|
|
162
|
+
self.mention_type = attributes[:'mention_type']
|
|
163
|
+
else
|
|
164
|
+
self.mention_type = nil
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'mention_position')
|
|
168
|
+
self.mention_position = attributes[:'mention_position']
|
|
169
|
+
else
|
|
170
|
+
self.mention_position = nil
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.key?(:'text')
|
|
174
|
+
self.text = attributes[:'text']
|
|
175
|
+
else
|
|
176
|
+
self.text = nil
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'detected_at')
|
|
180
|
+
self.detected_at = attributes[:'detected_at']
|
|
181
|
+
else
|
|
182
|
+
self.detected_at = nil
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
if attributes.key?(:'query_text')
|
|
186
|
+
self.query_text = attributes[:'query_text']
|
|
187
|
+
else
|
|
188
|
+
self.query_text = nil
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if attributes.key?(:'country')
|
|
192
|
+
self.country = attributes[:'country']
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'mention_relation')
|
|
196
|
+
self.mention_relation = attributes[:'mention_relation']
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'brand_name')
|
|
200
|
+
self.brand_name = attributes[:'brand_name']
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if attributes.key?(:'citations')
|
|
204
|
+
if (value = attributes[:'citations']).is_a?(Array)
|
|
205
|
+
self.citations = value
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
211
|
+
# @return Array for valid properties with the reasons
|
|
212
|
+
def list_invalid_properties
|
|
213
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
214
|
+
invalid_properties = Array.new
|
|
215
|
+
if @id.nil?
|
|
216
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if @tracked_query_id.nil?
|
|
220
|
+
invalid_properties.push('invalid value for "tracked_query_id", tracked_query_id cannot be nil.')
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if @ai_response_id.nil?
|
|
224
|
+
invalid_properties.push('invalid value for "ai_response_id", ai_response_id cannot be nil.')
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if @engine.nil?
|
|
228
|
+
invalid_properties.push('invalid value for "engine", engine cannot be nil.')
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
if @sentiment.nil?
|
|
232
|
+
invalid_properties.push('invalid value for "sentiment", sentiment cannot be nil.')
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if @mention_type.nil?
|
|
236
|
+
invalid_properties.push('invalid value for "mention_type", mention_type cannot be nil.')
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if @mention_position.nil?
|
|
240
|
+
invalid_properties.push('invalid value for "mention_position", mention_position cannot be nil.')
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if @text.nil?
|
|
244
|
+
invalid_properties.push('invalid value for "text", text cannot be nil.')
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if @detected_at.nil?
|
|
248
|
+
invalid_properties.push('invalid value for "detected_at", detected_at cannot be nil.')
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
if @query_text.nil?
|
|
252
|
+
invalid_properties.push('invalid value for "query_text", query_text cannot be nil.')
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
invalid_properties
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Check to see if the all the properties in the model are valid
|
|
259
|
+
# @return true if the model is valid
|
|
260
|
+
def valid?
|
|
261
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
262
|
+
return false if @id.nil?
|
|
263
|
+
return false if @tracked_query_id.nil?
|
|
264
|
+
return false if @ai_response_id.nil?
|
|
265
|
+
return false if @engine.nil?
|
|
266
|
+
return false if @sentiment.nil?
|
|
267
|
+
return false if @mention_type.nil?
|
|
268
|
+
return false if @mention_position.nil?
|
|
269
|
+
return false if @text.nil?
|
|
270
|
+
return false if @detected_at.nil?
|
|
271
|
+
return false if @query_text.nil?
|
|
272
|
+
true
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Custom attribute writer method with validation
|
|
276
|
+
# @param [Object] id Value to be assigned
|
|
277
|
+
def id=(id)
|
|
278
|
+
if id.nil?
|
|
279
|
+
fail ArgumentError, 'id cannot be nil'
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
@id = id
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Custom attribute writer method with validation
|
|
286
|
+
# @param [Object] tracked_query_id Value to be assigned
|
|
287
|
+
def tracked_query_id=(tracked_query_id)
|
|
288
|
+
if tracked_query_id.nil?
|
|
289
|
+
fail ArgumentError, 'tracked_query_id cannot be nil'
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
@tracked_query_id = tracked_query_id
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Custom attribute writer method with validation
|
|
296
|
+
# @param [Object] ai_response_id Value to be assigned
|
|
297
|
+
def ai_response_id=(ai_response_id)
|
|
298
|
+
if ai_response_id.nil?
|
|
299
|
+
fail ArgumentError, 'ai_response_id cannot be nil'
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
@ai_response_id = ai_response_id
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# Custom attribute writer method with validation
|
|
306
|
+
# @param [Object] engine Value to be assigned
|
|
307
|
+
def engine=(engine)
|
|
308
|
+
if engine.nil?
|
|
309
|
+
fail ArgumentError, 'engine cannot be nil'
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
@engine = engine
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# Custom attribute writer method with validation
|
|
316
|
+
# @param [Object] sentiment Value to be assigned
|
|
317
|
+
def sentiment=(sentiment)
|
|
318
|
+
if sentiment.nil?
|
|
319
|
+
fail ArgumentError, 'sentiment cannot be nil'
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
@sentiment = sentiment
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# Custom attribute writer method with validation
|
|
326
|
+
# @param [Object] mention_type Value to be assigned
|
|
327
|
+
def mention_type=(mention_type)
|
|
328
|
+
if mention_type.nil?
|
|
329
|
+
fail ArgumentError, 'mention_type cannot be nil'
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
@mention_type = mention_type
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# Custom attribute writer method with validation
|
|
336
|
+
# @param [Object] mention_position Value to be assigned
|
|
337
|
+
def mention_position=(mention_position)
|
|
338
|
+
if mention_position.nil?
|
|
339
|
+
fail ArgumentError, 'mention_position cannot be nil'
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
@mention_position = mention_position
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
# Custom attribute writer method with validation
|
|
346
|
+
# @param [Object] text Value to be assigned
|
|
347
|
+
def text=(text)
|
|
348
|
+
if text.nil?
|
|
349
|
+
fail ArgumentError, 'text cannot be nil'
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
@text = text
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
# Custom attribute writer method with validation
|
|
356
|
+
# @param [Object] detected_at Value to be assigned
|
|
357
|
+
def detected_at=(detected_at)
|
|
358
|
+
if detected_at.nil?
|
|
359
|
+
fail ArgumentError, 'detected_at cannot be nil'
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
@detected_at = detected_at
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Custom attribute writer method with validation
|
|
366
|
+
# @param [Object] query_text Value to be assigned
|
|
367
|
+
def query_text=(query_text)
|
|
368
|
+
if query_text.nil?
|
|
369
|
+
fail ArgumentError, 'query_text cannot be nil'
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
@query_text = query_text
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# Checks equality by comparing each attribute.
|
|
376
|
+
# @param [Object] Object to be compared
|
|
377
|
+
def ==(o)
|
|
378
|
+
return true if self.equal?(o)
|
|
379
|
+
self.class == o.class &&
|
|
380
|
+
id == o.id &&
|
|
381
|
+
tracked_query_id == o.tracked_query_id &&
|
|
382
|
+
ai_response_id == o.ai_response_id &&
|
|
383
|
+
engine == o.engine &&
|
|
384
|
+
competitor_id == o.competitor_id &&
|
|
385
|
+
sentiment == o.sentiment &&
|
|
386
|
+
mention_type == o.mention_type &&
|
|
387
|
+
mention_position == o.mention_position &&
|
|
388
|
+
text == o.text &&
|
|
389
|
+
detected_at == o.detected_at &&
|
|
390
|
+
query_text == o.query_text &&
|
|
391
|
+
country == o.country &&
|
|
392
|
+
mention_relation == o.mention_relation &&
|
|
393
|
+
brand_name == o.brand_name &&
|
|
394
|
+
citations == o.citations
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
# @see the `==` method
|
|
398
|
+
# @param [Object] Object to be compared
|
|
399
|
+
def eql?(o)
|
|
400
|
+
self == o
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
# Calculates hash code according to all attributes.
|
|
404
|
+
# @return [Integer] Hash code
|
|
405
|
+
def hash
|
|
406
|
+
[id, tracked_query_id, ai_response_id, engine, competitor_id, sentiment, mention_type, mention_position, text, detected_at, query_text, country, mention_relation, brand_name, citations].hash
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
# Builds the object from hash
|
|
410
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
411
|
+
# @return [Object] Returns the model itself
|
|
412
|
+
def self.build_from_hash(attributes)
|
|
413
|
+
return nil unless attributes.is_a?(Hash)
|
|
414
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
415
|
+
transformed_hash = {}
|
|
416
|
+
openapi_types.each_pair do |key, type|
|
|
417
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
418
|
+
transformed_hash["#{key}"] = nil
|
|
419
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
420
|
+
# check to ensure the input is an array given that the attribute
|
|
421
|
+
# is documented as an array but the input is not
|
|
422
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
423
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
424
|
+
end
|
|
425
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
426
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
427
|
+
end
|
|
428
|
+
end
|
|
429
|
+
new(transformed_hash)
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
# Returns the object in the form of hash
|
|
433
|
+
# @return [Hash] Returns the object in the form of hash
|
|
434
|
+
def to_hash
|
|
435
|
+
hash = {}
|
|
436
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
437
|
+
value = self.send(attr)
|
|
438
|
+
if value.nil?
|
|
439
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
440
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
hash[param] = _to_hash(value)
|
|
444
|
+
end
|
|
445
|
+
hash
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
end
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Mencoro API
|
|
3
|
+
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@mencoro.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Mencoro
|
|
17
|
+
class MentionTypeCounts < ApiModelBase
|
|
18
|
+
attr_accessor :recommendation
|
|
19
|
+
|
|
20
|
+
attr_accessor :comparison
|
|
21
|
+
|
|
22
|
+
attr_accessor :listing
|
|
23
|
+
|
|
24
|
+
attr_accessor :example
|
|
25
|
+
|
|
26
|
+
attr_accessor :reference
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'recommendation' => :'recommendation',
|
|
32
|
+
:'comparison' => :'comparison',
|
|
33
|
+
:'listing' => :'listing',
|
|
34
|
+
:'example' => :'example',
|
|
35
|
+
:'reference' => :'reference'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'recommendation' => :'Integer',
|
|
53
|
+
:'comparison' => :'Integer',
|
|
54
|
+
:'listing' => :'Integer',
|
|
55
|
+
:'example' => :'Integer',
|
|
56
|
+
:'reference' => :'Integer'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Mencoro::MentionTypeCounts` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Mencoro::MentionTypeCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'recommendation')
|
|
83
|
+
self.recommendation = attributes[:'recommendation']
|
|
84
|
+
else
|
|
85
|
+
self.recommendation = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'comparison')
|
|
89
|
+
self.comparison = attributes[:'comparison']
|
|
90
|
+
else
|
|
91
|
+
self.comparison = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'listing')
|
|
95
|
+
self.listing = attributes[:'listing']
|
|
96
|
+
else
|
|
97
|
+
self.listing = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'example')
|
|
101
|
+
self.example = attributes[:'example']
|
|
102
|
+
else
|
|
103
|
+
self.example = nil
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'reference')
|
|
107
|
+
self.reference = attributes[:'reference']
|
|
108
|
+
else
|
|
109
|
+
self.reference = nil
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
114
|
+
# @return Array for valid properties with the reasons
|
|
115
|
+
def list_invalid_properties
|
|
116
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
117
|
+
invalid_properties = Array.new
|
|
118
|
+
if @recommendation.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "recommendation", recommendation cannot be nil.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @comparison.nil?
|
|
123
|
+
invalid_properties.push('invalid value for "comparison", comparison cannot be nil.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if @listing.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "listing", listing cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if @example.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "example", example cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @reference.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "reference", reference cannot be nil.')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
invalid_properties
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Check to see if the all the properties in the model are valid
|
|
142
|
+
# @return true if the model is valid
|
|
143
|
+
def valid?
|
|
144
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
145
|
+
return false if @recommendation.nil?
|
|
146
|
+
return false if @comparison.nil?
|
|
147
|
+
return false if @listing.nil?
|
|
148
|
+
return false if @example.nil?
|
|
149
|
+
return false if @reference.nil?
|
|
150
|
+
true
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Custom attribute writer method with validation
|
|
154
|
+
# @param [Object] recommendation Value to be assigned
|
|
155
|
+
def recommendation=(recommendation)
|
|
156
|
+
if recommendation.nil?
|
|
157
|
+
fail ArgumentError, 'recommendation cannot be nil'
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
@recommendation = recommendation
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Custom attribute writer method with validation
|
|
164
|
+
# @param [Object] comparison Value to be assigned
|
|
165
|
+
def comparison=(comparison)
|
|
166
|
+
if comparison.nil?
|
|
167
|
+
fail ArgumentError, 'comparison cannot be nil'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
@comparison = comparison
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Custom attribute writer method with validation
|
|
174
|
+
# @param [Object] listing Value to be assigned
|
|
175
|
+
def listing=(listing)
|
|
176
|
+
if listing.nil?
|
|
177
|
+
fail ArgumentError, 'listing cannot be nil'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
@listing = listing
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Custom attribute writer method with validation
|
|
184
|
+
# @param [Object] example Value to be assigned
|
|
185
|
+
def example=(example)
|
|
186
|
+
if example.nil?
|
|
187
|
+
fail ArgumentError, 'example cannot be nil'
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
@example = example
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Custom attribute writer method with validation
|
|
194
|
+
# @param [Object] reference Value to be assigned
|
|
195
|
+
def reference=(reference)
|
|
196
|
+
if reference.nil?
|
|
197
|
+
fail ArgumentError, 'reference cannot be nil'
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
@reference = reference
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Checks equality by comparing each attribute.
|
|
204
|
+
# @param [Object] Object to be compared
|
|
205
|
+
def ==(o)
|
|
206
|
+
return true if self.equal?(o)
|
|
207
|
+
self.class == o.class &&
|
|
208
|
+
recommendation == o.recommendation &&
|
|
209
|
+
comparison == o.comparison &&
|
|
210
|
+
listing == o.listing &&
|
|
211
|
+
example == o.example &&
|
|
212
|
+
reference == o.reference
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# @see the `==` method
|
|
216
|
+
# @param [Object] Object to be compared
|
|
217
|
+
def eql?(o)
|
|
218
|
+
self == o
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Calculates hash code according to all attributes.
|
|
222
|
+
# @return [Integer] Hash code
|
|
223
|
+
def hash
|
|
224
|
+
[recommendation, comparison, listing, example, reference].hash
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Builds the object from hash
|
|
228
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
229
|
+
# @return [Object] Returns the model itself
|
|
230
|
+
def self.build_from_hash(attributes)
|
|
231
|
+
return nil unless attributes.is_a?(Hash)
|
|
232
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
233
|
+
transformed_hash = {}
|
|
234
|
+
openapi_types.each_pair do |key, type|
|
|
235
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
236
|
+
transformed_hash["#{key}"] = nil
|
|
237
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
238
|
+
# check to ensure the input is an array given that the attribute
|
|
239
|
+
# is documented as an array but the input is not
|
|
240
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
241
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
242
|
+
end
|
|
243
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
244
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
new(transformed_hash)
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Returns the object in the form of hash
|
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
|
252
|
+
def to_hash
|
|
253
|
+
hash = {}
|
|
254
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
255
|
+
value = self.send(attr)
|
|
256
|
+
if value.nil?
|
|
257
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
258
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
hash[param] = _to_hash(value)
|
|
262
|
+
end
|
|
263
|
+
hash
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
end
|