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.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +41 -5
  3. data/docs/AccountApi.md +1 -1
  4. data/docs/AnalyticsApi.md +96 -86
  5. data/docs/AsyncJobResource.md +3 -1
  6. data/docs/AsyncJobResourceError.md +20 -0
  7. data/docs/BillingApi.md +1 -1
  8. data/docs/CitedSourceRow.md +32 -0
  9. data/docs/CitedSourcesResponse.md +20 -0
  10. data/docs/ClusterBreakdownRow.md +82 -0
  11. data/docs/ClustersApi.md +74 -0
  12. data/docs/CompetitorCoOccurrenceResponse.md +18 -0
  13. data/docs/CompetitorCoOccurrenceRow.md +36 -0
  14. data/docs/CompetitorShareOfVoice.md +20 -0
  15. data/docs/CreateInvitation201Response.md +4 -0
  16. data/docs/CreateInvitationRequest.md +3 -1
  17. data/docs/CreateInvitationRequestProjectAccess.md +20 -0
  18. data/docs/DiscoveryApi.md +1 -1
  19. data/docs/GetMeStats200ResponseProjects.md +1 -1
  20. data/docs/GetOrganizationOverview200ResponseAggregate.md +1 -1
  21. data/docs/GetOrganizationOverview200ResponseProjectsInner.md +8 -2
  22. data/docs/GetOrganizationStats200ResponseInvitations.md +1 -1
  23. data/docs/GetOrganizationStats200ResponseMembers.md +1 -1
  24. data/docs/GetOrganizationStats200ResponseProjects.md +1 -1
  25. data/docs/InvitationResource.md +5 -1
  26. data/docs/JobsApi.md +1 -1
  27. data/docs/KeywordListingResource.md +12 -10
  28. data/docs/KeywordListingResourceCarriedPositions.md +24 -0
  29. data/docs/KeywordListingResourceCarriedPositionsSerp.md +20 -0
  30. data/docs/ListProjects200Response.md +1 -1
  31. data/docs/MemberResource.md +5 -1
  32. data/docs/MembersApi.md +78 -0
  33. data/docs/MentionMatchResource.md +44 -0
  34. data/docs/MentionSampleResponse.md +46 -0
  35. data/docs/MentionTypeCounts.md +26 -0
  36. data/docs/OrganizationsApi.md +3 -3
  37. data/docs/PerCompetitorSentiment.md +30 -0
  38. data/docs/PerEngineSentiment.md +28 -0
  39. data/docs/PerEntityMetrics.md +32 -0
  40. data/docs/PositionDistributionBucket.md +20 -0
  41. data/docs/ProjectMentionMixResponse.md +22 -0
  42. data/docs/ProjectMentionSamplesResponse.md +20 -0
  43. data/docs/ProjectRankTrackingClusterBreakdown.md +20 -0
  44. data/docs/ProjectRankTrackingStats.md +96 -0
  45. data/docs/ProjectRankTrackingTimeSeries.md +20 -0
  46. data/docs/ProjectSentimentBreakdown.md +20 -0
  47. data/docs/ProjectedMonthlyChecksResource.md +2 -2
  48. data/docs/ProjectsApi.md +76 -2
  49. data/docs/SearchTrackedQueryMentionMatches200Response.md +20 -0
  50. data/docs/SearchTrackedQuerySerpMatches200Response.md +20 -0
  51. data/docs/SerpMatchResource.md +30 -0
  52. data/docs/SetMemberProjectAccessRequest.md +20 -0
  53. data/docs/SubscriptionResource.md +1 -1
  54. data/docs/TimeSeriesPoint.md +22 -0
  55. data/docs/TrackedQueriesApi.md +175 -3
  56. data/docs/TrackedQueryCountResource.md +1 -1
  57. data/docs/TrackedQueryMoverRow.md +58 -0
  58. data/docs/TrackedQueryMoversResponse.md +22 -0
  59. data/docs/TrackedQueryRankTrackingTimeSeries.md +20 -0
  60. data/docs/TrackedQueryUsageResource.md +1 -1
  61. data/lib/mencoro/api/account_api.rb +3 -3
  62. data/lib/mencoro/api/analytics_api.rb +103 -85
  63. data/lib/mencoro/api/billing_api.rb +3 -3
  64. data/lib/mencoro/api/captures_api.rb +2 -2
  65. data/lib/mencoro/api/clusters_api.rb +76 -1
  66. data/lib/mencoro/api/discovery_api.rb +3 -3
  67. data/lib/mencoro/api/invitations_api.rb +1 -1
  68. data/lib/mencoro/api/jobs_api.rb +3 -3
  69. data/lib/mencoro/api/members_api.rb +95 -1
  70. data/lib/mencoro/api/organization_operations_api.rb +1 -1
  71. data/lib/mencoro/api/organizations_api.rb +7 -7
  72. data/lib/mencoro/api/projects_api.rb +80 -5
  73. data/lib/mencoro/api/tracked_queries_api.rb +220 -8
  74. data/lib/mencoro/api_client.rb +2 -2
  75. data/lib/mencoro/api_error.rb +1 -1
  76. data/lib/mencoro/api_model_base.rb +1 -1
  77. data/lib/mencoro/configuration.rb +1 -1
  78. data/lib/mencoro/models/accepted_job_resource.rb +1 -1
  79. data/lib/mencoro/models/ai_response_report_resource.rb +1 -1
  80. data/lib/mencoro/models/ai_response_resource.rb +1 -1
  81. data/lib/mencoro/models/apply_clustering_job_outcome.rb +1 -1
  82. data/lib/mencoro/models/apply_clustering_job_outcome_clusters_inner.rb +1 -1
  83. data/lib/mencoro/models/apply_clustering_job_outcome_failed_inner.rb +1 -1
  84. data/lib/mencoro/models/apply_clustering_job_outcome_skipped_clusters_inner.rb +1 -1
  85. data/lib/mencoro/models/apply_clustering_job_outcome_successful_inner.rb +1 -1
  86. data/lib/mencoro/models/async_job_resource.rb +17 -7
  87. data/lib/mencoro/models/async_job_resource_error.rb +217 -0
  88. data/lib/mencoro/models/batch_change_tracked_query_check_frequency_request_data.rb +1 -1
  89. data/lib/mencoro/models/batch_change_tracked_query_passes_request_data.rb +1 -1
  90. data/lib/mencoro/models/batch_create_query_clusters_outcome.rb +1 -1
  91. data/lib/mencoro/models/batch_create_query_clusters_outcome_failed_inner.rb +1 -1
  92. data/lib/mencoro/models/batch_create_query_clusters_outcome_successful_inner.rb +1 -1
  93. data/lib/mencoro/models/batch_create_query_clusters_request_data.rb +1 -1
  94. data/lib/mencoro/models/batch_create_tracked_queries_request_data.rb +1 -1
  95. data/lib/mencoro/models/batch_create_tracked_queries_result_resource.rb +1 -1
  96. data/lib/mencoro/models/batch_create_tracked_queries_result_resource_failed_inner.rb +1 -1
  97. data/lib/mencoro/models/batch_create_tracked_queries_result_resource_successful_inner.rb +1 -1
  98. data/lib/mencoro/models/batch_force_check_tracked_queries200_response.rb +1 -1
  99. data/lib/mencoro/models/batch_force_check_tracked_queries200_response_failed_inner.rb +1 -1
  100. data/lib/mencoro/models/batch_pause_tracked_queries200_response.rb +1 -1
  101. data/lib/mencoro/models/batch_pause_tracked_queries200_response_failed_inner.rb +1 -1
  102. data/lib/mencoro/models/batch_pause_tracked_queries200_response_successful_inner.rb +1 -1
  103. data/lib/mencoro/models/batch_resume_tracked_queries200_response.rb +1 -1
  104. data/lib/mencoro/models/batch_targets_request_data.rb +1 -1
  105. data/lib/mencoro/models/batch_write_outcome.rb +1 -1
  106. data/lib/mencoro/models/batch_write_outcome_failed_inner.rb +1 -1
  107. data/lib/mencoro/models/brand_profile_resource.rb +1 -1
  108. data/lib/mencoro/models/bulk_add_clusters_to_tracked_queries200_response.rb +1 -1
  109. data/lib/mencoro/models/bulk_add_clusters_to_tracked_queries_request.rb +1 -1
  110. data/lib/mencoro/models/bulk_remove_clusters_from_tracked_queries200_response.rb +1 -1
  111. data/lib/mencoro/models/bulk_remove_clusters_from_tracked_queries_request.rb +1 -1
  112. data/lib/mencoro/models/change_member_role_request.rb +1 -1
  113. data/lib/mencoro/models/change_tracked_query_check_frequency_request_data.rb +1 -1
  114. data/lib/mencoro/models/change_tracked_query_passes_request_data.rb +1 -1
  115. data/lib/mencoro/models/citation_resource.rb +1 -1
  116. data/lib/mencoro/models/cited_source_row.rb +298 -0
  117. data/lib/mencoro/models/cited_sources_response.rb +192 -0
  118. data/lib/mencoro/models/cluster_breakdown_row.rb +580 -0
  119. data/lib/mencoro/models/cluster_membership_request_data.rb +1 -1
  120. data/lib/mencoro/models/competitor_co_occurrence_response.rb +166 -0
  121. data/lib/mencoro/models/competitor_co_occurrence_row.rb +318 -0
  122. data/lib/mencoro/models/competitor_resource.rb +1 -1
  123. data/lib/mencoro/models/competitor_share_of_voice.rb +174 -0
  124. data/lib/mencoro/models/create_competitor_request.rb +1 -1
  125. data/lib/mencoro/models/create_invitation200_response.rb +1 -1
  126. data/lib/mencoro/models/create_invitation201_response.rb +60 -2
  127. data/lib/mencoro/models/create_invitation_request.rb +15 -5
  128. data/lib/mencoro/models/create_invitation_request_project_access.rb +201 -0
  129. data/lib/mencoro/models/create_organization201_response.rb +1 -1
  130. data/lib/mencoro/models/create_organization_request.rb +1 -1
  131. data/lib/mencoro/models/create_project_request.rb +1 -1
  132. data/lib/mencoro/models/create_project_request_competitors_inner.rb +1 -1
  133. data/lib/mencoro/models/create_query_cluster409_response.rb +1 -1
  134. data/lib/mencoro/models/create_query_cluster_request.rb +1 -1
  135. data/lib/mencoro/models/delete_query_cluster200_response.rb +1 -1
  136. data/lib/mencoro/models/entitlements_resource.rb +1 -1
  137. data/lib/mencoro/models/get_available_filters200_response.rb +1 -1
  138. data/lib/mencoro/models/get_available_filters200_response_clusters_inner.rb +1 -1
  139. data/lib/mencoro/models/get_me_stats200_response.rb +1 -1
  140. data/lib/mencoro/models/get_me_stats200_response_organizations.rb +1 -1
  141. data/lib/mencoro/models/get_me_stats200_response_projects.rb +2 -2
  142. data/lib/mencoro/models/get_membership_stats200_response.rb +1 -1
  143. data/lib/mencoro/models/get_mention_samples400_response.rb +1 -1
  144. data/lib/mencoro/models/get_mention_samples400_response_details_value_inner.rb +1 -1
  145. data/lib/mencoro/models/get_metric_glossary200_response.rb +1 -1
  146. data/lib/mencoro/models/get_metric_glossary200_response_metrics_inner.rb +1 -1
  147. data/lib/mencoro/models/get_organization_overview200_response.rb +1 -1
  148. data/lib/mencoro/models/get_organization_overview200_response_aggregate.rb +2 -2
  149. data/lib/mencoro/models/get_organization_overview200_response_projects_inner.rb +34 -3
  150. data/lib/mencoro/models/get_organization_stats200_response.rb +1 -1
  151. data/lib/mencoro/models/get_organization_stats200_response_invitations.rb +4 -7
  152. data/lib/mencoro/models/get_organization_stats200_response_members.rb +4 -7
  153. data/lib/mencoro/models/get_organization_stats200_response_projects.rb +2 -2
  154. data/lib/mencoro/models/get_share_of_voice_formula200_response.rb +1 -1
  155. data/lib/mencoro/models/get_tracking_coverage200_response.rb +1 -1
  156. data/lib/mencoro/models/get_tracking_coverage200_response_sample_inner.rb +1 -1
  157. data/lib/mencoro/models/invitation_resource.rb +64 -6
  158. data/lib/mencoro/models/keyword_listing_resource.rb +40 -14
  159. data/lib/mencoro/models/keyword_listing_resource_carried_positions.rb +187 -0
  160. data/lib/mencoro/models/keyword_listing_resource_carried_positions_serp.rb +192 -0
  161. data/lib/mencoro/models/keyword_listing_resource_mention_type_counts.rb +1 -1
  162. data/lib/mencoro/models/list_ai_responses200_response.rb +1 -1
  163. data/lib/mencoro/models/list_competitors200_response.rb +1 -1
  164. data/lib/mencoro/models/list_invitations200_response.rb +1 -1
  165. data/lib/mencoro/models/list_keyword_listings200_response.rb +1 -1
  166. data/lib/mencoro/models/list_members200_response.rb +1 -1
  167. data/lib/mencoro/models/list_organizations200_response.rb +1 -1
  168. data/lib/mencoro/models/list_projects200_response.rb +2 -2
  169. data/lib/mencoro/models/list_query_clusters200_response.rb +1 -1
  170. data/lib/mencoro/models/list_search_snapshots200_response.rb +1 -1
  171. data/lib/mencoro/models/list_shopping_snapshots200_response.rb +1 -1
  172. data/lib/mencoro/models/me_resource.rb +1 -1
  173. data/lib/mencoro/models/member_resource.rb +63 -5
  174. data/lib/mencoro/models/mention_match_resource.rb +432 -0
  175. data/lib/mencoro/models/mention_sample_response.rb +450 -0
  176. data/lib/mencoro/models/mention_type_counts.rb +268 -0
  177. data/lib/mencoro/models/operation_effect.rb +1 -1
  178. data/lib/mencoro/models/organization_resource.rb +1 -1
  179. data/lib/mencoro/models/per_competitor_sentiment.rb +304 -0
  180. data/lib/mencoro/models/per_engine_sentiment.rb +278 -0
  181. data/lib/mencoro/models/per_entity_metrics.rb +218 -0
  182. data/lib/mencoro/models/position_distribution_bucket.rb +190 -0
  183. data/lib/mencoro/models/preview_organization_operation200_response.rb +1 -1
  184. data/lib/mencoro/models/preview_organization_operation200_response_organization.rb +1 -1
  185. data/lib/mencoro/models/preview_organization_operation_request.rb +3 -3
  186. data/lib/mencoro/models/project_detail_resource.rb +1 -1
  187. data/lib/mencoro/models/project_detail_resource_competitors_inner.rb +1 -1
  188. data/lib/mencoro/models/project_mention_mix_response.rb +222 -0
  189. data/lib/mencoro/models/project_mention_samples_response.rb +192 -0
  190. data/lib/mencoro/models/project_rank_tracking_cluster_breakdown.rb +176 -0
  191. data/lib/mencoro/models/project_rank_tracking_stats.rb +718 -0
  192. data/lib/mencoro/models/project_rank_tracking_time_series.rb +176 -0
  193. data/lib/mencoro/models/project_resource.rb +1 -1
  194. data/lib/mencoro/models/project_sentiment_breakdown.rb +194 -0
  195. data/lib/mencoro/models/projected_monthly_checks_resource.rb +3 -3
  196. data/lib/mencoro/models/query_cluster_resource.rb +1 -1
  197. data/lib/mencoro/models/report_ai_response_request.rb +1 -1
  198. data/lib/mencoro/models/search_result_resource.rb +1 -1
  199. data/lib/mencoro/models/search_snapshot_resource.rb +1 -1
  200. data/lib/mencoro/models/search_tracked_queries200_response.rb +1 -1
  201. data/lib/mencoro/models/search_tracked_query_mention_matches200_response.rb +158 -0
  202. data/lib/mencoro/models/search_tracked_query_serp_matches200_response.rb +158 -0
  203. data/lib/mencoro/models/serp_match_resource.rb +314 -0
  204. data/lib/mencoro/models/set_member_project_access_request.rb +200 -0
  205. data/lib/mencoro/models/shopping_offer_resource.rb +1 -1
  206. data/lib/mencoro/models/shopping_snapshot_resource.rb +1 -1
  207. data/lib/mencoro/models/start_brand_discovery_job_request.rb +1 -1
  208. data/lib/mencoro/models/start_brand_name_suggestion_job_request.rb +1 -1
  209. data/lib/mencoro/models/start_clustering_job_request_data.rb +1 -1
  210. data/lib/mencoro/models/start_keyword_discovery_job_request.rb +1 -1
  211. data/lib/mencoro/models/start_prompt_discovery_job_request.rb +1 -1
  212. data/lib/mencoro/models/submitted_checks_resource.rb +1 -1
  213. data/lib/mencoro/models/subscription_resource.rb +3 -3
  214. data/lib/mencoro/models/time_series_point.rb +218 -0
  215. data/lib/mencoro/models/tracked_query_count_resource.rb +3 -3
  216. data/lib/mencoro/models/tracked_query_detail_resource.rb +3 -3
  217. data/lib/mencoro/models/tracked_query_mover_row.rb +492 -0
  218. data/lib/mencoro/models/tracked_query_movers_response.rb +202 -0
  219. data/lib/mencoro/models/tracked_query_rank_tracking_time_series.rb +176 -0
  220. data/lib/mencoro/models/tracked_query_resource.rb +3 -3
  221. data/lib/mencoro/models/tracked_query_usage_resource.rb +2 -2
  222. data/lib/mencoro/models/update_organization_request.rb +1 -1
  223. data/lib/mencoro/models/update_project_brand_profile_request.rb +1 -1
  224. data/lib/mencoro/models/update_project_request.rb +1 -1
  225. data/lib/mencoro/version.rb +2 -2
  226. data/lib/mencoro.rb +32 -1
  227. data/mencoro.gemspec +2 -2
  228. data/spec/models/async_job_resource_error_spec.rb +46 -0
  229. data/spec/models/cited_source_row_spec.rb +78 -0
  230. data/spec/models/cited_sources_response_spec.rb +42 -0
  231. data/spec/models/cluster_breakdown_row_spec.rb +228 -0
  232. data/spec/models/competitor_co_occurrence_response_spec.rb +36 -0
  233. data/spec/models/competitor_co_occurrence_row_spec.rb +90 -0
  234. data/spec/models/competitor_share_of_voice_spec.rb +42 -0
  235. data/spec/models/create_invitation_request_project_access_spec.rb +46 -0
  236. data/spec/models/keyword_listing_resource_carried_positions_serp_spec.rb +42 -0
  237. data/spec/models/keyword_listing_resource_carried_positions_spec.rb +54 -0
  238. data/spec/models/mention_match_resource_spec.rb +114 -0
  239. data/spec/models/mention_sample_response_spec.rb +114 -0
  240. data/spec/models/mention_type_counts_spec.rb +60 -0
  241. data/spec/models/per_competitor_sentiment_spec.rb +72 -0
  242. data/spec/models/per_engine_sentiment_spec.rb +66 -0
  243. data/spec/models/per_entity_metrics_spec.rb +78 -0
  244. data/spec/models/position_distribution_bucket_spec.rb +42 -0
  245. data/spec/models/project_mention_mix_response_spec.rb +48 -0
  246. data/spec/models/project_mention_samples_response_spec.rb +42 -0
  247. data/spec/models/project_rank_tracking_cluster_breakdown_spec.rb +42 -0
  248. data/spec/models/project_rank_tracking_stats_spec.rb +270 -0
  249. data/spec/models/project_rank_tracking_time_series_spec.rb +42 -0
  250. data/spec/models/project_sentiment_breakdown_spec.rb +42 -0
  251. data/spec/models/search_tracked_query_mention_matches200_response_spec.rb +42 -0
  252. data/spec/models/search_tracked_query_serp_matches200_response_spec.rb +42 -0
  253. data/spec/models/serp_match_resource_spec.rb +72 -0
  254. data/spec/models/set_member_project_access_request_spec.rb +46 -0
  255. data/spec/models/time_series_point_spec.rb +48 -0
  256. data/spec/models/tracked_query_mover_row_spec.rb +156 -0
  257. data/spec/models/tracked_query_movers_response_spec.rb +48 -0
  258. data/spec/models/tracked_query_rank_tracking_time_series_spec.rb +42 -0
  259. data/spec/spec_helper.rb +1 -1
  260. metadata +235 -108
@@ -0,0 +1,158 @@
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 SearchTrackedQuerySerpMatches200Response < ApiModelBase
18
+ attr_accessor :items
19
+
20
+ attr_accessor :total
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'items' => :'items',
26
+ :'total' => :'total'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'items' => :'Array<SerpMatchResource>',
44
+ :'total' => :'Integer'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Mencoro::SearchTrackedQuerySerpMatches200Response` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Mencoro::SearchTrackedQuerySerpMatches200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'items')
71
+ if (value = attributes[:'items']).is_a?(Array)
72
+ self.items = value
73
+ end
74
+ end
75
+
76
+ if attributes.key?(:'total')
77
+ self.total = attributes[:'total']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ items == o.items &&
102
+ total == o.total
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [items, total].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end
@@ -0,0 +1,314 @@
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 serp match; no provider credentials or operational metadata
18
+ class SerpMatchResource < ApiModelBase
19
+ attr_accessor :tracked_query_id
20
+
21
+ attr_accessor :project_id
22
+
23
+ attr_accessor :engine
24
+
25
+ attr_accessor :search_page_id
26
+
27
+ attr_accessor :competitor_id
28
+
29
+ attr_accessor :position
30
+
31
+ attr_accessor :detected_at
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'tracked_query_id' => :'trackedQueryId',
37
+ :'project_id' => :'projectId',
38
+ :'engine' => :'engine',
39
+ :'search_page_id' => :'searchPageId',
40
+ :'competitor_id' => :'competitorId',
41
+ :'position' => :'position',
42
+ :'detected_at' => :'detectedAt'
43
+ }
44
+ end
45
+
46
+ # Returns attribute mapping this model knows about
47
+ def self.acceptable_attribute_map
48
+ attribute_map
49
+ end
50
+
51
+ # Returns all the JSON keys this model knows about
52
+ def self.acceptable_attributes
53
+ acceptable_attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'tracked_query_id' => :'String',
60
+ :'project_id' => :'String',
61
+ :'engine' => :'String',
62
+ :'search_page_id' => :'String',
63
+ :'competitor_id' => :'String',
64
+ :'position' => :'Integer',
65
+ :'detected_at' => :'Time'
66
+ }
67
+ end
68
+
69
+ # List of attributes with nullable: true
70
+ def self.openapi_nullable
71
+ Set.new([
72
+ :'competitor_id',
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Mencoro::SerpMatchResource` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Mencoro::SerpMatchResource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'tracked_query_id')
93
+ self.tracked_query_id = attributes[:'tracked_query_id']
94
+ else
95
+ self.tracked_query_id = nil
96
+ end
97
+
98
+ if attributes.key?(:'project_id')
99
+ self.project_id = attributes[:'project_id']
100
+ else
101
+ self.project_id = nil
102
+ end
103
+
104
+ if attributes.key?(:'engine')
105
+ self.engine = attributes[:'engine']
106
+ else
107
+ self.engine = nil
108
+ end
109
+
110
+ if attributes.key?(:'search_page_id')
111
+ self.search_page_id = attributes[:'search_page_id']
112
+ else
113
+ self.search_page_id = nil
114
+ end
115
+
116
+ if attributes.key?(:'competitor_id')
117
+ self.competitor_id = attributes[:'competitor_id']
118
+ end
119
+
120
+ if attributes.key?(:'position')
121
+ self.position = attributes[:'position']
122
+ else
123
+ self.position = nil
124
+ end
125
+
126
+ if attributes.key?(:'detected_at')
127
+ self.detected_at = attributes[:'detected_at']
128
+ else
129
+ self.detected_at = nil
130
+ end
131
+ end
132
+
133
+ # Show invalid properties with the reasons. Usually used together with valid?
134
+ # @return Array for valid properties with the reasons
135
+ def list_invalid_properties
136
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
137
+ invalid_properties = Array.new
138
+ if @tracked_query_id.nil?
139
+ invalid_properties.push('invalid value for "tracked_query_id", tracked_query_id cannot be nil.')
140
+ end
141
+
142
+ if @project_id.nil?
143
+ invalid_properties.push('invalid value for "project_id", project_id cannot be nil.')
144
+ end
145
+
146
+ if @engine.nil?
147
+ invalid_properties.push('invalid value for "engine", engine cannot be nil.')
148
+ end
149
+
150
+ if @search_page_id.nil?
151
+ invalid_properties.push('invalid value for "search_page_id", search_page_id cannot be nil.')
152
+ end
153
+
154
+ if @position.nil?
155
+ invalid_properties.push('invalid value for "position", position cannot be nil.')
156
+ end
157
+
158
+ if @position < 1
159
+ invalid_properties.push('invalid value for "position", must be greater than or equal to 1.')
160
+ end
161
+
162
+ if @detected_at.nil?
163
+ invalid_properties.push('invalid value for "detected_at", detected_at cannot be nil.')
164
+ end
165
+
166
+ invalid_properties
167
+ end
168
+
169
+ # Check to see if the all the properties in the model are valid
170
+ # @return true if the model is valid
171
+ def valid?
172
+ warn '[DEPRECATED] the `valid?` method is obsolete'
173
+ return false if @tracked_query_id.nil?
174
+ return false if @project_id.nil?
175
+ return false if @engine.nil?
176
+ return false if @search_page_id.nil?
177
+ return false if @position.nil?
178
+ return false if @position < 1
179
+ return false if @detected_at.nil?
180
+ true
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] tracked_query_id Value to be assigned
185
+ def tracked_query_id=(tracked_query_id)
186
+ if tracked_query_id.nil?
187
+ fail ArgumentError, 'tracked_query_id cannot be nil'
188
+ end
189
+
190
+ @tracked_query_id = tracked_query_id
191
+ end
192
+
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] project_id Value to be assigned
195
+ def project_id=(project_id)
196
+ if project_id.nil?
197
+ fail ArgumentError, 'project_id cannot be nil'
198
+ end
199
+
200
+ @project_id = project_id
201
+ end
202
+
203
+ # Custom attribute writer method with validation
204
+ # @param [Object] engine Value to be assigned
205
+ def engine=(engine)
206
+ if engine.nil?
207
+ fail ArgumentError, 'engine cannot be nil'
208
+ end
209
+
210
+ @engine = engine
211
+ end
212
+
213
+ # Custom attribute writer method with validation
214
+ # @param [Object] search_page_id Value to be assigned
215
+ def search_page_id=(search_page_id)
216
+ if search_page_id.nil?
217
+ fail ArgumentError, 'search_page_id cannot be nil'
218
+ end
219
+
220
+ @search_page_id = search_page_id
221
+ end
222
+
223
+ # Custom attribute writer method with validation
224
+ # @param [Object] position Value to be assigned
225
+ def position=(position)
226
+ if position.nil?
227
+ fail ArgumentError, 'position cannot be nil'
228
+ end
229
+
230
+ if position < 1
231
+ fail ArgumentError, 'invalid value for "position", must be greater than or equal to 1.'
232
+ end
233
+
234
+ @position = position
235
+ end
236
+
237
+ # Custom attribute writer method with validation
238
+ # @param [Object] detected_at Value to be assigned
239
+ def detected_at=(detected_at)
240
+ if detected_at.nil?
241
+ fail ArgumentError, 'detected_at cannot be nil'
242
+ end
243
+
244
+ @detected_at = detected_at
245
+ end
246
+
247
+ # Checks equality by comparing each attribute.
248
+ # @param [Object] Object to be compared
249
+ def ==(o)
250
+ return true if self.equal?(o)
251
+ self.class == o.class &&
252
+ tracked_query_id == o.tracked_query_id &&
253
+ project_id == o.project_id &&
254
+ engine == o.engine &&
255
+ search_page_id == o.search_page_id &&
256
+ competitor_id == o.competitor_id &&
257
+ position == o.position &&
258
+ detected_at == o.detected_at
259
+ end
260
+
261
+ # @see the `==` method
262
+ # @param [Object] Object to be compared
263
+ def eql?(o)
264
+ self == o
265
+ end
266
+
267
+ # Calculates hash code according to all attributes.
268
+ # @return [Integer] Hash code
269
+ def hash
270
+ [tracked_query_id, project_id, engine, search_page_id, competitor_id, position, detected_at].hash
271
+ end
272
+
273
+ # Builds the object from hash
274
+ # @param [Hash] attributes Model attributes in the form of hash
275
+ # @return [Object] Returns the model itself
276
+ def self.build_from_hash(attributes)
277
+ return nil unless attributes.is_a?(Hash)
278
+ attributes = attributes.transform_keys(&:to_sym)
279
+ transformed_hash = {}
280
+ openapi_types.each_pair do |key, type|
281
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
282
+ transformed_hash["#{key}"] = nil
283
+ elsif type =~ /\AArray<(.*)>/i
284
+ # check to ensure the input is an array given that the attribute
285
+ # is documented as an array but the input is not
286
+ if attributes[attribute_map[key]].is_a?(Array)
287
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
288
+ end
289
+ elsif !attributes[attribute_map[key]].nil?
290
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
291
+ end
292
+ end
293
+ new(transformed_hash)
294
+ end
295
+
296
+ # Returns the object in the form of hash
297
+ # @return [Hash] Returns the object in the form of hash
298
+ def to_hash
299
+ hash = {}
300
+ self.class.attribute_map.each_pair do |attr, param|
301
+ value = self.send(attr)
302
+ if value.nil?
303
+ is_nullable = self.class.openapi_nullable.include?(attr)
304
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
305
+ end
306
+
307
+ hash[param] = _to_hash(value)
308
+ end
309
+ hash
310
+ end
311
+
312
+ end
313
+
314
+ end
@@ -0,0 +1,200 @@
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 SetMemberProjectAccessRequest < ApiModelBase
18
+ attr_accessor :mode
19
+
20
+ # The projects of the organization a selected access reaches: at least one and at most 500. Omit it, or send an empty list, for all.
21
+ attr_accessor :project_ids
22
+
23
+ class EnumAttributeValidator
24
+ attr_reader :datatype
25
+ attr_reader :allowable_values
26
+
27
+ def initialize(datatype, allowable_values)
28
+ @allowable_values = allowable_values.map do |value|
29
+ case datatype.to_s
30
+ when /Integer/i
31
+ value.to_i
32
+ when /Float/i
33
+ value.to_f
34
+ else
35
+ value
36
+ end
37
+ end
38
+ end
39
+
40
+ def valid?(value)
41
+ !value || allowable_values.include?(value)
42
+ end
43
+ end
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'mode' => :'mode',
49
+ :'project_ids' => :'projectIds'
50
+ }
51
+ end
52
+
53
+ # Returns attribute mapping this model knows about
54
+ def self.acceptable_attribute_map
55
+ attribute_map
56
+ end
57
+
58
+ # Returns all the JSON keys this model knows about
59
+ def self.acceptable_attributes
60
+ acceptable_attribute_map.values
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.openapi_types
65
+ {
66
+ :'mode' => :'String',
67
+ :'project_ids' => :'Array<String>'
68
+ }
69
+ end
70
+
71
+ # List of attributes with nullable: true
72
+ def self.openapi_nullable
73
+ Set.new([
74
+ ])
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ if (!attributes.is_a?(Hash))
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Mencoro::SetMemberProjectAccessRequest` initialize method"
82
+ end
83
+
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ acceptable_attribute_map = self.class.acceptable_attribute_map
86
+ attributes = attributes.each_with_object({}) { |(k, v), h|
87
+ if (!acceptable_attribute_map.key?(k.to_sym))
88
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Mencoro::SetMemberProjectAccessRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
89
+ end
90
+ h[k.to_sym] = v
91
+ }
92
+
93
+ if attributes.key?(:'mode')
94
+ self.mode = attributes[:'mode']
95
+ else
96
+ self.mode = nil
97
+ end
98
+
99
+ if attributes.key?(:'project_ids')
100
+ if (value = attributes[:'project_ids']).is_a?(Array)
101
+ self.project_ids = value
102
+ end
103
+ end
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properties with the reasons
108
+ def list_invalid_properties
109
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
110
+ invalid_properties = Array.new
111
+ if @mode.nil?
112
+ invalid_properties.push('invalid value for "mode", mode cannot be nil.')
113
+ end
114
+
115
+ invalid_properties
116
+ end
117
+
118
+ # Check to see if the all the properties in the model are valid
119
+ # @return true if the model is valid
120
+ def valid?
121
+ warn '[DEPRECATED] the `valid?` method is obsolete'
122
+ return false if @mode.nil?
123
+ mode_validator = EnumAttributeValidator.new('String', ["all", "selected"])
124
+ return false unless mode_validator.valid?(@mode)
125
+ true
126
+ end
127
+
128
+ # Custom attribute writer method checking allowed values (enum).
129
+ # @param [Object] mode Object to be assigned
130
+ def mode=(mode)
131
+ validator = EnumAttributeValidator.new('String', ["all", "selected"])
132
+ unless validator.valid?(mode)
133
+ fail ArgumentError, "invalid value for \"mode\", must be one of #{validator.allowable_values}."
134
+ end
135
+ @mode = mode
136
+ end
137
+
138
+ # Checks equality by comparing each attribute.
139
+ # @param [Object] Object to be compared
140
+ def ==(o)
141
+ return true if self.equal?(o)
142
+ self.class == o.class &&
143
+ mode == o.mode &&
144
+ project_ids == o.project_ids
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [mode, project_ids].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ return nil unless attributes.is_a?(Hash)
164
+ attributes = attributes.transform_keys(&:to_sym)
165
+ transformed_hash = {}
166
+ openapi_types.each_pair do |key, type|
167
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = nil
169
+ elsif type =~ /\AArray<(.*)>/i
170
+ # check to ensure the input is an array given that the attribute
171
+ # is documented as an array but the input is not
172
+ if attributes[attribute_map[key]].is_a?(Array)
173
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
174
+ end
175
+ elsif !attributes[attribute_map[key]].nil?
176
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
177
+ end
178
+ end
179
+ new(transformed_hash)
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ end
199
+
200
+ end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Mencoro API
3
3
 
4
- #Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
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
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: support@mencoro.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Mencoro API
3
3
 
4
- #Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
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
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: support@mencoro.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Mencoro API
3
3
 
4
- #Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
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
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: support@mencoro.com