mencoro 1.0.1 → 2.0.1
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,432 @@
|
|
|
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
|
+
# A stored mention match; no provider credentials or operational metadata
|
|
18
|
+
class MentionMatchResource < ApiModelBase
|
|
19
|
+
attr_accessor :tracked_query_id
|
|
20
|
+
|
|
21
|
+
attr_accessor :project_id
|
|
22
|
+
|
|
23
|
+
attr_accessor :engine
|
|
24
|
+
|
|
25
|
+
attr_accessor :ai_response_id
|
|
26
|
+
|
|
27
|
+
attr_accessor :competitor_id
|
|
28
|
+
|
|
29
|
+
attr_accessor :mention_position
|
|
30
|
+
|
|
31
|
+
attr_accessor :sentiment
|
|
32
|
+
|
|
33
|
+
attr_accessor :mention_type
|
|
34
|
+
|
|
35
|
+
attr_accessor :mention_type_condition
|
|
36
|
+
|
|
37
|
+
attr_accessor :response_context
|
|
38
|
+
|
|
39
|
+
attr_accessor :detected_at
|
|
40
|
+
|
|
41
|
+
attr_accessor :mention_relation
|
|
42
|
+
|
|
43
|
+
attr_accessor :brand_name
|
|
44
|
+
|
|
45
|
+
attr_accessor :brand_name_as_mentioned
|
|
46
|
+
|
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
48
|
+
def self.attribute_map
|
|
49
|
+
{
|
|
50
|
+
:'tracked_query_id' => :'trackedQueryId',
|
|
51
|
+
:'project_id' => :'projectId',
|
|
52
|
+
:'engine' => :'engine',
|
|
53
|
+
:'ai_response_id' => :'aiResponseId',
|
|
54
|
+
:'competitor_id' => :'competitorId',
|
|
55
|
+
:'mention_position' => :'mentionPosition',
|
|
56
|
+
:'sentiment' => :'sentiment',
|
|
57
|
+
:'mention_type' => :'mentionType',
|
|
58
|
+
:'mention_type_condition' => :'mentionTypeCondition',
|
|
59
|
+
:'response_context' => :'responseContext',
|
|
60
|
+
:'detected_at' => :'detectedAt',
|
|
61
|
+
:'mention_relation' => :'mentionRelation',
|
|
62
|
+
:'brand_name' => :'brandName',
|
|
63
|
+
:'brand_name_as_mentioned' => :'brandNameAsMentioned'
|
|
64
|
+
}
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns attribute mapping this model knows about
|
|
68
|
+
def self.acceptable_attribute_map
|
|
69
|
+
attribute_map
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns all the JSON keys this model knows about
|
|
73
|
+
def self.acceptable_attributes
|
|
74
|
+
acceptable_attribute_map.values
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Attribute type mapping.
|
|
78
|
+
def self.openapi_types
|
|
79
|
+
{
|
|
80
|
+
:'tracked_query_id' => :'String',
|
|
81
|
+
:'project_id' => :'String',
|
|
82
|
+
:'engine' => :'String',
|
|
83
|
+
:'ai_response_id' => :'String',
|
|
84
|
+
:'competitor_id' => :'String',
|
|
85
|
+
:'mention_position' => :'Integer',
|
|
86
|
+
:'sentiment' => :'String',
|
|
87
|
+
:'mention_type' => :'String',
|
|
88
|
+
:'mention_type_condition' => :'String',
|
|
89
|
+
:'response_context' => :'String',
|
|
90
|
+
:'detected_at' => :'Time',
|
|
91
|
+
:'mention_relation' => :'String',
|
|
92
|
+
:'brand_name' => :'String',
|
|
93
|
+
:'brand_name_as_mentioned' => :'String'
|
|
94
|
+
}
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# List of attributes with nullable: true
|
|
98
|
+
def self.openapi_nullable
|
|
99
|
+
Set.new([
|
|
100
|
+
:'competitor_id',
|
|
101
|
+
:'mention_type_condition',
|
|
102
|
+
:'mention_relation',
|
|
103
|
+
:'brand_name',
|
|
104
|
+
:'brand_name_as_mentioned'
|
|
105
|
+
])
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Initializes the object
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
def initialize(attributes = {})
|
|
111
|
+
if (!attributes.is_a?(Hash))
|
|
112
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Mencoro::MentionMatchResource` initialize method"
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
116
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
117
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
118
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
119
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Mencoro::MentionMatchResource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
120
|
+
end
|
|
121
|
+
h[k.to_sym] = v
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'tracked_query_id')
|
|
125
|
+
self.tracked_query_id = attributes[:'tracked_query_id']
|
|
126
|
+
else
|
|
127
|
+
self.tracked_query_id = nil
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'project_id')
|
|
131
|
+
self.project_id = attributes[:'project_id']
|
|
132
|
+
else
|
|
133
|
+
self.project_id = nil
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'engine')
|
|
137
|
+
self.engine = attributes[:'engine']
|
|
138
|
+
else
|
|
139
|
+
self.engine = nil
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'ai_response_id')
|
|
143
|
+
self.ai_response_id = attributes[:'ai_response_id']
|
|
144
|
+
else
|
|
145
|
+
self.ai_response_id = nil
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'competitor_id')
|
|
149
|
+
self.competitor_id = attributes[:'competitor_id']
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'mention_position')
|
|
153
|
+
self.mention_position = attributes[:'mention_position']
|
|
154
|
+
else
|
|
155
|
+
self.mention_position = nil
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'sentiment')
|
|
159
|
+
self.sentiment = attributes[:'sentiment']
|
|
160
|
+
else
|
|
161
|
+
self.sentiment = nil
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'mention_type')
|
|
165
|
+
self.mention_type = attributes[:'mention_type']
|
|
166
|
+
else
|
|
167
|
+
self.mention_type = nil
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'mention_type_condition')
|
|
171
|
+
self.mention_type_condition = attributes[:'mention_type_condition']
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'response_context')
|
|
175
|
+
self.response_context = attributes[:'response_context']
|
|
176
|
+
else
|
|
177
|
+
self.response_context = nil
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'detected_at')
|
|
181
|
+
self.detected_at = attributes[:'detected_at']
|
|
182
|
+
else
|
|
183
|
+
self.detected_at = nil
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'mention_relation')
|
|
187
|
+
self.mention_relation = attributes[:'mention_relation']
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'brand_name')
|
|
191
|
+
self.brand_name = attributes[:'brand_name']
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'brand_name_as_mentioned')
|
|
195
|
+
self.brand_name_as_mentioned = attributes[:'brand_name_as_mentioned']
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
200
|
+
# @return Array for valid properties with the reasons
|
|
201
|
+
def list_invalid_properties
|
|
202
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
203
|
+
invalid_properties = Array.new
|
|
204
|
+
if @tracked_query_id.nil?
|
|
205
|
+
invalid_properties.push('invalid value for "tracked_query_id", tracked_query_id cannot be nil.')
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if @project_id.nil?
|
|
209
|
+
invalid_properties.push('invalid value for "project_id", project_id cannot be nil.')
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if @engine.nil?
|
|
213
|
+
invalid_properties.push('invalid value for "engine", engine cannot be nil.')
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if @ai_response_id.nil?
|
|
217
|
+
invalid_properties.push('invalid value for "ai_response_id", ai_response_id cannot be nil.')
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
if @mention_position.nil?
|
|
221
|
+
invalid_properties.push('invalid value for "mention_position", mention_position cannot be nil.')
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if @mention_position < 1
|
|
225
|
+
invalid_properties.push('invalid value for "mention_position", must be greater than or equal to 1.')
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
if @sentiment.nil?
|
|
229
|
+
invalid_properties.push('invalid value for "sentiment", sentiment cannot be nil.')
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
if @mention_type.nil?
|
|
233
|
+
invalid_properties.push('invalid value for "mention_type", mention_type cannot be nil.')
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
if @response_context.nil?
|
|
237
|
+
invalid_properties.push('invalid value for "response_context", response_context cannot be nil.')
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
if @detected_at.nil?
|
|
241
|
+
invalid_properties.push('invalid value for "detected_at", detected_at cannot be nil.')
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
invalid_properties
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Check to see if the all the properties in the model are valid
|
|
248
|
+
# @return true if the model is valid
|
|
249
|
+
def valid?
|
|
250
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
251
|
+
return false if @tracked_query_id.nil?
|
|
252
|
+
return false if @project_id.nil?
|
|
253
|
+
return false if @engine.nil?
|
|
254
|
+
return false if @ai_response_id.nil?
|
|
255
|
+
return false if @mention_position.nil?
|
|
256
|
+
return false if @mention_position < 1
|
|
257
|
+
return false if @sentiment.nil?
|
|
258
|
+
return false if @mention_type.nil?
|
|
259
|
+
return false if @response_context.nil?
|
|
260
|
+
return false if @detected_at.nil?
|
|
261
|
+
true
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Custom attribute writer method with validation
|
|
265
|
+
# @param [Object] tracked_query_id Value to be assigned
|
|
266
|
+
def tracked_query_id=(tracked_query_id)
|
|
267
|
+
if tracked_query_id.nil?
|
|
268
|
+
fail ArgumentError, 'tracked_query_id cannot be nil'
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
@tracked_query_id = tracked_query_id
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# Custom attribute writer method with validation
|
|
275
|
+
# @param [Object] project_id Value to be assigned
|
|
276
|
+
def project_id=(project_id)
|
|
277
|
+
if project_id.nil?
|
|
278
|
+
fail ArgumentError, 'project_id cannot be nil'
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
@project_id = project_id
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# Custom attribute writer method with validation
|
|
285
|
+
# @param [Object] engine Value to be assigned
|
|
286
|
+
def engine=(engine)
|
|
287
|
+
if engine.nil?
|
|
288
|
+
fail ArgumentError, 'engine cannot be nil'
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
@engine = engine
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# Custom attribute writer method with validation
|
|
295
|
+
# @param [Object] ai_response_id Value to be assigned
|
|
296
|
+
def ai_response_id=(ai_response_id)
|
|
297
|
+
if ai_response_id.nil?
|
|
298
|
+
fail ArgumentError, 'ai_response_id cannot be nil'
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
@ai_response_id = ai_response_id
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Custom attribute writer method with validation
|
|
305
|
+
# @param [Object] mention_position Value to be assigned
|
|
306
|
+
def mention_position=(mention_position)
|
|
307
|
+
if mention_position.nil?
|
|
308
|
+
fail ArgumentError, 'mention_position cannot be nil'
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
if mention_position < 1
|
|
312
|
+
fail ArgumentError, 'invalid value for "mention_position", must be greater than or equal to 1.'
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
@mention_position = mention_position
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
# Custom attribute writer method with validation
|
|
319
|
+
# @param [Object] sentiment Value to be assigned
|
|
320
|
+
def sentiment=(sentiment)
|
|
321
|
+
if sentiment.nil?
|
|
322
|
+
fail ArgumentError, 'sentiment cannot be nil'
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
@sentiment = sentiment
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# Custom attribute writer method with validation
|
|
329
|
+
# @param [Object] mention_type Value to be assigned
|
|
330
|
+
def mention_type=(mention_type)
|
|
331
|
+
if mention_type.nil?
|
|
332
|
+
fail ArgumentError, 'mention_type cannot be nil'
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
@mention_type = mention_type
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
# Custom attribute writer method with validation
|
|
339
|
+
# @param [Object] response_context Value to be assigned
|
|
340
|
+
def response_context=(response_context)
|
|
341
|
+
if response_context.nil?
|
|
342
|
+
fail ArgumentError, 'response_context cannot be nil'
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
@response_context = response_context
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# Custom attribute writer method with validation
|
|
349
|
+
# @param [Object] detected_at Value to be assigned
|
|
350
|
+
def detected_at=(detected_at)
|
|
351
|
+
if detected_at.nil?
|
|
352
|
+
fail ArgumentError, 'detected_at cannot be nil'
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
@detected_at = detected_at
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# Checks equality by comparing each attribute.
|
|
359
|
+
# @param [Object] Object to be compared
|
|
360
|
+
def ==(o)
|
|
361
|
+
return true if self.equal?(o)
|
|
362
|
+
self.class == o.class &&
|
|
363
|
+
tracked_query_id == o.tracked_query_id &&
|
|
364
|
+
project_id == o.project_id &&
|
|
365
|
+
engine == o.engine &&
|
|
366
|
+
ai_response_id == o.ai_response_id &&
|
|
367
|
+
competitor_id == o.competitor_id &&
|
|
368
|
+
mention_position == o.mention_position &&
|
|
369
|
+
sentiment == o.sentiment &&
|
|
370
|
+
mention_type == o.mention_type &&
|
|
371
|
+
mention_type_condition == o.mention_type_condition &&
|
|
372
|
+
response_context == o.response_context &&
|
|
373
|
+
detected_at == o.detected_at &&
|
|
374
|
+
mention_relation == o.mention_relation &&
|
|
375
|
+
brand_name == o.brand_name &&
|
|
376
|
+
brand_name_as_mentioned == o.brand_name_as_mentioned
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
# @see the `==` method
|
|
380
|
+
# @param [Object] Object to be compared
|
|
381
|
+
def eql?(o)
|
|
382
|
+
self == o
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
# Calculates hash code according to all attributes.
|
|
386
|
+
# @return [Integer] Hash code
|
|
387
|
+
def hash
|
|
388
|
+
[tracked_query_id, project_id, engine, ai_response_id, competitor_id, mention_position, sentiment, mention_type, mention_type_condition, response_context, detected_at, mention_relation, brand_name, brand_name_as_mentioned].hash
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
# Builds the object from hash
|
|
392
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
393
|
+
# @return [Object] Returns the model itself
|
|
394
|
+
def self.build_from_hash(attributes)
|
|
395
|
+
return nil unless attributes.is_a?(Hash)
|
|
396
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
397
|
+
transformed_hash = {}
|
|
398
|
+
openapi_types.each_pair do |key, type|
|
|
399
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
400
|
+
transformed_hash["#{key}"] = nil
|
|
401
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
402
|
+
# check to ensure the input is an array given that the attribute
|
|
403
|
+
# is documented as an array but the input is not
|
|
404
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
405
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
406
|
+
end
|
|
407
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
408
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
409
|
+
end
|
|
410
|
+
end
|
|
411
|
+
new(transformed_hash)
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Returns the object in the form of hash
|
|
415
|
+
# @return [Hash] Returns the object in the form of hash
|
|
416
|
+
def to_hash
|
|
417
|
+
hash = {}
|
|
418
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
419
|
+
value = self.send(attr)
|
|
420
|
+
if value.nil?
|
|
421
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
422
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
hash[param] = _to_hash(value)
|
|
426
|
+
end
|
|
427
|
+
hash
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
end
|