hubspot-api-client 17.0.0.pre.beta.2 → 17.0.0.pre.beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -1
  3. data/Gemfile.lock +1 -1
  4. data/lib/hubspot/codegen/crm/associations/schema/api/types_api.rb +97 -0
  5. data/lib/hubspot/codegen/crm/associations/schema/api_client.rb +412 -0
  6. data/lib/hubspot/codegen/crm/associations/schema/api_error.rb +63 -0
  7. data/lib/hubspot/codegen/crm/associations/schema/configuration.rb +296 -0
  8. data/lib/hubspot/codegen/crm/associations/schema/models/associated_id.rb +244 -0
  9. data/lib/hubspot/codegen/crm/associations/schema/models/batch_input_public_association.rb +232 -0
  10. data/lib/hubspot/codegen/crm/associations/schema/models/batch_input_public_object_id.rb +232 -0
  11. data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association.rb +328 -0
  12. data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_multi.rb +328 -0
  13. data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_multi_with_errors.rb +348 -0
  14. data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_with_errors.rb +348 -0
  15. data/lib/hubspot/codegen/crm/associations/schema/models/collection_response_public_association_definition_no_paging.rb +232 -0
  16. data/lib/hubspot/codegen/crm/associations/schema/models/error.rb +307 -0
  17. data/lib/hubspot/codegen/crm/associations/schema/models/error_category.rb +278 -0
  18. data/lib/hubspot/codegen/crm/associations/schema/models/error_detail.rb +273 -0
  19. data/lib/hubspot/codegen/crm/associations/schema/models/next_page.rb +239 -0
  20. data/lib/hubspot/codegen/crm/associations/schema/models/paging.rb +234 -0
  21. data/lib/hubspot/codegen/crm/associations/schema/models/previous_page.rb +239 -0
  22. data/lib/hubspot/codegen/crm/associations/schema/models/public_association.rb +258 -0
  23. data/lib/hubspot/codegen/crm/associations/schema/models/public_association_definition.rb +244 -0
  24. data/lib/hubspot/codegen/crm/associations/schema/models/public_association_multi.rb +256 -0
  25. data/lib/hubspot/codegen/crm/associations/schema/models/public_object_id.rb +231 -0
  26. data/lib/hubspot/codegen/crm/associations/schema/models/standard_error.rb +324 -0
  27. data/lib/hubspot/codegen/crm/associations/v4/api/basic_api.rb +365 -0
  28. data/lib/hubspot/codegen/crm/associations/v4/api/batch_api.rb +1 -1
  29. data/lib/hubspot/codegen/crm/associations/v4/api_client.rb +1 -1
  30. data/lib/hubspot/codegen/crm/associations/v4/api_error.rb +1 -1
  31. data/lib/hubspot/codegen/crm/associations/v4/configuration.rb +1 -1
  32. data/lib/hubspot/codegen/crm/associations/v4/models/associated_id.rb +244 -0
  33. data/lib/hubspot/codegen/crm/associations/v4/models/association_spec.rb +1 -1
  34. data/lib/hubspot/codegen/crm/associations/v4/models/association_spec_with_label.rb +1 -1
  35. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_association_multi_archive.rb +1 -1
  36. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_association_multi_post.rb +1 -1
  37. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_default_association_multi_post.rb +1 -1
  38. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_fetch_associations_batch_request.rb +1 -1
  39. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_batch_input.rb +232 -0
  40. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_id.rb +232 -0
  41. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_input_for_create.rb +232 -0
  42. data/lib/hubspot/codegen/crm/associations/v4/models/batch_read_input_simple_public_object_id.rb +273 -0
  43. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_labels_between_object_pair.rb +1 -1
  44. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_labels_between_object_pair_with_errors.rb +1 -1
  45. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_association_multi_with_label.rb +1 -1
  46. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_association_multi_with_label_with_errors.rb +1 -1
  47. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_default_association.rb +1 -1
  48. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_simple_public_object.rb +328 -0
  49. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_simple_public_object_with_errors.rb +348 -0
  50. data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_associated_id.rb +241 -0
  51. data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_association_spec_with_label_no_paging.rb +1 -1
  52. data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_multi_associated_object_with_label_forward_paging.rb +241 -0
  53. data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
  54. data/lib/hubspot/codegen/crm/associations/v4/models/error.rb +1 -1
  55. data/lib/hubspot/codegen/crm/associations/v4/models/error_category.rb +1 -1
  56. data/lib/hubspot/codegen/crm/associations/v4/models/error_detail.rb +1 -1
  57. data/lib/hubspot/codegen/crm/associations/v4/models/forward_paging.rb +225 -0
  58. data/lib/hubspot/codegen/crm/associations/v4/models/labels_between_object_pair.rb +1 -1
  59. data/lib/hubspot/codegen/crm/associations/v4/models/multi_associated_object_with_label.rb +1 -1
  60. data/lib/hubspot/codegen/crm/associations/v4/models/next_page.rb +1 -1
  61. data/lib/hubspot/codegen/crm/associations/v4/models/paging.rb +1 -1
  62. data/lib/hubspot/codegen/crm/associations/v4/models/previous_page.rb +1 -1
  63. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_definition_create_request.rb +1 -1
  64. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_definition_update_request.rb +1 -1
  65. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_archive.rb +1 -1
  66. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_post.rb +1 -1
  67. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_with_label.rb +1 -1
  68. data/lib/hubspot/codegen/crm/associations/v4/models/public_associations_for_object.rb +246 -0
  69. data/lib/hubspot/codegen/crm/associations/v4/models/public_default_association.rb +1 -1
  70. data/lib/hubspot/codegen/crm/associations/v4/models/public_default_association_multi_post.rb +1 -1
  71. data/lib/hubspot/codegen/crm/associations/v4/models/public_fetch_associations_batch_request.rb +1 -1
  72. data/lib/hubspot/codegen/crm/associations/v4/models/public_gdpr_delete_input.rb +239 -0
  73. data/lib/hubspot/codegen/crm/associations/v4/models/public_object_id.rb +1 -1
  74. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object.rb +303 -0
  75. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_batch_input.rb +246 -0
  76. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_id.rb +230 -0
  77. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_input.rb +232 -0
  78. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_input_for_create.rb +248 -0
  79. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_with_associations.rb +314 -0
  80. data/lib/hubspot/codegen/crm/associations/v4/models/standard_error.rb +1 -1
  81. data/lib/hubspot/codegen/crm/associations/v4/models/value_with_timestamp.rb +285 -0
  82. data/lib/hubspot/codegen/crm/associations/v4/schema/api/definitions_api.rb +334 -0
  83. data/lib/hubspot/codegen/crm/associations/v4/schema/api_client.rb +414 -0
  84. data/lib/hubspot/codegen/crm/associations/v4/schema/api_error.rb +65 -0
  85. data/lib/hubspot/codegen/crm/associations/v4/schema/configuration.rb +298 -0
  86. data/lib/hubspot/codegen/crm/associations/v4/schema/models/association_spec.rb +280 -0
  87. data/lib/hubspot/codegen/crm/associations/v4/schema/models/association_spec_with_label.rb +289 -0
  88. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_association_multi_archive.rb +234 -0
  89. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_association_multi_post.rb +234 -0
  90. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_default_association_multi_post.rb +234 -0
  91. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_fetch_associations_batch_request.rb +234 -0
  92. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_labels_between_object_pair.rb +330 -0
  93. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_labels_between_object_pair_with_errors.rb +350 -0
  94. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_association_multi_with_label.rb +330 -0
  95. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_association_multi_with_label_with_errors.rb +350 -0
  96. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_default_association.rb +350 -0
  97. data/lib/hubspot/codegen/crm/associations/v4/schema/models/collection_response_association_spec_with_label_no_paging.rb +234 -0
  98. data/lib/hubspot/codegen/crm/associations/v4/schema/models/error.rb +309 -0
  99. data/lib/hubspot/codegen/crm/associations/v4/schema/models/error_category.rb +280 -0
  100. data/lib/hubspot/codegen/crm/associations/v4/schema/models/error_detail.rb +275 -0
  101. data/lib/hubspot/codegen/crm/associations/v4/schema/models/labels_between_object_pair.rb +290 -0
  102. data/lib/hubspot/codegen/crm/associations/v4/schema/models/multi_associated_object_with_label.rb +248 -0
  103. data/lib/hubspot/codegen/crm/associations/v4/schema/models/next_page.rb +241 -0
  104. data/lib/hubspot/codegen/crm/associations/v4/schema/models/paging.rb +236 -0
  105. data/lib/hubspot/codegen/crm/associations/v4/schema/models/previous_page.rb +241 -0
  106. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_definition_create_request.rb +246 -0
  107. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_definition_update_request.rb +246 -0
  108. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_archive.rb +248 -0
  109. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_post.rb +262 -0
  110. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_with_label.rb +257 -0
  111. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_default_association.rb +260 -0
  112. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_default_association_multi_post.rb +246 -0
  113. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_fetch_associations_batch_request.rb +241 -0
  114. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_object_id.rb +232 -0
  115. data/lib/hubspot/codegen/crm/associations/v4/schema/models/standard_error.rb +326 -0
  116. data/lib/hubspot/codegen/crm/objects/communications/api/basic_api.rb +391 -0
  117. data/lib/hubspot/codegen/crm/objects/communications/api/batch_api.rb +295 -0
  118. data/lib/hubspot/codegen/crm/objects/communications/api/public_object_api.rb +94 -0
  119. data/lib/hubspot/codegen/crm/objects/communications/api/search_api.rb +92 -0
  120. data/lib/hubspot/codegen/crm/objects/communications/api_client.rb +412 -0
  121. data/lib/hubspot/codegen/crm/objects/communications/api_error.rb +63 -0
  122. data/lib/hubspot/codegen/crm/objects/communications/configuration.rb +296 -0
  123. data/lib/hubspot/codegen/crm/objects/communications/models/associated_id.rb +244 -0
  124. data/lib/hubspot/codegen/crm/objects/communications/models/association_spec.rb +278 -0
  125. data/lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_batch_input.rb +232 -0
  126. data/lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_id.rb +232 -0
  127. data/lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_input_for_create.rb +232 -0
  128. data/lib/hubspot/codegen/crm/objects/communications/models/batch_read_input_simple_public_object_id.rb +273 -0
  129. data/lib/hubspot/codegen/crm/objects/communications/models/batch_response_simple_public_object.rb +328 -0
  130. data/lib/hubspot/codegen/crm/objects/communications/models/batch_response_simple_public_object_with_errors.rb +348 -0
  131. data/lib/hubspot/codegen/crm/objects/communications/models/collection_response_associated_id.rb +241 -0
  132. data/lib/hubspot/codegen/crm/objects/communications/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
  133. data/lib/hubspot/codegen/crm/objects/communications/models/collection_response_with_total_simple_public_object_forward_paging.rb +255 -0
  134. data/lib/hubspot/codegen/crm/objects/communications/models/error.rb +307 -0
  135. data/lib/hubspot/codegen/crm/objects/communications/models/error_category.rb +278 -0
  136. data/lib/hubspot/codegen/crm/objects/communications/models/error_detail.rb +273 -0
  137. data/lib/hubspot/codegen/crm/objects/communications/models/filter.rb +308 -0
  138. data/lib/hubspot/codegen/crm/objects/communications/models/filter_group.rb +232 -0
  139. data/lib/hubspot/codegen/crm/objects/communications/models/forward_paging.rb +225 -0
  140. data/lib/hubspot/codegen/crm/objects/communications/models/next_page.rb +239 -0
  141. data/lib/hubspot/codegen/crm/objects/communications/models/paging.rb +234 -0
  142. data/lib/hubspot/codegen/crm/objects/communications/models/previous_page.rb +239 -0
  143. data/lib/hubspot/codegen/crm/objects/communications/models/public_associations_for_object.rb +246 -0
  144. data/lib/hubspot/codegen/crm/objects/communications/models/public_merge_input.rb +244 -0
  145. data/lib/hubspot/codegen/crm/objects/communications/models/public_object_id.rb +230 -0
  146. data/lib/hubspot/codegen/crm/objects/communications/models/public_object_search_request.rb +301 -0
  147. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object.rb +303 -0
  148. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_batch_input.rb +246 -0
  149. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_id.rb +230 -0
  150. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_input.rb +232 -0
  151. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_input_for_create.rb +248 -0
  152. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_with_associations.rb +314 -0
  153. data/lib/hubspot/codegen/crm/objects/communications/models/standard_error.rb +324 -0
  154. data/lib/hubspot/codegen/crm/objects/communications/models/value_with_timestamp.rb +285 -0
  155. data/lib/hubspot/discovery/crm/associations/client.rb +4 -2
  156. data/lib/hubspot/discovery/crm/associations/schema/api/types_api.rb +15 -0
  157. data/lib/hubspot/discovery/crm/associations/schema/client.rb +20 -0
  158. data/lib/hubspot/discovery/crm/associations/v4/api/{definitions_api.rb → basic_api.rb} +1 -1
  159. data/lib/hubspot/discovery/crm/associations/v4/client.rb +6 -1
  160. data/lib/hubspot/discovery/crm/associations/v4/schema/api/definitions_api.rb +17 -0
  161. data/lib/hubspot/discovery/crm/associations/v4/schema/client.rb +22 -0
  162. data/lib/hubspot/discovery/crm/objects/client.rb +1 -0
  163. data/lib/hubspot/discovery/crm/objects/communications/api/basic_api.rb +15 -0
  164. data/lib/hubspot/discovery/crm/objects/communications/api/batch_api.rb +15 -0
  165. data/lib/hubspot/discovery/crm/objects/communications/api/public_object_api.rb +15 -0
  166. data/lib/hubspot/discovery/crm/objects/communications/api/search_api.rb +15 -0
  167. data/lib/hubspot/discovery/crm/objects/communications/client.rb +24 -0
  168. data/lib/hubspot/version.rb +1 -1
  169. data/spec/discovery/crm/associations/client_spec.rb +1 -0
  170. data/spec/discovery/crm/associations/schema/types_api_spec.rb +7 -0
  171. data/spec/discovery/crm/associations/v4/basic_api_spec.rb +10 -0
  172. data/spec/discovery/crm/associations/v4/client_spec.rb +7 -0
  173. data/spec/discovery/crm/associations/v4/{definitions_api_spec.rb → schema/definitions_api_spec.rb} +3 -3
  174. data/spec/discovery/crm/objects/client_spec.rb +1 -0
  175. data/spec/discovery/crm/objects/communications/basic_api_spec.rb +10 -0
  176. data/spec/discovery/crm/objects/communications/batch_api_spec.rb +10 -0
  177. data/spec/discovery/crm/objects/communications/public_object_api_spec.rb +7 -0
  178. data/spec/discovery/crm/objects/communications/search_api_spec.rb +7 -0
  179. metadata +145 -10
  180. data/lib/hubspot/codegen/crm/associations/api/types_api.rb +0 -95
  181. data/lib/hubspot/codegen/crm/associations/v4/api/definitions_api.rb +0 -332
  182. data/lib/hubspot/discovery/crm/associations/api/types_api.rb +0 -13
  183. data/spec/discovery/crm/associations/types_api_spec.rb +0 -7
@@ -0,0 +1,330 @@
1
+ =begin
2
+ #CrmPublicAssociationsServiceV4
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v4
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Hubspot
17
+ module Crm
18
+ module Associations
19
+ module V4
20
+ module Schema
21
+ class BatchResponsePublicAssociationMultiWithLabel
22
+ attr_accessor :status
23
+
24
+ attr_accessor :results
25
+
26
+ attr_accessor :requested_at
27
+
28
+ attr_accessor :started_at
29
+
30
+ attr_accessor :completed_at
31
+
32
+ attr_accessor :links
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.include?(value)
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'status' => :'status',
60
+ :'results' => :'results',
61
+ :'requested_at' => :'requestedAt',
62
+ :'started_at' => :'startedAt',
63
+ :'completed_at' => :'completedAt',
64
+ :'links' => :'links'
65
+ }
66
+ end
67
+
68
+ # Returns all the JSON keys this model knows about
69
+ def self.acceptable_attributes
70
+ attribute_map.values
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.openapi_types
75
+ {
76
+ :'status' => :'String',
77
+ :'results' => :'Array<PublicAssociationMultiWithLabel>',
78
+ :'requested_at' => :'Time',
79
+ :'started_at' => :'Time',
80
+ :'completed_at' => :'Time',
81
+ :'links' => :'Hash<String, String>'
82
+ }
83
+ end
84
+
85
+ # List of attributes with nullable: true
86
+ def self.openapi_nullable
87
+ Set.new([
88
+ ])
89
+ end
90
+
91
+ # Initializes the object
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ def initialize(attributes = {})
94
+ if (!attributes.is_a?(Hash))
95
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Associations::V4::BatchResponsePublicAssociationMultiWithLabel` initialize method"
96
+ end
97
+
98
+ # check to see if the attribute exists and convert string to symbol for hash key
99
+ attributes = attributes.each_with_object({}) { |(k, v), h|
100
+ if (!self.class.attribute_map.key?(k.to_sym))
101
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Associations::V4::BatchResponsePublicAssociationMultiWithLabel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
102
+ end
103
+ h[k.to_sym] = v
104
+ }
105
+
106
+ if attributes.key?(:'status')
107
+ self.status = attributes[:'status']
108
+ end
109
+
110
+ if attributes.key?(:'results')
111
+ if (value = attributes[:'results']).is_a?(Array)
112
+ self.results = value
113
+ end
114
+ end
115
+
116
+ if attributes.key?(:'requested_at')
117
+ self.requested_at = attributes[:'requested_at']
118
+ end
119
+
120
+ if attributes.key?(:'started_at')
121
+ self.started_at = attributes[:'started_at']
122
+ end
123
+
124
+ if attributes.key?(:'completed_at')
125
+ self.completed_at = attributes[:'completed_at']
126
+ end
127
+
128
+ if attributes.key?(:'links')
129
+ if (value = attributes[:'links']).is_a?(Hash)
130
+ self.links = value
131
+ end
132
+ end
133
+ end
134
+
135
+ # Show invalid properties with the reasons. Usually used together with valid?
136
+ # @return Array for valid properties with the reasons
137
+ def list_invalid_properties
138
+ invalid_properties = Array.new
139
+ if @status.nil?
140
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
141
+ end
142
+
143
+ if @results.nil?
144
+ invalid_properties.push('invalid value for "results", results cannot be nil.')
145
+ end
146
+
147
+ if @started_at.nil?
148
+ invalid_properties.push('invalid value for "started_at", started_at cannot be nil.')
149
+ end
150
+
151
+ if @completed_at.nil?
152
+ invalid_properties.push('invalid value for "completed_at", completed_at cannot be nil.')
153
+ end
154
+
155
+ invalid_properties
156
+ end
157
+
158
+ # Check to see if the all the properties in the model are valid
159
+ # @return true if the model is valid
160
+ def valid?
161
+ return false if @status.nil?
162
+ status_validator = EnumAttributeValidator.new('String', ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"])
163
+ return false unless status_validator.valid?(@status)
164
+ return false if @results.nil?
165
+ return false if @started_at.nil?
166
+ return false if @completed_at.nil?
167
+ true
168
+ end
169
+
170
+ # Custom attribute writer method checking allowed values (enum).
171
+ # @param [Object] status Object to be assigned
172
+ def status=(status)
173
+ validator = EnumAttributeValidator.new('String', ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"])
174
+ unless validator.valid?(status)
175
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
176
+ end
177
+ @status = status
178
+ end
179
+
180
+ # Checks equality by comparing each attribute.
181
+ # @param [Object] Object to be compared
182
+ def ==(o)
183
+ return true if self.equal?(o)
184
+ self.class == o.class &&
185
+ status == o.status &&
186
+ results == o.results &&
187
+ requested_at == o.requested_at &&
188
+ started_at == o.started_at &&
189
+ completed_at == o.completed_at &&
190
+ links == o.links
191
+ end
192
+
193
+ # @see the `==` method
194
+ # @param [Object] Object to be compared
195
+ def eql?(o)
196
+ self == o
197
+ end
198
+
199
+ # Calculates hash code according to all attributes.
200
+ # @return [Integer] Hash code
201
+ def hash
202
+ [status, results, requested_at, started_at, completed_at, links].hash
203
+ end
204
+
205
+ # Builds the object from hash
206
+ # @param [Hash] attributes Model attributes in the form of hash
207
+ # @return [Object] Returns the model itself
208
+ def self.build_from_hash(attributes)
209
+ new.build_from_hash(attributes)
210
+ end
211
+
212
+ # Builds the object from hash
213
+ # @param [Hash] attributes Model attributes in the form of hash
214
+ # @return [Object] Returns the model itself
215
+ def build_from_hash(attributes)
216
+ return nil unless attributes.is_a?(Hash)
217
+ attributes = attributes.transform_keys(&:to_sym)
218
+ self.class.openapi_types.each_pair do |key, type|
219
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
220
+ self.send("#{key}=", nil)
221
+ elsif type =~ /\AArray<(.*)>/i
222
+ # check to ensure the input is an array given that the attribute
223
+ # is documented as an array but the input is not
224
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
225
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
226
+ end
227
+ elsif !attributes[self.class.attribute_map[key]].nil?
228
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
229
+ end
230
+ end
231
+
232
+ self
233
+ end
234
+
235
+ # Deserializes the data based on type
236
+ # @param string type Data type
237
+ # @param string value Value to be deserialized
238
+ # @return [Object] Deserialized data
239
+ def _deserialize(type, value)
240
+ case type.to_sym
241
+ when :Time
242
+ Time.parse(value)
243
+ when :Date
244
+ Date.parse(value)
245
+ when :String
246
+ value.to_s
247
+ when :Integer
248
+ value.to_i
249
+ when :Float
250
+ value.to_f
251
+ when :Boolean
252
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
253
+ true
254
+ else
255
+ false
256
+ end
257
+ when :Object
258
+ # generic object (usually a Hash), return directly
259
+ value
260
+ when /\AArray<(?<inner_type>.+)>\z/
261
+ inner_type = Regexp.last_match[:inner_type]
262
+ value.map { |v| _deserialize(inner_type, v) }
263
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
264
+ k_type = Regexp.last_match[:k_type]
265
+ v_type = Regexp.last_match[:v_type]
266
+ {}.tap do |hash|
267
+ value.each do |k, v|
268
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
269
+ end
270
+ end
271
+ else # model
272
+ # models (e.g. Pet) or oneOf
273
+ klass = Hubspot::Crm::Associations::V4.const_get(type)
274
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
275
+ end
276
+ end
277
+
278
+ # Returns the string representation of the object
279
+ # @return [String] String presentation of the object
280
+ def to_s
281
+ to_hash.to_s
282
+ end
283
+
284
+ # to_body is an alias to to_hash (backward compatibility)
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_body
287
+ to_hash
288
+ end
289
+
290
+ # Returns the object in the form of hash
291
+ # @return [Hash] Returns the object in the form of hash
292
+ def to_hash
293
+ hash = {}
294
+ self.class.attribute_map.each_pair do |attr, param|
295
+ value = self.send(attr)
296
+ if value.nil?
297
+ is_nullable = self.class.openapi_nullable.include?(attr)
298
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
299
+ end
300
+
301
+ hash[param] = _to_hash(value)
302
+ end
303
+ hash
304
+ end
305
+
306
+ # Outputs non-array value in the form of hash
307
+ # For object, use to_hash. Otherwise, just return the value
308
+ # @param [Object] value Any valid value
309
+ # @return [Hash] Returns the value in the form of hash
310
+ def _to_hash(value)
311
+ if value.is_a?(Array)
312
+ value.compact.map { |v| _to_hash(v) }
313
+ elsif value.is_a?(Hash)
314
+ {}.tap do |hash|
315
+ value.each { |k, v| hash[k] = _to_hash(v) }
316
+ end
317
+ elsif value.respond_to? :to_hash
318
+ value.to_hash
319
+ else
320
+ value
321
+ end
322
+ end
323
+
324
+ end
325
+
326
+ end
327
+ end
328
+ end
329
+ end
330
+ end
@@ -0,0 +1,350 @@
1
+ =begin
2
+ #CrmPublicAssociationsServiceV4
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v4
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Hubspot
17
+ module Crm
18
+ module Associations
19
+ module V4
20
+ module Schema
21
+ class BatchResponsePublicAssociationMultiWithLabelWithErrors
22
+ attr_accessor :status
23
+
24
+ attr_accessor :results
25
+
26
+ attr_accessor :num_errors
27
+
28
+ attr_accessor :errors
29
+
30
+ attr_accessor :requested_at
31
+
32
+ attr_accessor :started_at
33
+
34
+ attr_accessor :completed_at
35
+
36
+ attr_accessor :links
37
+
38
+ class EnumAttributeValidator
39
+ attr_reader :datatype
40
+ attr_reader :allowable_values
41
+
42
+ def initialize(datatype, allowable_values)
43
+ @allowable_values = allowable_values.map do |value|
44
+ case datatype.to_s
45
+ when /Integer/i
46
+ value.to_i
47
+ when /Float/i
48
+ value.to_f
49
+ else
50
+ value
51
+ end
52
+ end
53
+ end
54
+
55
+ def valid?(value)
56
+ !value || allowable_values.include?(value)
57
+ end
58
+ end
59
+
60
+ # Attribute mapping from ruby-style variable name to JSON key.
61
+ def self.attribute_map
62
+ {
63
+ :'status' => :'status',
64
+ :'results' => :'results',
65
+ :'num_errors' => :'numErrors',
66
+ :'errors' => :'errors',
67
+ :'requested_at' => :'requestedAt',
68
+ :'started_at' => :'startedAt',
69
+ :'completed_at' => :'completedAt',
70
+ :'links' => :'links'
71
+ }
72
+ end
73
+
74
+ # Returns all the JSON keys this model knows about
75
+ def self.acceptable_attributes
76
+ attribute_map.values
77
+ end
78
+
79
+ # Attribute type mapping.
80
+ def self.openapi_types
81
+ {
82
+ :'status' => :'String',
83
+ :'results' => :'Array<PublicAssociationMultiWithLabel>',
84
+ :'num_errors' => :'Integer',
85
+ :'errors' => :'Array<StandardError>',
86
+ :'requested_at' => :'Time',
87
+ :'started_at' => :'Time',
88
+ :'completed_at' => :'Time',
89
+ :'links' => :'Hash<String, String>'
90
+ }
91
+ end
92
+
93
+ # List of attributes with nullable: true
94
+ def self.openapi_nullable
95
+ Set.new([
96
+ ])
97
+ end
98
+
99
+ # Initializes the object
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ def initialize(attributes = {})
102
+ if (!attributes.is_a?(Hash))
103
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Associations::V4::BatchResponsePublicAssociationMultiWithLabelWithErrors` initialize method"
104
+ end
105
+
106
+ # check to see if the attribute exists and convert string to symbol for hash key
107
+ attributes = attributes.each_with_object({}) { |(k, v), h|
108
+ if (!self.class.attribute_map.key?(k.to_sym))
109
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Associations::V4::BatchResponsePublicAssociationMultiWithLabelWithErrors`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
110
+ end
111
+ h[k.to_sym] = v
112
+ }
113
+
114
+ if attributes.key?(:'status')
115
+ self.status = attributes[:'status']
116
+ end
117
+
118
+ if attributes.key?(:'results')
119
+ if (value = attributes[:'results']).is_a?(Array)
120
+ self.results = value
121
+ end
122
+ end
123
+
124
+ if attributes.key?(:'num_errors')
125
+ self.num_errors = attributes[:'num_errors']
126
+ end
127
+
128
+ if attributes.key?(:'errors')
129
+ if (value = attributes[:'errors']).is_a?(Array)
130
+ self.errors = value
131
+ end
132
+ end
133
+
134
+ if attributes.key?(:'requested_at')
135
+ self.requested_at = attributes[:'requested_at']
136
+ end
137
+
138
+ if attributes.key?(:'started_at')
139
+ self.started_at = attributes[:'started_at']
140
+ end
141
+
142
+ if attributes.key?(:'completed_at')
143
+ self.completed_at = attributes[:'completed_at']
144
+ end
145
+
146
+ if attributes.key?(:'links')
147
+ if (value = attributes[:'links']).is_a?(Hash)
148
+ self.links = value
149
+ end
150
+ end
151
+ end
152
+
153
+ # Show invalid properties with the reasons. Usually used together with valid?
154
+ # @return Array for valid properties with the reasons
155
+ def list_invalid_properties
156
+ invalid_properties = Array.new
157
+ if @status.nil?
158
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
159
+ end
160
+
161
+ if @results.nil?
162
+ invalid_properties.push('invalid value for "results", results cannot be nil.')
163
+ end
164
+
165
+ if @started_at.nil?
166
+ invalid_properties.push('invalid value for "started_at", started_at cannot be nil.')
167
+ end
168
+
169
+ if @completed_at.nil?
170
+ invalid_properties.push('invalid value for "completed_at", completed_at cannot be nil.')
171
+ end
172
+
173
+ invalid_properties
174
+ end
175
+
176
+ # Check to see if the all the properties in the model are valid
177
+ # @return true if the model is valid
178
+ def valid?
179
+ return false if @status.nil?
180
+ status_validator = EnumAttributeValidator.new('String', ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"])
181
+ return false unless status_validator.valid?(@status)
182
+ return false if @results.nil?
183
+ return false if @started_at.nil?
184
+ return false if @completed_at.nil?
185
+ true
186
+ end
187
+
188
+ # Custom attribute writer method checking allowed values (enum).
189
+ # @param [Object] status Object to be assigned
190
+ def status=(status)
191
+ validator = EnumAttributeValidator.new('String', ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"])
192
+ unless validator.valid?(status)
193
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
194
+ end
195
+ @status = status
196
+ end
197
+
198
+ # Checks equality by comparing each attribute.
199
+ # @param [Object] Object to be compared
200
+ def ==(o)
201
+ return true if self.equal?(o)
202
+ self.class == o.class &&
203
+ status == o.status &&
204
+ results == o.results &&
205
+ num_errors == o.num_errors &&
206
+ errors == o.errors &&
207
+ requested_at == o.requested_at &&
208
+ started_at == o.started_at &&
209
+ completed_at == o.completed_at &&
210
+ links == o.links
211
+ end
212
+
213
+ # @see the `==` method
214
+ # @param [Object] Object to be compared
215
+ def eql?(o)
216
+ self == o
217
+ end
218
+
219
+ # Calculates hash code according to all attributes.
220
+ # @return [Integer] Hash code
221
+ def hash
222
+ [status, results, num_errors, errors, requested_at, started_at, completed_at, links].hash
223
+ end
224
+
225
+ # Builds the object from hash
226
+ # @param [Hash] attributes Model attributes in the form of hash
227
+ # @return [Object] Returns the model itself
228
+ def self.build_from_hash(attributes)
229
+ new.build_from_hash(attributes)
230
+ end
231
+
232
+ # Builds the object from hash
233
+ # @param [Hash] attributes Model attributes in the form of hash
234
+ # @return [Object] Returns the model itself
235
+ def build_from_hash(attributes)
236
+ return nil unless attributes.is_a?(Hash)
237
+ attributes = attributes.transform_keys(&:to_sym)
238
+ self.class.openapi_types.each_pair do |key, type|
239
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
240
+ self.send("#{key}=", nil)
241
+ elsif type =~ /\AArray<(.*)>/i
242
+ # check to ensure the input is an array given that the attribute
243
+ # is documented as an array but the input is not
244
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
245
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
246
+ end
247
+ elsif !attributes[self.class.attribute_map[key]].nil?
248
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
249
+ end
250
+ end
251
+
252
+ self
253
+ end
254
+
255
+ # Deserializes the data based on type
256
+ # @param string type Data type
257
+ # @param string value Value to be deserialized
258
+ # @return [Object] Deserialized data
259
+ def _deserialize(type, value)
260
+ case type.to_sym
261
+ when :Time
262
+ Time.parse(value)
263
+ when :Date
264
+ Date.parse(value)
265
+ when :String
266
+ value.to_s
267
+ when :Integer
268
+ value.to_i
269
+ when :Float
270
+ value.to_f
271
+ when :Boolean
272
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
273
+ true
274
+ else
275
+ false
276
+ end
277
+ when :Object
278
+ # generic object (usually a Hash), return directly
279
+ value
280
+ when /\AArray<(?<inner_type>.+)>\z/
281
+ inner_type = Regexp.last_match[:inner_type]
282
+ value.map { |v| _deserialize(inner_type, v) }
283
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
284
+ k_type = Regexp.last_match[:k_type]
285
+ v_type = Regexp.last_match[:v_type]
286
+ {}.tap do |hash|
287
+ value.each do |k, v|
288
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
289
+ end
290
+ end
291
+ else # model
292
+ # models (e.g. Pet) or oneOf
293
+ klass = Hubspot::Crm::Associations::V4.const_get(type)
294
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
295
+ end
296
+ end
297
+
298
+ # Returns the string representation of the object
299
+ # @return [String] String presentation of the object
300
+ def to_s
301
+ to_hash.to_s
302
+ end
303
+
304
+ # to_body is an alias to to_hash (backward compatibility)
305
+ # @return [Hash] Returns the object in the form of hash
306
+ def to_body
307
+ to_hash
308
+ end
309
+
310
+ # Returns the object in the form of hash
311
+ # @return [Hash] Returns the object in the form of hash
312
+ def to_hash
313
+ hash = {}
314
+ self.class.attribute_map.each_pair do |attr, param|
315
+ value = self.send(attr)
316
+ if value.nil?
317
+ is_nullable = self.class.openapi_nullable.include?(attr)
318
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
319
+ end
320
+
321
+ hash[param] = _to_hash(value)
322
+ end
323
+ hash
324
+ end
325
+
326
+ # Outputs non-array value in the form of hash
327
+ # For object, use to_hash. Otherwise, just return the value
328
+ # @param [Object] value Any valid value
329
+ # @return [Hash] Returns the value in the form of hash
330
+ def _to_hash(value)
331
+ if value.is_a?(Array)
332
+ value.compact.map { |v| _to_hash(v) }
333
+ elsif value.is_a?(Hash)
334
+ {}.tap do |hash|
335
+ value.each { |k, v| hash[k] = _to_hash(v) }
336
+ end
337
+ elsif value.respond_to? :to_hash
338
+ value.to_hash
339
+ else
340
+ value
341
+ end
342
+ end
343
+
344
+ end
345
+
346
+ end
347
+ end
348
+ end
349
+ end
350
+ end