Class: Merge::Ats::AuditLogEvent
- Inherits:
-
Object
- Object
- Merge::Ats::AuditLogEvent
- Defined in:
- lib/merge_ruby_client/ats/types/audit_log_event.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #created_at ⇒ DateTime readonly
- #event_description ⇒ String readonly
-
#event_type ⇒ Merge::Ats::EventTypeEnum
readonly
Designates the type of event that occurred.
- #id ⇒ String readonly
- #ip_address ⇒ String readonly
-
#role ⇒ Merge::Ats::RoleEnum
readonly
Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.
-
#user_email ⇒ String
readonly
The User’s email at the time of this Event occurring.
-
#user_name ⇒ String
readonly
The User’s full name at the time of this Event occurring.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Merge::Ats::AuditLogEvent
Deserialize a JSON object to an instance of AuditLogEvent.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(role:, ip_address:, event_type:, event_description:, id: OMIT, user_name: OMIT, user_email: OMIT, created_at: OMIT, additional_properties: nil) ⇒ Merge::Ats::AuditLogEvent constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of AuditLogEvent to a JSON object.
Constructor Details
#initialize(role:, ip_address:, event_type:, event_description:, id: OMIT, user_name: OMIT, user_email: OMIT, created_at: OMIT, additional_properties: nil) ⇒ Merge::Ats::AuditLogEvent
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/merge_ruby_client/ats/types/audit_log_event.rb', line 150 def initialize(role:, ip_address:, event_type:, event_description:, id: OMIT, user_name: OMIT, user_email: OMIT, created_at: OMIT, additional_properties: nil) @id = id if id != OMIT @user_name = user_name if user_name != OMIT @user_email = user_email if user_email != OMIT @role = role @ip_address = ip_address @event_type = event_type @event_description = event_description @created_at = created_at if created_at != OMIT @additional_properties = additional_properties @_field_set = { "id": id, "user_name": user_name, "user_email": user_email, "role": role, "ip_address": ip_address, "event_type": event_type, "event_description": event_description, "created_at": created_at }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
81 82 83 |
# File 'lib/merge_ruby_client/ats/types/audit_log_event.rb', line 81 def additional_properties @additional_properties end |
#created_at ⇒ DateTime (readonly)
79 80 81 |
# File 'lib/merge_ruby_client/ats/types/audit_log_event.rb', line 79 def created_at @created_at end |
#event_description ⇒ String (readonly)
77 78 79 |
# File 'lib/merge_ruby_client/ats/types/audit_log_event.rb', line 77 def event_description @event_description end |
#event_type ⇒ Merge::Ats::EventTypeEnum (readonly)
Returns Designates the type of event that occurred.
-
‘CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY
-
‘DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY
-
‘CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY
-
‘DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY
-
‘REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY
-
‘INVITED_USER` - INVITED_USER
-
‘TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED
-
‘TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED
-
‘DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT
-
‘CREATED_DESTINATION` - CREATED_DESTINATION
-
‘DELETED_DESTINATION` - DELETED_DESTINATION
-
‘CHANGED_DESTINATION` - CHANGED_DESTINATION
-
‘CHANGED_SCOPES` - CHANGED_SCOPES
-
‘CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION
-
‘CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS
-
‘ENABLED_INTEGRATION` - ENABLED_INTEGRATION
-
‘DISABLED_INTEGRATION` - DISABLED_INTEGRATION
-
‘ENABLED_CATEGORY` - ENABLED_CATEGORY
-
‘DISABLED_CATEGORY` - DISABLED_CATEGORY
-
‘CHANGED_PASSWORD` - CHANGED_PASSWORD
-
‘RESET_PASSWORD` - RESET_PASSWORD
-
‘ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` -
ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
-
‘ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` -
ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
-
‘DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` -
DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
-
‘DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` -
DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
-
‘CREATED_INTEGRATION_WIDE_FIELD_MAPPING` -
CREATED_INTEGRATION_WIDE_FIELD_MAPPING
-
‘CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING
-
‘CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` -
CHANGED_INTEGRATION_WIDE_FIELD_MAPPING
-
‘CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING
-
‘DELETED_INTEGRATION_WIDE_FIELD_MAPPING` -
DELETED_INTEGRATION_WIDE_FIELD_MAPPING
-
‘DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING
-
‘FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC
-
‘MUTED_ISSUE` - MUTED_ISSUE
-
‘GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK
-
‘ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK
-
‘DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK
-
‘MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED
-
‘END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED.
75 76 77 |
# File 'lib/merge_ruby_client/ats/types/audit_log_event.rb', line 75 def event_type @event_type end |
#id ⇒ String (readonly)
13 14 15 |
# File 'lib/merge_ruby_client/ats/types/audit_log_event.rb', line 13 def id @id end |
#ip_address ⇒ String (readonly)
28 29 30 |
# File 'lib/merge_ruby_client/ats/types/audit_log_event.rb', line 28 def ip_address @ip_address end |
#role ⇒ Merge::Ats::RoleEnum (readonly)
Returns Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.
-
‘ADMIN` - ADMIN
-
‘DEVELOPER` - DEVELOPER
-
‘MEMBER` - MEMBER
-
‘API` - API
-
‘SYSTEM` - SYSTEM
-
‘MERGE_TEAM` - MERGE_TEAM.
26 27 28 |
# File 'lib/merge_ruby_client/ats/types/audit_log_event.rb', line 26 def role @role end |
#user_email ⇒ String (readonly)
Returns The User’s email at the time of this Event occurring.
17 18 19 |
# File 'lib/merge_ruby_client/ats/types/audit_log_event.rb', line 17 def user_email @user_email end |
#user_name ⇒ String (readonly)
Returns The User’s full name at the time of this Event occurring.
15 16 17 |
# File 'lib/merge_ruby_client/ats/types/audit_log_event.rb', line 15 def user_name @user_name end |
Class Method Details
.from_json(json_object:) ⇒ Merge::Ats::AuditLogEvent
Deserialize a JSON object to an instance of AuditLogEvent
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/merge_ruby_client/ats/types/audit_log_event.rb', line 179 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) id = parsed_json["id"] user_name = parsed_json["user_name"] user_email = parsed_json["user_email"] role = parsed_json["role"] ip_address = parsed_json["ip_address"] event_type = parsed_json["event_type"] event_description = parsed_json["event_description"] created_at = (DateTime.parse(parsed_json["created_at"]) unless parsed_json["created_at"].nil?) new( id: id, user_name: user_name, user_email: user_email, role: role, ip_address: ip_address, event_type: event_type, event_description: event_description, created_at: created_at, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
216 217 218 219 220 221 222 223 224 225 |
# File 'lib/merge_ruby_client/ats/types/audit_log_event.rb', line 216 def self.validate_raw(obj:) obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.") obj.user_name&.is_a?(String) != false || raise("Passed value for field obj.user_name is not the expected type, validation failed.") obj.user_email&.is_a?(String) != false || raise("Passed value for field obj.user_email is not the expected type, validation failed.") obj.role.is_a?(Merge::Ats::RoleEnum) != false || raise("Passed value for field obj.role is not the expected type, validation failed.") obj.ip_address.is_a?(String) != false || raise("Passed value for field obj.ip_address is not the expected type, validation failed.") obj.event_type.is_a?(Merge::Ats::EventTypeEnum) != false || raise("Passed value for field obj.event_type is not the expected type, validation failed.") obj.event_description.is_a?(String) != false || raise("Passed value for field obj.event_description is not the expected type, validation failed.") obj.created_at&.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of AuditLogEvent to a JSON object
206 207 208 |
# File 'lib/merge_ruby_client/ats/types/audit_log_event.rb', line 206 def to_json(*_args) @_field_set&.to_json end |