emailguard_sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +169 -0
- data/Rakefile +10 -0
- data/docs/BaseResponse.md +20 -0
- data/docs/BillingApi.md +85 -0
- data/docs/BillingUsageEvent.md +26 -0
- data/docs/BillingUsageItem.md +28 -0
- data/docs/BillingUsageResponse.md +22 -0
- data/docs/ChannelsApi.md +366 -0
- data/docs/CreateNotificationChannelInput.md +22 -0
- data/docs/CreateNotificationRuleInput.md +28 -0
- data/docs/EmailApi.md +72 -0
- data/docs/EmailDetectData.md +44 -0
- data/docs/EmailDetectResponse.md +22 -0
- data/docs/EventsApi.md +76 -0
- data/docs/GetNotificationChannelResponse.md +22 -0
- data/docs/GetNotificationChannelsResponse.md +22 -0
- data/docs/GetNotificationEventsResponse.md +22 -0
- data/docs/GetNotificationRulesResponse.md +22 -0
- data/docs/GetPublicTeamResponse.md +22 -0
- data/docs/IdDataResponse.md +22 -0
- data/docs/IdDataStruct.md +18 -0
- data/docs/InviteTeamMemberInput.md +20 -0
- data/docs/InvitesApi.md +220 -0
- data/docs/ListPublicTeamInvitesResponse.md +22 -0
- data/docs/ListPublicTeamMembersResponse.md +22 -0
- data/docs/MembersApi.md +222 -0
- data/docs/MessageResponse.md +20 -0
- data/docs/NotificationChannelResponse.md +28 -0
- data/docs/NotificationRuleChannelInput.md +22 -0
- data/docs/NotificationRuleChannelResponse.md +28 -0
- data/docs/NotificationRuleResponse.md +32 -0
- data/docs/PublicTeamInviteResponse.md +24 -0
- data/docs/PublicTeamMemberResponse.md +34 -0
- data/docs/PublicTeamResponse.md +28 -0
- data/docs/RulesApi.md +294 -0
- data/docs/TeamsApi.md +148 -0
- data/docs/UpdateNotificationChannelInput.md +20 -0
- data/docs/UpdateNotificationRuleInput.md +28 -0
- data/docs/UpdateTeamInput.md +24 -0
- data/docs/UpdateTeamMemberInput.md +22 -0
- data/emailguard_sdk.gemspec +39 -0
- data/git_push.sh +57 -0
- data/lib/emailguard_sdk/api/billing_api.rb +92 -0
- data/lib/emailguard_sdk/api/channels_api.rb +347 -0
- data/lib/emailguard_sdk/api/email_api.rb +86 -0
- data/lib/emailguard_sdk/api/events_api.rb +79 -0
- data/lib/emailguard_sdk/api/invites_api.rb +210 -0
- data/lib/emailguard_sdk/api/members_api.rb +216 -0
- data/lib/emailguard_sdk/api/rules_api.rb +284 -0
- data/lib/emailguard_sdk/api/teams_api.rb +147 -0
- data/lib/emailguard_sdk/api_client.rb +397 -0
- data/lib/emailguard_sdk/api_error.rb +58 -0
- data/lib/emailguard_sdk/api_model_base.rb +88 -0
- data/lib/emailguard_sdk/configuration.rb +322 -0
- data/lib/emailguard_sdk/models/base_response.rb +175 -0
- data/lib/emailguard_sdk/models/billing_usage_event.rb +268 -0
- data/lib/emailguard_sdk/models/billing_usage_item.rb +262 -0
- data/lib/emailguard_sdk/models/billing_usage_response.rb +186 -0
- data/lib/emailguard_sdk/models/create_notification_channel_input.rb +204 -0
- data/lib/emailguard_sdk/models/create_notification_rule_input.rb +264 -0
- data/lib/emailguard_sdk/models/email_detect_data.rb +266 -0
- data/lib/emailguard_sdk/models/email_detect_response.rb +184 -0
- data/lib/emailguard_sdk/models/get_notification_channel_response.rb +184 -0
- data/lib/emailguard_sdk/models/get_notification_channels_response.rb +186 -0
- data/lib/emailguard_sdk/models/get_notification_events_response.rb +186 -0
- data/lib/emailguard_sdk/models/get_notification_rules_response.rb +186 -0
- data/lib/emailguard_sdk/models/get_public_team_response.rb +184 -0
- data/lib/emailguard_sdk/models/id_data_response.rb +184 -0
- data/lib/emailguard_sdk/models/id_data_struct.rb +148 -0
- data/lib/emailguard_sdk/models/invite_team_member_input.rb +192 -0
- data/lib/emailguard_sdk/models/list_public_team_invites_response.rb +186 -0
- data/lib/emailguard_sdk/models/list_public_team_members_response.rb +186 -0
- data/lib/emailguard_sdk/models/message_response.rb +175 -0
- data/lib/emailguard_sdk/models/notification_channel_response.rb +200 -0
- data/lib/emailguard_sdk/models/notification_rule_channel_input.rb +168 -0
- data/lib/emailguard_sdk/models/notification_rule_channel_response.rb +198 -0
- data/lib/emailguard_sdk/models/notification_rule_response.rb +224 -0
- data/lib/emailguard_sdk/models/public_team_invite_response.rb +246 -0
- data/lib/emailguard_sdk/models/public_team_member_response.rb +347 -0
- data/lib/emailguard_sdk/models/public_team_response.rb +198 -0
- data/lib/emailguard_sdk/models/update_notification_channel_input.rb +160 -0
- data/lib/emailguard_sdk/models/update_notification_rule_input.rb +204 -0
- data/lib/emailguard_sdk/models/update_team_input.rb +195 -0
- data/lib/emailguard_sdk/models/update_team_member_input.rb +185 -0
- data/lib/emailguard_sdk/version.rb +15 -0
- data/lib/emailguard_sdk.rb +78 -0
- data/spec/api/billing_api_spec.rb +49 -0
- data/spec/api/channels_api_spec.rb +95 -0
- data/spec/api/email_api_spec.rb +47 -0
- data/spec/api/events_api_spec.rb +46 -0
- data/spec/api/invites_api_spec.rb +70 -0
- data/spec/api/members_api_spec.rb +71 -0
- data/spec/api/rules_api_spec.rb +83 -0
- data/spec/api/teams_api_spec.rb +58 -0
- data/spec/models/base_response_spec.rb +42 -0
- data/spec/models/billing_usage_event_spec.rb +60 -0
- data/spec/models/billing_usage_item_spec.rb +66 -0
- data/spec/models/billing_usage_response_spec.rb +48 -0
- data/spec/models/create_notification_channel_input_spec.rb +48 -0
- data/spec/models/create_notification_rule_input_spec.rb +66 -0
- data/spec/models/email_detect_data_spec.rb +114 -0
- data/spec/models/email_detect_response_spec.rb +48 -0
- data/spec/models/get_notification_channel_response_spec.rb +48 -0
- data/spec/models/get_notification_channels_response_spec.rb +48 -0
- data/spec/models/get_notification_events_response_spec.rb +48 -0
- data/spec/models/get_notification_rules_response_spec.rb +48 -0
- data/spec/models/get_public_team_response_spec.rb +48 -0
- data/spec/models/id_data_response_spec.rb +48 -0
- data/spec/models/id_data_struct_spec.rb +36 -0
- data/spec/models/invite_team_member_input_spec.rb +42 -0
- data/spec/models/list_public_team_invites_response_spec.rb +48 -0
- data/spec/models/list_public_team_members_response_spec.rb +48 -0
- data/spec/models/message_response_spec.rb +42 -0
- data/spec/models/notification_channel_response_spec.rb +66 -0
- data/spec/models/notification_rule_channel_input_spec.rb +48 -0
- data/spec/models/notification_rule_channel_response_spec.rb +66 -0
- data/spec/models/notification_rule_response_spec.rb +78 -0
- data/spec/models/public_team_invite_response_spec.rb +54 -0
- data/spec/models/public_team_member_response_spec.rb +84 -0
- data/spec/models/public_team_response_spec.rb +66 -0
- data/spec/models/update_notification_channel_input_spec.rb +42 -0
- data/spec/models/update_notification_rule_input_spec.rb +66 -0
- data/spec/models/update_team_input_spec.rb +54 -0
- data/spec/models/update_team_member_input_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- metadata +251 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#EmailGuard Public API
|
|
3
|
+
|
|
4
|
+
#Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: dev@emailguard.co
|
|
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 Emailguard
|
|
17
|
+
class PublicTeamMemberResponse < ApiModelBase
|
|
18
|
+
# When the member joined the team (RFC3339).
|
|
19
|
+
attr_accessor :created_at
|
|
20
|
+
|
|
21
|
+
# Member login email.
|
|
22
|
+
attr_accessor :email
|
|
23
|
+
|
|
24
|
+
# User profile emoji.
|
|
25
|
+
attr_accessor :emoji
|
|
26
|
+
|
|
27
|
+
# Member given name.
|
|
28
|
+
attr_accessor :first_name
|
|
29
|
+
|
|
30
|
+
# Team membership record ID.
|
|
31
|
+
attr_accessor :id
|
|
32
|
+
|
|
33
|
+
# Member family name.
|
|
34
|
+
attr_accessor :last_name
|
|
35
|
+
|
|
36
|
+
# Internal notes stored on the membership.
|
|
37
|
+
attr_accessor :notes
|
|
38
|
+
|
|
39
|
+
# Team role (for example Owner, Admin, Member).
|
|
40
|
+
attr_accessor :role
|
|
41
|
+
|
|
42
|
+
# User account ID for this member.
|
|
43
|
+
attr_accessor :user_id
|
|
44
|
+
|
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
46
|
+
def self.attribute_map
|
|
47
|
+
{
|
|
48
|
+
:'created_at' => :'created_at',
|
|
49
|
+
:'email' => :'email',
|
|
50
|
+
:'emoji' => :'emoji',
|
|
51
|
+
:'first_name' => :'first_name',
|
|
52
|
+
:'id' => :'id',
|
|
53
|
+
:'last_name' => :'last_name',
|
|
54
|
+
:'notes' => :'notes',
|
|
55
|
+
:'role' => :'role',
|
|
56
|
+
:'user_id' => :'user_id'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns attribute mapping this model knows about
|
|
61
|
+
def self.acceptable_attribute_map
|
|
62
|
+
attribute_map
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Returns all the JSON keys this model knows about
|
|
66
|
+
def self.acceptable_attributes
|
|
67
|
+
acceptable_attribute_map.values
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Attribute type mapping.
|
|
71
|
+
def self.openapi_types
|
|
72
|
+
{
|
|
73
|
+
:'created_at' => :'String',
|
|
74
|
+
:'email' => :'String',
|
|
75
|
+
:'emoji' => :'String',
|
|
76
|
+
:'first_name' => :'String',
|
|
77
|
+
:'id' => :'String',
|
|
78
|
+
:'last_name' => :'String',
|
|
79
|
+
:'notes' => :'String',
|
|
80
|
+
:'role' => :'String',
|
|
81
|
+
:'user_id' => :'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 `Emailguard::PublicTeamMemberResponse` initialize method"
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
99
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
100
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
101
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
102
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Emailguard::PublicTeamMemberResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
103
|
+
end
|
|
104
|
+
h[k.to_sym] = v
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'created_at')
|
|
108
|
+
self.created_at = attributes[:'created_at']
|
|
109
|
+
else
|
|
110
|
+
self.created_at = nil
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'email')
|
|
114
|
+
self.email = attributes[:'email']
|
|
115
|
+
else
|
|
116
|
+
self.email = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'emoji')
|
|
120
|
+
self.emoji = attributes[:'emoji']
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'first_name')
|
|
124
|
+
self.first_name = attributes[:'first_name']
|
|
125
|
+
else
|
|
126
|
+
self.first_name = nil
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'id')
|
|
130
|
+
self.id = attributes[:'id']
|
|
131
|
+
else
|
|
132
|
+
self.id = nil
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'last_name')
|
|
136
|
+
self.last_name = attributes[:'last_name']
|
|
137
|
+
else
|
|
138
|
+
self.last_name = nil
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'notes')
|
|
142
|
+
self.notes = attributes[:'notes']
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'role')
|
|
146
|
+
self.role = attributes[:'role']
|
|
147
|
+
else
|
|
148
|
+
self.role = nil
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'user_id')
|
|
152
|
+
self.user_id = attributes[:'user_id']
|
|
153
|
+
else
|
|
154
|
+
self.user_id = nil
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
159
|
+
# @return Array for valid properties with the reasons
|
|
160
|
+
def list_invalid_properties
|
|
161
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
162
|
+
invalid_properties = Array.new
|
|
163
|
+
if @created_at.nil?
|
|
164
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if @email.nil?
|
|
168
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if @first_name.nil?
|
|
172
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if @id.nil?
|
|
176
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if @last_name.nil?
|
|
180
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if @role.nil?
|
|
184
|
+
invalid_properties.push('invalid value for "role", role cannot be nil.')
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if @user_id.nil?
|
|
188
|
+
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
invalid_properties
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Check to see if the all the properties in the model are valid
|
|
195
|
+
# @return true if the model is valid
|
|
196
|
+
def valid?
|
|
197
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
198
|
+
return false if @created_at.nil?
|
|
199
|
+
return false if @email.nil?
|
|
200
|
+
return false if @first_name.nil?
|
|
201
|
+
return false if @id.nil?
|
|
202
|
+
return false if @last_name.nil?
|
|
203
|
+
return false if @role.nil?
|
|
204
|
+
return false if @user_id.nil?
|
|
205
|
+
true
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Custom attribute writer method with validation
|
|
209
|
+
# @param [Object] created_at Value to be assigned
|
|
210
|
+
def created_at=(created_at)
|
|
211
|
+
if created_at.nil?
|
|
212
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
@created_at = created_at
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Custom attribute writer method with validation
|
|
219
|
+
# @param [Object] email Value to be assigned
|
|
220
|
+
def email=(email)
|
|
221
|
+
if email.nil?
|
|
222
|
+
fail ArgumentError, 'email cannot be nil'
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
@email = email
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Custom attribute writer method with validation
|
|
229
|
+
# @param [Object] first_name Value to be assigned
|
|
230
|
+
def first_name=(first_name)
|
|
231
|
+
if first_name.nil?
|
|
232
|
+
fail ArgumentError, 'first_name cannot be nil'
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
@first_name = first_name
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Custom attribute writer method with validation
|
|
239
|
+
# @param [Object] id Value to be assigned
|
|
240
|
+
def id=(id)
|
|
241
|
+
if id.nil?
|
|
242
|
+
fail ArgumentError, 'id cannot be nil'
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
@id = id
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Custom attribute writer method with validation
|
|
249
|
+
# @param [Object] last_name Value to be assigned
|
|
250
|
+
def last_name=(last_name)
|
|
251
|
+
if last_name.nil?
|
|
252
|
+
fail ArgumentError, 'last_name cannot be nil'
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
@last_name = last_name
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Custom attribute writer method with validation
|
|
259
|
+
# @param [Object] role Value to be assigned
|
|
260
|
+
def role=(role)
|
|
261
|
+
if role.nil?
|
|
262
|
+
fail ArgumentError, 'role cannot be nil'
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
@role = role
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Custom attribute writer method with validation
|
|
269
|
+
# @param [Object] user_id Value to be assigned
|
|
270
|
+
def user_id=(user_id)
|
|
271
|
+
if user_id.nil?
|
|
272
|
+
fail ArgumentError, 'user_id cannot be nil'
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
@user_id = user_id
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Checks equality by comparing each attribute.
|
|
279
|
+
# @param [Object] Object to be compared
|
|
280
|
+
def ==(o)
|
|
281
|
+
return true if self.equal?(o)
|
|
282
|
+
self.class == o.class &&
|
|
283
|
+
created_at == o.created_at &&
|
|
284
|
+
email == o.email &&
|
|
285
|
+
emoji == o.emoji &&
|
|
286
|
+
first_name == o.first_name &&
|
|
287
|
+
id == o.id &&
|
|
288
|
+
last_name == o.last_name &&
|
|
289
|
+
notes == o.notes &&
|
|
290
|
+
role == o.role &&
|
|
291
|
+
user_id == o.user_id
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# @see the `==` method
|
|
295
|
+
# @param [Object] Object to be compared
|
|
296
|
+
def eql?(o)
|
|
297
|
+
self == o
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Calculates hash code according to all attributes.
|
|
301
|
+
# @return [Integer] Hash code
|
|
302
|
+
def hash
|
|
303
|
+
[created_at, email, emoji, first_name, id, last_name, notes, role, user_id].hash
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# Builds the object from hash
|
|
307
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
308
|
+
# @return [Object] Returns the model itself
|
|
309
|
+
def self.build_from_hash(attributes)
|
|
310
|
+
return nil unless attributes.is_a?(Hash)
|
|
311
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
312
|
+
transformed_hash = {}
|
|
313
|
+
openapi_types.each_pair do |key, type|
|
|
314
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
315
|
+
transformed_hash["#{key}"] = nil
|
|
316
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
317
|
+
# check to ensure the input is an array given that the attribute
|
|
318
|
+
# is documented as an array but the input is not
|
|
319
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
320
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
321
|
+
end
|
|
322
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
323
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
new(transformed_hash)
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
# Returns the object in the form of hash
|
|
330
|
+
# @return [Hash] Returns the object in the form of hash
|
|
331
|
+
def to_hash
|
|
332
|
+
hash = {}
|
|
333
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
334
|
+
value = self.send(attr)
|
|
335
|
+
if value.nil?
|
|
336
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
337
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
hash[param] = _to_hash(value)
|
|
341
|
+
end
|
|
342
|
+
hash
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
end
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#EmailGuard Public API
|
|
3
|
+
|
|
4
|
+
#Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: dev@emailguard.co
|
|
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 Emailguard
|
|
17
|
+
class PublicTeamResponse < ApiModelBase
|
|
18
|
+
# Contact email for the workspace.
|
|
19
|
+
attr_accessor :email
|
|
20
|
+
|
|
21
|
+
# Avatar emoji.
|
|
22
|
+
attr_accessor :emoji
|
|
23
|
+
|
|
24
|
+
# Team UUID.
|
|
25
|
+
attr_accessor :id
|
|
26
|
+
|
|
27
|
+
# Display name.
|
|
28
|
+
attr_accessor :name
|
|
29
|
+
|
|
30
|
+
# Team kind (for example team or personal).
|
|
31
|
+
attr_accessor :type
|
|
32
|
+
|
|
33
|
+
# Public website URL.
|
|
34
|
+
attr_accessor :url
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'email' => :'email',
|
|
40
|
+
:'emoji' => :'emoji',
|
|
41
|
+
:'id' => :'id',
|
|
42
|
+
:'name' => :'name',
|
|
43
|
+
:'type' => :'type',
|
|
44
|
+
:'url' => :'url'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns attribute mapping this model knows about
|
|
49
|
+
def self.acceptable_attribute_map
|
|
50
|
+
attribute_map
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns all the JSON keys this model knows about
|
|
54
|
+
def self.acceptable_attributes
|
|
55
|
+
acceptable_attribute_map.values
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Attribute type mapping.
|
|
59
|
+
def self.openapi_types
|
|
60
|
+
{
|
|
61
|
+
:'email' => :'String',
|
|
62
|
+
:'emoji' => :'String',
|
|
63
|
+
:'id' => :'String',
|
|
64
|
+
:'name' => :'String',
|
|
65
|
+
:'type' => :'String',
|
|
66
|
+
:'url' => :'String'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
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 `Emailguard::PublicTeamResponse` 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 `Emailguard::PublicTeamResponse`. 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?(:'email')
|
|
93
|
+
self.email = attributes[:'email']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'emoji')
|
|
97
|
+
self.emoji = attributes[:'emoji']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'id')
|
|
101
|
+
self.id = attributes[:'id']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'name')
|
|
105
|
+
self.name = attributes[:'name']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'type')
|
|
109
|
+
self.type = attributes[:'type']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'url')
|
|
113
|
+
self.url = attributes[:'url']
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
118
|
+
# @return Array for valid properties with the reasons
|
|
119
|
+
def list_invalid_properties
|
|
120
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
121
|
+
invalid_properties = Array.new
|
|
122
|
+
invalid_properties
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Check to see if the all the properties in the model are valid
|
|
126
|
+
# @return true if the model is valid
|
|
127
|
+
def valid?
|
|
128
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
129
|
+
true
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Checks equality by comparing each attribute.
|
|
133
|
+
# @param [Object] Object to be compared
|
|
134
|
+
def ==(o)
|
|
135
|
+
return true if self.equal?(o)
|
|
136
|
+
self.class == o.class &&
|
|
137
|
+
email == o.email &&
|
|
138
|
+
emoji == o.emoji &&
|
|
139
|
+
id == o.id &&
|
|
140
|
+
name == o.name &&
|
|
141
|
+
type == o.type &&
|
|
142
|
+
url == o.url
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# @see the `==` method
|
|
146
|
+
# @param [Object] Object to be compared
|
|
147
|
+
def eql?(o)
|
|
148
|
+
self == o
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Calculates hash code according to all attributes.
|
|
152
|
+
# @return [Integer] Hash code
|
|
153
|
+
def hash
|
|
154
|
+
[email, emoji, id, name, type, url].hash
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Builds the object from hash
|
|
158
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
159
|
+
# @return [Object] Returns the model itself
|
|
160
|
+
def self.build_from_hash(attributes)
|
|
161
|
+
return nil unless attributes.is_a?(Hash)
|
|
162
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
163
|
+
transformed_hash = {}
|
|
164
|
+
openapi_types.each_pair do |key, type|
|
|
165
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = nil
|
|
167
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
168
|
+
# check to ensure the input is an array given that the attribute
|
|
169
|
+
# is documented as an array but the input is not
|
|
170
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
171
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
172
|
+
end
|
|
173
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
174
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
new(transformed_hash)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Returns the object in the form of hash
|
|
181
|
+
# @return [Hash] Returns the object in the form of hash
|
|
182
|
+
def to_hash
|
|
183
|
+
hash = {}
|
|
184
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
185
|
+
value = self.send(attr)
|
|
186
|
+
if value.nil?
|
|
187
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
188
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
hash[param] = _to_hash(value)
|
|
192
|
+
end
|
|
193
|
+
hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
end
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#EmailGuard Public API
|
|
3
|
+
|
|
4
|
+
#Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: dev@emailguard.co
|
|
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 Emailguard
|
|
17
|
+
class UpdateNotificationChannelInput < ApiModelBase
|
|
18
|
+
# Updated type-specific configuration. Omit to leave unchanged.
|
|
19
|
+
attr_accessor :config
|
|
20
|
+
|
|
21
|
+
# Updated display name. Omit to leave unchanged.
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'config' => :'config',
|
|
28
|
+
:'name' => :'name'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'config' => :'Hash<String, Object>',
|
|
46
|
+
:'name' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Emailguard::UpdateNotificationChannelInput` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Emailguard::UpdateNotificationChannelInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'config')
|
|
73
|
+
if (value = attributes[:'config']).is_a?(Hash)
|
|
74
|
+
self.config = value
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'name')
|
|
79
|
+
self.name = attributes[:'name']
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
invalid_properties
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Check to see if the all the properties in the model are valid
|
|
92
|
+
# @return true if the model is valid
|
|
93
|
+
def valid?
|
|
94
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
95
|
+
true
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Checks equality by comparing each attribute.
|
|
99
|
+
# @param [Object] Object to be compared
|
|
100
|
+
def ==(o)
|
|
101
|
+
return true if self.equal?(o)
|
|
102
|
+
self.class == o.class &&
|
|
103
|
+
config == o.config &&
|
|
104
|
+
name == o.name
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# @see the `==` method
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def eql?(o)
|
|
110
|
+
self == o
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Calculates hash code according to all attributes.
|
|
114
|
+
# @return [Integer] Hash code
|
|
115
|
+
def hash
|
|
116
|
+
[config, name].hash
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Builds the object from hash
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
# @return [Object] Returns the model itself
|
|
122
|
+
def self.build_from_hash(attributes)
|
|
123
|
+
return nil unless attributes.is_a?(Hash)
|
|
124
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
125
|
+
transformed_hash = {}
|
|
126
|
+
openapi_types.each_pair do |key, type|
|
|
127
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
128
|
+
transformed_hash["#{key}"] = nil
|
|
129
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
130
|
+
# check to ensure the input is an array given that the attribute
|
|
131
|
+
# is documented as an array but the input is not
|
|
132
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
133
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
134
|
+
end
|
|
135
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
136
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
new(transformed_hash)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Returns the object in the form of hash
|
|
143
|
+
# @return [Hash] Returns the object in the form of hash
|
|
144
|
+
def to_hash
|
|
145
|
+
hash = {}
|
|
146
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
147
|
+
value = self.send(attr)
|
|
148
|
+
if value.nil?
|
|
149
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
150
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
hash[param] = _to_hash(value)
|
|
154
|
+
end
|
|
155
|
+
hash
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
end
|