Class: OpenApiOpenAIClient::AuditLog
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- OpenApiOpenAIClient::AuditLog
- Defined in:
- lib/openapi_openai/models/audit_log.rb
Overview
A log of a user action or configuration change within this organization.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#actor ⇒ Object
Returns the value of attribute actor.
-
#api_key_created ⇒ Object
Returns the value of attribute api_key_created.
-
#api_key_deleted ⇒ Object
Returns the value of attribute api_key_deleted.
-
#api_key_updated ⇒ Object
Returns the value of attribute api_key_updated.
-
#effective_at ⇒ Object
The Unix timestamp (in seconds) of the event.
-
#id ⇒ Object
The ID of this log.
-
#invite_accepted ⇒ Object
Returns the value of attribute invite_accepted.
-
#invite_deleted ⇒ Object
Returns the value of attribute invite_deleted.
-
#invite_sent ⇒ Object
Returns the value of attribute invite_sent.
-
#login_failed ⇒ Object
Returns the value of attribute login_failed.
-
#logout_failed ⇒ Object
Returns the value of attribute logout_failed.
-
#organization_updated ⇒ Object
Returns the value of attribute organization_updated.
-
#project ⇒ Object
Returns the value of attribute project.
-
#project_archived ⇒ Object
Returns the value of attribute project_archived.
-
#project_created ⇒ Object
Returns the value of attribute project_created.
-
#project_updated ⇒ Object
Returns the value of attribute project_updated.
-
#rate_limit_deleted ⇒ Object
Returns the value of attribute rate_limit_deleted.
-
#rate_limit_updated ⇒ Object
Returns the value of attribute rate_limit_updated.
-
#service_account_created ⇒ Object
Returns the value of attribute service_account_created.
-
#service_account_deleted ⇒ Object
Returns the value of attribute service_account_deleted.
-
#service_account_updated ⇒ Object
Returns the value of attribute service_account_updated.
-
#type ⇒ Object
Returns the value of attribute type.
-
#user_added ⇒ Object
Returns the value of attribute user_added.
-
#user_deleted ⇒ Object
Returns the value of attribute user_deleted.
-
#user_updated ⇒ Object
Returns the value of attribute user_updated.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ AuditLog
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ AuditLog
Initializes the object
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/openapi_openai/models/audit_log.rb', line 173 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `OpenApiOpenAIClient::AuditLog` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `OpenApiOpenAIClient::AuditLog`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'id') self.id = attributes[:'id'] else self.id = nil end if attributes.key?(:'type') self.type = attributes[:'type'] else self.type = nil end if attributes.key?(:'effective_at') self.effective_at = attributes[:'effective_at'] else self.effective_at = nil end if attributes.key?(:'project') self.project = attributes[:'project'] end if attributes.key?(:'actor') self.actor = attributes[:'actor'] else self.actor = nil end if attributes.key?(:'api_key_created') self.api_key_created = attributes[:'api_key_created'] end if attributes.key?(:'api_key_updated') self.api_key_updated = attributes[:'api_key_updated'] end if attributes.key?(:'api_key_deleted') self.api_key_deleted = attributes[:'api_key_deleted'] end if attributes.key?(:'invite_sent') self.invite_sent = attributes[:'invite_sent'] end if attributes.key?(:'invite_accepted') self.invite_accepted = attributes[:'invite_accepted'] end if attributes.key?(:'invite_deleted') self.invite_deleted = attributes[:'invite_deleted'] end if attributes.key?(:'login_failed') self.login_failed = attributes[:'login_failed'] end if attributes.key?(:'logout_failed') self.logout_failed = attributes[:'logout_failed'] end if attributes.key?(:'organization_updated') self.organization_updated = attributes[:'organization_updated'] end if attributes.key?(:'project_created') self.project_created = attributes[:'project_created'] end if attributes.key?(:'project_updated') self.project_updated = attributes[:'project_updated'] end if attributes.key?(:'project_archived') self.project_archived = attributes[:'project_archived'] end if attributes.key?(:'rate_limit_updated') self.rate_limit_updated = attributes[:'rate_limit_updated'] end if attributes.key?(:'rate_limit_deleted') self.rate_limit_deleted = attributes[:'rate_limit_deleted'] end if attributes.key?(:'service_account_created') self.service_account_created = attributes[:'service_account_created'] end if attributes.key?(:'service_account_updated') self.service_account_updated = attributes[:'service_account_updated'] end if attributes.key?(:'service_account_deleted') self.service_account_deleted = attributes[:'service_account_deleted'] end if attributes.key?(:'user_added') self.user_added = attributes[:'user_added'] end if attributes.key?(:'user_updated') self.user_updated = attributes[:'user_updated'] end if attributes.key?(:'user_deleted') self.user_deleted = attributes[:'user_deleted'] end end |
Instance Attribute Details
#actor ⇒ Object
Returns the value of attribute actor.
29 30 31 |
# File 'lib/openapi_openai/models/audit_log.rb', line 29 def actor @actor end |
#api_key_created ⇒ Object
Returns the value of attribute api_key_created.
31 32 33 |
# File 'lib/openapi_openai/models/audit_log.rb', line 31 def api_key_created @api_key_created end |
#api_key_deleted ⇒ Object
Returns the value of attribute api_key_deleted.
35 36 37 |
# File 'lib/openapi_openai/models/audit_log.rb', line 35 def api_key_deleted @api_key_deleted end |
#api_key_updated ⇒ Object
Returns the value of attribute api_key_updated.
33 34 35 |
# File 'lib/openapi_openai/models/audit_log.rb', line 33 def api_key_updated @api_key_updated end |
#effective_at ⇒ Object
The Unix timestamp (in seconds) of the event.
25 26 27 |
# File 'lib/openapi_openai/models/audit_log.rb', line 25 def effective_at @effective_at end |
#id ⇒ Object
The ID of this log.
20 21 22 |
# File 'lib/openapi_openai/models/audit_log.rb', line 20 def id @id end |
#invite_accepted ⇒ Object
Returns the value of attribute invite_accepted.
39 40 41 |
# File 'lib/openapi_openai/models/audit_log.rb', line 39 def invite_accepted @invite_accepted end |
#invite_deleted ⇒ Object
Returns the value of attribute invite_deleted.
41 42 43 |
# File 'lib/openapi_openai/models/audit_log.rb', line 41 def invite_deleted @invite_deleted end |
#invite_sent ⇒ Object
Returns the value of attribute invite_sent.
37 38 39 |
# File 'lib/openapi_openai/models/audit_log.rb', line 37 def invite_sent @invite_sent end |
#login_failed ⇒ Object
Returns the value of attribute login_failed.
43 44 45 |
# File 'lib/openapi_openai/models/audit_log.rb', line 43 def login_failed @login_failed end |
#logout_failed ⇒ Object
Returns the value of attribute logout_failed.
45 46 47 |
# File 'lib/openapi_openai/models/audit_log.rb', line 45 def logout_failed @logout_failed end |
#organization_updated ⇒ Object
Returns the value of attribute organization_updated.
47 48 49 |
# File 'lib/openapi_openai/models/audit_log.rb', line 47 def organization_updated @organization_updated end |
#project ⇒ Object
Returns the value of attribute project.
27 28 29 |
# File 'lib/openapi_openai/models/audit_log.rb', line 27 def project @project end |
#project_archived ⇒ Object
Returns the value of attribute project_archived.
53 54 55 |
# File 'lib/openapi_openai/models/audit_log.rb', line 53 def project_archived @project_archived end |
#project_created ⇒ Object
Returns the value of attribute project_created.
49 50 51 |
# File 'lib/openapi_openai/models/audit_log.rb', line 49 def project_created @project_created end |
#project_updated ⇒ Object
Returns the value of attribute project_updated.
51 52 53 |
# File 'lib/openapi_openai/models/audit_log.rb', line 51 def project_updated @project_updated end |
#rate_limit_deleted ⇒ Object
Returns the value of attribute rate_limit_deleted.
57 58 59 |
# File 'lib/openapi_openai/models/audit_log.rb', line 57 def rate_limit_deleted @rate_limit_deleted end |
#rate_limit_updated ⇒ Object
Returns the value of attribute rate_limit_updated.
55 56 57 |
# File 'lib/openapi_openai/models/audit_log.rb', line 55 def rate_limit_updated @rate_limit_updated end |
#service_account_created ⇒ Object
Returns the value of attribute service_account_created.
59 60 61 |
# File 'lib/openapi_openai/models/audit_log.rb', line 59 def service_account_created @service_account_created end |
#service_account_deleted ⇒ Object
Returns the value of attribute service_account_deleted.
63 64 65 |
# File 'lib/openapi_openai/models/audit_log.rb', line 63 def service_account_deleted @service_account_deleted end |
#service_account_updated ⇒ Object
Returns the value of attribute service_account_updated.
61 62 63 |
# File 'lib/openapi_openai/models/audit_log.rb', line 61 def service_account_updated @service_account_updated end |
#type ⇒ Object
Returns the value of attribute type.
22 23 24 |
# File 'lib/openapi_openai/models/audit_log.rb', line 22 def type @type end |
#user_added ⇒ Object
Returns the value of attribute user_added.
65 66 67 |
# File 'lib/openapi_openai/models/audit_log.rb', line 65 def user_added @user_added end |
#user_deleted ⇒ Object
Returns the value of attribute user_deleted.
69 70 71 |
# File 'lib/openapi_openai/models/audit_log.rb', line 69 def user_deleted @user_deleted end |
#user_updated ⇒ Object
Returns the value of attribute user_updated.
67 68 69 |
# File 'lib/openapi_openai/models/audit_log.rb', line 67 def user_updated @user_updated end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
125 126 127 |
# File 'lib/openapi_openai/models/audit_log.rb', line 125 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
130 131 132 |
# File 'lib/openapi_openai/models/audit_log.rb', line 130 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/openapi_openai/models/audit_log.rb', line 94 def self.attribute_map { :'id' => :'id', :'type' => :'type', :'effective_at' => :'effective_at', :'project' => :'project', :'actor' => :'actor', :'api_key_created' => :'api_key.created', :'api_key_updated' => :'api_key.updated', :'api_key_deleted' => :'api_key.deleted', :'invite_sent' => :'invite.sent', :'invite_accepted' => :'invite.accepted', :'invite_deleted' => :'invite.deleted', :'login_failed' => :'login.failed', :'logout_failed' => :'logout.failed', :'organization_updated' => :'organization.updated', :'project_created' => :'project.created', :'project_updated' => :'project.updated', :'project_archived' => :'project.archived', :'rate_limit_updated' => :'rate_limit.updated', :'rate_limit_deleted' => :'rate_limit.deleted', :'service_account_created' => :'service_account.created', :'service_account_updated' => :'service_account.updated', :'service_account_deleted' => :'service_account.deleted', :'user_added' => :'user.added', :'user_updated' => :'user.updated', :'user_deleted' => :'user.deleted' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 |
# File 'lib/openapi_openai/models/audit_log.rb', line 418 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
166 167 168 169 |
# File 'lib/openapi_openai/models/audit_log.rb', line 166 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/openapi_openai/models/audit_log.rb', line 135 def self.openapi_types { :'id' => :'String', :'type' => :'AuditLogEventType', :'effective_at' => :'Integer', :'project' => :'AuditLogProject', :'actor' => :'AuditLogActor', :'api_key_created' => :'AuditLogApiKeyCreated', :'api_key_updated' => :'AuditLogApiKeyUpdated', :'api_key_deleted' => :'AuditLogApiKeyDeleted', :'invite_sent' => :'AuditLogInviteSent', :'invite_accepted' => :'AuditLogInviteAccepted', :'invite_deleted' => :'AuditLogInviteAccepted', :'login_failed' => :'AuditLogLoginFailed', :'logout_failed' => :'AuditLogLoginFailed', :'organization_updated' => :'AuditLogOrganizationUpdated', :'project_created' => :'AuditLogProjectCreated', :'project_updated' => :'AuditLogProjectUpdated', :'project_archived' => :'AuditLogProjectArchived', :'rate_limit_updated' => :'AuditLogRateLimitUpdated', :'rate_limit_deleted' => :'AuditLogRateLimitDeleted', :'service_account_created' => :'AuditLogServiceAccountCreated', :'service_account_updated' => :'AuditLogServiceAccountUpdated', :'service_account_deleted' => :'AuditLogServiceAccountDeleted', :'user_added' => :'AuditLogUserAdded', :'user_updated' => :'AuditLogUserUpdated', :'user_deleted' => :'AuditLogUserDeleted' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'lib/openapi_openai/models/audit_log.rb', line 373 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && type == o.type && effective_at == o.effective_at && project == o.project && actor == o.actor && api_key_created == o.api_key_created && api_key_updated == o.api_key_updated && api_key_deleted == o.api_key_deleted && invite_sent == o.invite_sent && invite_accepted == o.invite_accepted && invite_deleted == o.invite_deleted && login_failed == o.login_failed && logout_failed == o.logout_failed && organization_updated == o.organization_updated && project_created == o.project_created && project_updated == o.project_updated && project_archived == o.project_archived && rate_limit_updated == o.rate_limit_updated && rate_limit_deleted == o.rate_limit_deleted && service_account_created == o.service_account_created && service_account_updated == o.service_account_updated && service_account_deleted == o.service_account_deleted && user_added == o.user_added && user_updated == o.user_updated && user_deleted == o.user_deleted end |
#eql?(o) ⇒ Boolean
405 406 407 |
# File 'lib/openapi_openai/models/audit_log.rb', line 405 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
411 412 413 |
# File 'lib/openapi_openai/models/audit_log.rb', line 411 def hash [id, type, effective_at, project, actor, api_key_created, api_key_updated, api_key_deleted, invite_sent, invite_accepted, invite_deleted, login_failed, logout_failed, organization_updated, project_created, project_updated, project_archived, rate_limit_updated, rate_limit_deleted, service_account_created, service_account_updated, service_account_deleted, user_added, user_updated, user_deleted].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/openapi_openai/models/audit_log.rb', line 298 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end if @effective_at.nil? invalid_properties.push('invalid value for "effective_at", effective_at cannot be nil.') end if @actor.nil? invalid_properties.push('invalid value for "actor", actor cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/openapi_openai/models/audit_log.rb', line 440 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
322 323 324 325 326 327 328 329 |
# File 'lib/openapi_openai/models/audit_log.rb', line 322 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @id.nil? return false if @type.nil? return false if @effective_at.nil? return false if @actor.nil? true end |