lockally 0.3.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f24bc219e41f5e39e6fbf2261fee36481a275ac3d39c18d2658056eaa7234a48
4
- data.tar.gz: f327cd437bc456bf649b946c55dd381baf6124ca3d31ba7e92379493dce35c11
3
+ metadata.gz: 3095a5e6f5c8257afb5ba49d4a692fbf4e5bed572e6b841b8231a0be60868f48
4
+ data.tar.gz: 13e3f26e3281db298bfb641378730aec7eb42edf880ca3d3f9ca2eb29f20d529
5
5
  SHA512:
6
- metadata.gz: 92962203eb034a4791390d2574e876b153ae7780af001373002feb2273b2a868220c271b2ccb6b4fbb6af9b0085b78316a6148682841553a7b0a3a2dbd0dd401
7
- data.tar.gz: 28fbc4bcc8b4db43c325954c29161e4514a6aad4af1d9761d36538f4e06451e1212eb78758dce42c65ea72aba05a98a2a573696c9a8dc5af75a43e6ab4e1bc55
6
+ metadata.gz: 073a3603ffc0d7c4ce9113c4161ade6eb059c036f20e13bb1f9a4b2163e5881f44e10639943eee2a749b793003531c5601a832d394be0d3a0069a763a8264205
7
+ data.tar.gz: 2f1f55e2304ff060f34d9b037728ccec12d31946101eded533880b63d4837083a9ac5e86ee382b9f181a3dadf5157528d22cb418a3a92cff89f6865d1fcb07f8
data/README.md CHANGED
@@ -35,7 +35,7 @@ Insufficient scope returns `403` with the required scope name in `detail`.
35
35
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
36
36
 
37
37
  - API version: 0.1.0
38
- - Package version: 0.3.0
38
+ - Package version: 0.3.1
39
39
  - Generator version: 7.23.0
40
40
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
41
41
 
@@ -52,16 +52,16 @@ gem build lockally.gemspec
52
52
  Then either install the gem locally:
53
53
 
54
54
  ```shell
55
- gem install ./lockally-0.3.0.gem
55
+ gem install ./lockally-0.3.1.gem
56
56
  ```
57
57
 
58
- (for development, run `gem install --dev ./lockally-0.3.0.gem` to install the development dependencies)
58
+ (for development, run `gem install --dev ./lockally-0.3.1.gem` to install the development dependencies)
59
59
 
60
60
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
61
61
 
62
62
  Finally add this to the Gemfile:
63
63
 
64
- gem 'lockally', '~> 0.3.0'
64
+ gem 'lockally', '~> 0.3.1'
65
65
 
66
66
  ### Install from Git
67
67
 
@@ -316,6 +316,8 @@ Class | Method | HTTP request | Description
316
316
  - [Lockally::AgentSendResult](docs/AgentSendResult.md)
317
317
  - [Lockally::AiConfig](docs/AiConfig.md)
318
318
  - [Lockally::AiConfigUpdate](docs/AiConfigUpdate.md)
319
+ - [Lockally::Annotations](docs/Annotations.md)
320
+ - [Lockally::Attachment](docs/Attachment.md)
319
321
  - [Lockally::AuditEvent](docs/AuditEvent.md)
320
322
  - [Lockally::BatchLookupPublicKeys200Response](docs/BatchLookupPublicKeys200Response.md)
321
323
  - [Lockally::BatchLookupPublicKeys200ResponseDataInner](docs/BatchLookupPublicKeys200ResponseDataInner.md)
@@ -326,6 +328,7 @@ Class | Method | HTTP request | Description
326
328
  - [Lockally::CalendarIntegration](docs/CalendarIntegration.md)
327
329
  - [Lockally::CalendarMember](docs/CalendarMember.md)
328
330
  - [Lockally::CalendarPolicies](docs/CalendarPolicies.md)
331
+ - [Lockally::Classification](docs/Classification.md)
329
332
  - [Lockally::Contact](docs/Contact.md)
330
333
  - [Lockally::ContactList](docs/ContactList.md)
331
334
  - [Lockally::ContactLookup](docs/ContactLookup.md)
@@ -406,6 +409,7 @@ Class | Method | HTTP request | Description
406
409
  - [Lockally::HealthCheck200Response](docs/HealthCheck200Response.md)
407
410
  - [Lockally::Inbox](docs/Inbox.md)
408
411
  - [Lockally::InboxList](docs/InboxList.md)
412
+ - [Lockally::InjectionRisk](docs/InjectionRisk.md)
409
413
  - [Lockally::InviteAdminRequest](docs/InviteAdminRequest.md)
410
414
  - [Lockally::ListAddOns200Response](docs/ListAddOns200Response.md)
411
415
  - [Lockally::ListAdmins200Response](docs/ListAdmins200Response.md)
@@ -454,6 +458,7 @@ Class | Method | HTTP request | Description
454
458
  - [Lockally::MigrationSettings](docs/MigrationSettings.md)
455
459
  - [Lockally::ModelAlias](docs/ModelAlias.md)
456
460
  - [Lockally::PlanCatalogEntry](docs/PlanCatalogEntry.md)
461
+ - [Lockally::PolicyFlags](docs/PolicyFlags.md)
457
462
  - [Lockally::Problem](docs/Problem.md)
458
463
  - [Lockally::ReplaceDistributionListMembers200Response](docs/ReplaceDistributionListMembers200Response.md)
459
464
  - [Lockally::ReplaceDistributionListMembersRequest](docs/ReplaceDistributionListMembersRequest.md)
@@ -0,0 +1,22 @@
1
+ # Lockally::Annotations
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **attachment_types** | **Array<String>** | | [optional] |
8
+ | **meeting_request** | **Boolean** | | [optional] |
9
+ | **injection_risk** | [**InjectionRisk**](InjectionRisk.md) | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'lockally'
15
+
16
+ instance = Lockally::Annotations.new(
17
+ attachment_types: null,
18
+ meeting_request: null,
19
+ injection_risk: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,26 @@
1
+ # Lockally::Attachment
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | | [optional] |
8
+ | **type** | **String** | MIME type. | [optional] |
9
+ | **size** | **Integer** | Bytes. | [optional] |
10
+ | **blob_id** | **String** | | [optional] |
11
+ | **part_id** | **String** | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'lockally'
17
+
18
+ instance = Lockally::Attachment.new(
19
+ name: null,
20
+ type: null,
21
+ size: null,
22
+ blob_id: null,
23
+ part_id: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,24 @@
1
+ # Lockally::Classification
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **intent** | **String** | For example support_request, sales_lead, billing, spam. | [optional] |
8
+ | **urgency** | **String** | | [optional] |
9
+ | **summary** | **String** | One line. | [optional] |
10
+ | **suggested_action** | **String** | One line. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'lockally'
16
+
17
+ instance = Lockally::Classification.new(
18
+ intent: null,
19
+ urgency: null,
20
+ summary: null,
21
+ suggested_action: null
22
+ )
23
+ ```
24
+
data/docs/Draft.md CHANGED
@@ -13,7 +13,7 @@
13
13
  | **subject** | **String** | | [optional] |
14
14
  | **body_text** | **String** | | [optional] |
15
15
  | **status** | **String** | | |
16
- | **policy_flags** | **Hash<String, Object>** | | |
16
+ | **policy_flags** | [**PolicyFlags**](PolicyFlags.md) | | |
17
17
  | **reviewed_at** | **Time** | | [optional] |
18
18
  | **sent_message_id** | **String** | | [optional] |
19
19
  | **created_at** | **Time** | | |
data/docs/DraftResult.md CHANGED
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **draft_id** | **String** | | |
8
8
  | **status** | **String** | | |
9
- | **policy_flags** | **Hash<String, Object>** | | |
9
+ | **policy_flags** | [**PolicyFlags**](PolicyFlags.md) | | |
10
10
  | **thread_id** | **String** | | [optional] |
11
11
  | **sent** | [**AgentSendResult**](AgentSendResult.md) | | [optional] |
12
12
 
@@ -0,0 +1,20 @@
1
+ # Lockally::InjectionRisk
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **flagged** | **Boolean** | | [optional] |
8
+ | **signals** | **Array<String>** | The phrases that tripped the check. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'lockally'
14
+
15
+ instance = Lockally::InjectionRisk.new(
16
+ flagged: null,
17
+ signals: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,28 @@
1
+ # Lockally::PolicyFlags
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **always_approve** | **Boolean** | | [optional] |
8
+ | **injection_risk** | **Boolean** | | [optional] |
9
+ | **new_recipient** | **Array<String>** | | [optional] |
10
+ | **new_thread** | **Boolean** | | [optional] |
11
+ | **pii** | **Array<String>** | | [optional] |
12
+ | **recipient_count** | **Integer** | | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'lockally'
18
+
19
+ instance = Lockally::PolicyFlags.new(
20
+ always_approve: null,
21
+ injection_risk: null,
22
+ new_recipient: null,
23
+ new_thread: null,
24
+ pii: null,
25
+ recipient_count: null
26
+ )
27
+ ```
28
+
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **thread_id** | **String** | | [optional] |
8
8
  | **message_id** | **String** | | [optional] |
9
- | **annotations** | **Hash<String, Object>** | | [optional] |
9
+ | **annotations** | [**Annotations**](Annotations.md) | | [optional] |
10
10
 
11
11
  ## Example
12
12
 
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **thread_id** | **String** | | |
8
8
  | **cached** | **Boolean** | True when a previous classification was reused. | [optional] |
9
- | **classification** | **Hash<String, Object>** | Intent | [optional] |
9
+ | **classification** | [**Classification**](Classification.md) | | [optional] |
10
10
 
11
11
  ## Example
12
12
 
@@ -13,8 +13,8 @@
13
13
  | **to** | **Array<String>** | | |
14
14
  | **snippet** | **String** | | [optional] |
15
15
  | **has_attachments** | **Boolean** | | |
16
- | **attachments** | **Array<Hash<String, Object>>** | | [optional] |
17
- | **annotations** | **Hash<String, Object>** | Signals computed at ingest | [optional] |
16
+ | **attachments** | [**Array<Attachment>**](Attachment.md) | | [optional] |
17
+ | **annotations** | [**Annotations**](Annotations.md) | | [optional] |
18
18
  | **received_at** | **Time** | | |
19
19
 
20
20
  ## Example
@@ -13,8 +13,8 @@
13
13
  | **to** | **Array<String>** | | |
14
14
  | **snippet** | **String** | | [optional] |
15
15
  | **has_attachments** | **Boolean** | | |
16
- | **attachments** | **Array<Hash<String, Object>>** | | [optional] |
17
- | **annotations** | **Hash<String, Object>** | Signals computed at ingest | [optional] |
16
+ | **attachments** | [**Array<Attachment>**](Attachment.md) | | [optional] |
17
+ | **annotations** | [**Annotations**](Annotations.md) | | [optional] |
18
18
  | **received_at** | **Time** | | |
19
19
  | **body** | [**ThreadMessageBodyAllOfBody**](ThreadMessageBodyAllOfBody.md) | | [optional] |
20
20
 
@@ -0,0 +1,168 @@
1
+ =begin
2
+ #lockally control plane
3
+
4
+ #The lockally control plane lets integrators and direct customers manage everything except actual mail data flow (which uses standard JMAP / IMAP / SMTP-submission against the data plane endpoints). **Authentication.** All `/v1/*` endpoints require a Bearer API key in the `Authorization` header. Keys are formatted `lk_live_<8-char-prefix>_<32-char-secret>`, or `lk_test_<...>` for a test key. Create keys in the dashboard, or with `POST /v1/api-keys` using a key that holds `tenant:admin`. The key's plan is checked on every request, so a key stops working if the account moves to a plan without API access, and works again if it moves back. **Errors.** Failures return [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) `application/problem+json` documents. **Scopes.** Each endpoint requires a specific scope on the presented key. Insufficient scope returns `403` with the required scope name in `detail`.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+ Contact: support@lockally.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Lockally
17
+ # Signals computed at ingest, before an agent sees the message. A key is absent when its check did not fire.
18
+ class Annotations < ApiModelBase
19
+ attr_accessor :attachment_types
20
+
21
+ attr_accessor :meeting_request
22
+
23
+ attr_accessor :injection_risk
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'attachment_types' => :'attachment_types',
29
+ :'meeting_request' => :'meeting_request',
30
+ :'injection_risk' => :'injection_risk'
31
+ }
32
+ end
33
+
34
+ # Returns attribute mapping this model knows about
35
+ def self.acceptable_attribute_map
36
+ attribute_map
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ acceptable_attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'attachment_types' => :'Array<String>',
48
+ :'meeting_request' => :'Boolean',
49
+ :'injection_risk' => :'InjectionRisk'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::Annotations` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ acceptable_attribute_map = self.class.acceptable_attribute_map
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!acceptable_attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::Annotations`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'attachment_types')
76
+ if (value = attributes[:'attachment_types']).is_a?(Array)
77
+ self.attachment_types = value
78
+ end
79
+ end
80
+
81
+ if attributes.key?(:'meeting_request')
82
+ self.meeting_request = attributes[:'meeting_request']
83
+ end
84
+
85
+ if attributes.key?(:'injection_risk')
86
+ self.injection_risk = attributes[:'injection_risk']
87
+ end
88
+ end
89
+
90
+ # Show invalid properties with the reasons. Usually used together with valid?
91
+ # @return Array for valid properties with the reasons
92
+ def list_invalid_properties
93
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
+ invalid_properties = Array.new
95
+ invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ warn '[DEPRECATED] the `valid?` method is obsolete'
102
+ true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ attachment_types == o.attachment_types &&
111
+ meeting_request == o.meeting_request &&
112
+ injection_risk == o.injection_risk
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Integer] Hash code
123
+ def hash
124
+ [attachment_types, meeting_request, injection_risk].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def self.build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ attributes = attributes.transform_keys(&:to_sym)
133
+ transformed_hash = {}
134
+ openapi_types.each_pair do |key, type|
135
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = nil
137
+ elsif type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[attribute_map[key]].is_a?(Array)
141
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
+ end
143
+ elsif !attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
+ end
146
+ end
147
+ new(transformed_hash)
148
+ end
149
+
150
+ # Returns the object in the form of hash
151
+ # @return [Hash] Returns the object in the form of hash
152
+ def to_hash
153
+ hash = {}
154
+ self.class.attribute_map.each_pair do |attr, param|
155
+ value = self.send(attr)
156
+ if value.nil?
157
+ is_nullable = self.class.openapi_nullable.include?(attr)
158
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
159
+ end
160
+
161
+ hash[param] = _to_hash(value)
162
+ end
163
+ hash
164
+ end
165
+
166
+ end
167
+
168
+ end
@@ -0,0 +1,185 @@
1
+ =begin
2
+ #lockally control plane
3
+
4
+ #The lockally control plane lets integrators and direct customers manage everything except actual mail data flow (which uses standard JMAP / IMAP / SMTP-submission against the data plane endpoints). **Authentication.** All `/v1/*` endpoints require a Bearer API key in the `Authorization` header. Keys are formatted `lk_live_<8-char-prefix>_<32-char-secret>`, or `lk_test_<...>` for a test key. Create keys in the dashboard, or with `POST /v1/api-keys` using a key that holds `tenant:admin`. The key's plan is checked on every request, so a key stops working if the account moves to a plan without API access, and works again if it moves back. **Errors.** Failures return [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) `application/problem+json` documents. **Scopes.** Each endpoint requires a specific scope on the presented key. Insufficient scope returns `403` with the required scope name in `detail`.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+ Contact: support@lockally.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Lockally
17
+ class Attachment < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ # MIME type.
21
+ attr_accessor :type
22
+
23
+ # Bytes.
24
+ attr_accessor :size
25
+
26
+ attr_accessor :blob_id
27
+
28
+ attr_accessor :part_id
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'name' => :'name',
34
+ :'type' => :'type',
35
+ :'size' => :'size',
36
+ :'blob_id' => :'blobId',
37
+ :'part_id' => :'partId'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'name' => :'String',
55
+ :'type' => :'String',
56
+ :'size' => :'Integer',
57
+ :'blob_id' => :'String',
58
+ :'part_id' => :'String'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ def self.openapi_nullable
64
+ Set.new([
65
+ ])
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ if (!attributes.is_a?(Hash))
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::Attachment` initialize method"
73
+ end
74
+
75
+ # check to see if the attribute exists and convert string to symbol for hash key
76
+ acceptable_attribute_map = self.class.acceptable_attribute_map
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if (!acceptable_attribute_map.key?(k.to_sym))
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::Attachment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
80
+ end
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:'name')
85
+ self.name = attributes[:'name']
86
+ end
87
+
88
+ if attributes.key?(:'type')
89
+ self.type = attributes[:'type']
90
+ end
91
+
92
+ if attributes.key?(:'size')
93
+ self.size = attributes[:'size']
94
+ end
95
+
96
+ if attributes.key?(:'blob_id')
97
+ self.blob_id = attributes[:'blob_id']
98
+ end
99
+
100
+ if attributes.key?(:'part_id')
101
+ self.part_id = attributes[:'part_id']
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
117
+ true
118
+ end
119
+
120
+ # Checks equality by comparing each attribute.
121
+ # @param [Object] Object to be compared
122
+ def ==(o)
123
+ return true if self.equal?(o)
124
+ self.class == o.class &&
125
+ name == o.name &&
126
+ type == o.type &&
127
+ size == o.size &&
128
+ blob_id == o.blob_id &&
129
+ part_id == o.part_id
130
+ end
131
+
132
+ # @see the `==` method
133
+ # @param [Object] Object to be compared
134
+ def eql?(o)
135
+ self == o
136
+ end
137
+
138
+ # Calculates hash code according to all attributes.
139
+ # @return [Integer] Hash code
140
+ def hash
141
+ [name, type, size, blob_id, part_id].hash
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def self.build_from_hash(attributes)
148
+ return nil unless attributes.is_a?(Hash)
149
+ attributes = attributes.transform_keys(&:to_sym)
150
+ transformed_hash = {}
151
+ openapi_types.each_pair do |key, type|
152
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
153
+ transformed_hash["#{key}"] = nil
154
+ elsif type =~ /\AArray<(.*)>/i
155
+ # check to ensure the input is an array given that the attribute
156
+ # is documented as an array but the input is not
157
+ if attributes[attribute_map[key]].is_a?(Array)
158
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
159
+ end
160
+ elsif !attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
162
+ end
163
+ end
164
+ new(transformed_hash)
165
+ end
166
+
167
+ # Returns the object in the form of hash
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_hash
170
+ hash = {}
171
+ self.class.attribute_map.each_pair do |attr, param|
172
+ value = self.send(attr)
173
+ if value.nil?
174
+ is_nullable = self.class.openapi_nullable.include?(attr)
175
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
176
+ end
177
+
178
+ hash[param] = _to_hash(value)
179
+ end
180
+ hash
181
+ end
182
+
183
+ end
184
+
185
+ end