You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

968 lines
40 KiB

package domain
import "time"
type SystemStatus struct {
Model string `json:"model"`
HardwareProfile string `json:"hardware_profile"`
FirmwareVersion string `json:"firmware_version"`
BuildNumber string `json:"build_number"`
DeviceID string `json:"device_id"`
SystemTime time.Time `json:"system_time"`
UptimeSeconds int64 `json:"uptime_seconds"`
TemperatureCelsius *float64 `json:"temperature_celsius"`
LoadAverages []float64 `json:"load_averages"`
CPUUsagePercent *float64 `json:"cpu_usage_percent"`
MemoryTotalBytes uint64 `json:"memory_total_bytes"`
MemoryUsedBytes uint64 `json:"memory_used_bytes"`
MemoryAvailableBytes uint64 `json:"memory_available_bytes"`
MemoryUsagePercent *float64 `json:"memory_usage_percent"`
Storage *StorageMetrics `json:"storage"`
NetworkInterfaces []SystemNetworkInterface `json:"network_interfaces"`
SerialPortCount int `json:"serial_port_count"`
ActiveSessions int `json:"active_sessions"`
ActiveAlarms int `json:"active_alarms"`
ProtectedLogUsagePercent int `json:"protected_log_usage_percent"`
MostUsedPort string `json:"most_used_port"`
MostUsedPortBytes uint64 `json:"most_used_port_bytes"`
TotalSerialRXBytes uint64 `json:"total_serial_rx_bytes"`
TotalSerialTXBytes uint64 `json:"total_serial_tx_bytes"`
ActivePortCount int `json:"active_port_count"`
OOB OOBStatus `json:"oob"`
}
type SystemNetworkInterface struct {
Name string `json:"name"`
Device string `json:"device"`
MACAddress string `json:"mac_address"`
Link string `json:"link"`
SpeedMbps int `json:"speed_mbps"`
RXBytes uint64 `json:"rx_bytes"`
TXBytes uint64 `json:"tx_bytes"`
Addresses []string `json:"addresses"`
}
type SystemRuntimeMetrics struct {
BuildNumber string
DeviceID string
SystemTime time.Time
UptimeSeconds int64
TemperatureCelsius *float64
LoadAverages []float64
CPUUsagePercent *float64
MemoryTotalBytes uint64
MemoryUsedBytes uint64
MemoryAvailableBytes uint64
MemoryUsagePercent *float64
Storage *StorageMetrics
NetworkInterfaces []SystemNetworkInterface
}
type StorageMetrics struct {
Path string `json:"path"`
TotalBytes uint64 `json:"total_bytes"`
UsedBytes uint64 `json:"used_bytes"`
AvailableBytes uint64 `json:"available_bytes"`
ReservedBytes uint64 `json:"reserved_bytes"`
UsagePercent float64 `json:"usage_percent"`
}
type ServiceHealth struct {
Service string `json:"service"`
Status string `json:"status"`
Detail string `json:"detail"`
LastCheckedAt time.Time `json:"last_checked_at"`
}
type OOBStatus struct {
PrimaryInterface string `json:"primary_interface"`
FallbackInterface string `json:"fallback_interface"`
HealthCheckTarget string `json:"health_check_target"`
HealthCheckIntervalSecond int `json:"health_check_interval_seconds"`
FailureThreshold int `json:"failure_threshold"`
PrimaryLink string `json:"primary_link"`
FallbackAvailable bool `json:"fallback_available"`
FallbackActive bool `json:"fallback_active"`
FailoverReason string `json:"failover_reason"`
LastFailoverAt *time.Time `json:"last_failover_at"`
}
type NetworkAdvancedSettings struct {
Mode string `json:"mode"`
BondMode string `json:"bond_mode"`
BondMii int `json:"bond_mii"`
BridgeSTP bool `json:"bridge_stp"`
}
type DDNSSettings struct {
Enabled bool `json:"enabled"`
Provider string `json:"provider"`
IPv4Enabled bool `json:"ipv4_enabled"`
IPv6Enabled bool `json:"ipv6_enabled"`
Username string `json:"username"`
Password string `json:"password,omitempty"`
IPv4Domain string `json:"ipv4_domain"`
IPv6Domain string `json:"ipv6_domain"`
CheckIPURL string `json:"check_ip_url"`
CustomProvider string `json:"custom_provider"`
CustomPath string `json:"custom_path"`
}
type NetworkState struct {
HostName string `json:"host_name"`
OperatingMode string `json:"operating_mode"`
Advanced NetworkAdvancedSettings `json:"advanced"`
DDNS DDNSSettings `json:"ddns"`
Interfaces []NetworkInterface `json:"interfaces"`
OOB OOBStatus `json:"oob"`
RoutingMode string `json:"routing_mode"`
RollbackTimeoutSeconds int `json:"rollback_timeout_seconds"`
DefaultRoute string `json:"default_route,omitempty"`
Apply *NetworkApplyStatus `json:"apply,omitempty"`
}
type NetworkInterface struct {
Name string `json:"name"`
Device string `json:"device"`
DeviceTreeNode string `json:"device_tree_node"`
PHY string `json:"phy"`
IdentitySource string `json:"identity_source"`
ActiveMedium string `json:"active_medium"`
Link string `json:"link"`
Speed string `json:"speed"`
Address string `json:"address"`
Gateway string `json:"gateway"`
Role string `json:"role"`
AddressMode string `json:"address_mode"`
DNSServers []string `json:"dns_servers"`
IPv6Mode string `json:"ipv6_mode"`
IPv6Address string `json:"ipv6_address"`
IPv6Gateway string `json:"ipv6_gateway"`
IPv6DNSServers []string `json:"ipv6_dns_servers"`
Weight int `json:"weight"`
}
type NetworkAdvancedUpdate struct {
Mode *string `json:"mode,omitempty"`
BondMode *string `json:"bond_mode,omitempty"`
BondMii *int `json:"bond_mii,omitempty"`
BridgeSTP *bool `json:"bridge_stp,omitempty"`
}
type DDNSSettingsUpdate struct {
Enabled *bool `json:"enabled,omitempty"`
Provider *string `json:"provider,omitempty"`
IPv4Enabled *bool `json:"ipv4_enabled,omitempty"`
IPv6Enabled *bool `json:"ipv6_enabled,omitempty"`
Username *string `json:"username,omitempty"`
Password *string `json:"password,omitempty"`
IPv4Domain *string `json:"ipv4_domain,omitempty"`
IPv6Domain *string `json:"ipv6_domain,omitempty"`
CheckIPURL *string `json:"check_ip_url,omitempty"`
CustomProvider *string `json:"custom_provider,omitempty"`
CustomPath *string `json:"custom_path,omitempty"`
}
type NetworkUpdate struct {
HostName *string `json:"host_name,omitempty"`
OperatingMode *string `json:"operating_mode,omitempty"`
Advanced *NetworkAdvancedUpdate `json:"advanced,omitempty"`
DDNS *DDNSSettingsUpdate `json:"ddns,omitempty"`
OOB *OOBSettingsUpdate `json:"oob,omitempty"`
Interfaces []NetworkInterfaceUpdate `json:"interfaces,omitempty"`
}
type NetworkInterfaceUpdate struct {
Name string `json:"name"`
AddressMode *string `json:"address_mode,omitempty"`
Address *string `json:"address,omitempty"`
Gateway *string `json:"gateway,omitempty"`
DNSServers *[]string `json:"dns_servers,omitempty"`
IPv6Mode *string `json:"ipv6_mode,omitempty"`
IPv6Address *string `json:"ipv6_address,omitempty"`
IPv6Gateway *string `json:"ipv6_gateway,omitempty"`
IPv6DNSServers *[]string `json:"ipv6_dns_servers,omitempty"`
Role *string `json:"role,omitempty"`
Weight *int `json:"weight,omitempty"`
}
type OOBSettingsUpdate struct {
PrimaryInterface *string `json:"primary_interface,omitempty"`
FallbackInterface *string `json:"fallback_interface,omitempty"`
HealthCheckTarget *string `json:"health_check_target,omitempty"`
HealthCheckIntervalSecond *int `json:"health_check_interval_seconds,omitempty"`
FailureThreshold *int `json:"failure_threshold,omitempty"`
}
type NetworkApplyStatus struct {
TransactionID string `json:"transaction_id,omitempty"`
State string `json:"state"`
Deadline *time.Time `json:"deadline,omitempty"`
}
type NetworkTransactionRequest struct {
TransactionID string `json:"transaction_id"`
}
type Port struct {
Channel string `json:"channel"`
Alias string `json:"alias"`
Status string `json:"status"`
Mode string `json:"mode"`
ListenerPort int `json:"listener_port"`
SerialType string `json:"serial_type"`
BaudRate int `json:"baud_rate"`
DataBits int `json:"data_bits"`
Parity string `json:"parity"`
StopBits int `json:"stop_bits"`
StopBitsMode string `json:"stop_bits_mode"`
FlowControl string `json:"flow_control"`
RTSControl string `json:"rts_control"`
DTRControl string `json:"dtr_control"`
IgnoreJammed bool `json:"ignore_jammed"`
ConnectedUsers int `json:"connected_users"`
MaxViewers int `json:"max_viewers"`
Writer string `json:"writer"`
AlarmKeyword string `json:"alarm_keyword"`
DataLogMode string `json:"data_log_mode"`
DataPackage DataPackage `json:"data_package"`
DataLog DataLog `json:"data_log"`
Operation1 PortOperation `json:"operation_1"`
Operation2 PortOperation `json:"operation_2"`
RedirectTo []string `json:"redirect_to"`
Runtime *PortRuntime `json:"runtime,omitempty"`
}
type DataPackage struct {
Mode string `json:"mode"`
Length int `json:"length"`
TimeoutMillis int `json:"timeout_ms"`
DelimiterProcess string `json:"delimiter_process"`
Delimiter1 int `json:"delimiter_1"`
Delimiter2 int `json:"delimiter_2"`
}
type DataLogTrigger struct {
Length int `json:"length"`
TimeoutMillis int `json:"timeout_ms"`
Process string `json:"process"`
Character1 int `json:"character_1"`
Character2 int `json:"character_2"`
}
type DataLog struct {
Read bool `json:"read"`
Send bool `json:"send"`
ShowTimestamp bool `json:"show_timestamp"`
ShowDirection bool `json:"show_direction"`
ShowUsername bool `json:"show_username"`
ShowIPAddress bool `json:"show_ip_address"`
ShowPort bool `json:"show_port"`
Format string `json:"format"`
ReadTrigger DataLogTrigger `json:"read_trigger"`
SendTrigger DataLogTrigger `json:"send_trigger"`
}
type PortOperation struct {
Mode string `json:"mode"`
Port int `json:"port"`
Host string `json:"host,omitempty"`
KeepAliveSeconds int `json:"keep_alive_seconds"`
TimeoutMilliseconds int `json:"timeout_ms"`
InactivityTimeoutMilliseconds int `json:"inactivity_timeout_ms"`
MaxClients int `json:"max_clients"`
Authentication string `json:"authentication"`
Username string `json:"username,omitempty"`
PasswordStored bool `json:"password_stored"`
Credential string `json:"credential,omitempty"`
ClearCredential bool `json:"clear_credential,omitempty"`
Newline string `json:"newline"`
ControlShortcut string `json:"control_shortcut"`
SwitchShortcut string `json:"switch_shortcut"`
QuitShortcut string `json:"quit_shortcut"`
BreakShortcut string `json:"break_shortcut,omitempty"`
InterruptShortcut string `json:"interrupt_shortcut,omitempty"`
}
type PortRuntime struct {
HardwareAvailable bool `json:"hardware_available"`
HardwareMessage string `json:"hardware_message,omitempty"`
HardwareProfile string `json:"hardware_profile,omitempty"`
MappingVersion string `json:"mapping_version,omitempty"`
Device string `json:"device,omitempty"`
ProfileApplied bool `json:"profile_applied"`
AppliedLine *PortLineSettings `json:"applied_line,omitempty"`
LinkState string `json:"link_state"`
LinkSignal string `json:"link_signal"`
LinkAvailable bool `json:"link_available"`
LinkEverUp bool `json:"link_ever_up"`
LinkMessage string `json:"link_message,omitempty"`
CRProbeEnabled bool `json:"cr_probe_enabled"`
CRProbeState string `json:"cr_probe_state,omitempty"`
CRProbeMethod string `json:"cr_probe_method,omitempty"`
CRProbeLastAt *time.Time `json:"cr_probe_last_at,omitempty"`
CRProbeResponseAt *time.Time `json:"cr_probe_response_at,omitempty"`
CRProbeConfirmedAt *time.Time `json:"cr_probe_confirmed_at,omitempty"`
CRProbeBytes int `json:"cr_probe_response_bytes,omitempty"`
CRProbeResponses int `json:"cr_probe_consecutive_responses,omitempty"`
CRProbeMisses int `json:"cr_probe_consecutive_misses,omitempty"`
CRProbeUp bool `json:"cr_probe_up"`
CRProbeEverUp bool `json:"cr_probe_ever_up"`
CRProbeMessage string `json:"cr_probe_message,omitempty"`
SessionState string `json:"session_state"`
SessionActive bool `json:"session_active"`
RXBytes uint64 `json:"rx_bytes"`
TXBytes uint64 `json:"tx_bytes"`
LastRXAt *time.Time `json:"last_rx_at,omitempty"`
RXAgeMillis int64 `json:"rx_age_ms,omitempty"`
QueuedBytes int `json:"queued_bytes"`
Operations []PortOperationRuntime `json:"operations,omitempty"`
}
type PortOperationRuntime struct {
Operation int `json:"operation"`
Mode string `json:"mode"`
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
State string `json:"state"`
ActiveClients int `json:"active_clients"`
Sources []string `json:"sources,omitempty"`
Targets []string `json:"targets,omitempty"`
}
type PortLineSettings struct {
BaudRate int `json:"baud_rate"`
DataBits int `json:"data_bits"`
Parity string `json:"parity"`
StopBits int `json:"stop_bits"`
StopBitsMode string `json:"stop_bits_mode"`
FlowControl string `json:"flow_control"`
RTSControl string `json:"rts_control"`
DTRControl string `json:"dtr_control"`
IgnoreJammed bool `json:"ignore_jammed"`
}
type PortUpdate struct {
Alias *string `json:"alias,omitempty"`
Mode *string `json:"mode,omitempty"`
SerialType *string `json:"serial_type,omitempty"`
BaudRate *int `json:"baud_rate,omitempty"`
DataBits *int `json:"data_bits,omitempty"`
Parity *string `json:"parity,omitempty"`
StopBits *int `json:"stop_bits,omitempty"`
StopBitsMode *string `json:"stop_bits_mode,omitempty"`
FlowControl *string `json:"flow_control,omitempty"`
RTSControl *string `json:"rts_control,omitempty"`
DTRControl *string `json:"dtr_control,omitempty"`
IgnoreJammed *bool `json:"ignore_jammed,omitempty"`
AlarmKeyword *string `json:"alarm_keyword,omitempty"`
DataLogMode *string `json:"data_log_mode,omitempty"`
DataPackage *DataPackage `json:"data_package,omitempty"`
DataLog *DataLog `json:"data_log,omitempty"`
Operation1 *PortOperation `json:"operation_1,omitempty"`
Operation2 *PortOperation `json:"operation_2,omitempty"`
RedirectTo []string `json:"redirect_to,omitempty"`
}
type PortBulkUpdate struct {
Channels []string `json:"channels"`
Update PortUpdate `json:"update"`
}
type PortBulkRestart struct {
Channels []string `json:"channels"`
}
type GreenLEDForceRequest struct {
Force *bool `json:"force"`
}
type GreenLEDPulseRequest struct {
DwellMilliseconds int `json:"dwell_ms"`
}
type AlarmRule struct {
RuleID string `json:"rule_id"`
Name string `json:"name"`
Source string `json:"source"`
Channel string `json:"channel"`
Trigger string `json:"trigger"`
Severity string `json:"severity"`
Delivery []string `json:"delivery"`
Enabled bool `json:"enabled"`
}
type AlarmRuleUpdate struct {
Trigger *string `json:"trigger,omitempty"`
Delivery []string `json:"delivery,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
}
type AlarmDeliveryPolicy struct {
RetryCount int `json:"retry_count"`
RetryIntervalSeconds int `json:"retry_interval_seconds"`
PendingQueueLimit int `json:"pending_queue_limit"`
NotifyOnRetryExhausted bool `json:"notify_on_retry_exhausted"`
}
type AlarmDeliveryPolicyUpdate struct {
RetryCount *int `json:"retry_count,omitempty"`
RetryIntervalSeconds *int `json:"retry_interval_seconds,omitempty"`
PendingQueueLimit *int `json:"pending_queue_limit,omitempty"`
NotifyOnRetryExhausted *bool `json:"notify_on_retry_exhausted,omitempty"`
}
type AlarmDeliveryTestRequest struct {
RuleID string `json:"rule_id,omitempty"`
Delivery []string `json:"delivery,omitempty"`
Message string `json:"message,omitempty"`
}
type EmailNotificationSettings struct {
Enabled bool `json:"enabled"`
SMTPHost string `json:"smtp_host"`
SMTPPort int `json:"smtp_port"`
STARTTLSEnabled bool `json:"starttls_enabled"`
AuthEnabled bool `json:"auth_enabled"`
Username string `json:"username,omitempty"`
PasswordStored bool `json:"password_stored"`
From string `json:"from"`
To []string `json:"to"`
CC []string `json:"cc"`
CustomTitle string `json:"custom_title"`
CustomContent string `json:"custom_content"`
}
type EmailNotificationUpdate struct {
Enabled *bool `json:"enabled,omitempty"`
SMTPHost *string `json:"smtp_host,omitempty"`
SMTPPort *int `json:"smtp_port,omitempty"`
STARTTLSEnabled *bool `json:"starttls_enabled,omitempty"`
AuthEnabled *bool `json:"auth_enabled,omitempty"`
Username *string `json:"username,omitempty"`
PasswordStored *bool `json:"password_stored,omitempty"`
From *string `json:"from,omitempty"`
To []string `json:"to,omitempty"`
CC []string `json:"cc,omitempty"`
CustomTitle *string `json:"custom_title,omitempty"`
CustomContent *string `json:"custom_content,omitempty"`
Password string `json:"password,omitempty"`
ClearPassword bool `json:"clear_password,omitempty"`
}
type SNMPTrapTargetSettings struct {
Targets []SNMPTrapTarget `json:"targets"`
}
type SNMPTrapTarget struct {
TargetID string `json:"target_id"`
Host string `json:"host"`
Port int `json:"port"`
Version string `json:"version"`
Username string `json:"username,omitempty"`
AuthProtocol string `json:"auth_protocol,omitempty"`
PrivacyProtocol string `json:"privacy_protocol,omitempty"`
EngineID string `json:"engine_id,omitempty"`
CredentialStored bool `json:"credential_stored"`
PrivacyKeyStored bool `json:"privacy_key_stored"`
Enabled bool `json:"enabled"`
Credential string `json:"credential,omitempty"`
PrivacyKey string `json:"privacy_key,omitempty"`
ClearCredential bool `json:"clear_credential,omitempty"`
ClearPrivacyKey bool `json:"clear_privacy_key,omitempty"`
}
type SNMPTrapTargetUpdate struct {
Targets []SNMPTrapTarget `json:"targets"`
}
type SNMPAgentSettings struct {
Enabled bool `json:"enabled"`
Location string `json:"location"`
Contact string `json:"contact"`
V1Enabled bool `json:"v1_enabled"`
V2CEnabled bool `json:"v2c_enabled"`
V3Enabled bool `json:"v3_enabled"`
ReadOnlyCommunityStored bool `json:"read_only_community_stored"`
ReadWriteCommunityStored bool `json:"read_write_community_stored"`
V3Users []SNMPV3User `json:"v3_users"`
}
type SNMPV3User struct {
Username string `json:"username"`
Access string `json:"access"`
AuthProtocol string `json:"auth_protocol"`
PrivacyProtocol string `json:"privacy_protocol"`
AuthKeyStored bool `json:"auth_key_stored"`
PrivacyKeyStored bool `json:"privacy_key_stored"`
Enabled bool `json:"enabled"`
AuthKey string `json:"auth_key,omitempty"`
PrivacyKey string `json:"privacy_key,omitempty"`
ClearAuthKey bool `json:"clear_auth_key,omitempty"`
ClearPrivacyKey bool `json:"clear_privacy_key,omitempty"`
}
type SNMPAgentUpdate struct {
Enabled *bool `json:"enabled,omitempty"`
Location *string `json:"location,omitempty"`
Contact *string `json:"contact,omitempty"`
V1Enabled *bool `json:"v1_enabled,omitempty"`
V2CEnabled *bool `json:"v2c_enabled,omitempty"`
V3Enabled *bool `json:"v3_enabled,omitempty"`
ReadOnlyCommunityStored *bool `json:"read_only_community_stored,omitempty"`
ReadWriteCommunityStored *bool `json:"read_write_community_stored,omitempty"`
V3Users []SNMPV3User `json:"v3_users,omitempty"`
ReadOnlyCommunity string `json:"read_only_community,omitempty"`
ReadWriteCommunity string `json:"read_write_community,omitempty"`
ClearReadOnlyCommunity bool `json:"clear_read_only_community,omitempty"`
ClearReadWriteCommunity bool `json:"clear_read_write_community,omitempty"`
}
type DirectSessionRequest struct {
Access string `json:"access,omitempty"`
}
type DirectSession struct {
SessionID string `json:"session_id"`
Channel string `json:"channel"`
Actor string `json:"actor"`
Access string `json:"access"`
ViewerCount int `json:"viewer_count"`
MaxViewers int `json:"max_viewers"`
Writer string `json:"writer"`
State string `json:"state"`
Message string `json:"message"`
AuditID string `json:"audit_id"`
StreamURL string `json:"stream_url"`
StreamProtocol string `json:"stream_protocol"`
StreamTicket string `json:"stream_ticket"`
TicketExpiresAt *time.Time `json:"ticket_expires_at,omitempty"`
}
type PortLogFilter struct {
Channel string
Keyword string
EventType string
Direction string
Actor string
From time.Time
To time.Time
Limit int
Offset int
}
type LinkLogFilter struct {
Kind string
Resource string
State string
EventType string
Keyword string
From time.Time
To time.Time
Limit int
Offset int
}
type SystemLogFilter struct {
Category string
Severity string
Keyword string
From time.Time
To time.Time
Limit int
Offset int
}
type SystemLogEvent struct {
AuditProtected bool `json:"audit_protected,omitempty"`
Timestamp time.Time `json:"timestamp"`
Category string `json:"category,omitempty"`
Severity string `json:"severity"`
Source string `json:"source"`
Message string `json:"message"`
Actor string `json:"actor,omitempty"`
Action string `json:"action,omitempty"`
Target string `json:"target,omitempty"`
AuditID string `json:"audit_id,omitempty"`
}
type PortLogEvent struct {
Timestamp time.Time `json:"timestamp"`
Channel string `json:"channel"`
EventType string `json:"event_type"`
Direction string `json:"direction,omitempty"`
Actor string `json:"actor"`
Command string `json:"command,omitempty"`
ReturnValue string `json:"return_value,omitempty"`
Message string `json:"message"`
Match string `json:"match,omitempty"`
KeywordMatches []string `json:"keyword_matches,omitempty"`
AlarmTriggered bool `json:"alarm_triggered"`
Redacted bool `json:"redacted"`
Payload []byte `json:"payload_base64,omitempty"`
PayloadBytes int `json:"payload_bytes,omitempty"`
PayloadEncoding string `json:"payload_encoding,omitempty"`
DisplayFormat string `json:"display_format,omitempty"`
ShowTimestamp bool `json:"show_timestamp"`
ShowDirection bool `json:"show_direction"`
ShowUsername bool `json:"show_username"`
ShowIPAddress bool `json:"show_ip_address"`
ShowPort bool `json:"show_port"`
RemoteAddress string `json:"remote_address,omitempty"`
RemotePort int `json:"remote_port,omitempty"`
}
type LinkStateObservation struct {
Kind string `json:"kind"`
Resource string `json:"resource"`
State string `json:"state"`
Signal string `json:"signal"`
ObservedAt time.Time `json:"observed_at,omitempty"`
}
type PortLogClearResult struct {
Channel string `json:"channel"`
Deleted int `json:"deleted"`
AuditID string `json:"audit_id"`
}
type SystemLogClearResult struct {
Deleted int `json:"deleted"`
AuditID string `json:"audit_id"`
}
type LinkLogEvent struct {
Timestamp time.Time `json:"timestamp"`
Kind string `json:"kind"`
Resource string `json:"resource"`
State string `json:"state"`
PreviousState string `json:"previous_state,omitempty"`
Signal string `json:"signal"`
EventType string `json:"event_type"`
AlarmTriggered bool `json:"alarm_triggered"`
MatchedRuleIDs []string `json:"matched_rule_ids,omitempty"`
Message string `json:"message"`
}
type LogExportRequest struct {
LogType string `json:"log_type,omitempty"`
Category string `json:"category,omitempty"`
Severity string `json:"severity,omitempty"`
Channel string `json:"channel,omitempty"`
Kind string `json:"kind,omitempty"`
Resource string `json:"resource,omitempty"`
State string `json:"state,omitempty"`
Keyword string `json:"keyword,omitempty"`
EventType string `json:"event_type,omitempty"`
Direction string `json:"direction,omitempty"`
Actor string `json:"actor,omitempty"`
From time.Time `json:"from,omitempty"`
To time.Time `json:"to,omitempty"`
MaxRows int `json:"max_rows,omitempty"`
}
type LogRetentionSettings struct {
SystemDays int `json:"system_days"`
AuditDays int `json:"audit_days"`
PortDays int `json:"port_days"`
ProtectedUsageWarningPct int `json:"protected_usage_warning_pct"`
PreserveOnFactoryReset bool `json:"preserve_on_factory_reset"`
LocalSystemEnabled bool `json:"local_system_enabled"`
LocalConfigurationEnabled bool `json:"local_configuration_enabled"`
LocalOperationEnabled bool `json:"local_operation_enabled"`
LocalStatusEnabled bool `json:"local_status_enabled"`
RemoteSystemEnabled bool `json:"remote_system_enabled"`
RemoteConfigurationEnabled bool `json:"remote_configuration_enabled"`
RemoteOperationEnabled bool `json:"remote_operation_enabled"`
RemoteStatusEnabled bool `json:"remote_status_enabled"`
KeepaliveEnabled bool `json:"keepalive_enabled"`
KeepaliveIntervalMinutes int `json:"keepalive_interval_minutes"`
AllPortStatusEnabled bool `json:"all_port_status_enabled"`
AllPortStatusIntervalMinutes int `json:"all_port_status_interval_minutes"`
SinglePortStatusEnabled bool `json:"single_port_status_enabled"`
SinglePortStatusRealtime bool `json:"single_port_status_realtime"`
SinglePortStatusIntervalMinutes int `json:"single_port_status_interval_minutes"`
}
type LogPolicySettings struct {
MaxRetentionDays int `json:"max_retention_days"`
CommandResultCapture bool `json:"command_result_capture"`
PhysicalLinkLogging bool `json:"physical_link_logging"`
PeriodicStatusLogging bool `json:"periodic_status_logging"`
LinkPollIntervalSeconds int `json:"link_poll_interval_seconds"`
KeepaliveIntervalSeconds int `json:"keepalive_interval_seconds"`
SnapshotIntervalSeconds int `json:"snapshot_interval_seconds"`
AtRestEncryption bool `json:"at_rest_encryption"`
LocalStorage bool `json:"local_storage"`
RemoteSyslogForwarding bool `json:"remote_syslog_forwarding"`
RawUARTPayloadCapture bool `json:"raw_uart_payload_capture"`
DirectModePayloadCapture bool `json:"direct_mode_payload_capture"`
MaxPayloadBytes int `json:"max_payload_bytes"`
MaxCommandCharacters int `json:"max_command_characters"`
MaxReturnCharacters int `json:"max_return_characters"`
}
type LogRetentionUpdate struct {
SystemDays *int `json:"system_days,omitempty"`
AuditDays *int `json:"audit_days,omitempty"`
PortDays *int `json:"port_days,omitempty"`
ProtectedUsageWarningPct *int `json:"protected_usage_warning_pct,omitempty"`
PreserveOnFactoryReset *bool `json:"preserve_on_factory_reset,omitempty"`
LocalSystemEnabled *bool `json:"local_system_enabled,omitempty"`
LocalConfigurationEnabled *bool `json:"local_configuration_enabled,omitempty"`
LocalOperationEnabled *bool `json:"local_operation_enabled,omitempty"`
LocalStatusEnabled *bool `json:"local_status_enabled,omitempty"`
RemoteSystemEnabled *bool `json:"remote_system_enabled,omitempty"`
RemoteConfigurationEnabled *bool `json:"remote_configuration_enabled,omitempty"`
RemoteOperationEnabled *bool `json:"remote_operation_enabled,omitempty"`
RemoteStatusEnabled *bool `json:"remote_status_enabled,omitempty"`
KeepaliveEnabled *bool `json:"keepalive_enabled,omitempty"`
KeepaliveIntervalMinutes *int `json:"keepalive_interval_minutes,omitempty"`
AllPortStatusEnabled *bool `json:"all_port_status_enabled,omitempty"`
AllPortStatusIntervalMinutes *int `json:"all_port_status_interval_minutes,omitempty"`
SinglePortStatusEnabled *bool `json:"single_port_status_enabled,omitempty"`
SinglePortStatusRealtime *bool `json:"single_port_status_realtime,omitempty"`
SinglePortStatusIntervalMinutes *int `json:"single_port_status_interval_minutes,omitempty"`
}
type BrowserTimeSyncRequest struct {
BrowserTime time.Time `json:"browser_time"`
Timezone string `json:"timezone,omitempty"`
}
type TimeSettings struct {
Mode string `json:"mode"`
Timezone string `json:"timezone"`
NTPServers []string `json:"ntp_servers"`
}
type TimeSettingsUpdate struct {
Mode *string `json:"mode,omitempty"`
Timezone *string `json:"timezone,omitempty"`
NTPServers []string `json:"ntp_servers,omitempty"`
}
type ManagementAccessSettings struct {
HTTPEnabled bool `json:"http_enabled"`
HTTPPort int `json:"http_port"`
HTTPSEnabled bool `json:"https_enabled"`
HTTPSPort int `json:"https_port"`
SSHEnabled bool `json:"ssh_enabled"`
SSHPort int `json:"ssh_port"`
TelnetEnabled bool `json:"telnet_enabled"`
TelnetPort int `json:"telnet_port"`
SerialConsoleEnabled bool `json:"serial_console_enabled"`
IdleTimeoutMinutes int `json:"idle_timeout_minutes"`
CaptchaEnabled bool `json:"captcha_enabled"`
LoginDetectionMinutes int `json:"login_detection_minutes"`
LoginSecurityHitCount int `json:"login_security_hit_count"`
}
type ManagementAccessUpdate struct {
HTTPEnabled *bool `json:"http_enabled,omitempty"`
HTTPPort *int `json:"http_port,omitempty"`
HTTPSEnabled *bool `json:"https_enabled,omitempty"`
HTTPSPort *int `json:"https_port,omitempty"`
SSHEnabled *bool `json:"ssh_enabled,omitempty"`
SSHPort *int `json:"ssh_port,omitempty"`
TelnetEnabled *bool `json:"telnet_enabled,omitempty"`
TelnetPort *int `json:"telnet_port,omitempty"`
SerialConsoleEnabled *bool `json:"serial_console_enabled,omitempty"`
IdleTimeoutMinutes *int `json:"idle_timeout_minutes,omitempty"`
CaptchaEnabled *bool `json:"captcha_enabled,omitempty"`
LoginDetectionMinutes *int `json:"login_detection_minutes,omitempty"`
LoginSecurityHitCount *int `json:"login_security_hit_count,omitempty"`
}
type RemoteSyslogSettings struct {
Enabled bool `json:"enabled"`
Host string `json:"host"`
Port int `json:"port"`
Protocol string `json:"protocol"`
Facility string `json:"facility"`
}
type RemoteSyslogUpdate struct {
Enabled *bool `json:"enabled,omitempty"`
Host *string `json:"host,omitempty"`
Port *int `json:"port,omitempty"`
Protocol *string `json:"protocol,omitempty"`
Facility *string `json:"facility,omitempty"`
}
type TLSCertificateSettings struct {
ActiveCertificateID string `json:"active_certificate_id"`
Subject string `json:"subject"`
Issuer string `json:"issuer"`
NotBefore time.Time `json:"not_before"`
NotAfter time.Time `json:"not_after"`
FingerprintSHA256 string `json:"fingerprint_sha256"`
Source string `json:"source"`
PrivateKeyStored bool `json:"private_key_stored"`
}
type TLSCertificateUpdate struct {
ActiveCertificateID *string `json:"active_certificate_id,omitempty"`
}
type TLSCertificateEntry struct {
CertificateID string `json:"certificate_id"`
Subject string `json:"subject"`
Issuer string `json:"issuer"`
CommonName string `json:"common_name"`
NotBefore time.Time `json:"not_before"`
NotAfter time.Time `json:"not_after"`
FingerprintSHA256 string `json:"fingerprint_sha256"`
Source string `json:"source"`
PrivateKeyStored bool `json:"private_key_stored"`
KeyBits int `json:"key_bits"`
Active bool `json:"active"`
}
type TLSCertificateInventory struct {
ActiveCertificateID string `json:"active_certificate_id"`
Certificates []TLSCertificateEntry `json:"certificates"`
}
type TLSCertificateSubject struct {
Country string `json:"country,omitempty"`
Province string `json:"province,omitempty"`
Locality string `json:"locality,omitempty"`
Organization string `json:"organization,omitempty"`
OrganizationalUnit string `json:"organizational_unit,omitempty"`
CommonName string `json:"common_name,omitempty"`
Email string `json:"email,omitempty"`
}
type TLSCertificateCreateRequest struct {
CertificateID string `json:"certificate_id"`
TLSCertificateSubject
}
type TLSCertificateImportRequest struct {
CertificateID string `json:"certificate_id"`
CertificatePEM string `json:"certificate_pem"`
PrivateKeyPEM string `json:"private_key_pem,omitempty"`
Password string `json:"password,omitempty"`
}
type TLSCSRRequest struct {
TLSCertificateSubject
}
type TLSCSRArtifact struct {
CertificateID string `json:"certificate_id"`
Filename string `json:"filename"`
PEM string `json:"pem"`
}
type DiagnosticsRequest struct {
Target string `json:"target,omitempty"`
Port int `json:"port,omitempty"`
Count int `json:"count,omitempty"`
MaxHops int `json:"max_hops,omitempty"`
TimeoutSeconds int `json:"timeout_seconds,omitempty"`
MaxOutputBytes int `json:"max_output_bytes,omitempty"`
}
type SupportBundleArtifact struct {
BundleID string `json:"bundle_id"`
Filename string `json:"filename"`
SizeBytes int `json:"size_bytes"`
SHA256 string `json:"sha256"`
Content []byte `json:"-"`
}
type ConfigSummary struct {
PendingChanges int `json:"pending_changes"`
PendingSections []string `json:"pending_sections"`
RunningRevision int `json:"running_revision"`
PersistentRevision int `json:"persistent_revision"`
RunningDiffersFromPersistent bool `json:"running_differs_from_persistent"`
}
type ConfigExport struct {
FormatVersion int `json:"format_version"`
GeneratedAt time.Time `json:"generated_at"`
Summary ConfigSummary `json:"summary"`
Running ConfigExportState `json:"running"`
Persistent ConfigExportState `json:"persistent"`
Pending ConfigExportPending `json:"pending"`
}
type ConfigExportState struct {
Ports []Port `json:"ports"`
AlarmRules []AlarmRule `json:"alarm_rules"`
AlarmDelivery AlarmDeliveryPolicy `json:"alarm_delivery"`
EmailNotification EmailNotificationSettings `json:"email_notification"`
SNMPAgent SNMPAgentSettings `json:"snmp_agent"`
SNMPTrapTargets SNMPTrapTargetSettings `json:"snmp_trap_targets"`
Network NetworkState `json:"network"`
Time TimeSettings `json:"time"`
Logs LogRetentionSettings `json:"logs"`
Management ManagementAccessSettings `json:"management"`
RemoteSyslog RemoteSyslogSettings `json:"remote_syslog"`
TLSCertificate TLSCertificateSettings `json:"tls_certificate"`
ExternalAuth ExternalAuthSettings `json:"external_auth"`
}
type ConfigExportPending struct {
Ports []Port `json:"ports"`
AlarmRules []AlarmRule `json:"alarm_rules"`
AlarmDelivery *AlarmDeliveryPolicy `json:"alarm_delivery,omitempty"`
EmailNotification *EmailNotificationSettings `json:"email_notification,omitempty"`
SNMPAgent *SNMPAgentSettings `json:"snmp_agent,omitempty"`
SNMPTrapTargets *SNMPTrapTargetSettings `json:"snmp_trap_targets,omitempty"`
Network *NetworkState `json:"network,omitempty"`
NetworkInterfaces []NetworkInterface `json:"network_interfaces"`
Time *TimeSettings `json:"time,omitempty"`
Logs *LogRetentionSettings `json:"logs,omitempty"`
Management *ManagementAccessSettings `json:"management,omitempty"`
RemoteSyslog *RemoteSyslogSettings `json:"remote_syslog,omitempty"`
TLSCertificate *TLSCertificateSettings `json:"tls_certificate,omitempty"`
ExternalAuth *ExternalAuthSettings `json:"external_auth,omitempty"`
}
type AuditEvent struct {
AuditID string `json:"audit_id"`
Timestamp time.Time `json:"timestamp"`
Actor string `json:"actor"`
Surface string `json:"surface"`
Action string `json:"action"`
Target string `json:"target"`
Command string `json:"command"`
Result string `json:"result"`
ReturnValue string `json:"return_value"`
Message string `json:"message"`
Redacted bool `json:"redacted"`
}
type Operation struct {
OperationID string `json:"operation_id"`
State string `json:"state"`
Message string `json:"message"`
AuditID string `json:"audit_id"`
Result map[string]any `json:"result,omitempty"`
ProgressPercent int `json:"progress_percent"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
}
type CommandResult struct {
Result string `json:"result"`
Message string `json:"message"`
AuditID string `json:"audit_id"`
Config *ConfigSummary `json:"config,omitempty"`
Operation *Operation `json:"operation,omitempty"`
NetworkApply *NetworkApplyStatus `json:"network_apply,omitempty"`
}
type ErrorResponse struct {
Error ErrorBody `json:"error"`
}
type ErrorBody struct {
Code string `json:"code"`
Message string `json:"message"`
}