#### OpenVAS Management Protocol (OMP)
####
#### Version: 7.0
####
#### The "management" protocol of the Open Vulnerability Assessment System.

### Preamble

start = command | response

command
  = authenticate
    | commands
    | create_agent
    | create_alert
    | create_asset
    | create_config
    | create_credential
    | create_filter
    | create_group
    | create_note
    | create_override
    | create_permission
    | create_port_list
    | create_port_range
    | create_report
    | create_report_format
    | create_role
    | create_scanner
    | create_schedule
    | create_tag
    | create_target
    | create_task
    | create_user
    | delete_agent
    | delete_asset
    | delete_config
    | delete_alert
    | delete_credential
    | delete_filter
    | delete_group
    | delete_note
    | delete_override
    | delete_report
    | delete_permission
    | delete_port_list
    | delete_port_range
    | delete_report_format
    | delete_role
    | delete_scanner
    | delete_schedule
    | delete_tag
    | delete_target
    | delete_task
    | delete_user
    | describe_auth
    | empty_trashcan
    | get_agents
    | get_configs
    | get_aggregates
    | get_alerts
    | get_assets
    | get_credentials
    | get_feeds
    | get_filters
    | get_groups
    | get_info
    | get_notes
    | get_nvts
    | get_nvt_families
    | get_overrides
    | get_permissions
    | get_port_lists
    | get_preferences
    | get_reports
    | get_report_formats
    | get_results
    | get_roles
    | get_scanners
    | get_schedules
    | get_settings
    | get_system_reports
    | get_tags
    | get_targets
    | get_tasks
    | get_users
    | get_version
    | help
    | modify_agent
    | modify_alert
    | modify_asset
    | modify_auth
    | modify_config
    | modify_credential
    | modify_filter
    | modify_group
    | modify_note
    | modify_override
    | modify_permission
    | modify_port_list
    | modify_report
    | modify_report_format
    | modify_role
    | modify_scanner
    | modify_schedule
    | modify_setting
    | modify_target
    | modify_tag
    | modify_task
    | modify_user
    | move_task
    | restore
    | resume_task
    | run_wizard
    | start_task
    | stop_task
    | sync_cert
    | sync_feed
    | sync_config
    | sync_scap
    | test_alert
    | verify_agent
    | verify_report_format
    | verify_scanner

response
  = authenticate_response
    | commands_response
    | create_agent_response
    | create_alert_response
    | create_asset_response
    | create_config_response
    | create_credential_response
    | create_filter_response
    | create_group_response
    | create_note_response
    | create_override_response
    | create_permission_response
    | create_port_list_response
    | create_port_range_response
    | create_report_response
    | create_report_format_response
    | create_role_response
    | create_scanner_response
    | create_schedule_response
    | create_tag_response
    | create_target_response
    | create_task_response
    | create_user_response
    | delete_agent_response
    | delete_asset_response
    | delete_config_response
    | delete_alert_response
    | delete_credential_response
    | delete_filter_response
    | delete_group_response
    | delete_note_response
    | delete_override_response
    | delete_report_response
    | delete_permission_response
    | delete_port_list_response
    | delete_port_range_response
    | delete_report_format_response
    | delete_role_response
    | delete_scanner_response
    | delete_schedule_response
    | delete_tag_response
    | delete_target_response
    | delete_task_response
    | delete_user_response
    | describe_auth_response
    | empty_trashcan_response
    | get_agents_response
    | get_configs_response
    | get_aggregates_response
    | get_alerts_response
    | get_assets_response
    | get_credentials_response
    | get_feeds_response
    | get_filters_response
    | get_groups_response
    | get_info_response
    | get_notes_response
    | get_nvts_response
    | get_nvt_families_response
    | get_overrides_response
    | get_permissions_response
    | get_port_lists_response
    | get_preferences_response
    | get_reports_response
    | get_report_formats_response
    | get_results_response
    | get_roles_response
    | get_scanners_response
    | get_schedules_response
    | get_settings_response
    | get_system_reports_response
    | get_tags_response
    | get_targets_response
    | get_tasks_response
    | get_users_response
    | get_version_response
    | help_response
    | modify_agent_response
    | modify_alert_response
    | modify_asset_response
    | modify_auth_response
    | modify_config_response
    | modify_credential_response
    | modify_filter_response
    | modify_group_response
    | modify_note_response
    | modify_override_response
    | modify_permission_response
    | modify_port_list_response
    | modify_report_response
    | modify_report_format_response
    | modify_role_response
    | modify_scanner_response
    | modify_schedule_response
    | modify_setting_response
    | modify_target_response
    | modify_tag_response
    | modify_task_response
    | modify_user_response
    | move_task_response
    | restore_response
    | resume_task_response
    | run_wizard_response
    | start_task_response
    | stop_task_response
    | sync_cert_response
    | sync_feed_response
    | sync_config_response
    | sync_scap_response
    | test_alert_response
    | verify_agent_response
    | verify_report_format_response
    | verify_scanner_response

### Data Types

# An alive test.
alive_test = xsd:token { pattern = "ICMP, TCP Service & ARP Ping|TCP Service & ARP Ping|ICMP & ARP Ping|ICMP & TCP Service Ping|ARP Ping|TCP Service Ping|ICMP Ping|Scan Config Default" }
# Base64 encoded data.
base64 = xsd:base64Binary
# A true or false value.
boolean = text
# A true or false value, after conversion to an integer.
boolean_atoi = text
# A date and time, in the C `ctime' format.
ctime = text
# A name of a data type.
type_name = xsd:Name
# An integer.
integer = xsd:integer
# A date and time, in ISO 8601 format.
iso_time = text
# A string that may include the characters h, m, l, g and d.
levels = xsd:token { pattern = "h?m?l?g?d?" }
# A name.
name = xsd:string
# A port.
port = xsd:token { pattern = "[0-9]{1,5}" }
# A space separated list of users.
user_list = text
# An Object Identifier (OID).
oid = xsd:token { pattern = "[0-9\.]{1,80}" }
# A severity score.
severity = xsd:token { pattern = "-[1-3](\.0)?|[0-9](\.[0-9])?|10(\.0)?" }
# A string describing an order for sorting.
sort_order = text
# The success or failure status of a command.
status = xsd:token { pattern = "200|201|202|400|401|403|404|409|500|503" }
# A task run status.
task_status = xsd:token { pattern = "Delete Requested|Done|New|Requested|Running|Stop Requested|Stopped|Internal Error" }
# The trend of results for a task.
task_trend = xsd:token { pattern = "up|down|more|less|same" }
# A threat level.
threat = xsd:token { pattern = "High|Medium|Low|Alarm|Log|Debug" }
# A unit of time.
time_unit = xsd:token { pattern = "second|minute|hour|day|week|month|year|decade" }
# A timezone.
timezone = text
# A Universally Unique Identifier (UUID).
uuid = xsd:token { pattern = "[0-9abcdefABCDEF\-]{1,40}" }
# A Universally Unique Identifier (UUID), or the empty string.
uuid_or_empty = xsd:token { pattern = "[0-9abcdefABCDEF\-]{0,40}" }

### Element Types

## Element Type c
##
## A reference to a command.

c
 = element c
     {
       text
     }

## Element Type e
##
## A reference to an element.

e
 = element e
     {
       text
     }

## Element Type r
##
## A reference to a response.

r
 = element r
     {
       text
     }

## Element Type o
##
## An optional pattern item.

o
 = element o
     {
       ( c
           | e
           | r
           | g )
     }

## Element Type g
##
## A group of pattern items.

g
 = element g
     {
       c*
       & e*
       & r*
       & o*
       & any*
     }

## Element Type any
##
## Pattern item indicating "any number of".

any
 = element any
     {
       ( c
           | e
           | r
           | g )
     }

## Element Type pattern
##
## The pattern element of a command or command descendant.

pattern
 = element pattern
     {
       text
       & pattern_attrib*
       & c*
       & e*
       & r*
       & o*
       & g*
       & any*
       & pattern_t?
     }

# An attribute.
pattern_attrib
 = element attrib
     {
       pattern_attrib_name
       & pattern_attrib_type
       & pattern_attrib_required
       & pattern_attrib_filter_keywords*
     }

pattern_attrib_name
 = element name
     {
       type_name
     }

pattern_attrib_type
 = element type
     {
       type_name
     }

pattern_attrib_required
 = element required
     {
       boolean
     }

# Optional description of filter keywords usable in the attribute.
pattern_attrib_filter_keywords
 = element filter_keywords
     {
       filter_keywords
     }

# The type of the text of the element.
pattern_t
 = element t
     {
       type_name
     }

## Element Type command_definition
##
## Definition of a command in OMP describing HELP command.

command_definition
 = element command_definition
     {
       command_definition_name
       & command_definition_summary?
       & command_definition_description?
       & ( ( command_definition_pattern
           & command_definition_response )
           | ( command_definition_type
           & command_definition_ele* ) )
       & command_definition_example*
     }

# The name of the command.
command_definition_name
 = element name
     {
       type_name
     }

# A summary of the command.
command_definition_summary
 = element summary
     {
       text
     }

# A description of the command.
command_definition_description
 = element description
     {
       text
       & command_definition_description_p*
     }

# A paragraph.
command_definition_description_p
 = element p
     {
       text
     }

command_definition_pattern
 = element pattern    # type pattern
     {
       text
       & pattern_attrib*
       & c*
       & e*
       & r*
       & o*
       & g*
       & any*
       & pattern_t?
     }

command_definition_response
 = element response    # type pattern
     {
       text
       & pattern_attrib*
       & c*
       & e*
       & r*
       & o*
       & g*
       & any*
       & pattern_t?
     }

command_definition_example
 = element example
     {
       command_definition_example_summary?
       & command_definition_example_description?
       & command_definition_example_request
       & command_definition_example_response
     }

command_definition_example_summary
 = element summary
     {
       text
     }

command_definition_example_description
 = element description
     {
       text
     }

# Example request.
command_definition_example_request
 = element request
     {
       text
     }

# Response to example request.
command_definition_example_response
 = element response
     {
       text
     }

# The type of the element.
command_definition_type
 = element type
     {
       text
     }

# An element.
command_definition_ele
 = element ele    # type command_definition
     {
       command_definition_name
       & command_definition_summary?
       & command_definition_description?
       & ( ( command_definition_pattern
           & command_definition_response )
           | ( command_definition_type
           & command_definition_ele* ) )
       & command_definition_example*
     }

## Element Type filter_keywords
##
## A group of filter keywords usable in an attribute or element text.

filter_keywords
 = element filter_keywords
     {
       filter_keywords_condition?
       & filter_keywords_column*
       & filter_keywords_option*
     }

# Description of the condition under which the group of keywords applies.
filter_keywords_condition
 = element condition
     {
       text
     }

# A column that can be used multiple times with operators and in sorting.
filter_keywords_column
 = element column
     {
       filter_keywords_column_name
       & filter_keywords_column_type
       & filter_keywords_column_summary
     }

# Name of the keyword as used in the filter.
filter_keywords_column_name
 = element name
     {
       name
     }

# Type of the values the keyword can use.
filter_keywords_column_type
 = element type
     {
       type_name
     }

# Short description of the keyword.
filter_keywords_column_summary
 = element summary
     {
       text
     }

# An option only applied once which cannot be used with operators or in sorting.
filter_keywords_option
 = element option
     {
       filter_keywords_option_name
       & filter_keywords_option_type
       & filter_keywords_option_summary
     }

# Name of the keyword as used in the filter.
filter_keywords_option_name
 = element name
     {
       name
     }

# Type of the values the keyword can use.
filter_keywords_option_type
 = element type
     {
       type_name
     }

# Short description of the keyword.
filter_keywords_option_summary
 = element summary
     {
       text
     }

## Element Type certificate_info
##
## Info about a certificate.

certificate_info
 = element certificate_info
     {
       certificate_info_time_status
       & certificate_info_activation_time
       & certificate_info_expiration_time
       & certificate_info_issuer
       & certificate_info_md5_fingerprint
     }

# Whether the certificate is valid, expired or not active yet.
certificate_info_time_status
 = element time_status
     {
       xsd:token { pattern = "expired|inactive|unknown|valid" }
     }

# Time before which the certificate is not valid.
certificate_info_activation_time
 = element activation_time
     {
       text
     }

# Time after which the certificate is no longer valid.
certificate_info_expiration_time
 = element expiration_time
     {
       text
     }

# DN of the issuer of the certificate.
certificate_info_issuer
 = element issuer
     {
       text
     }

# MD5 fingerprint of the certificate.
certificate_info_md5_fingerprint
 = element md5_fingerprint
     {
       text
     }

## Element Type note
##
## A note.

note
 = element note
     {
       attribute id { uuid }
       & note_permissions
       & note_owner
       & note_nvt
       & note_text
       & note_creation_time
       & note_modification_time
       & note_writable
       & note_in_use
       & note_active
       & note_orphan
       & note_user_tags
       & ( note_hosts
           & note_port
           & note_severity
           & note_threat
           & note_task
           & note_end_time?
           & note_result? )?
     }

# Permissions that the current user has on the note.
note_permissions
 = element permissions
     {
       note_permissions_permission*
     }

note_permissions_permission
 = element permission
     {
       note_permissions_permission_name
     }

# The name of the permission.
note_permissions_permission_name
 = element name
     {
       name
     }

# Owner of the note.
note_owner
 = element owner
     {
       note_owner_name
     }

# The name of the owner.
note_owner_name
 = element name
     {
       name
     }

note_nvt
 = element nvt
     {
       attribute oid { oid }
       & note_nvt_name
       & note_nvt_type
     }

note_nvt_name
 = element name
     {
       name
     }

# The type of the NVT: nvt, cve, ovaldef, ....
note_nvt_type
 = element type
     {
       text
     }

# Date and time the note was created.
note_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the note was last modified.
note_modification_time
 = element modification_time
     {
       iso_time
     }

note_writable
 = element writable
     {
       boolean
     }

note_in_use
 = element in_use
     {
       boolean
     }

# Whether the note is active.
note_active
 = element active
     {
       boolean
     }

# The text of the note.
note_text
 = element text
     {
       text
       & # Whether the content is an excerpt of the full text.
       attribute excerpt { boolean }
     }

# Whether the note is an orphan.
note_orphan
 = element orphan
     {
       boolean
     }

# Info on tags attached to the note.
note_user_tags
 = element user_tags
     {
       note_user_tags_count
       & note_user_tags_tag*
     }

# Number of attached tags.
note_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
note_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & note_user_tags_tag_name
       & note_user_tags_tag_value
       & note_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
note_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
note_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
note_user_tags_tag_comment
 = element comment
     {
       text
     }

# A textual list of hosts.
note_hosts
 = element hosts
     {
       text
     }

# Port to which note applies.
note_port
 = element port
     {
       text
     }

# Severity to which note applies.
note_severity
 = element severity
     {
       severity
     }

# Threat level to which note applies.
note_threat
 = element threat
     {
       threat
     }

# Task to which note applies.
note_task
 = element task
     {
       attribute id { uuid }
     }

# Whether the note is active.
note_active
 = element active
     {
       integer
     }

# End time of the note in case of limit, else empty.
note_end_time
 = element end_time
     {
       text
     }

# Result to which note applies.
note_result
 = element result
     {
       attribute id { uuid }
       & note_result_host
       & note_result_port
       & note_result_nvt
       & note_result_severity
       & note_result_threat
       & note_result_qod
       & note_result_description
     }

note_result_host
 = element host
     {
       text
       & note_result_host_asset
     }

# Asset linked to host.
note_result_host_asset
 = element asset
     {
       attribute asset_id { uuid }
     }

note_result_port
 = element port
     {
       text
     }

note_result_nvt
 = element nvt
     {
       attribute oid { oid }
       & note_result_nvt_name
       & note_result_nvt_type
       & note_result_nvt_cvss_base
       & note_result_nvt_cve?
       & note_result_nvt_bid?
     }

note_result_nvt_name
 = element name
     {
       name
     }

# The type of the NVT: nvt, cve, ovaldef, ....
note_result_nvt_type
 = element type
     {
       text
     }

note_result_nvt_cvss_base
 = element cvss_base
     {
       text
     }

# CVE value associated with the NVT.
note_result_nvt_cve
 = element cve
     {
       text
     }

# BID associated with the NVT.
note_result_nvt_bid
 = element bid
     {
       integer
     }

note_result_severity
 = element severity
     {
       severity
     }

note_result_threat
 = element threat
     {
       threat
     }

# The quality of detection (QoD) of the result.
note_result_qod
 = element qod
     {
       note_result_qod_value
       & note_result_qod_type
     }

# The numeric QoD value.
note_result_qod_value
 = element value
     {
       integer
     }

# The QoD type.
note_result_qod_type
 = element type
     {
       text
     }

note_result_description
 = element description
     {
       text
     }

## Element Type override
##
## An override.

override
 = element override
     {
       attribute id { uuid }
       & override_permissions
       & override_owner
       & override_nvt
       & override_creation_time
       & override_modification_time
       & override_writable
       & override_in_use
       & override_active
       & override_text
       & override_threat
       & override_severity
       & override_new_threat
       & override_new_severity
       & override_orphan
       & override_permissions
       & override_user_tags
       & ( override_hosts
           & override_port
           & override_task
           & override_end_time?
           & override_result? )?
     }

# Permissions that the current user has on the note.
override_permissions
 = element permissions
     {
       override_permissions_permission*
     }

override_permissions_permission
 = element permission
     {
       override_permissions_permission_name
     }

# The name of the permission.
override_permissions_permission_name
 = element name
     {
       name
     }

# Owner of the override.
override_owner
 = element owner
     {
       override_owner_name
     }

override_owner_name
 = element name
     {
       name
     }

override_nvt
 = element nvt
     {
       attribute oid { oid }
       & override_nvt_name
       & override_nvt_type
     }

override_nvt_name
 = element name
     {
       name
     }

# The type of the NVT: nvt, cve, ovaldef, ....
override_nvt_type
 = element type
     {
       text
     }

# Date and time the override was created.
override_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the override was last modified.
override_modification_time
 = element modification_time
     {
       iso_time
     }

override_writable
 = element writable
     {
       boolean
     }

override_in_use
 = element in_use
     {
       boolean
     }

# Whether the override is currently active.
override_active
 = element active
     {
       boolean
     }

# The text of the override.
override_text
 = element text
     {
       text
       & # Whether the contents is an excerpt of the full text.
       attribute excerpt { boolean }
     }

# Threat level to which override applies, derived from severity.
override_threat
 = element threat
     {
       threat
     }

# Severity score to which override applies.
override_severity
 = element severity
     {
       severity
     }

# New threat for result.
override_new_threat
 = element new_threat
     {
       threat
     }

# New severity score for result.
override_new_severity
 = element new_severity
     {
       severity
     }

# Whether the override is an orphan.
override_orphan
 = element orphan
     {
       boolean
     }

# Info on tags attached to the override.
override_user_tags
 = element user_tags
     {
       override_user_tags_count
       & override_user_tags_tag*
     }

# Number of attached tags.
override_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
override_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & override_user_tags_tag_name
       & override_user_tags_tag_value
       & override_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
override_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
override_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
override_user_tags_tag_comment
 = element comment
     {
       text
     }

# A textual list of hosts.
override_hosts
 = element hosts
     {
       text
     }

# Port to which override applies.
override_port
 = element port
     {
       text
     }

# Task to which override applies.
override_task
 = element task
     {
       attribute id { uuid }
     }

# Whether the override is active.
override_active
 = element active
     {
       integer
     }

# Override end time in case of limit, else empty.
override_end_time
 = element end_time
     {
       text
     }

# Result to which override applies.
override_result
 = element result
     {
       attribute id { uuid }
       & override_result_host
       & override_result_port
       & override_result_nvt
       & override_result_threat
       & override_result_severity
       & override_result_qod
       & override_result_description
     }

override_result_host
 = element host
     {
       text
       & override_result_host_asset
     }

# Asset linked to host.
override_result_host_asset
 = element asset
     {
       attribute asset_id { uuid }
     }

override_result_port
 = element port
     {
       text
     }

override_result_nvt
 = element nvt
     {
       attribute oid { oid }
       & override_result_nvt_name
       & override_result_nvt_type
       & override_result_nvt_cvss_base
       & override_result_nvt_cve?
       & override_result_nvt_bid?
     }

override_result_nvt_name
 = element name
     {
       name
     }

# The type of the NVT: nvt, cve, ovaldef, ....
override_result_nvt_type
 = element type
     {
       text
     }

override_result_nvt_cvss_base
 = element cvss_base
     {
       text
     }

# CVE value associated with the NVT.
override_result_nvt_cve
 = element cve
     {
       text
     }

# BID associated with the NVT.
override_result_nvt_bid
 = element bid
     {
       integer
     }

override_result_threat
 = element threat
     {
       threat
     }

override_result_severity
 = element severity
     {
       severity
     }

# The quality of detection (QoD) of the result.
override_result_qod
 = element qod
     {
       override_result_qod_value
       & override_result_qod_type
     }

# The numeric QoD value.
override_result_qod_value
 = element value
     {
       integer
     }

# The QoD type.
override_result_qod_type
 = element type
     {
       text
     }

override_result_description
 = element description
     {
       text
     }

## Element Type result
##
## A result.

result
 = element result
     {
       attribute id { uuid }
       & result_name
       & result_owner
       & result_comment
       & result_creation_time
       & result_modification_time
       & result_user_tags?
       & result_report?
       & result_task?
       & result_host
       & result_port
       & result_nvt
       & result_scan_nvt_version
       & result_threat
       & result_severity
       & result_qod
       & result_original_threat?
       & result_original_severity?
       & result_description
       & result_delta?
       & result_details
       & result_detection
       & result_notes?
       & result_overrides?
     }

# The name of the result.
result_name
 = element name
     {
       text
     }

# Owner of the result.
result_owner
 = element owner
     {
       result_owner_name
     }

# The name of the owner.
result_owner_name
 = element name
     {
       name
     }

# The comment on the result.
result_comment
 = element comment
     {
       text
     }

# Date and time the result was created.
result_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the result was last modified.
result_modification_time
 = element modification_time
     {
       iso_time
     }

# Info on tags attached to the result (not in delta results).
result_user_tags
 = element user_tags
     {
       result_user_tags_count
       & result_user_tags_tag*
     }

# Number of attached tags.
result_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
result_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & result_user_tags_tag_name
       & result_user_tags_tag_value
       & result_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
result_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
result_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
result_user_tags_tag_comment
 = element comment
     {
       text
     }

# Report the result belongs to (only when details were requested).
result_report
 = element report
     {
       # UUID of the report the result belongs to.
       attribute id { uuid }
     }

# Task the result applies to (only when details were requested).
result_task
 = element task
     {
       # UUID of the task the result applies to.
       attribute id { uuid }
       & result_task_name
     }

# Name of the task the result applies to.
result_task_name
 = element name
     {
       text
     }

# The host the result applies to.
result_host
 = element host
     {
       text
       & result_host_asset
     }

# Asset linked to host.
result_host_asset
 = element asset
     {
       attribute asset_id { uuid }
     }

# The port on the host.
result_port
 = element port
     {
       text
     }

# NVT to which result applies.
result_nvt
 = element nvt
     {
       attribute oid { oid }
       & result_nvt_name
       & result_nvt_type
       & result_nvt_family
       & result_nvt_cvss_base
       & result_nvt_cve
       & result_nvt_cpe
       & result_nvt_bid
       & result_nvt_tags
       & result_nvt_cert
       & result_nvt_xref
     }

# The name of the NVT.
result_nvt_name
 = element name
     {
       name
     }

# The type of the NVT: nvt, cve, ovaldef, ....
result_nvt_type
 = element type
     {
       text
     }

# The family the NVT is in.
result_nvt_family
 = element family
     {
       name
     }

# CVSS base value associated with the NVT.
result_nvt_cvss_base
 = element cvss_base
     {
       integer
     }

# CVE associated with the NVT.
result_nvt_cve
 = element cve
     {
       text
     }

# The CPE which produced the CVE (for "cve" results).
result_nvt_cpe
 = element cpe
     {
       text
     }

# BID associated with the NVT.
result_nvt_bid
 = element bid
     {
       text
     }

# Tags associated with the NVT.
result_nvt_tags
 = element tags
     {
       text
     }

# List of CERT advisories referencing this NVT via CVEs.
result_nvt_cert
 = element cert
     {
       result_nvt_cert_cert_ref*
     }

# A CERT advisory reference.
result_nvt_cert_cert_ref
 = element cert_ref
     {
       # ID of the advisory.
       attribute id { text }?
       & # Type of the advisory (e.g. "DFN-CERT", "CERT-BUND").
       attribute type { text }?
     }

# XREFs associated with the NVT.
result_nvt_xref
 = element xref
     {
       text
     }

# Version of the NVT used in the scan.
result_scan_nvt_version
 = element scan_nvt_version
     {
       text
     }

result_threat
 = element threat
     {
       threat
     }

result_severity
 = element severity
     {
       severity
     }

# The quality of detection (QoD) of the result.
result_qod
 = element qod
     {
       result_qod_value
       & result_qod_type
     }

# The numeric QoD value.
result_qod_value
 = element value
     {
       integer
     }

# The QoD type.
result_qod_type
 = element type
     {
       text
     }

# Original threat when overridden.
result_original_threat
 = element original_threat
     {
       threat
     }

# Original severity when overridden.
result_original_severity
 = element original_severity
     {
       severity
     }

# Description of the result.
result_description
 = element description
     {
       text
     }

# Delta state.
result_delta
 = element delta
     {
       text
       & result_delta_result?
       & result_delta_diff?
       & result_delta_notes?
       & result_delta_overrides?
     }

# Delta result.
result_delta_result
 = element result    # type result
     {
       attribute id { uuid }
       & result_name
       & result_owner
       & result_comment
       & result_creation_time
       & result_modification_time
       & result_user_tags?
       & result_report?
       & result_task?
       & result_host
       & result_port
       & result_nvt
       & result_scan_nvt_version
       & result_threat
       & result_severity
       & result_qod
       & result_original_threat?
       & result_original_severity?
       & result_description
       & result_delta?
       & result_details
       & result_detection
       & result_notes?
       & result_overrides?
     }

# Comparison between descriptions.
result_delta_diff
 = element diff    # type text
     {
     }

# List of notes on the result.
result_delta_notes
 = element notes
     {
       result_delta_notes_note*
     }

result_delta_notes_note
 = element note    # type note
     {
       attribute id { uuid }
       & note_permissions
       & note_owner
       & note_nvt
       & note_text
       & note_creation_time
       & note_modification_time
       & note_writable
       & note_in_use
       & note_active
       & note_orphan
       & note_user_tags
       & ( note_hosts
           & note_port
           & note_severity
           & note_threat
           & note_task
           & note_end_time?
           & note_result? )?
     }

# List of overrides on the result.
result_delta_overrides
 = element overrides
     {
       result_delta_overrides_override*
     }

result_delta_overrides_override
 = element override    # type override
     {
       attribute id { uuid }
       & override_permissions
       & override_owner
       & override_nvt
       & override_creation_time
       & override_modification_time
       & override_writable
       & override_in_use
       & override_active
       & override_text
       & override_threat
       & override_severity
       & override_new_threat
       & override_new_severity
       & override_orphan
       & override_permissions
       & override_user_tags
       & ( override_hosts
           & override_port
           & override_task
           & override_end_time?
           & override_result? )?
     }

# Any details associated with the result.
result_details
 = element details
     {
       result_details_detail*
     }

# A detail associated with the result.
result_details_detail
 = element detail
     {
       result_details_detail_name
       & result_details_detail_value
     }

# The name of the detail.
result_details_detail_name
 = element name
     {
       text
     }

# The value of the detail.
result_details_detail_value
 = element value
     {
       text
     }

# Detection details.
result_detection
 = element detection
     {
       result_detection_result
     }

# Detection result.
result_detection_result
 = element result
     {
       # UUID of the detection result.
       attribute id { uuid }
       & result_detection_result_details
     }

result_detection_result_details
 = element details
     {
       result_detection_result_details_detail*
     }

# A detail associated with the detection result.
result_detection_result_details_detail
 = element detail
     {
       result_detection_result_details_detail_name
       & result_detection_result_details_detail_value
     }

# The name of the detail.
result_detection_result_details_detail_name
 = element name
     {
       text
     }

# The value of the detail.
result_detection_result_details_detail_value
 = element value
     {
       text
     }

# List of notes on the result.
result_notes
 = element notes
     {
       result_notes_note*
     }

result_notes_note
 = element note    # type note
     {
       attribute id { uuid }
       & note_permissions
       & note_owner
       & note_nvt
       & note_text
       & note_creation_time
       & note_modification_time
       & note_writable
       & note_in_use
       & note_active
       & note_orphan
       & note_user_tags
       & ( note_hosts
           & note_port
           & note_severity
           & note_threat
           & note_task
           & note_end_time?
           & note_result? )?
     }

# List of overrides on the result.
result_overrides
 = element overrides
     {
       result_overrides_override*
     }

result_overrides_override
 = element override    # type override
     {
       attribute id { uuid }
       & override_permissions
       & override_owner
       & override_nvt
       & override_creation_time
       & override_modification_time
       & override_writable
       & override_in_use
       & override_active
       & override_text
       & override_threat
       & override_severity
       & override_new_threat
       & override_new_severity
       & override_orphan
       & override_permissions
       & override_user_tags
       & ( override_hosts
           & override_port
           & override_task
           & override_end_time?
           & override_result? )?
     }

## Element Type report
##
## Actually attributes and either base64 or a report.

report
 = element report
     {
       text # RNC limitation: base64
       & attribute id { uuid }
       & attribute format_id { uuid }
       & attribute extension { text }
       & attribute content_type { text }
       & attribute type { xsd:token { pattern = "scan|assets|prognostic" } }?
       & report_owner
       & report_name
       & report_comment
       & report_creation_time
       & report_modification_time
       & report_writable
       & report_in_use
       & report_task
       & report_report_format
       & report_report
     }

# Owner of the report.
report_owner
 = element owner
     {
       report_owner_name
     }

# The name of the owner.
report_owner_name
 = element name
     {
       name
     }

# Creation time as compatibility placeholder.
report_name
 = element name
     {
       ""
     }

# The comment on the report.
report_comment
 = element comment
     {
       text
     }

# Date and time the report was created.
report_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the report was last modified.
report_modification_time
 = element modification_time
     {
       iso_time
     }

# Whether the report is in use.
report_in_use
 = element in_use
     {
       boolean
     }

# Whether the report is writable.
report_writable
 = element writable
     {
       boolean
     }

# The task the report belongs to.
report_task
 = element task
     {
       attribute id { uuid }
       & report_task_name
     }

# The name of the task.
report_task_name
 = element name
     {
       name
     }

# The report format used.
report_report_format
 = element report_format
     {
       attribute id { uuid }
       & report_report_format_name
     }

# The name of the report format.
report_report_format_name
 = element name
     {
       name
     }

report_report
 = element report
     {
       attribute id { uuid }
       & attribute type { xsd:token { pattern = "scan|assets|prognostic" } }?
       & report_report_omp
       & report_report_report_format
       & report_report_sort
       & report_report_filters
       & report_report_severity_class
       & report_report_delta?
       & ( report_report_timezone
           & report_report_timezone_abbrev
           & report_report_permissions
           & report_report_user_tags
           & report_report_scan_run_status
           & report_report_result_count
           & report_report_severity
           & report_report_host_count?
           & report_report_task
           & report_report_scan
           & report_report_ports
           & report_report_results
           & report_report_hosts
           & report_report_closed_cves
           & report_report_vulns
           & report_report_os
           & report_report_apps
           & report_report_ssl_certs
           & report_report_host*
           & report_report_timestamp
           & report_report_scan_start
           & report_report_host_start*
           & report_report_host_end*
           & report_report_scan_end
           & report_report_errors )?
     }

# Information of the OMP server.
report_report_omp
 = element omp
     {
       report_report_omp_version
     }

# The OMP version.
report_report_omp_version
 = element version
     {
       text
     }

report_report_report_format
 = element report_format
     {
       report_report_report_format_param
     }

# Report format parameter.
report_report_report_format_param
 = element param
     {
       report_report_report_format_param_name
       & report_report_report_format_param_value
     }

# Parameter name.
report_report_report_format_param_name
 = element name
     {
       text
     }

# Parameter value.
report_report_report_format_param_value
 = element value
     {
       text
     }

report_report_delta
 = element delta
     {
       report_report_delta_report
     }

# Second report, for delta reports.
report_report_delta_report
 = element report
     {
       attribute id { uuid }
       & report_report_delta_report_scan_run_status
       & report_report_delta_report_timestamp
       & report_report_delta_report_scan_start
       & report_report_delta_report_scan_end
     }

# Run status of task scan at time of report.
report_report_delta_report_scan_run_status
 = element scan_run_status
     {
       task_status
     }

# The time the scan was requested.
report_report_delta_report_timestamp
 = element timestamp
     {
       iso_time
     }

# Start time of scan.
report_report_delta_report_scan_start
 = element scan_start
     {
       iso_time
     }

# End time of scan.
report_report_delta_report_scan_end
 = element scan_end
     {
       iso_time
     }

# Result sorting information.
report_report_sort
 = element sort
     {
       report_report_sort_field
     }

# Sort field.
report_report_sort_field
 = element field
     {
       text
       & report_report_sort_field_order
     }

# Sort order of field.
report_report_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

# Result filtering information.
report_report_filters
 = element filters
     {
       text # RNC limitation: levels
       & # Filter used if any, else 0.
       attribute id { uuid }?
       & report_report_filters_term
       & report_report_filters_phrase
       & report_report_filters_notes
       & report_report_filters_overrides
       & report_report_filters_apply_overrides
       & report_report_filters_result_hosts_only
       & report_report_filters_min_qod
       & report_report_filters_autofp
       & report_report_filters_filter*
       & report_report_filters_host?
       & report_report_filters_delta?
     }

# Filter term.
report_report_filters_term
 = element term
     {
       text
     }

# Search phrase.
report_report_filters_phrase
 = element phrase
     {
       text
     }

# Whether notes are included.
report_report_filters_notes
 = element notes
     {
       xsd:token { pattern = "0|1" }
     }

# Whether overrides are included.
report_report_filters_overrides
 = element overrides
     {
       xsd:token { pattern = "0|1" }
     }

# Whether overrides are applied.
report_report_filters_apply_overrides
 = element apply_overrides
     {
       xsd:token { pattern = "0|1" }
     }

# Whether only those hosts that have results are included.
report_report_filters_result_hosts_only
 = element result_hosts_only
     {
       xsd:token { pattern = "0|1" }
     }

# Minimum QoD if in effect, else empty string.
report_report_filters_min_qod
 = element min_qod
     {
       text
     }

# Whether to trust vendor security updates. 1 full match, 2 partial.
report_report_filters_autofp
 = element autofp
     {
       xsd:token { pattern = "0|1|2" }
     }

# Level filter.
report_report_filters_filter
 = element filter
     {
       xsd:token { pattern = "High|Medium|Low|Log|Debug" }
     }

report_report_filters_host
 = element host
     {
       report_report_filters_host_ip
     }

# IP of single host in report (for "delta" and "prognostic").
report_report_filters_host_ip
 = element ip
     {
       text
     }

# Delta states.
report_report_filters_delta
 = element delta
     {
       text
       & report_report_filters_delta_changed
       & report_report_filters_delta_gone
       & report_report_filters_delta_new
       & report_report_filters_delta_same
     }

# Whether changed results are included.
report_report_filters_delta_changed
 = element changed
     {
       boolean
     }

# Whether results that have vanished are included.
report_report_filters_delta_gone
 = element gone
     {
       boolean
     }

# Whether new results are included.
report_report_filters_delta_new
 = element new
     {
       boolean
     }

# Whether results that are equal are included.
report_report_filters_delta_same
 = element same
     {
       boolean
     }

# Name of timezone used for dates.
report_report_timezone
 = element timezone
     {
       timezone
     }

# Abbreviation used for timezone.
report_report_timezone_abbrev
 = element timezone_abbrev
     {
       text
     }

# Permissions that the current user has on the report.
report_report_permissions
 = element permissions
     {
       report_report_permissions_permission*
     }

report_report_permissions_permission
 = element permission
     {
       report_report_permissions_permission_name
     }

# The name of the permission.
report_report_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the report.
report_report_user_tags
 = element user_tags
     {
       report_report_user_tags_count
       & report_report_user_tags_tag*
     }

# Number of attached tags.
report_report_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
report_report_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & report_report_user_tags_tag_name
       & report_report_user_tags_tag_value
       & report_report_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
report_report_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
report_report_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
report_report_user_tags_tag_comment
 = element comment
     {
       text
     }

# Run status of task scan at time of report.
report_report_scan_run_status
 = element scan_run_status
     {
       task_status
     }

# Counts of results produced by scan.
report_report_result_count
 = element result_count
     {
       text
       & report_report_result_count_full
       & report_report_result_count_filtered
       & report_report_result_count_debug
       & report_report_result_count_hole
       & report_report_result_count_info
       & report_report_result_count_log
       & report_report_result_count_warning
     }

# Total number of results produced by scan.
report_report_result_count_full
 = element full
     {
       integer
     }

# Number of results after filtering.
report_report_result_count_filtered
 = element filtered
     {
       integer
     }

# Number of "debug" results (threat level Debug).
report_report_result_count_debug
 = element debug
     {
       report_report_result_count_debug_full
       & report_report_result_count_debug_filtered
     }

# Total number of results.
report_report_result_count_debug_full
 = element full
     {
       integer
     }

# Number of results after filtering.
report_report_result_count_debug_filtered
 = element filtered
     {
       integer
     }

# Number of "hole" results (threat level High).
report_report_result_count_hole
 = element hole
     {
       report_report_result_count_hole_full
       & report_report_result_count_hole_filtered
     }

# Total number of results.
report_report_result_count_hole_full
 = element full
     {
       integer
     }

# Number of results after filtering.
report_report_result_count_hole_filtered
 = element filtered
     {
       integer
     }

# Number of "info" results (threat level Low).
report_report_result_count_info
 = element info
     {
       report_report_result_count_info_full
       & report_report_result_count_info_filtered
     }

# Total number of results.
report_report_result_count_info_full
 = element full
     {
       integer
     }

# Number of results after filtering.
report_report_result_count_info_filtered
 = element filtered
     {
       integer
     }

# Number of "log" results (threat level Log).
report_report_result_count_log
 = element log
     {
       report_report_result_count_log_full
       & report_report_result_count_log_filtered
     }

# Total number of results.
report_report_result_count_log_full
 = element full
     {
       integer
     }

# Number of results after filtering.
report_report_result_count_log_filtered
 = element filtered
     {
       integer
     }

# Number of "warning" results (threat level Medium).
report_report_result_count_warning
 = element warning
     {
       report_report_result_count_warning_full
       & report_report_result_count_warning_filtered
     }

# Total number of results.
report_report_result_count_warning_full
 = element full
     {
       integer
     }

# Number of results after filtering.
report_report_result_count_warning_filtered
 = element filtered
     {
       integer
     }

report_report_severity
 = element severity
     {
       report_report_severity_full
       & report_report_severity_filtered
     }

# Maximum severity of the full report.
report_report_severity_full
 = element full
     {
       severity
     }

# Maximum severity of the report after filtering.
report_report_severity_filtered
 = element filtered
     {
       severity
     }

report_report_severity_class
 = element severity_class
     {
       report_report_severity_class_name
       & report_report_severity_class_full_name
       & report_report_severity_class_severity_range*
     }

# Short severity class name.
report_report_severity_class_name
 = element name
     {
       
        ERROR
      
     }

# Full severity class name.
report_report_severity_class_full_name
 = element full_name
     {
       text
     }

# Severity range.
report_report_severity_class_severity_range
 = element severity_range
     {
       report_report_severity_class_severity_range_name
       & report_report_severity_class_severity_range_min
       & report_report_severity_class_severity_range_max
     }

# Name of severity range.
report_report_severity_class_severity_range_name
 = element name
     {
       name
     }

# Minimum CVSS value.
report_report_severity_class_severity_range_min
 = element min
     {
       integer
     }

# Maximum CVSS value.
report_report_severity_class_severity_range_max
 = element max
     {
       integer
     }

# Counts of hosts in the results.
report_report_host_count
 = element host_count
     {
       report_report_host_count_full
       & report_report_host_count_filtered
     }

# Total number of hosts.
report_report_host_count_full
 = element full
     {
       integer
     }

# Number of hosts after filtering.
report_report_host_count_filtered
 = element filtered
     {
       integer
     }

report_report_task
 = element task
     {
       attribute id { uuid }
       & report_report_task_name
       & report_report_task_comment
       & report_report_task_target
       & report_report_task_progress
       & report_report_task_user_tags
     }

# The name of the task.
report_report_task_name
 = element name
     {
       name
     }

# Comment for the task.
report_report_task_comment
 = element comment
     {
       text
     }

# The target of the task.
report_report_task_target
 = element target
     {
       # The UUID of the target.
       attribute id { uuid }?
       & report_report_task_target_trash
     }

# Whether the target is in the trashcan.
report_report_task_target_trash
 = element trash    # type boolean
     {
     }

# The percentage of the task that is complete.
report_report_task_progress
 = element progress
     {
       integer
     }

# Info on tags attached to the task.
report_report_task_user_tags
 = element user_tags
     {
       report_report_task_user_tags_count
       & report_report_task_user_tags_tag*
     }

# Number of attached tags.
report_report_task_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag.
report_report_task_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & report_report_task_user_tags_tag_name
       & report_report_task_user_tags_tag_value
       & report_report_task_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
report_report_task_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
report_report_task_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
report_report_task_user_tags_tag_comment
 = element comment
     {
       text
     }

# Info from scan time.
report_report_scan
 = element scan
     {
       report_report_scan_task
     }

report_report_scan_task
 = element task
     {
       report_report_scan_task_slave
       & report_report_scan_task_preferences
     }

# The task slave.
report_report_scan_task_slave
 = element slave
     {
       attribute id { uuid }
       & report_report_scan_task_slave_name
       & report_report_scan_task_slave_host
       & report_report_scan_task_slave_port
     }

report_report_scan_task_slave_name
 = element name
     {
       name
     }

report_report_scan_task_slave_host
 = element host
     {
       text
     }

report_report_scan_task_slave_port
 = element port
     {
       text
     }

# Currently only "source_iface".
report_report_scan_task_preferences
 = element preferences
     {
       report_report_scan_task_preferences_preference*
     }

report_report_scan_task_preferences_preference
 = element preference
     {
       report_report_scan_task_preferences_preference_name
       & report_report_scan_task_preferences_preference_scanner_name
       & report_report_scan_task_preferences_preference_value
     }

# Full name of preference, suitable for end users.
report_report_scan_task_preferences_preference_name
 = element name
     {
       text
     }

# Compact name of preference, from scanner.
report_report_scan_task_preferences_preference_scanner_name
 = element scanner_name
     {
       text
     }

report_report_scan_task_preferences_preference_value
 = element value
     {
       text
     }

report_report_ports
 = element ports
     {
       attribute start { integer }
       & attribute max { integer }
       & report_report_ports_port*
     }

report_report_ports_port
 = element port
     {
       text
       & report_report_ports_port_host
       & report_report_ports_port_severity
       & report_report_ports_port_threat
     }

report_report_ports_port_host
 = element host
     {
       text
     }

report_report_ports_port_severity
 = element severity
     {
       severity
     }

report_report_ports_port_threat
 = element threat
     {
       threat
     }

report_report_results
 = element results
     {
       attribute start { integer }
       & attribute max { integer }
       & report_report_results_result*
     }

# A result.
report_report_results_result
 = element result    # type result
     {
       attribute id { uuid }
       & result_name
       & result_owner
       & result_comment
       & result_creation_time
       & result_modification_time
       & result_user_tags?
       & result_report?
       & result_task?
       & result_host
       & result_port
       & result_nvt
       & result_scan_nvt_version
       & result_threat
       & result_severity
       & result_qod
       & result_original_threat?
       & result_original_severity?
       & result_description
       & result_delta?
       & result_details
       & result_detection
       & result_notes?
       & result_overrides?
     }

report_report_hosts
 = element hosts
     {
       ( ( attribute start { integer }
           & attribute max { integer } )
           | report_report_hosts_count )
     }

# Number of hosts.
report_report_hosts_count
 = element count
     {
     }

# .
report_report_closed_cves
 = element closed_cves
     {
       report_report_closed_cves_count
     }

# The number of closed CVEs.
report_report_closed_cves_count
 = element count
     {
     }

# .
report_report_vulns
 = element vulns
     {
       report_report_vulns_count
     }

# The number of Vulnerabilities.
report_report_vulns_count
 = element count
     {
     }

# .
report_report_os
 = element os
     {
       report_report_os_count
     }

# The number of operating systems.
report_report_os_count
 = element count
     {
     }

# .
report_report_apps
 = element apps
     {
       report_report_apps_count
     }

# The number of Applications.
report_report_apps_count
 = element count
     {
     }

# .
report_report_ssl_certs
 = element ssl_certs
     {
       report_report_ssl_certs_count
     }

# The number of SSL certificates.
report_report_ssl_certs_count
 = element count
     {
     }

report_report_host
 = element host
     {
       report_report_host_ip
       & report_report_host_asset
       & report_report_host_start
       & report_report_host_end
       & report_report_host_port_count
       & report_report_host_result_count
       & report_report_host_detail*
     }

# IP of the host.
report_report_host_ip
 = element ip
     {
       text
     }

# Asset linked to host.
report_report_host_asset
 = element asset
     {
       attribute asset_id { uuid }
     }

# Scan start time for this host.
report_report_host_start
 = element start
     {
       text
     }

# Scan end time for this host.
report_report_host_end
 = element end
     {
       text
     }

# .
report_report_host_port_count
 = element port_count
     {
       report_report_host_port_count_page
     }

# Number of ports of current host on current page.
report_report_host_port_count_page
 = element page
     {
       integer
     }

# .
report_report_host_result_count
 = element result_count
     {
       report_report_host_result_count_page
       & report_report_host_result_count_hole
       & report_report_host_result_count_warning
       & report_report_host_result_count_info
       & report_report_host_result_count_log
       & report_report_host_result_count_false_positive
     }

# Total number of results for current host on current page.
report_report_host_result_count_page
 = element page
     {
       integer
     }

# Number of "hole" results (level "High").
report_report_host_result_count_hole
 = element hole
     {
       report_report_host_result_count_hole_page
     }

# Number of results on current page.
report_report_host_result_count_hole_page
 = element page
     {
       integer
     }

# Number of "warning" results (level "Medium").
report_report_host_result_count_warning
 = element warning
     {
       report_report_host_result_count_warning_page
     }

# Number of results on current page.
report_report_host_result_count_warning_page
 = element page
     {
       integer
     }

# Number of "info" results (level "Low").
report_report_host_result_count_info
 = element info
     {
       report_report_host_result_count_info_page
     }

# Number of results on current page.
report_report_host_result_count_info_page
 = element page
     {
       integer
     }

# Number of "log" results.
report_report_host_result_count_log
 = element log
     {
       report_report_host_result_count_log_page
     }

# Number of results on current page.
report_report_host_result_count_log_page
 = element page
     {
       integer
     }

# Number of "false positive" results.
report_report_host_result_count_false_positive
 = element false_positive
     {
       report_report_host_result_count_false_positive_page
     }

# Number of results on current page.
report_report_host_result_count_false_positive_page
 = element page
     {
       integer
     }

# A detail associated with the host.
report_report_host_detail
 = element detail
     {
       report_report_host_detail_name
       & report_report_host_detail_value
       & report_report_host_detail_source
       & report_report_host_detail_extra
     }

# The name of the detail.
report_report_host_detail_name
 = element name
     {
       text
     }

# The value of the detail.
report_report_host_detail_value
 = element value
     {
       text
     }

# Where the detail comes from.
report_report_host_detail_source
 = element source
     {
       report_report_host_detail_source_type
       & report_report_host_detail_source_name
       & report_report_host_detail_source_description
     }

# The type of the detail source.
report_report_host_detail_source_type
 = element type
     {
       text
     }

# The name of the detail source.
report_report_host_detail_source_name
 = element name
     {
       text
     }

# A description of the detail source.
report_report_host_detail_source_description
 = element description
     {
       text
     }

# Extra info (NVT CVSS for closed CVE results).
report_report_host_detail_extra
 = element extra
     {
       text
     }

# The time the scan was requested.
report_report_timestamp
 = element timestamp
     {
       iso_time
     }

# Start time of scan.
report_report_scan_start
 = element scan_start
     {
       iso_time
     }

# Start time of a particular host.
report_report_host_start
 = element host_start
     {
       text # RNC limitation: iso_time
       & report_report_host_start_host
     }

report_report_host_start_host
 = element host
     {
       text
     }

# End time of a particular host.
report_report_host_end
 = element host_end
     {
       text # RNC limitation: iso_time
       & report_report_host_end_host
     }

report_report_host_end_host
 = element host
     {
       text
     }

# End time of scan.
report_report_scan_end
 = element scan_end
     {
       iso_time
     }

report_report_errors
 = element errors
     {
       report_report_errors_count
       & report_report_errors_error*
     }

# The number of error messages.
report_report_errors_count
 = element count
     {
     }

# An error message.
report_report_errors_error
 = element error
     {
       report_report_errors_error_host
       & report_report_errors_error_port
       & report_report_errors_error_description
       & report_report_errors_error_nvt
       & report_report_errors_error_scan_nvt_version
       & report_report_errors_error_severity
     }

# The host of the error message.
report_report_errors_error_host
 = element host
     {
       text
       & report_report_errors_error_host_asset
     }

# Asset linked to host.
report_report_errors_error_host_asset
 = element asset
     {
       attribute asset_id { uuid }
     }

# The port of the error message.
report_report_errors_error_port
 = element port
     {
       port
     }

# The description of the error message.
report_report_errors_error_description
 = element description
     {
       text
     }

# The NVT that generated the error message.
report_report_errors_error_nvt
 = element nvt
     {
       attribute oid {  }
       & report_report_errors_error_nvt_name
       & report_report_errors_error_nvt_type
       & report_report_errors_error_nvt_cvss_base
     }

# The name of the NVT.
report_report_errors_error_nvt_name
 = element name
     {
       text
     }

# The type of the NVT: nvt, cve, ovaldef, ....
report_report_errors_error_nvt_type
 = element type
     {
       text
     }

# The base CVSS score of the NVT.
report_report_errors_error_nvt_cvss_base
 = element cvss_base
     {
       severity
     }

# The NVT version that generated the error.
report_report_errors_error_scan_nvt_version
 = element scan_nvt_version
     {
       text
     }

# The severity score of the error message.
report_report_errors_error_severity
 = element severity
     {
       severity
     }

### Commands

## Command authenticate
##
## Authenticate with the manager.

authenticate
 = element authenticate
     {
       authenticate_credentials
     }

authenticate_credentials
 = element credentials
     {
       authenticate_credentials_username
       & authenticate_credentials_password
     }

# The login name of the user.
authenticate_credentials_username
 = element username
     {
       text
     }

# The user's password.
authenticate_credentials_password
 = element password
     {
       text
     }

## Command commands
##
## Run a list of commands.

commands
 = element commands
     {
       ( authenticate
           | commands
           | create_agent
           | create_alert
           | create_asset
           | create_config
           | create_credential
           | create_filter
           | create_group
           | create_note
           | create_override
           | create_permission
           | create_port_list
           | create_port_range
           | create_report_format
           | create_role
           | create_scanner
           | create_schedule
           | create_tag
           | create_target
           | create_task
           | create_user
           | delete_agent
           | delete_alert
           | delete_asset
           | delete_config
           | delete_credential
           | delete_filter
           | delete_group
           | delete_note
           | delete_override
           | delete_permission
           | delete_report
           | delete_report_format
           | delete_role
           | delete_port_list
           | delete_port_range
           | delete_scanner
           | delete_schedule
           | delete_tag
           | delete_target
           | delete_task
           | delete_user
           | describe_auth
           | empty_trashcan
           | get_agents
           | get_alerts
           | get_assets
           | get_configs
           | get_credentials
           | get_feeds
           | get_filters
           | get_groups
           | get_info
           | get_notes
           | get_nvts
           | get_nvt_families
           | get_overrides
           | get_permissions
           | get_port_lists
           | get_preferences
           | get_reports
           | get_report_formats
           | get_results
           | get_roles
           | get_scanners
           | get_schedules
           | get_settings
           | get_system_reports
           | get_tags
           | get_targets
           | get_tasks
           | get_users
           | get_version
           | help
           | modify_agent
           | modify_alert
           | modify_asset
           | modify_auth
           | modify_config
           | modify_credential
           | modify_filter
           | modify_group
           | modify_note
           | modify_override
           | modify_permission
           | modify_port_list
           | modify_report
           | modify_report_format
           | modify_role
           | modify_scanner
           | modify_schedule
           | modify_setting
           | modify_tag
           | modify_target
           | modify_task
           | modify_user
           | restore
           | resume_task
           | run_wizard
           | start_task
           | stop_task
           | sync_feed
           | sync_config
           | sync_scap
           | sync_cert
           | test_alert
           | verify_agent
           | verify_report_format
           | verify_scanner )*
     }

## Command create_agent
##
## Create an agent.

create_agent
 = element create_agent
     {
       create_agent_installer
       & create_agent_name
       & create_agent_comment?
       & create_agent_copy?
       & create_agent_howto_install?
       & create_agent_howto_use?
     }

# A file that installs the agent on a target machine.
create_agent_installer
 = element installer
     {
       text # RNC limitation: base64
       & create_agent_installer_signature
     }

# A detached OpenPGP signature of the installer.
create_agent_installer_signature
 = element signature
     {
       base64
     }

# A name for the installer.
create_agent_name
 = element name
     {
       name
     }

# A comment on the agent.
create_agent_comment
 = element comment
     {
       text
     }

# The UUID of an existing agent.
create_agent_copy
 = element copy
     {
       uuid
     }

# A file that describes how to install the agent.
create_agent_howto_install
 = element howto_install
     {
       base64
     }

# A file that describes how to use the agent.
create_agent_howto_use
 = element howto_use
     {
       base64
     }

## Command create_alert
##
## Create an alert.

create_alert
 = element create_alert
     {
       create_alert_name
       & create_alert_comment?
       & create_alert_copy?
       & create_alert_condition
       & create_alert_event
       & create_alert_method
       & create_alert_filter
     }

# A name for the alert.
create_alert_name
 = element name
     {
       name
     }

# A comment on the alert.
create_alert_comment
 = element comment
     {
       text
     }

# The UUID of an existing alert.
create_alert_copy
 = element copy
     {
       uuid
     }

# The condition that must be satisfied for the alert to occur.
create_alert_condition
 = element condition
     {
       text
       & create_alert_condition_data*
     }

# Some data that defines the condition.
create_alert_condition_data
 = element data
     {
       text
       & create_alert_condition_data_name
     }

# The name of the condition data.
create_alert_condition_data_name
 = element name
     {
       text
     }

# The event that must happen for the alert to occur.
create_alert_event
 = element event
     {
       text
       & create_alert_event_data*
     }

# Some data that defines the event.
create_alert_event_data
 = element data
     {
       text
       & create_alert_event_data_name
     }

# The name of the event data.
create_alert_event_data_name
 = element name
     {
       text
     }

# The method by which the user is alerted.
create_alert_method
 = element method
     {
       text
       & create_alert_method_data*
     }

# Some data that defines the method.
create_alert_method_data
 = element data
     {
       text
       & create_alert_method_data_name
     }

# The name of the method data.
create_alert_method_data_name
 = element name
     {
       text
     }

# Filter to apply when executing alert.
create_alert_filter
 = element filter
     {
       attribute id { uuid }
     }

## Command create_asset
##
## Create an asset.

create_asset
 = element create_asset
     {
       ( create_asset_asset
           | create_asset_report )
     }

create_asset_asset
 = element asset
     {
       create_asset_asset_name
       & create_asset_asset_comment
     }

# A name for the asset.
create_asset_asset_name
 = element name
     {
       name
     }

# A comment on the asset.
create_asset_asset_comment
 = element comment
     {
       text
     }

# Report from which to import assets.
create_asset_report
 = element report
     {
       attribute id { uuid }
       & create_asset_report_filter
     }

# Filter, for min_qod and apply_overrides.
create_asset_report_filter
 = element filter
     {
       create_asset_report_filter_term
     }

# Filter term.
create_asset_report_filter_term
 = element term
     {
       text
     }

## Command create_config
##
## Create a config.

create_config
 = element create_config
     {
       create_config_comment?
       & ( create_config_copy
           | get_configs_response )
       & create_config_name
     }

# A comment on the config.
create_config_comment
 = element comment
     {
       text
     }

# The UUID of an existing config.
create_config_copy
 = element copy
     {
       uuid
     }

# A name for the config.
create_config_name
 = element name
     {
       name
     }

## Command create_credential
##
## Create a credential.

create_credential
 = element create_credential
     {
       create_credential_name
       & create_credential_comment?
       & create_credential_copy?
       & create_credential_allow_insecure?
       & create_credential_certificate?
       & create_credential_key?
       & create_credential_login?
       & create_credential_password?
       & create_credential_auth_algorithm?
       & create_credential_community?
       & create_credential_privacy?
       & create_credential_type?
     }

# A name for the credential.
create_credential_name
 = element name
     {
       name
     }

# A comment on the credential.
create_credential_comment
 = element comment
     {
       text
     }

# The UUID of an existing credential.
create_credential_copy
 = element copy
     {
       uuid
     }

# Whether to allow insecure use of the credential.
create_credential_allow_insecure
 = element allow_insecure
     {
       boolean
     }

# The certificate of the credential.
create_credential_certificate
 = element certificate
     {
       text
     }

create_credential_key
 = element key
     {
       create_credential_key_phrase
       & create_credential_key_private
     }

# Key passphrase.
create_credential_key_phrase
 = element phrase
     {
       text
     }

# Private key.
create_credential_key_private
 = element private
     {
       text
     }

# The user name of the credential.
create_credential_login
 = element login
     {
       text
     }

# The password for the credential login.
create_credential_password
 = element password
     {
       text
     }

# The SNMP community.
create_credential_community
 = element community
     {
       text
     }

# Authentication algorithm for SNMP, either md5 or sha1.
create_credential_auth_algorithm
 = element auth_algorithm
     {
       xsd:token { pattern = "md5|sha1" }
     }

create_credential_privacy
 = element privacy
     {
       create_credential_privacy_algorithm
       & create_credential_privacy_password
     }

# The SNMP privacy algorithm, either aes or des.
create_credential_privacy_algorithm
 = element algorithm
     {
       xsd:token { pattern = "aes|des" }
     }

# The SNMP privacy password.
create_credential_privacy_password
 = element password
     {
       text
     }

# The type of credential to create.
create_credential_type
 = element type
     {
       xsd:token { pattern = "cc|snmp|up|usk" }
     }

## Command create_filter
##
## Create a filter.

create_filter
 = element create_filter
     {
       create_filter_name
       & create_filter_comment?
       & create_filter_copy?
       & create_filter_term?
       & create_filter_type?
     }

# A name for the filter.
create_filter_name
 = element name
     {
       text # RNC limitation: name
       & create_filter_name_make_unique
     }

# Whether to append a unique suffix if the name already exists.
create_filter_name_make_unique
 = element make_unique
     {
       boolean
     }

# A comment on the filter.
create_filter_comment
 = element comment
     {
       text
     }

# The UUID of an existing filter.
create_filter_copy
 = element copy
     {
       uuid
     }

# Filter term.
create_filter_term
 = element term
     {
       text
     }

# Resource type.
create_filter_type
 = element type
     {
       text
     }

## Command create_group
##
## Create a group.

create_group
 = element create_group
     {
       create_group_name
       & create_group_comment?
       & create_group_copy?
       & create_group_specials?
       & create_group_users?
     }

# A name for the group.
create_group_name
 = element name
     {
       name
     }

# A comment on the group.
create_group_comment
 = element comment
     {
       text
     }

# The UUID of an existing group.
create_group_copy
 = element copy
     {
       uuid
     }

create_group_specials
 = element specials
     {
       create_group_specials_full
     }

# Create permission giving members full access to each other's resources.
create_group_specials_full
 = element full
     {
       ""
     }

# Comma separated list of user names.
create_group_users
 = element users
     {
       text
     }

## Command create_note
##
## Create a note.

create_note
 = element create_note
     {
       create_note_text
       & create_note_nvt
       & create_note_active?
       & create_note_comment?
       & create_note_copy?
       & create_note_hosts?
       & create_note_port?
       & create_note_result?
       & create_note_severity?
       & create_note_task?
       & create_note_threat?
     }

# The text of the note.
create_note_text
 = element text
     {
       text
     }

# NVT to which note applies.
create_note_nvt
 = element nvt
     {
       attribute oid { oid }
     }

# Seconds note will be active. -1 on always, 0 off.
create_note_active
 = element active
     {
       integer
     }

# A comment on the note.
create_note_comment
 = element comment
     {
       text
     }

# The UUID of an existing note.
create_note_copy
 = element copy
     {
       uuid
     }

# A textual list of hosts.
create_note_hosts
 = element hosts
     {
       text
     }

# Port to which note applies.
create_note_port
 = element port
     {
       text
     }

# Result to which note applies.
create_note_result
 = element result
     {
       attribute id { uuid }
     }

# Severity to which note applies.
create_note_severity
 = element severity
     {
       severity
     }

# Task to which note applies.
create_note_task
 = element task
     {
       attribute id { uuid }
     }

# Threat level to which note applies. Will be converted to severity.
create_note_threat
 = element threat
     {
       threat
     }

## Command create_override
##
## Create an override.

create_override
 = element create_override
     {
       create_override_text
       & create_override_nvt
       & create_override_active?
       & create_override_comment?
       & create_override_copy?
       & create_override_hosts?
       & create_override_new_severity?
       & create_override_new_threat?
       & create_override_port?
       & create_override_result?
       & create_override_severity?
       & create_override_task?
       & create_override_threat?
     }

# The text of the override.
create_override_text
 = element text
     {
       text
     }

# Seconds override will be active. -1 on always, 0 off.
create_override_active
 = element active
     {
       integer
     }

# NVT to which override applies.
create_override_nvt
 = element nvt
     {
       attribute oid { oid }
     }

# A comment on the override.
create_override_comment
 = element comment
     {
       text
     }

# The UUID of an existing override.
create_override_copy
 = element copy
     {
       uuid
     }

# A textual list of hosts.
create_override_hosts
 = element hosts
     {
       text
     }

# New severity for result.
create_override_new_severity
 = element new_severity
     {
       severity
     }

# New threat level for result, will be converted to a new_severity.
create_override_new_threat
 = element new_threat
     {
       threat
     }

# Port to which override applies.
create_override_port
 = element port
     {
       text
     }

# Result to which override applies.
create_override_result
 = element result
     {
       attribute id { uuid }
     }

# Severity score to which override applies.
create_override_severity
 = element severity
     {
       severity
     }

# Task to which override applies.
create_override_task
 = element task
     {
       attribute id { uuid }
     }

# Threat level to which override applies, will be converted to severity.
create_override_threat
 = element threat
     {
       threat
     }

## Command create_permission
##
## Create a permission.

create_permission
 = element create_permission
     {
       create_permission_name
       & create_permission_subject
       & create_permission_resource?
       & create_permission_copy?
       & create_permission_comment?
     }

# A permission name, currently the name of a command.
create_permission_name
 = element name
     {
       text
     }

# A subject to whom the permission is granted.
create_permission_subject
 = element subject
     {
       attribute id { uuid }?
       & create_permission_subject_type
     }

# OMP type of the subject: user, group or role.
create_permission_subject_type
 = element type
     {
       text
     }

# A resource to which the permission applies.
create_permission_resource
 = element resource
     {
       attribute id { uuid }?
       & create_permission_resource_type
     }

# OMP type, for Super permissions: user, group or role.
create_permission_resource_type
 = element type
     {
       text
     }

# UUID of an existing permission to copy.
create_permission_copy
 = element copy
     {
       uuid
     }

# Comment on the permission.
create_permission_comment
 = element comment
     {
       text
     }

## Command create_port_list
##
## Create a port list.

create_port_list
 = element create_port_list
     {
       create_port_list_name
       & create_port_list_comment?
       & create_port_list_copy?
       & create_port_list_port_range
       & get_port_lists_response
     }

# The name of the port list.
create_port_list_name
 = element name
     {
       name
     }

# A comment on the port list.
create_port_list_comment
 = element comment
     {
       text
     }

# The UUID of an existing agent.
create_port_list_copy
 = element copy
     {
       uuid
     }

# Comma or newline separated list of ranges.
create_port_list_port_range
 = element port_range
     {
       text
     }

## Command create_port_range
##
## Create a port range.

create_port_range
 = element create_port_range
     {
       create_port_range_comment?
       & create_port_range_port_list
       & create_port_range_start
       & create_port_range_end
       & create_port_range_type
     }

# A comment on the port range.
create_port_range_comment
 = element comment
     {
       text
     }

# The port list to which to add the range.
create_port_range_port_list
 = element port_list
     {
       attribute id { uuid }
     }

# The first port in the range.
create_port_range_start
 = element start
     {
       port
     }

# The last port in the range.
create_port_range_end
 = element end
     {
       port
     }

# The type of the ports: TCP, UDP, ....
create_port_range_type
 = element type
     {
       text
     }

## Command create_report
##
## Create a report.

create_report
 = element create_report
     {
       create_report_report
       & create_report_task
       & create_report_in_assets?
     }

# A report wrapper, as in the GET_REPORTS response.
create_report_report
 = element report    # type report
     {
       text # RNC limitation: base64
       & attribute id { uuid }
       & attribute format_id { uuid }
       & attribute extension { text }
       & attribute content_type { text }
       & attribute type { xsd:token { pattern = "scan|assets|prognostic" } }?
       & report_owner
       & report_name
       & report_comment
       & report_creation_time
       & report_modification_time
       & report_writable
       & report_in_use
       & report_task
       & report_report_format
       & report_report
     }

# Task for report: id to use existing task, name to create new task.
create_report_task
 = element task
     {
       attribute id { uuid }?
       & create_report_task_name?
       & create_report_task_comment?
     }

# The name of the task.
create_report_task_name
 = element name
     {
       name
     }

# Comment for the new task.
create_report_task_comment
 = element comment
     {
       text
     }

# Whether to create or update assets using the report.
create_report_in_assets
 = element in_assets    # type boolean
     {
     }

## Command create_report_format
##
## Create a report format.

create_report_format
 = element create_report_format
     {
       ( create_report_format_copy
           | get_report_formats_response )
     }

# The UUID of an existing report format.
create_report_format_copy
 = element copy
     {
       uuid
     }

## Command create_role
##
## Create a role.

create_role
 = element create_role
     {
       create_role_name
       & create_role_comment?
       & create_role_copy?
       & create_role_users?
     }

# A name for the role.
create_role_name
 = element name
     {
       name
     }

# A comment on the role.
create_role_comment
 = element comment
     {
       text
     }

# The UUID of an existing role.
create_role_copy
 = element copy
     {
       uuid
     }

# Comma separated list of user names.
create_role_users
 = element users
     {
       text
     }

## Command create_scanner
##
## Create a scanner.

create_scanner
 = element create_scanner
     {
       create_scanner_name
       & create_scanner_comment?
       & create_scanner_copy?
       & create_scanner_host
       & create_scanner_port
       & create_scanner_type
       & create_scanner_ca_pub
       & create_scanner_credential
     }

# A name for the scanner.
create_scanner_name
 = element name
     {
       name
     }

# A comment on the scanner.
create_scanner_comment
 = element comment
     {
       text
     }

# The UUID of an existing scanner.
create_scanner_copy
 = element copy
     {
       uuid
     }

# The host of the scanner.
create_scanner_host
 = element host
     {
       text
     }

# The port of the scanner.
create_scanner_port
 = element port
     {
       text
     }

# The type of the scanner.
create_scanner_type
 = element type
     {
       text
     }

# Certificate of CA to verify scanner certificate..
create_scanner_ca_pub
 = element ca_pub
     {
       text
     }

# Client certificate credential for the Scanner.
create_scanner_credential
 = element credential
     {
       # UUID of the credential.
       attribute id { uuid }
     }

## Command create_schedule
##
## Create a schedule.

create_schedule
 = element create_schedule
     {
       create_schedule_name
       & create_schedule_comment?
       & create_schedule_copy?
       & create_schedule_first_time?
       & create_schedule_duration?
       & create_schedule_period?
       & create_schedule_timezone?
     }

# A name for the schedule.
create_schedule_name
 = element name
     {
       name
     }

# A comment on the schedule.
create_schedule_comment
 = element comment
     {
       text
     }

# The UUID of an existing schedule.
create_schedule_copy
 = element copy
     {
       uuid
     }

# The first time the schedule will run.
create_schedule_first_time
 = element first_time
     {
       create_schedule_first_time_minute
       & create_schedule_first_time_hour
       & create_schedule_first_time_day_of_month
       & create_schedule_first_time_month
       & create_schedule_first_time_year
     }

create_schedule_first_time_minute
 = element minute
     {
       integer
     }

create_schedule_first_time_hour
 = element hour
     {
       integer
     }

create_schedule_first_time_day_of_month
 = element day_of_month
     {
       integer
     }

create_schedule_first_time_month
 = element month
     {
       integer
     }

create_schedule_first_time_year
 = element year
     {
       integer
     }

# How long the Manager will run the scheduled task for.
create_schedule_duration
 = element duration
     {
       create_schedule_duration_unit
     }

# Duration time unit.
create_schedule_duration_unit
 = element unit
     {
       time_unit
     }

# How often the Manager will repeat the scheduled task.
create_schedule_period
 = element period
     {
       create_schedule_period_unit
     }

# Period time unit.
create_schedule_period_unit
 = element unit
     {
       time_unit
     }

# The timezone the schedule will follow.
create_schedule_timezone
 = element timezone
     {
       timezone
     }

## Command create_tag
##
## Create a tag.

create_tag
 = element create_tag
     {
       create_tag_name
       & create_tag_resource
       & create_tag_copy?
       & create_tag_value?
       & create_tag_comment?
       & create_tag_active?
     }

# A full tag name consisting of namespace and predicate.
create_tag_name
 = element name
     {
       text
     }

# Identifies a resource the tag is to be attached to.
create_tag_resource
 = element resource
     {
       # ID of the resource the tag is to be attached to.
       attribute id { uuid }?
       & create_tag_resource_type
     }

# OMP type of the resource the tag is to be attached to.
create_tag_resource_type
 = element type
     {
       text
     }

# UUID of an existing tag to copy.
create_tag_copy
 = element copy
     {
       uuid
     }

# Value associated with the tag.
create_tag_value
 = element value
     {
       text
     }

# Comment to add to the tag.
create_tag_comment
 = element comment
     {
       text
     }

# Whether the tag is active.
create_tag_active
 = element active
     {
       boolean
     }

## Command create_target
##
## Create a target.

create_target
 = element create_target
     {
       create_target_name
       & create_target_comment?
       & create_target_copy?
       & ( create_target_asset_hosts
           | create_target_hosts )
       & create_target_exclude_hosts?
       & create_target_ssh_credential?
       & create_target_smb_credential?
       & create_target_esxi_credential?
       & create_target_snmp_credential?
       & create_target_ssh_lsc_credential?
       & create_target_smb_lsc_credential?
       & create_target_esxi_lsc_credential?
       & create_target_alive_tests?
       & create_target_reverse_lookup_only?
       & create_target_reverse_lookup_unify?
       & create_target_port_range?
       & create_target_port_list?
     }

# A name for the target.
create_target_name
 = element name
     {
       text # RNC limitation: name
       & create_target_name_make_unique
     }

# Whether to append a unique suffix if the name already exists.
create_target_name_make_unique
 = element make_unique
     {
       boolean
     }

# A comment on the target.
create_target_comment
 = element comment
     {
       text
     }

# The UUID of an existing target.
create_target_copy
 = element copy
     {
       uuid
     }

# Hosts from which to create the target.
create_target_asset_hosts
 = element asset_hosts
     {
       # Filter term that defines the list of hosts.
       attribute filter { text }
     }

# A textual list of hosts, which may be empty.
create_target_hosts
 = element hosts
     {
       text
     }

# A list of hosts to exclude.
create_target_exclude_hosts
 = element exclude_hosts
     {
       text
     }

# SSH login credentials for target.
create_target_ssh_credential
 = element ssh_credential
     {
       attribute id { uuid }
       & create_target_ssh_credential_port?
     }

# The port the LSCs will use.
create_target_ssh_credential_port
 = element port
     {
       text
     }

# SMB login credentials for target.
create_target_smb_credential
 = element smb_credential
     {
       attribute id { uuid }
     }

# ESXi credential to use on target.
create_target_esxi_credential
 = element esxi_credential
     {
       attribute id { uuid }
     }

# SNMP credentials to use on target.
create_target_snmp_credential
 = element snmp_credential
     {
       attribute id { uuid }
     }

# Deprecated: use ssh_credential. SSH credential.
create_target_ssh_lsc_credential
 = element ssh_lsc_credential
     {
       attribute id { uuid }
       & create_target_ssh_lsc_credential_port?
     }

# The port the LSCs will use.
create_target_ssh_lsc_credential_port
 = element port
     {
       text
     }

# Deprecated: use ssh_credential. SMB credential.
create_target_smb_lsc_credential
 = element smb_lsc_credential
     {
       attribute id { uuid }
     }

# Deprecated: use esxi_credential. ESXi credential.
create_target_esxi_lsc_credential
 = element esxi_lsc_credential
     {
       attribute id { uuid }
     }

# Which alive tests to use.
create_target_alive_tests
 = element alive_tests
     {
       alive_test
     }

# Whether to scan only hosts that have names.
create_target_reverse_lookup_only
 = element reverse_lookup_only
     {
       boolean
     }

# Whether to scan only one IP when multiple IPs have the same name.
create_target_reverse_lookup_unify
 = element reverse_lookup_unify
     {
       boolean
     }

# Port range for the target.
create_target_port_range
 = element port_range
     {
       text
     }

# Port list for the target.
create_target_port_list
 = element port_list
     {
       attribute id { uuid }
     }

## Command create_task
##
## Create a task.

create_task
 = element create_task
     {
       create_task_name
       & create_task_comment?
       & create_task_copy?
       & create_task_alterable?
       & create_task_config
       & create_task_target
       & create_task_hosts_ordering?
       & create_task_scanner
       & create_task_alert*
       & create_task_schedule?
       & create_task_schedule_periods?
       & create_task_observers?
       & create_task_preferences?
     }

# A name for the task.
create_task_name
 = element name
     {
       name
     }

# A comment on the task.
create_task_comment
 = element comment
     {
       text
     }

# The UUID of an existing task.
create_task_copy
 = element copy
     {
       uuid
     }

# Whether the task is alterable.
create_task_alterable
 = element alterable
     {
       boolean
     }

# The scan configuration used by the task.
create_task_config
 = element config
     {
       attribute id { uuid }
     }

# The hosts scanned by the task.
create_task_target
 = element target
     {
       attribute id { uuid }
     }

# The order hosts are scanned in.
create_task_hosts_ordering
 = element hosts_ordering
     {
       text
     }

# The scanner to use for scanning the target.
create_task_scanner
 = element scanner
     {
       attribute id { uuid }
     }

# An alert that applies to the task.
create_task_alert
 = element alert
     {
       attribute id { uuid }
     }

# When the task will run.
create_task_schedule
 = element schedule
     {
       attribute id { uuid }
     }

# A limit to the number of times the task will be scheduled, or 0 for no limit.
create_task_schedule_periods
 = element schedule_periods
     {
       integer
     }

# Users allowed to observe this task.
create_task_observers
 = element observers
     {
       user_list
     }

create_task_preferences
 = element preferences
     {
       create_task_preferences_preference*
     }

create_task_preferences_preference
 = element preference
     {
       create_task_preferences_preference_scanner_name
       & create_task_preferences_preference_value
     }

# Compact name of preference, from scanner.
create_task_preferences_preference_scanner_name
 = element scanner_name
     {
       text
     }

create_task_preferences_preference_value
 = element value
     {
       text
     }

## Command create_user
##
## Create a user.

create_user
 = element create_user
     {
       create_user_name
       & create_user_copy?
       & create_user_hosts?
       & create_user_ifaces?
       & create_user_password?
       & create_user_role*
     }

# The name of the user to be created.
create_user_name
 = element name
     {
       text
     }

# The UUID of an existing user.
create_user_copy
 = element copy
     {
       uuid
     }

# User access rules: a textual list of hosts.
create_user_hosts
 = element hosts
     {
       text
       & # If 1, allow only listed, otherwise forbid listed.
       attribute allow { boolean }?
     }

# User access rules: a textual list of ifaces.
create_user_ifaces
 = element ifaces
     {
       text
       & # If 1, allow only listed, otherwise forbid listed.
       attribute allow { boolean }?
     }

# The password for the user.
create_user_password
 = element password
     {
       text
     }

# A role of the user.
create_user_role
 = element role
     {
       attribute id { uuid }
     }

## Command delete_agent
##
## Delete an agent.

delete_agent
 = element delete_agent
     {
       attribute agent_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_asset
##
## Delete an asset.

delete_asset
 = element delete_asset
     {
       ( # Single asset to delete.
       attribute asset_id { uuid }
           | # Report from which to get all assets to delete.
       attribute report_id { uuid } )
     }

## Command delete_config
##
## Delete a config.

delete_config
 = element delete_config
     {
       attribute config_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_alert
##
## Delete an alert.

delete_alert
 = element delete_alert
     {
       attribute alert_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_credential
##
## Delete a credential.

delete_credential
 = element delete_credential
     {
       attribute credential_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_filter
##
## Delete a filter.

delete_filter
 = element delete_filter
     {
       attribute filter_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_group
##
## Delete a group.

delete_group
 = element delete_group
     {
       attribute group_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_note
##
## Delete a note.

delete_note
 = element delete_note
     {
       attribute note_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_override
##
## Delete an override.

delete_override
 = element delete_override
     {
       attribute override_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_report
##
## Delete a report.

delete_report
 = element delete_report
     {
       attribute report_id { uuid }
     }

## Command delete_permission
##
## Delete a permission.

delete_permission
 = element delete_permission
     {
       attribute permission_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_port_list
##
## Delete a port list.

delete_port_list
 = element delete_port_list
     {
       attribute port_list_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_port_range
##
## Delete a port range.

delete_port_range
 = element delete_port_range
     {
       attribute port_range_id { uuid }
     }

## Command delete_report_format
##
## Delete a report format.

delete_report_format
 = element delete_report_format
     {
       attribute report_format_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_role
##
## Delete a role.

delete_role
 = element delete_role
     {
       attribute role_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_scanner
##
## Delete a scanner.

delete_scanner
 = element delete_scanner
     {
       attribute scanner_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_schedule
##
## Delete a schedule.

delete_schedule
 = element delete_schedule
     {
       attribute schedule_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_tag
##
## Delete a tag.

delete_tag
 = element delete_tag
     {
       attribute tag_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_target
##
## Delete a target.

delete_target
 = element delete_target
     {
       attribute target_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_task
##
## Delete a task.

delete_task
 = element delete_task
     {
       attribute task_id { uuid }
       & # Whether to remove entirely, or to the trashcan.
       attribute ultimate { boolean }
     }

## Command delete_user
##
## Delete a user.

delete_user
 = element delete_user
     {
       ( # The ID of the user to be deleted. Overrides name.
       attribute user_id { uuid }
           | # The name of the user to be deleted.
       attribute name { text } )
       & ( # The ID of the inheriting user or "self". Overrides inheritor_name.
       attribute inheritor_id { text }
           | # The name of the inheriting user.
       attribute inheritor_name { text } )
     }

## Command describe_auth
##
## Describe authentication methods.

describe_auth
 = element describe_auth
     {
       ""
     }

## Command empty_trashcan
##
## Empty the trashcan.

empty_trashcan
 = element empty_trashcan
     {
       ""
     }

## Command get_agents
##
## Get one or many agents.

get_agents
 = element get_agents
     {
       # ID of single agent to get.
       attribute agent_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to get the trashcan agents instead.
       attribute trash { boolean }?
       & # Whether to include agents package information when no format was provided.
       attribute details { boolean }?
       & attribute format { xsd:token { pattern = "installer|howto_install|howto_use" } }?
     }

## Command get_configs
##
## Get one or many configs.

get_configs
 = element get_configs
     {
       # ID of single config to get.
       attribute config_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to get the trashcan configs instead.
       attribute trash { boolean }?
       & # Whether to get config families, preferences, nvt selectors and tasks.
       attribute details { boolean }?
       & # Whether to include the families if no details are requested.
       attribute families { boolean }?
       & # Whether to include the preferences if no details are requested.
       attribute preferences { boolean }?
       & # Whether to get tasks using this config.
       attribute tasks { boolean }?
     }

## Command get_aggregates
##
## Get aggregates of various resources.

get_aggregates
 = element get_aggregates
     {
       # Filter term to use to filter query of the resources to aggregate (see get_... commands of selected type for keywords).
       attribute filter { text }?
       & # ID of filter to use to filter query of the resources to aggregate.
       attribute filt_id { uuid }?
       & # The OMP resource type to gather data from.
       attribute type { text }
       & # A single column to get the data to aggregate from.
       attribute data_column { text }?
       & # The field to group the resources by.
       attribute group_column { text }?
       & # The field to further group the resources inside groups by.
       attribute subgroup_column { text }?
       & # The column to sort the aggregated rows by. With a subgroup column, groups will be sorted by the group_column first..
       attribute sort_field { text }?
       & # The order to sort by.
       attribute sort_order { xsd:token { pattern = "ascending|descending" } }?
       & # The statistic to sort the aggregated rows by.
       attribute sort_stat { xsd:token { pattern = "min|max|mean|sum|count|value" } }?
       & # The index of the first aggregate group to return.
       attribute first_group { integer }?
       & # The maximum number of aggregate groups to return, -1 for all.
       attribute max_groups { integer }?
       & # Special mode for aggregation.
       attribute mode { xsd:token { pattern = "|word_counts" } }?
       & get_aggregates_sort*
       & get_aggregates_data_column*
       & get_aggregates_text_column*
     }

# Optional tuples of sort criteria.
get_aggregates_sort
 = element sort
     {
       # The column to sort the aggregated rows by. With a subgroup column, groups will be sorted by the group_column first..
       attribute sort_field { text }?
       & # The order to sort by.
       attribute sort_order { xsd:token { pattern = "ascending|descending" } }?
       & # The statistic to sort the aggregated rows by.
       attribute sort_stat { xsd:token { pattern = "min|max|mean|sum|count|value" } }?
     }

# A column to get the data to aggregate from.
get_aggregates_data_column
 = element data_column    # type text
     {
     }

# A simple text column which no statistics are calculated for.
get_aggregates_text_column
 = element text_column    # type text
     {
     }

## Command get_alerts
##
## Get one or many alerts.

get_alerts
 = element get_alerts
     {
       # ID of single alert to get.
       attribute alert_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to get the trashcan alerts instead.
       attribute trash { boolean }?
       & # Whether to get the tasks using the alerts.
       attribute tasks { boolean }?
     }

## Command get_assets
##
## Get one or many assets.

get_assets
 = element get_assets
     {
       # ID of single asset to get.
       attribute asset_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to ignore info used to split the report into pages like the filter terms "first" and "rows".
       attribute ignore_pagination { boolean }?
     }

## Command get_credentials
##
## Get one or many credentials.

get_credentials
 = element get_credentials
     {
       # ID of single credential to get.
       attribute credential_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to include a list of scanners using the credentials.
       attribute scanners { boolean }?
       & # Whether to get the trashcan credentials instead.
       attribute trash { boolean }?
       & # Whether to include a list of targets using the credentials.
       attribute targets { boolean }?
       & attribute format { xsd:token { pattern = "key|rpm|deb|exe" } }?
     }

## Command get_feeds
##
## Get one or many feeds.

get_feeds
 = element get_feeds
     {
       # Type of single feed to get: NVT, CERT or SCAP.
       attribute type { text }?
     }

## Command get_filters
##
## Get one or many filters.

get_filters
 = element get_filters
     {
       # ID of single filter to get.
       attribute filter_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to get the trashcan filters instead.
       attribute trash { boolean }?
       & # Whether to include list of alerts that use the filter.
       attribute alerts { boolean }?
     }

## Command get_groups
##
## Get one or many groups.

get_groups
 = element get_groups
     {
       # ID of single group to get.
       attribute group_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to get the trashcan groups instead.
       attribute trash { boolean }?
     }

## Command get_info
##
## Get information for items of given type.

get_info
 = element get_info
     {
       # Type must be either CERT_BUND_ADV, CPE, CVE, DFN_CERT_ADV, OVALDEF, NVT or ALLINFO.
       attribute type { text }
       & # Name or identifier of the requested information.
       attribute name { text }?
       & # ID of single info to get. Conflicts with name.
       attribute info_id { text }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to include information about references to this information.
       attribute details { boolean }?
     }

## Command get_notes
##
## Get one or many notes.

get_notes
 = element get_notes
     {
       # ID of single note to get.
       attribute note_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & attribute nvt_oid { oid }?
       & attribute task_id { uuid }?
       & attribute details { boolean }?
       & attribute result { boolean }?
     }

## Command get_nvts
##
## Get one or many NVTs.

get_nvts
 = element get_nvts
     {
       # Single NVT to get.
       attribute nvt_oid { oid }
       & # Whether to include full details.
       attribute details { boolean }?
       & # Whether to include preference.
       attribute preferences { boolean }?
       & # Whether to include preference count.
       attribute preference_count { boolean }?
       & # Whether to include the special timeout preference.
       attribute timeout { boolean }?
       & # ID of config to which to limit the NVT listing.
       attribute config_id { uuid }?
       & # ID of config to use for preference values.
       attribute preferences_config_id { uuid }?
       & # Family to which to limit NVT listing.
       attribute family { text }?
       & attribute sort_order { sort_order }?
       & attribute sort_field { text }?
     }

## Command get_nvt_families
##
## Get a list of all NVT families.

get_nvt_families
 = element get_nvt_families
     {
       attribute sort_order { sort_order }?
     }

## Command get_overrides
##
## Get one or many overrides.

get_overrides
 = element get_overrides
     {
       # ID of single override to get.
       attribute override_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & attribute nvt_oid { oid }?
       & attribute task_id { uuid }?
       & attribute details { boolean }?
       & attribute result { boolean }?
     }

## Command get_permissions
##
## Get one or many permissions.

get_permissions
 = element get_permissions
     {
       # ID of single permission to get.
       attribute permission_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to get the trashcan permissions instead.
       attribute trash { boolean }?
     }

## Command get_port_lists
##
## Get one or many port lists.

get_port_lists
 = element get_port_lists
     {
       # ID of single port list to get.
       attribute port_list_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to include full port list details.
       attribute details { boolean }?
       & # Whether to include targets using this port list.
       attribute targets { boolean }?
       & # Whether to get the trashcan port lists instead.
       attribute trash { boolean }?
     }

## Command get_preferences
##
## Get one or many preferences.

get_preferences
 = element get_preferences
     {
       attribute nvt_oid { oid }?
       & # ID of config of which to show preference values.
       attribute config_id { uuid }?
       & # The name of a particular preference to get.
       attribute preference { text }?
     }

## Command get_reports
##
## Get one or many reports.

get_reports
 = element get_reports
     {
       # ID of single report to get.
       attribute report_id { uuid }?
       & # Filter term to use to filter results, when getting a single report.
       attribute filter { text }?
       & # ID of filter to use to filter results, when getting a single report.
       attribute filt_id { uuid }?
       & # Filter term to use to filter reports.
       attribute report_filter { text }?
       & # ID of filter to use to filter reports.
       attribute report_filt_id { uuid }?
       & # Type of report to get.
       attribute type { xsd:token { pattern = "scan|assets|prognostic" } }?
       & # ID of required report format.
       attribute format_id { uuid }?
       & # ID of alert to pass generated report to.
       attribute alert_id { uuid }?
       & # If notes are included, whether to include note details.
       attribute note_details { boolean }?
       & # If overrides are included, whether to include override details.
       attribute override_details { boolean }?
       & # For "assets" or "prognostic", single host to retrieve.
       attribute host { text }?
       & # For "assets" or "prognostic", first host to retrieve.
       attribute host_first_result { integer }?
       & # For "assets" or "prognostic", maximum hosts to retrieve.
       attribute host_max_results { integer }?
       & # For "assets" or "prognostic", which threat levels to include in hosts.
       attribute host_levels { levels }?
       & # For "assets" or "prognostic", the search phrase to limit hosts to.
       attribute host_search_phrase { text }?
       & # For type "assets", position of report used, from end.
       attribute pos { integer }?
       & # ID of second report, for producing a delta report.
       attribute delta_report_id { uuid }?
       & # Whether to ignore info used to split the report into pages like the filter terms "first" and "rows"..
       attribute ignore_pagination { boolean }?
     }

## Command get_report_formats
##
## Get one or many report formats.

get_report_formats
 = element get_report_formats
     {
       # ID of single report format to get.
       attribute report_format_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to get the trashcan report formats instead.
       attribute trash { boolean }?
       & # Whether to include alerts that use the report format.
       attribute alerts { boolean }?
       & # Whether to include report format parameters.
       attribute params { boolean }?
       & # Include report format file, signature and parameters.
       attribute details { boolean }?
     }

## Command get_results
##
## Get results.

get_results
 = element get_results
     {
       # ID of single result to get.
       attribute result_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # ID of task for note and override handling.
       attribute task_id { uuid }?
       & # If notes are included, whether to include note details.
       attribute note_details { boolean }?
       & # If overrides are included, whether to include override details.
       attribute override_details { boolean }?
       & # Whether to include additional details of the results.
       attribute details { boolean }?
     }

## Command get_roles
##
## Get one or many roles.

get_roles
 = element get_roles
     {
       # ID of single role to get.
       attribute role_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to get the trashcan roles instead.
       attribute trash { boolean }?
     }

## Command get_scanners
##
## Get one or many scanners.

get_scanners
 = element get_scanners
     {
       # ID of single scanner to get.
       attribute scanner_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to get the trashcan scanners instead.
       attribute trash { boolean }?
       & # Whether to include extra details like tasks using this scanner.
       attribute details { boolean }?
     }

## Command get_schedules
##
## Get one or many schedules.

get_schedules
 = element get_schedules
     {
       # ID of single schedule to get.
       attribute schedule_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to get the trashcan schedules instead.
       attribute trash { boolean }?
       & # Whether to include tasks using the schedules.
       attribute tasks { boolean }?
     }

## Command get_settings
##
## Get one or many settings.

get_settings
 = element get_settings
     {
       # ID of single setting to get.
       attribute setting_id { uuid }?
       & # Filter term.
       attribute filter { text }?
       & # First result.
       attribute first { integer }?
       & # Maximum number of results in response.
       attribute max { integer }?
       & attribute sort_order { sort_order }?
       & attribute sort_field { text }?
     }

## Command get_system_reports
##
## Get one or many system reports.

get_system_reports
 = element get_system_reports
     {
       # A string describing the required report.
       attribute name { text }?
       & # The number of seconds into the past that the report should include.
       attribute duration { integer }?
       & # The start of the time interval the report should include.
       attribute start_time { iso_time }?
       & # The end of the time interval the report should include.
       attribute end_time { iso_time }?
       & # Whether to include the actual reports.
       attribute brief { boolean }?
       & # OMP scanner from which to get report.
       attribute slave_id { uuid }?
     }

## Command get_tags
##
## Get one or many tags.

get_tags
 = element get_tags
     {
       # ID of single tag to get.
       attribute tag_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { text }?
       & # Whether to get tags from the trashcan instead.
       attribute trash { boolean }?
       & # Whether to get only distinct tag names.
       attribute names_only { boolean }?
     }

## Command get_targets
##
## Get one or many targets.

get_targets
 = element get_targets
     {
       # ID of single target to get.
       attribute target_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to get the trashcan targets instead.
       attribute trash { boolean }?
       & # Whether to include list of tasks that use the target.
       attribute tasks { boolean }?
     }

## Command get_tasks
##
## Get one or many tasks.

get_tasks
 = element get_tasks
     {
       # ID of single task to get.
       attribute task_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
       & # Whether to get the trashcan tasks instead.
       attribute trash { boolean }?
       & # Whether to include full task details.
       attribute details { boolean }?
       & # Whether to ignore info used to split the report into pages like the filter terms "first" and "rows"..
       attribute ignore_pagination { boolean }?
       & # Whether to only include id, name and schedule details.
       attribute schedules_only { boolean }?
     }

## Command get_users
##
## Get one or many users.

get_users
 = element get_users
     {
       # ID of single user to get.
       attribute user_id { uuid }?
       & # Filter term to use to filter query.
       attribute filter { text }?
       & # ID of filter to use to filter query.
       attribute filt_id { uuid }?
     }

## Command get_version
##
## Get the OpenVAS Manager Protocol version.

get_version
 = element get_version
     {
       ""
     }

## Command help
##
## Get the help text.

help
 = element help
     {
       # Required help format.
       attribute format { xsd:token { pattern = "html|HTML|rnc|RNC|text|TEXT|xml|XML" } }?
       & # Help type, currently only blank or "brief" for XML format.
       attribute type { xsd:token { pattern = "brief|" } }?
     }

## Command modify_agent
##
## Modify an existing agent.

modify_agent
 = element modify_agent
     {
       # ID of agent to modify.
       attribute agent_id { uuid }
       & modify_agent_name?
       & modify_agent_comment?
     }

# Comment on agent.
modify_agent_comment
 = element comment
     {
       text
     }

# Name of agent.
modify_agent_name
 = element name
     {
       name
     }

## Command modify_alert
##
## Modify an existing alert.

modify_alert
 = element modify_alert
     {
       # ID of alert to modify.
       attribute alert_id { uuid }
       & modify_alert_name?
       & modify_alert_comment?
       & modify_alert_filter?
       & modify_alert_event?
       & modify_alert_condition?
       & modify_alert_method?
     }

# Name of alert.
modify_alert_name
 = element name
     {
       name
     }

# Comment on alert.
modify_alert_comment
 = element comment
     {
       text
     }

# The condition that must be satisfied for the alert to occur.
modify_alert_condition
 = element condition
     {
       text
       & modify_alert_condition_data*
     }

# Some data that defines the condition.
modify_alert_condition_data
 = element data
     {
       text
       & modify_alert_condition_data_name
     }

# The name of the condition data.
modify_alert_condition_data_name
 = element name
     {
       text
     }

# The event that must happen for the alert to occur.
modify_alert_event
 = element event
     {
       text
       & modify_alert_event_data*
     }

# Some data that defines the event.
modify_alert_event_data
 = element data
     {
       text
       & modify_alert_event_data_name
     }

# The name of the event data.
modify_alert_event_data_name
 = element name
     {
       text
     }

# The method by which the user is alerted.
modify_alert_method
 = element method
     {
       text
       & modify_alert_method_data*
     }

# Some data that defines the method.
modify_alert_method_data
 = element data
     {
       text
       & modify_alert_method_data_name
     }

# The name of the method data.
modify_alert_method_data_name
 = element name
     {
       text
     }

# Filter to apply when executing alert.
modify_alert_filter
 = element filter
     {
       attribute id { uuid }
     }

## Command modify_asset
##
## Modify an existing asset.

modify_asset
 = element modify_asset
     {
       # ID of asset to modify.
       attribute asset_id { uuid }
       & modify_asset_comment?
     }

# Comment on asset.
modify_asset_comment
 = element comment
     {
       text
     }

## Command modify_auth
##
## Modify the authentication methods.

modify_auth
 = element modify_auth
     {
       modify_auth_group
     }

modify_auth_group
 = element group
     {
       modify_auth_group_auth_conf_setting*
     }

modify_auth_group_auth_conf_setting
 = element auth_conf_setting
     {
       modify_auth_group_auth_conf_setting_key
       & modify_auth_group_auth_conf_setting_value
     }

# Setting name.
modify_auth_group_auth_conf_setting_key
 = element key
     {
       text
     }

# Setting value.
modify_auth_group_auth_conf_setting_value
 = element value
     {
       text
     }

## Command modify_config
##
## Modify an existing config.

modify_config
 = element modify_config
     {
       # ID of config to modify.
       attribute config_id { uuid }
       & ( modify_config_name
           | modify_config_comment
           | modify_config_scanner
           | modify_config_preference
           | modify_config_family_selection
           | modify_config_nvt_selection )
     }

# New name for the config.
modify_config_name
 = element name
     {
       name
     }

# New comment for the config.
modify_config_comment
 = element comment
     {
       text
     }

# New scanner's UUID for the config.
modify_config_scanner
 = element scanner
     {
       text
     }

modify_config_preference
 = element preference
     {
       modify_config_preference_name
       & modify_config_preference_nvt?
       & modify_config_preference_value?
     }

# The name of the preference to modify.
modify_config_preference_name
 = element name
     {
       name
     }

# NVT associated with preference to modify.
modify_config_preference_nvt
 = element nvt
     {
       attribute oid { oid }
     }

# New value for preference.
modify_config_preference_value
 = element value
     {
       base64
     }

modify_config_family_selection
 = element family_selection
     {
       modify_config_family_selection_growing?
       & modify_config_family_selection_family*
     }

# Whether new families should be added to the config.
modify_config_family_selection_growing
 = element growing
     {
       boolean_atoi
     }

modify_config_family_selection_family
 = element family
     {
       modify_config_family_selection_family_all?
       & modify_config_family_selection_family_growing?
       & modify_config_family_selection_family_name
     }

# Whether to select all NVTs initially.
modify_config_family_selection_family_all
 = element all
     {
       boolean_atoi
     }

# Whether to add newly arrived nvts to the selection.
modify_config_family_selection_family_growing
 = element growing
     {
       boolean_atoi
     }

modify_config_family_selection_family_name
 = element name
     {
       name
     }

modify_config_nvt_selection
 = element nvt_selection
     {
       modify_config_nvt_selection_family
       & modify_config_nvt_selection_nvt*
     }

# Name of family to modify.
modify_config_nvt_selection_family
 = element family
     {
       name
     }

modify_config_nvt_selection_nvt
 = element nvt
     {
       attribute oid { oid }
     }

## Command modify_credential
##
## Modify an existing credential.

modify_credential
 = element modify_credential
     {
       # ID of credential to modify.
       attribute credential_id { uuid }
       & modify_credential_comment?
       & modify_credential_name?
       & modify_credential_allow_insecure?
       & modify_credential_certificate?
       & modify_credential_key?
       & modify_credential_login?
       & modify_credential_password?
       & modify_credential_community?
       & modify_credential_auth_algorithm?
       & modify_credential_privacy?
     }

# A name for the credential.
modify_credential_name
 = element name
     {
       name
     }

# A comment on the credential.
modify_credential_comment
 = element comment
     {
       text
     }

# Whether to allow insecure use of the credential.
modify_credential_allow_insecure
 = element allow_insecure
     {
       boolean
     }

# The certificate for the credential.
modify_credential_certificate
 = element certificate
     {
       text
     }

modify_credential_key
 = element key
     {
       modify_credential_key_phrase
       & modify_credential_key_private
     }

# Key passphrase.
modify_credential_key_phrase
 = element phrase
     {
       text
     }

# Private key.
modify_credential_key_private
 = element private
     {
       text
     }

# The user name of the credential.
modify_credential_login
 = element login
     {
       text
     }

# The password for the credential login.
modify_credential_password
 = element password
     {
       text
     }

# The SNMP community.
modify_credential_community
 = element community
     {
       text
     }

# Authentication algorithm for SNMP, either md5 or sha1.
modify_credential_auth_algorithm
 = element auth_algorithm
     {
       xsd:token { pattern = "md5|sha1" }
     }

modify_credential_privacy
 = element privacy
     {
       modify_credential_privacy_algorithm
       & modify_credential_privacy_password
     }

# The SNMP privacy algorithm, either aes or des.
modify_credential_privacy_algorithm
 = element algorithm
     {
       xsd:token { pattern = "aes|des" }
     }

# The SNMP privacy password.
modify_credential_privacy_password
 = element password
     {
       text
     }

## Command modify_filter
##
## Modify an existing filter.

modify_filter
 = element modify_filter
     {
       # ID of filter to modify.
       attribute filter_id { uuid }
       & modify_filter_comment?
       & modify_filter_name?
       & modify_filter_term?
       & modify_filter_type?
     }

# Comment on filter.
modify_filter_comment
 = element comment
     {
       text
     }

# Name of filter.
modify_filter_name
 = element name
     {
       name
     }

# Filter term.
modify_filter_term
 = element term
     {
       text
     }

# Resource type filter applies to.
modify_filter_type
 = element type
     {
       text
     }

## Command modify_group
##
## Modify an existing group.

modify_group
 = element modify_group
     {
       # ID of group to modify.
       attribute group_id { uuid }
       & modify_group_name?
       & modify_group_comment?
       & modify_group_users?
     }

# Name of group.
modify_group_name
 = element name
     {
       name
     }

# Comment on group.
modify_group_comment
 = element comment
     {
       text
     }

# Comma separated list of user names.
modify_group_users
 = element users
     {
       text
     }

## Command modify_note
##
## Modify an existing note.

modify_note
 = element modify_note
     {
       # ID of note to modify.
       attribute note_id { uuid }
       & modify_note_active?
       & modify_note_hosts?
       & modify_note_port?
       & modify_note_result?
       & modify_note_severity?
       & modify_note_task?
       & modify_note_text
       & modify_note_threat?
     }

# Seconds note will be active. -1 on always, 0 off.
modify_note_active
 = element active
     {
       integer
     }

# A textual list of hosts.
modify_note_hosts
 = element hosts
     {
       text
     }

# Port to which note applies.
modify_note_port
 = element port
     {
       text
     }

# Severity to which note applies.
modify_note_severity
 = element severity
     {
       severity
     }

# The text of the note.
modify_note_text
 = element text
     {
       text
     }

# Threat level to which note applies.
modify_note_threat
 = element threat
     {
       threat
     }

# Task to which note applies.
modify_note_task
 = element task
     {
       attribute id { uuid }
     }

# Result to which note applies.
modify_note_result
 = element result
     {
       attribute id { uuid }
     }

## Command modify_override
##
## Modify an existing override.

modify_override
 = element modify_override
     {
       # ID of override to modify.
       attribute override_id { uuid }
       & modify_override_active?
       & modify_override_hosts?
       & modify_override_new_severity?
       & modify_override_new_threat?
       & modify_override_port?
       & modify_override_result?
       & modify_override_task?
       & modify_override_text
       & modify_override_severity?
       & modify_override_threat?
     }

# Seconds override will be active. -1 on always, 0 off.
modify_override_active
 = element active
     {
       integer
     }

# A textual list of hosts.
modify_override_hosts
 = element hosts
     {
       text
     }

# New severity score for result.
modify_override_new_severity
 = element new_severity
     {
       severity
     }

# New threat level for result.
modify_override_new_threat
 = element new_threat
     {
       threat
     }

# Port to which override applies.
modify_override_port
 = element port
     {
       text
     }

# Text describing the override.
modify_override_text
 = element text
     {
       text
     }

# Severity score to which override applies.
modify_override_severity
 = element severity
     {
       severity
     }

# Threat level to which override applies.
modify_override_threat
 = element threat
     {
       threat
     }

# Task to which override applies.
modify_override_task
 = element task
     {
       attribute id { uuid }
     }

# Result to which override applies.
modify_override_result
 = element result
     {
       attribute id { uuid }
     }

## Command modify_permission
##
## Modify a permission.

modify_permission
 = element modify_permission
     {
       attribute permission_id { uuid }
       & modify_permission_name?
       & modify_permission_comment?
       & modify_permission_resource?
       & modify_permission_subject?
     }

# Permission name, currently the name of a command.
modify_permission_name
 = element name
     {
       text
     }

# The comment on the permission.
modify_permission_comment
 = element comment
     {
       text
     }

# A resource to which the permission applies.
modify_permission_resource
 = element resource
     {
       # UUID if permission applies to resource, else 0.
       attribute id { uuid }?
       & modify_permission_resource_type
     }

# OMP type, for Super permissions: user, group or role.
modify_permission_resource_type
 = element type
     {
       text
     }

# A subject to whom the permission is granted.
modify_permission_subject
 = element subject
     {
       attribute id { uuid }?
       & modify_permission_subject_type
     }

# OMP type of the subject: user, group or role.
modify_permission_subject_type
 = element type
     {
       text
     }

## Command modify_port_list
##
## Modify an existing port list.

modify_port_list
 = element modify_port_list
     {
       # ID of port list to modify.
       attribute port_list_id { uuid }
       & modify_port_list_name?
       & modify_port_list_comment?
     }

# Name of port list.
modify_port_list_name
 = element name
     {
       name
     }

# Comment on port list.
modify_port_list_comment
 = element comment
     {
       text
     }

## Command modify_report
##
## Modify an existing report.

modify_report
 = element modify_report
     {
       # ID of report to modify.
       attribute report_id { uuid }
       & modify_report_comment
     }

# The comment on the report.
modify_report_comment
 = element comment
     {
       text
     }

## Command modify_report_format
##
## Update an existing report format.

modify_report_format
 = element modify_report_format
     {
       # ID of report format to modify.
       attribute report_format_id { uuid }
       & ( modify_report_format_active
           | modify_report_format_name
           | modify_report_format_summary
           | modify_report_format_param )
     }

# Whether the report format is active.
modify_report_format_active
 = element active
     {
       boolean
     }

# The name of the report format.
modify_report_format_name
 = element name
     {
       name
     }

# A summary of the report format.
modify_report_format_summary
 = element summary
     {
       text
     }

modify_report_format_param
 = element param
     {
       modify_report_format_param_name
       & modify_report_format_param_value?
     }

# The name of the param.
modify_report_format_param_name
 = element name
     {
       name
     }

# New value for the param.
modify_report_format_param_value
 = element value
     {
       base64
     }

## Command modify_role
##
## Modify an existing role.

modify_role
 = element modify_role
     {
       # ID of role to modify.
       attribute role_id { uuid }
       & modify_role_name?
       & modify_role_comment?
       & modify_role_users?
     }

# Name of role.
modify_role_name
 = element name
     {
       name
     }

# Comment on role.
modify_role_comment
 = element comment
     {
       text
     }

# Comma separated list of user names.
modify_role_users
 = element users
     {
       text
     }

## Command modify_scanner
##
## Modify an existing scanner.

modify_scanner
 = element modify_scanner
     {
       # ID of scanner to modify.
       attribute scanner_id { uuid }
       & modify_scanner_comment?
       & modify_scanner_name?
       & modify_scanner_host
       & modify_scanner_port
       & modify_scanner_type
       & modify_scanner_ca_pub?
       & modify_scanner_credential?
     }

# Comment on scanner.
modify_scanner_comment
 = element comment
     {
       text
     }

# Name of scanner.
modify_scanner_name
 = element name
     {
       name
     }

# Host of the scanner.
modify_scanner_host
 = element host
     {
       text
     }

# Port of the scanner.
modify_scanner_port
 = element port
     {
       text
     }

# Type of the scanner. '1' for OSP, '2' for OpenVAS (classic) Scanner.
modify_scanner_type
 = element type
     {
       text
     }

# Certificate of CA to verify scanner's certificate.
modify_scanner_ca_pub
 = element ca_pub
     {
       text
     }

# Client certificate credential for the Scanner.
modify_scanner_credential
 = element credential
     {
       # UUID of the credential.
       attribute id { uuid }
     }

## Command modify_schedule
##
## Modify an existing schedule.

modify_schedule
 = element modify_schedule
     {
       # ID of schedule to modify.
       attribute schedule_id { uuid }
       & modify_schedule_comment?
       & modify_schedule_name?
       & modify_schedule_first_time?
       & modify_schedule_duration?
       & modify_schedule_period?
       & modify_schedule_timezone?
     }

# Comment on schedule.
modify_schedule_comment
 = element comment
     {
       text
     }

# Name of schedule.
modify_schedule_name
 = element name
     {
       name
     }

# First time the task will run. Missing subelements default to current system time.
modify_schedule_first_time
 = element first_time
     {
       modify_schedule_first_time_day_of_month?
       & modify_schedule_first_time_hour?
       & modify_schedule_first_time_minute?
       & modify_schedule_first_time_month?
       & modify_schedule_first_time_year?
     }

modify_schedule_first_time_day_of_month
 = element day_of_month
     {
       text
     }

modify_schedule_first_time_hour
 = element hour
     {
       text
     }

modify_schedule_first_time_minute
 = element minute
     {
       text
     }

modify_schedule_first_time_month
 = element month
     {
       text
     }

modify_schedule_first_time_year
 = element year
     {
       text
     }

# The timezone the schedule will follow. User's timezone is used if omitted.
modify_schedule_timezone
 = element timezone
     {
       timezone
     }

# How long the task will run for.
modify_schedule_duration
 = element duration
     {
       text
       & modify_schedule_duration_unit?
     }

modify_schedule_duration_unit
 = element unit
     {
       time_unit
     }

# How often the task will run.
modify_schedule_period
 = element period
     {
       text
       & modify_schedule_period_unit?
     }

modify_schedule_period_unit
 = element unit
     {
       time_unit
     }

## Command modify_setting
##
## Modify an existing setting.

modify_setting
 = element modify_setting
     {
       attribute setting_id { uuid }?
       & modify_setting_name
       & modify_setting_value
     }

# The name of the setting.
modify_setting_name
 = element name
     {
       text
     }

# The value of the setting.
modify_setting_value
 = element value
     {
       text
     }

## Command modify_target
##
## Modify an existing target.

modify_target
 = element modify_target
     {
       # ID of target to modify.
       attribute target_id { uuid }
       & modify_target_comment?
       & modify_target_name?
       & modify_target_hosts?
       & modify_target_hosts_ordering?
       & modify_target_exclude_hosts?
       & modify_target_ssh_credential?
       & modify_target_smb_credential?
       & modify_target_esxi_credential?
       & modify_target_snmp_credential?
       & modify_target_ssh_lsc_credential?
       & modify_target_smb_lsc_credential?
       & modify_target_esxi_lsc_credential?
       & modify_target_port_list?
       & modify_target_alive_tests?
       & modify_target_reverse_lookup_only?
       & modify_target_reverse_lookup_unify?
     }

# Comment on target.
modify_target_comment
 = element comment
     {
       text
     }

# Name of target.
modify_target_name
 = element name
     {
       name
     }

# Target hosts.
modify_target_hosts
 = element hosts
     {
       text
     }

# The order hosts are scanned in.
modify_target_hosts_ordering
 = element hosts_ordering
     {
       text
     }

# A list of hosts to exclude.
modify_target_exclude_hosts
 = element exclude_hosts
     {
       text
     }

# SSH credential to use on target.
modify_target_ssh_credential
 = element ssh_credential
     {
       attribute id { uuid }
     }

# SMB credential to use on target.
modify_target_smb_credential
 = element smb_credential
     {
       attribute id { uuid }
     }

# ESXi credential to use on target.
modify_target_esxi_credential
 = element esxi_credential
     {
       attribute id { uuid }
     }

# SNMP credential to use on target.
modify_target_snmp_credential
 = element snmp_credential
     {
       attribute id { uuid }
     }

# Deprecated: use ssh_credential. SSH credential.
modify_target_ssh_lsc_credential
 = element ssh_lsc_credential
     {
       attribute id { uuid }
     }

# Deprecated: use ssh_credential. SMB credential.
modify_target_smb_lsc_credential
 = element smb_lsc_credential
     {
       attribute id { uuid }
     }

# Deprecated: use esxi_credential. ESXi credential.
modify_target_esxi_lsc_credential
 = element esxi_lsc_credential
     {
       attribute id { uuid }
     }

# Port List describing ports to scan.
modify_target_port_list
 = element port_list
     {
       attribute id { uuid }
     }

# Which alive tests to use.
modify_target_alive_tests
 = element alive_tests
     {
       alive_test
     }

# Whether to scan only hosts that have names.
modify_target_reverse_lookup_only
 = element reverse_lookup_only
     {
       boolean
     }

# Whether to scan only one IP when multiple IPs have the same name.
modify_target_reverse_lookup_unify
 = element reverse_lookup_unify
     {
       boolean
     }

## Command modify_tag
##
## Modify a tag.

modify_tag
 = element modify_tag
     {
       attribute tag_id { uuid }
       & modify_tag_name?
       & modify_tag_resource?
       & modify_tag_value?
       & modify_tag_comment?
       & modify_tag_active?
     }

# A full tag name consisting of namespace and predicate.
modify_tag_name
 = element name
     {
       text
     }

# Identifies a resource the tag is to be attached to.
modify_tag_resource
 = element resource
     {
       # ID of the resource the tag is to be attached to.
       attribute id { uuid }?
       & modify_tag_resource_type
     }

# OMP type of the resource the tag is to be attached to.
modify_tag_resource_type
 = element type
     {
       text
     }

# Value associated with the tag.
modify_tag_value
 = element value
     {
       text
     }

# Comment to add to the tag.
modify_tag_comment
 = element comment
     {
       text
     }

# Whether the tag is active.
modify_tag_active
 = element active
     {
       boolean
     }

## Command modify_task
##
## Modify an existing task.

modify_task
 = element modify_task
     {
       # ID of task to modify.
       attribute task_id { uuid }
       & ( modify_task_comment
           | modify_task_alert*
           | modify_task_name
           | modify_task_observers
           | modify_task_preferences
           | modify_task_schedule
           | modify_task_schedule_periods
           | modify_task_scanner
           | modify_task_file )
     }

# The comment on the task.
modify_task_comment
 = element comment
     {
       text
     }

# Task alert.
modify_task_alert
 = element alert
     {
       attribute id { uuid }
     }

# The name of the task.
modify_task_name
 = element name
     {
       name
     }

# Users allowed to observe this task.
modify_task_observers
 = element observers
     {
       user_list
     }

modify_task_preferences
 = element preferences
     {
       modify_task_preferences_preference*
     }

modify_task_preferences_preference
 = element preference
     {
       modify_task_preferences_preference_scanner_name
       & modify_task_preferences_preference_value
     }

# Compact name of preference, from scanner.
modify_task_preferences_preference_scanner_name
 = element scanner_name
     {
       text
     }

modify_task_preferences_preference_value
 = element value
     {
       text
     }

# Task schedule.
modify_task_schedule
 = element schedule
     {
       attribute id { uuid }
     }

# A limit to the number of times the task will be scheduled, or 0 for no limit.
modify_task_schedule_periods
 = element schedule_periods
     {
       integer
     }

# Task scanner.
modify_task_scanner
 = element scanner
     {
       attribute id { uuid }
     }

# File to attach to task.
modify_task_file
 = element file
     {
       text # RNC limitation: base64
       & attribute name { text }
       & attribute action { xsd:token { pattern = "update|remove" } }
     }

## Command modify_user
##
## Modify a user.

modify_user
 = element modify_user
     {
       # ID of the user to be modified. Overrides NAME element.
       attribute user_id { uuid }
       & modify_user_name
       & modify_user_new_name?
       & modify_user_password?
       & modify_user_role*
       & modify_user_hosts?
       & modify_user_ifaces?
       & modify_user_sources?
     }

# The name of the user to be modified.
modify_user_name
 = element name
     {
       text
     }

# The new name for the user.
modify_user_new_name
 = element new_name
     {
       text
     }

# User access rules: a textual list of hosts.
modify_user_hosts
 = element hosts
     {
       text
       & # If 1, allow only listed, otherwise forbid listed.
       attribute allow { boolean }?
     }

# User access rules: a textual list of ifaces.
modify_user_ifaces
 = element ifaces
     {
       text
       & # If 1, allow only listed, otherwise forbid listed.
       attribute allow { boolean }?
     }

# The password for the user.
modify_user_password
 = element password
     {
       text
     }

# A role of the user.
modify_user_role
 = element role
     {
       attribute id { uuid }
     }

# List of authentication sources for this user (if omitted, no changes).
modify_user_sources
 = element sources    # type sources
     {
     }

## Command move_task
##
## 
      Moves an existing task to another OMP slave scanner or the master
    .

move_task
 = element move_task
     {
       # ID of task to reassign.
       attribute task_id { uuid }
       & # ID of slave to reassign to, empty for master.
       attribute slave_id { uuid }
     }

## Command restore
##
## Restore a resource.

restore
 = element restore
     {
       attribute id { uuid }
     }

## Command resume_task
##
## Resume a task.

resume_task
 = element resume_task
     {
       attribute task_id { uuid }
     }

## Command run_wizard
##
## Run a wizard.

run_wizard
 = element run_wizard
     {
       run_wizard_mode?
       & run_wizard_name
       & run_wizard_params
       & # Whether to only run wizards marked as read only.
       attribute read_only { boolean }?
     }

# The mode to run the wizard in.
run_wizard_mode
 = element mode
     {
       text
     }

# The name of the wizard.
run_wizard_name
 = element name
     {
       name
     }

# Parameters for the wizard.
run_wizard_params
 = element params
     {
       run_wizard_params_param*
     }

run_wizard_params_param
 = element param
     {
       run_wizard_params_param_name
       & run_wizard_params_param_value
     }

# Parameter name.
run_wizard_params_param_name
 = element name
     {
       text
     }

# Value of parameter.
run_wizard_params_param_value
 = element value
     {
       text
     }

## Command start_task
##
## Manually start an existing task.

start_task
 = element start_task
     {
       attribute task_id { uuid }
     }

## Command stop_task
##
## Stop a running task.

stop_task
 = element stop_task
     {
       attribute task_id { uuid }
     }

## Command sync_cert
##
## Synchronize with a CERT feed.

sync_cert
 = element sync_cert
     {
       ""
     }

## Command sync_feed
##
## Synchronize with an NVT feed.

sync_feed
 = element sync_feed
     {
       ""
     }

## Command sync_config
##
## Synchronize a config with a scanner.

sync_config
 = element sync_config
     {
       ""
     }

## Command sync_scap
##
## Synchronize with a SCAP feed.

sync_scap
 = element sync_scap
     {
       ""
     }

## Command test_alert
##
## Run an alert.

test_alert
 = element test_alert
     {
       attribute alert_id { uuid }
     }

## Command verify_agent
##
## Verify an agent.

verify_agent
 = element verify_agent
     {
       attribute agent_id { uuid }
     }

## Command verify_report_format
##
## Verify a report format.

verify_report_format
 = element verify_report_format
     {
       attribute report_format_id { uuid }
     }

## Command verify_scanner
##
## Verify a scanner.

verify_scanner
 = element verify_scanner
     {
       attribute scanner_id { uuid }
     }

### Responses

## Response to authenticate

authenticate_response
 = element authenticate_response
     {
       attribute status { status }
       & attribute status_text { text }
       & authenticate_response_role
       & authenticate_response_timezone
     }

# The user's role.
authenticate_response_role
 = element role    # type UserAdminSuper AdminObserver
     {
     }

# The user's timezone.
authenticate_response_timezone
 = element timezone
     {
       timezone
     }

## Response to commands

commands_response
 = element commands_response
     {
       attribute status { status }
       & attribute status_text { text }
       & ( authenticate_response
           | commands_response
           | create_agent_response
           | create_alert_response
           | create_asset_response
           | create_config_response
           | create_credential_response
           | create_filter_response
           | create_group_response
           | create_note_response
           | create_override_response
           | create_permission_response
           | create_port_list_response
           | create_port_range_response
           | create_role_response
           | create_scanner_response
           | create_schedule_response
           | create_tag_response
           | create_target_response
           | create_task_response
           | create_user_response
           | delete_agent_response
           | delete_alert_response
           | delete_asset_response
           | delete_config_response
           | delete_credential_response
           | delete_filter_response
           | delete_group_response
           | delete_note_response
           | delete_override_response
           | delete_permission_response
           | delete_port_list_response
           | delete_port_range_response
           | delete_report_response
           | delete_report_format_response
           | delete_role_response
           | delete_scanner_response
           | delete_schedule_response
           | delete_tag_response
           | delete_target_response
           | delete_task_response
           | delete_user_response
           | describe_auth_response
           | empty_trashcan_response
           | get_agents_response
           | get_alerts_response
           | get_assets_response
           | get_configs_response
           | get_credentials_response
           | get_groups_response
           | get_info_response
           | get_feeds_response
           | get_filters_response
           | get_notes_response
           | get_nvts_response
           | get_nvt_families_response
           | get_overrides_response
           | get_permissions_response
           | get_port_lists_response
           | get_preferences_response
           | get_reports_response
           | get_report_formats_response
           | get_results_response
           | get_roles_response
           | get_scanners_response
           | get_schedules_response
           | get_settings_response
           | get_system_reports_response
           | get_tags_response
           | get_targets_response
           | get_tasks_response
           | get_users_response
           | get_version_response
           | help_response
           | modify_agent_response
           | modify_alert_response
           | modify_asset_response
           | modify_auth_response
           | modify_config_response
           | modify_credential_response
           | modify_filter_response
           | modify_group_response
           | modify_note_response
           | modify_override_response
           | modify_permission_response
           | modify_port_list_response
           | modify_report_response
           | modify_report_format_response
           | modify_role_response
           | modify_scanner_response
           | modify_schedule_response
           | modify_setting_response
           | modify_tag_response
           | modify_target_response
           | modify_task_response
           | modify_user_response
           | restore_response
           | resume_task_response
           | run_wizard_response
           | start_task_response
           | stop_task_response
           | sync_feed_response
           | sync_config_response
           | sync_scap_response
           | sync_cert_response
           | test_alert_response
           | verify_agent_response
           | verify_report_format_response
           | verify_scanner_response )*
     }

## Response to create_agent

create_agent_response
 = element create_agent_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_alert

create_alert_response
 = element create_alert_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_asset

create_asset_response
 = element create_asset_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_config

create_config_response
 = element create_config_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_credential

create_credential_response
 = element create_credential_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_filter

create_filter_response
 = element create_filter_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_group

create_group_response
 = element create_group_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_note

create_note_response
 = element create_note_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_override

create_override_response
 = element create_override_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_permission

create_permission_response
 = element create_permission_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_port_list

create_port_list_response
 = element create_port_list_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_port_range

create_port_range_response
 = element create_port_range_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_report

create_report_response
 = element create_report_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_report_format

create_report_format_response
 = element create_report_format_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_role

create_role_response
 = element create_role_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_scanner

create_scanner_response
 = element create_scanner_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_schedule

create_schedule_response
 = element create_schedule_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_tag

create_tag_response
 = element create_tag_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_target

create_target_response
 = element create_target_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_task

create_task_response
 = element create_task_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to create_user

create_user_response
 = element create_user_response
     {
       attribute status { status }
       & attribute status_text { text }
       & attribute id { uuid }
     }

## Response to delete_agent

delete_agent_response
 = element delete_agent_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_asset

delete_asset_response
 = element delete_asset_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_config

delete_config_response
 = element delete_config_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_alert

delete_alert_response
 = element delete_alert_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_credential

delete_credential_response
 = element delete_credential_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_filter

delete_filter_response
 = element delete_filter_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_group

delete_group_response
 = element delete_group_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_note

delete_note_response
 = element delete_note_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_override

delete_override_response
 = element delete_override_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_report

delete_report_response
 = element delete_report_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_permission

delete_permission_response
 = element delete_permission_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_port_list

delete_port_list_response
 = element delete_port_list_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_port_range

delete_port_range_response
 = element delete_port_range_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_report_format

delete_report_format_response
 = element delete_report_format_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_role

delete_role_response
 = element delete_role_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_scanner

delete_scanner_response
 = element delete_scanner_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_schedule

delete_schedule_response
 = element delete_schedule_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_tag

delete_tag_response
 = element delete_tag_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_target

delete_target_response
 = element delete_target_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_task

delete_task_response
 = element delete_task_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to delete_user

delete_user_response
 = element delete_user_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to describe_auth

describe_auth_response
 = element describe_auth_response
     {
       attribute status { status }
       & attribute status_text { text }
       & describe_auth_response_group
     }

# Config group.
describe_auth_response_group
 = element group
     {
       attribute name { text }
       & describe_auth_response_group_auth_conf_setting
     }

describe_auth_response_group_auth_conf_setting
 = element auth_conf_setting
     {
       describe_auth_response_group_auth_conf_setting_key
       & describe_auth_response_group_auth_conf_setting_value
       & describe_auth_response_group_auth_conf_setting_certificate_info?
     }

# Setting name.
describe_auth_response_group_auth_conf_setting_key
 = element key
     {
       text
     }

# Setting value.
describe_auth_response_group_auth_conf_setting_value
 = element value
     {
       text
     }

# Info about the certificate.
describe_auth_response_group_auth_conf_setting_certificate_info
 = element certificate_info    # type certificate_info
     {
       certificate_info_time_status
       & certificate_info_activation_time
       & certificate_info_expiration_time
       & certificate_info_issuer
       & certificate_info_md5_fingerprint
     }

## Response to empty_trashcan

empty_trashcan_response
 = element empty_trashcan_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to get_agents

get_agents_response
 = element get_agents_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_agents_response_agent*
       & get_agents_response_filters
       & get_agents_response_sort
       & get_agents_response_agents
       & get_agents_response_agent_count
     }

get_agents_response_agent
 = element agent
     {
       attribute id { uuid }
       & get_agents_response_agent_owner
       & get_agents_response_agent_name
       & get_agents_response_agent_comment
       & get_agents_response_agent_creation_time
       & get_agents_response_agent_modification_time
       & get_agents_response_agent_in_use
       & get_agents_response_agent_writable
       & get_agents_response_agent_permissions
       & get_agents_response_agent_user_tags
       & ( get_agents_response_agent_installer
           | get_agents_response_agent_package )
     }

# Owner of the agent.
get_agents_response_agent_owner
 = element owner
     {
       get_agents_response_agent_owner_name
     }

# The name of the owner.
get_agents_response_agent_owner_name
 = element name
     {
       name
     }

# The name of the agent.
get_agents_response_agent_name
 = element name
     {
       name
     }

# The comment on the agent.
get_agents_response_agent_comment
 = element comment
     {
       text
     }

# Date and time the agent was created.
get_agents_response_agent_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the agent was last modified.
get_agents_response_agent_modification_time
 = element modification_time
     {
       iso_time
     }

# Whether the agent is in use.
get_agents_response_agent_in_use
 = element in_use
     {
       boolean
     }

# Whether the agent is writable.
get_agents_response_agent_writable
 = element writable
     {
       boolean
     }

# Permissions that the current user has on the agent.
get_agents_response_agent_permissions
 = element permissions
     {
       get_agents_response_agent_permissions_permission*
     }

get_agents_response_agent_permissions_permission
 = element permission
     {
       get_agents_response_agent_permissions_permission_name
     }

# The name of the permission.
get_agents_response_agent_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the agent.
get_agents_response_agent_user_tags
 = element user_tags
     {
       get_agents_response_agent_user_tags_count
       & get_agents_response_agent_user_tags_tag*
     }

# Number of attached tags.
get_agents_response_agent_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_agents_response_agent_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_agents_response_agent_user_tags_tag_name
       & get_agents_response_agent_user_tags_tag_value
       & get_agents_response_agent_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_agents_response_agent_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_agents_response_agent_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_agents_response_agent_user_tags_tag_comment
 = element comment
     {
       text
     }

get_agents_response_agent_installer
 = element installer
     {
       get_agents_response_agent_installer_trust
     }

# Whether signature verification succeeded.
get_agents_response_agent_installer_trust
 = element trust
     {
       text # RNC limitation: xsd:token { pattern = "yes|no|unknown" }
       & get_agents_response_agent_installer_trust_time
     }

# When the signature was verified.
get_agents_response_agent_installer_trust_time
 = element time
     {
       iso_time
     }

# Either the installer or one of the HOWTOs.
get_agents_response_agent_package
 = element package
     {
       text # RNC limitation: base64
       & get_agents_response_agent_package_filename
     }

# The filename of the package.
get_agents_response_agent_package_filename
 = element filename
     {
       text
     }

get_agents_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_agents_response_filters_term
       & get_agents_response_filters_name?
       & get_agents_response_filters_keywords
     }

# Filter term.
get_agents_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_agents_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_agents_response_filters_keywords
 = element keywords
     {
       get_agents_response_filters_keywords_keyword*
     }

get_agents_response_filters_keywords_keyword
 = element keyword
     {
       get_agents_response_filters_keywords_keyword_column
       & get_agents_response_filters_keywords_keyword_relation
       & get_agents_response_filters_keywords_keyword_value
     }

# Column prefix.
get_agents_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_agents_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_agents_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_agents_response_sort
 = element sort
     {
       text
       & get_agents_response_sort_field
     }

get_agents_response_sort_field
 = element field
     {
       get_agents_response_sort_field_order
     }

get_agents_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_agents_response_agents
 = element agents
     {
       # First agent.
       attribute start { integer }
       & # Maximum number of agents.
       attribute max { integer }
     }

get_agents_response_agent_count
 = element agent_count
     {
       get_agents_response_agent_count_filtered
       & get_agents_response_agent_count_page
     }

# Number of agents after filtering.
get_agents_response_agent_count_filtered
 = element filtered
     {
       integer
     }

# Number of agents on current page.
get_agents_response_agent_count_page
 = element page
     {
       integer
     }

## Response to get_configs

get_configs_response
 = element get_configs_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_configs_response_config*
       & get_configs_response_filters
       & get_configs_response_sort
       & get_configs_response_configs
       & get_configs_response_config_count
     }

get_configs_response_config
 = element config
     {
       attribute id { uuid }
       & get_configs_response_config_owner
       & get_configs_response_config_name
       & get_configs_response_config_comment
       & get_configs_response_config_creation_time
       & get_configs_response_config_modification_time
       & get_configs_response_config_family_count
       & get_configs_response_config_nvt_count
       & get_configs_response_config_type
       & get_configs_response_config_max_nvt_count
       & get_configs_response_config_known_nvt_count
       & get_configs_response_config_in_use
       & get_configs_response_config_writable
       & get_configs_response_config_permissions
       & get_configs_response_config_user_tags
       & get_configs_response_config_tasks
       & get_configs_response_config_families?
       & get_configs_response_config_preferences?
       & get_configs_response_config_nvt_selectors?
     }

# Owner of the config.
get_configs_response_config_owner
 = element owner
     {
       get_configs_response_config_owner_name
     }

# The name of the owner.
get_configs_response_config_owner_name
 = element name
     {
       name
     }

# The name of the config.
get_configs_response_config_name
 = element name
     {
       name
     }

# The comment on the config.
get_configs_response_config_comment
 = element comment
     {
       text
     }

# Creation time of the config.
get_configs_response_config_creation_time
 = element creation_time
     {
       iso_time
     }

# Last time the config was modified.
get_configs_response_config_modification_time
 = element modification_time
     {
       iso_time
     }

# The number of families selected by the config.
get_configs_response_config_family_count
 = element family_count
     {
       text # RNC limitation: integer
       & get_configs_response_config_family_count_growing
     }

# Whether new families are automatically added to the config.
get_configs_response_config_family_count_growing
 = element growing
     {
       boolean
     }

# The number of NVTs selected by the config.
get_configs_response_config_nvt_count
 = element nvt_count
     {
       text # RNC limitation: integer
       & get_configs_response_config_nvt_count_growing
     }

# Whether new NVTs are automatically added to the config.
get_configs_response_config_nvt_count_growing
 = element growing
     {
       boolean
     }

# The type the config..
get_configs_response_config_type
 = element type
     {
       text
     }

# Total number of NVTs in the families selected by the config.
get_configs_response_config_max_nvt_count
 = element max_nvt_count
     {
       integer
     }

# Total number of known NVTs selected by the config.
get_configs_response_config_known_nvt_count
 = element known_nvt_count
     {
       integer
     }

# Whether any tasks are using the config.
get_configs_response_config_in_use
 = element in_use
     {
       boolean
     }

# Whether any tasks are using the config, including trashcan tasks.
get_configs_response_config_writable
 = element writable
     {
       boolean
     }

# Permissions that the current user has on the target.
get_configs_response_config_permissions
 = element permissions
     {
       get_configs_response_config_permissions_permission*
     }

get_configs_response_config_permissions_permission
 = element permission
     {
       get_configs_response_config_permissions_permission_name
     }

# The name of the permission.
get_configs_response_config_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the config.
get_configs_response_config_user_tags
 = element user_tags
     {
       get_configs_response_config_user_tags_count
       & get_configs_response_config_user_tags_tag*
     }

# Number of attached tags.
get_configs_response_config_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_configs_response_config_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_configs_response_config_user_tags_tag_name
       & get_configs_response_config_user_tags_tag_value
       & get_configs_response_config_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_configs_response_config_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_configs_response_config_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_configs_response_config_user_tags_tag_comment
 = element comment
     {
       text
     }

# All tasks using the config.
get_configs_response_config_tasks
 = element tasks
     {
       get_configs_response_config_tasks_task*
     }

get_configs_response_config_tasks_task
 = element task
     {
       attribute id { uuid }
       & get_configs_response_config_tasks_task_name
       & get_configs_response_config_tasks_task_permissions?
     }

# The name of the task.
get_configs_response_config_tasks_task_name
 = element name
     {
       name
     }

# Permissions the user has on the task.
get_configs_response_config_tasks_task_permissions
 = element permissions
     {
       ""
     }

# All families selected by the config.
get_configs_response_config_families
 = element families
     {
       get_configs_response_config_families_family*
     }

get_configs_response_config_families_family
 = element family
     {
       get_configs_response_config_families_family_name
       & get_configs_response_config_families_family_nvt_count
       & get_configs_response_config_families_family_max_nvt_count
       & get_configs_response_config_families_family_growing
     }

# The name of the family.
get_configs_response_config_families_family_name
 = element name
     {
       name
     }

# The type of the config. 0 = OpenVAS scanner, 1 = OSP Scanner.
get_configs_response_config_families_family_type
 = element type
     {
       integer
     }

# The number of NVTs selected in the family.
get_configs_response_config_families_family_nvt_count
 = element nvt_count
     {
       integer
     }

# The total number of NVTs in the family.
get_configs_response_config_families_family_max_nvt_count
 = element max_nvt_count
     {
       integer
     }

# Whether new NVTs in the family are automatically added to the selection.
get_configs_response_config_families_family_growing
 = element growing
     {
       boolean
     }

# Preferences for all NVTs selected by the config.
get_configs_response_config_preferences
 = element preferences
     {
       get_configs_response_config_preferences_preference*
     }

get_configs_response_config_preferences_preference
 = element preference
     {
       get_configs_response_config_preferences_preference_nvt
       & get_configs_response_config_preferences_preference_hr_name
       & get_configs_response_config_preferences_preference_name
       & get_configs_response_config_preferences_preference_type
       & get_configs_response_config_preferences_preference_value
       & get_configs_response_config_preferences_preference_default
       & get_configs_response_config_preferences_preference_alt*
     }

# NVT to which preference applies.
get_configs_response_config_preferences_preference_nvt
 = element nvt
     {
       attribute oid { oid }
       & get_configs_response_config_preferences_preference_nvt_name
     }

# The name of the NVT.
get_configs_response_config_preferences_preference_nvt_name
 = element name
     {
       name
     }

# The full, more "human readable" name of the preference.
get_configs_response_config_preferences_preference_hr_name
 = element hr_name
     {
       name
     }

# The compact name of the preference as used by the scanner.
get_configs_response_config_preferences_preference_name
 = element name
     {
       name
     }

# The type of preference.
get_configs_response_config_preferences_preference_type
 = element type
     {
       text
     }

# The value of the preference.
get_configs_response_config_preferences_preference_value
 = element value
     {
       text
     }

# The default value of the preference.
get_configs_response_config_preferences_preference_default
 = element default
     {
       text
     }

# An alternate value for the preference.
get_configs_response_config_preferences_preference_alt
 = element alt
     {
       text
     }

# All NVT selectors of the config.
get_configs_response_config_nvt_selectors
 = element nvt_selectors
     {
       get_configs_response_config_nvt_selectors_nvt_selector*
     }

# An NVT selector.
get_configs_response_config_nvt_selectors_nvt_selector
 = element nvt_selector
     {
       get_configs_response_config_nvt_selectors_nvt_selector_name
       & get_configs_response_config_nvt_selectors_nvt_selector_include
       & get_configs_response_config_nvt_selectors_nvt_selector_type
       & get_configs_response_config_nvt_selectors_nvt_selector_family_or_nvt
     }

# Name of the selector.
get_configs_response_config_nvt_selectors_nvt_selector_name
 = element name
     {
       text
     }

# Whether the selector is an include selector.
get_configs_response_config_nvt_selectors_nvt_selector_include
 = element include
     {
       boolean
     }

# Selector type: 0 = all, 1 = family, 2 = NVT.
get_configs_response_config_nvt_selectors_nvt_selector_type
 = element type
     {
       integer
     }

# Name of the family or OID of the NVT.
get_configs_response_config_nvt_selectors_nvt_selector_family_or_nvt
 = element family_or_nvt
     {
       text
     }

get_configs_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_configs_response_filters_term
       & get_configs_response_filters_name?
       & get_configs_response_filters_keywords
     }

# Filter term.
get_configs_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_configs_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_configs_response_filters_keywords
 = element keywords
     {
       get_configs_response_filters_keywords_keyword*
     }

get_configs_response_filters_keywords_keyword
 = element keyword
     {
       get_configs_response_filters_keywords_keyword_column
       & get_configs_response_filters_keywords_keyword_relation
       & get_configs_response_filters_keywords_keyword_value
     }

# Column prefix.
get_configs_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_configs_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_configs_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_configs_response_sort
 = element sort
     {
       text
       & get_configs_response_sort_field
     }

get_configs_response_sort_field
 = element field
     {
       get_configs_response_sort_field_order
     }

get_configs_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_configs_response_configs
 = element configs
     {
       # First config.
       attribute start { integer }
       & # Maximum number of configs.
       attribute max { integer }
     }

get_configs_response_config_count
 = element config_count
     {
       get_configs_response_config_count_filtered
       & get_configs_response_config_count_page
     }

# Number of configs after filtering.
get_configs_response_config_count_filtered
 = element filtered
     {
       integer
     }

# Number of configs on current page.
get_configs_response_config_count_page
 = element page
     {
       integer
     }

## Response to get_aggregates

get_aggregates_response
 = element get_aggregates_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_aggregates_response_aggregate*
       & get_aggregates_response_filters
     }

# A collection of aggregated data of the selected type.
get_aggregates_response_aggregate
 = element aggregate
     {
       get_aggregates_response_aggregate_data_type
       & get_aggregates_response_aggregate_data_column*
       & get_aggregates_response_aggregate_group_column?
       & get_aggregates_response_aggregate_text_column*
       & ( get_aggregates_response_aggregate_group*
           | get_aggregates_response_aggregate_overall )
       & get_aggregates_response_aggregate_subgroups?
       & get_aggregates_response_aggregate_column_info
     }

# The resource type the data is aggregated from.
get_aggregates_response_aggregate_data_type
 = element data_type
     {
       text
     }

# A column the data is aggregated from.
get_aggregates_response_aggregate_data_column
 = element data_column
     {
       text
     }

# The column the data is grouped by.
get_aggregates_response_aggregate_group_column
 = element group_column
     {
       text
     }

# A simple text column.
get_aggregates_response_aggregate_text_column
 = element text_column
     {
       text
     }

# Aggregate data for a group of resources.
get_aggregates_response_aggregate_group
 = element group
     {
       get_aggregates_response_aggregate_group_value
       & get_aggregates_response_aggregate_group_subgroup*
       & get_aggregates_response_aggregate_group_count
       & get_aggregates_response_aggregate_group_c_count
       & get_aggregates_response_aggregate_group_stats*
       & get_aggregates_response_aggregate_group_text*
     }

# Value of the group column.
get_aggregates_response_aggregate_group_value
 = element value
     {
       text
     }

# Aggregate data for a subgroup of resources.
get_aggregates_response_aggregate_group_subgroup
 = element subgroup
     {
       get_aggregates_response_aggregate_group_subgroup_value
       & get_aggregates_response_aggregate_group_subgroup_count
       & get_aggregates_response_aggregate_group_subgroup_c_count
       & get_aggregates_response_aggregate_group_subgroup_stats*
     }

# Value of the subgroup column.
get_aggregates_response_aggregate_group_subgroup_value
 = element value
     {
       text
     }

# Number of resources in the subgroup.
get_aggregates_response_aggregate_group_subgroup_count
 = element count
     {
       integer
     }

# Cumulative number of resources in the current subgroup.
get_aggregates_response_aggregate_group_subgroup_c_count
 = element c_count
     {
       integer
     }

# Statistics of a data column for the current subgroup.
get_aggregates_response_aggregate_group_subgroup_stats
 = element stats
     {
       # Name of the column the stats apply to.
       attribute column { text }?
       & get_aggregates_response_aggregate_group_subgroup_stats_min
       & get_aggregates_response_aggregate_group_subgroup_stats_max
       & get_aggregates_response_aggregate_group_subgroup_stats_mean
       & get_aggregates_response_aggregate_group_subgroup_stats_sum
       & get_aggregates_response_aggregate_group_subgroup_stats_c_sum
     }

# Minimum value of the data column.
get_aggregates_response_aggregate_group_subgroup_stats_min
 = element min
     {
       text
     }

# Maximum value of the data column.
get_aggregates_response_aggregate_group_subgroup_stats_max
 = element max
     {
       text
     }

# Arithmetic mean of the numeric values of the data.
get_aggregates_response_aggregate_group_subgroup_stats_mean
 = element mean
     {
       text
     }

# Sum of the numeric values of the data column.
get_aggregates_response_aggregate_group_subgroup_stats_sum
 = element sum
     {
       text
     }

# Cumulative sum of the data column.
get_aggregates_response_aggregate_group_subgroup_stats_c_sum
 = element c_sum
     {
       text
     }

# Number of resources in the group.
get_aggregates_response_aggregate_group_count
 = element count
     {
       integer
     }

# Cumulative number of resources in all groups up to and including the current one.
get_aggregates_response_aggregate_group_c_count
 = element c_count
     {
       integer
     }

# The value of a simple text column..
get_aggregates_response_aggregate_group_text
 = element text
     {
       text
       & # Name of the text column.
       attribute name { text }?
     }

# Statistics of a data column.
get_aggregates_response_aggregate_group_stats
 = element stats
     {
       # Name of the column the stats apply to.
       attribute column { text }?
       & get_aggregates_response_aggregate_group_stats_min
       & get_aggregates_response_aggregate_group_stats_max
       & get_aggregates_response_aggregate_group_stats_mean
       & get_aggregates_response_aggregate_group_stats_sum
       & get_aggregates_response_aggregate_group_stats_c_sum
     }

# Minimum value of the data column.
get_aggregates_response_aggregate_group_stats_min
 = element min
     {
       text
     }

# Maximum value of the data column.
get_aggregates_response_aggregate_group_stats_max
 = element max
     {
       text
     }

# Arithmetic mean of the numeric values of the data.
get_aggregates_response_aggregate_group_stats_mean
 = element mean
     {
       text
     }

# Sum of the numeric values of the data column.
get_aggregates_response_aggregate_group_stats_sum
 = element sum
     {
       text
     }

# Cumulative sum of the numeric values of the data column for all groups up to and including the current one.
get_aggregates_response_aggregate_group_stats_c_sum
 = element c_sum
     {
       text
     }

# Aggregate data for all resources of the selected type.
get_aggregates_response_aggregate_overall
 = element overall
     {
       get_aggregates_response_aggregate_overall_count
       & get_aggregates_response_aggregate_overall_min
       & get_aggregates_response_aggregate_overall_max
       & get_aggregates_response_aggregate_overall_mean
       & get_aggregates_response_aggregate_overall_sum
     }

# Overall number of resources.
get_aggregates_response_aggregate_overall_count
 = element count
     {
       integer
     }

# Overall minimum value of the data column.
get_aggregates_response_aggregate_overall_min
 = element min
     {
       text
     }

# Overall maximum value of the data column.
get_aggregates_response_aggregate_overall_max
 = element max
     {
       text
     }

# Overall arithmetic mean of the numeric values of the data.
get_aggregates_response_aggregate_overall_mean
 = element mean
     {
       text
     }

# Overall sum of the numeric values of the data column.
get_aggregates_response_aggregate_overall_sum
 = element sum
     {
       text
     }

# Overview of all subgroup values.
get_aggregates_response_aggregate_subgroups
 = element subgroups
     {
       get_aggregates_response_aggregate_subgroups_value*
     }

# Value of the subgroup column.
get_aggregates_response_aggregate_subgroups_value
 = element value
     {
       text
     }

# Info on the aggregate columns.
get_aggregates_response_aggregate_column_info
 = element column_info
     {
       get_aggregates_response_aggregate_column_info_aggregate_column*
     }

# Info on one column of the aggregate.
get_aggregates_response_aggregate_column_info_aggregate_column
 = element aggregate_column
     {
       get_aggregates_response_aggregate_column_info_aggregate_column_name
       & get_aggregates_response_aggregate_column_info_aggregate_column_stat
       & get_aggregates_response_aggregate_column_info_aggregate_column_type
       & get_aggregates_response_aggregate_column_info_aggregate_column_column
       & get_aggregates_response_aggregate_column_info_aggregate_column_data_type
     }

# Name of the column as it appears in the group or overall element.
get_aggregates_response_aggregate_column_info_aggregate_column_name
 = element name
     {
       text
     }

# The type of statistic in the column, e.g. min, max, mean.
get_aggregates_response_aggregate_column_info_aggregate_column_stat
 = element stat
     {
       text
     }

# The resource type.
get_aggregates_response_aggregate_column_info_aggregate_column_type
 = element type
     {
       text
     }

# Name of the column in the non-aggregated table.
get_aggregates_response_aggregate_column_info_aggregate_column_column
 = element column
     {
       text
     }

# The data type of the column, e.g. integer, text, cvss.
get_aggregates_response_aggregate_column_info_aggregate_column_data_type
 = element data_type
     {
       text
     }

get_aggregates_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_aggregates_response_filters_term
       & get_aggregates_response_filters_name?
       & get_aggregates_response_filters_keywords
     }

# Filter term.
get_aggregates_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_aggregates_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_aggregates_response_filters_keywords
 = element keywords
     {
       get_aggregates_response_filters_keywords_keyword*
     }

get_aggregates_response_filters_keywords_keyword
 = element keyword
     {
       get_aggregates_response_filters_keywords_keyword_column
       & get_aggregates_response_filters_keywords_keyword_relation
       & get_aggregates_response_filters_keywords_keyword_value
     }

# Column prefix.
get_aggregates_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_aggregates_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_aggregates_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

## Response to get_alerts

get_alerts_response
 = element get_alerts_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_alerts_response_alert*
       & get_alerts_response_filters
       & get_alerts_response_sort
       & get_alerts_response_alerts
       & get_alerts_response_alert_count
     }

get_alerts_response_alert
 = element alert
     {
       attribute id { uuid }
       & get_alerts_response_alert_owner
       & get_alerts_response_alert_name
       & get_alerts_response_alert_comment
       & get_alerts_response_alert_creation_time
       & get_alerts_response_alert_modification_time
       & get_alerts_response_alert_in_use
       & get_alerts_response_alert_writable
       & get_alerts_response_alert_permissions
       & get_alerts_response_alert_user_tags
       & get_alerts_response_alert_condition
       & get_alerts_response_alert_event
       & get_alerts_response_alert_method
       & get_alerts_response_alert_filter
       & get_alerts_response_alert_tasks?
     }

# Owner of the alert.
get_alerts_response_alert_owner
 = element owner
     {
       get_alerts_response_alert_owner_name
     }

# The name of the owner.
get_alerts_response_alert_owner_name
 = element name
     {
       name
     }

# The name of the alert.
get_alerts_response_alert_name
 = element name
     {
       name
     }

# The comment on the alert.
get_alerts_response_alert_comment
 = element comment
     {
       text
     }

# Whether any tasks are using the alert.
get_alerts_response_alert_in_use
 = element in_use
     {
       boolean
     }

# Whether the alert is writable or not.
get_alerts_response_alert_writable
 = element writable
     {
       boolean
     }

# Creation time of the alert.
get_alerts_response_alert_creation_time
 = element creation_time
     {
       iso_time
     }

# Last time the alert was modified.
get_alerts_response_alert_modification_time
 = element modification_time
     {
       iso_time
     }

# Permissions that the current user has on the alert.
get_alerts_response_alert_permissions
 = element permissions
     {
       get_alerts_response_alert_permissions_permission*
     }

get_alerts_response_alert_permissions_permission
 = element permission
     {
       get_alerts_response_alert_permissions_permission_name
     }

# The name of the permission.
get_alerts_response_alert_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the alert.
get_alerts_response_alert_user_tags
 = element user_tags
     {
       get_alerts_response_alert_user_tags_count
       & get_alerts_response_alert_user_tags_tag*
     }

# Number of attached tags.
get_alerts_response_alert_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_alerts_response_alert_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_alerts_response_alert_user_tags_tag_name
       & get_alerts_response_alert_user_tags_tag_value
       & get_alerts_response_alert_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_alerts_response_alert_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_alerts_response_alert_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_alerts_response_alert_user_tags_tag_comment
 = element comment
     {
       text
     }

# The condition that must be satisfied for the alert to occur.
get_alerts_response_alert_condition
 = element condition
     {
       text
       & get_alerts_response_alert_condition_data*
     }

# Some data that defines the condition.
get_alerts_response_alert_condition_data
 = element data
     {
       text
       & get_alerts_response_alert_condition_data_name
     }

# The name of the condition data.
get_alerts_response_alert_condition_data_name
 = element name
     {
       text
     }

# The event that must happen for the alert to occur.
get_alerts_response_alert_event
 = element event
     {
       text
       & get_alerts_response_alert_event_data*
     }

# Some data that defines the event.
get_alerts_response_alert_event_data
 = element data
     {
       text
       & get_alerts_response_alert_event_data_name
     }

# The name of the event data.
get_alerts_response_alert_event_data_name
 = element name
     {
       text
     }

# The method by which he alert must occur.
get_alerts_response_alert_method
 = element method
     {
       text
       & get_alerts_response_alert_method_data*
     }

# Some data that defines the method.
get_alerts_response_alert_method_data
 = element data
     {
       text
       & get_alerts_response_alert_method_data_name
       & get_alerts_response_alert_method_data_credential?
     }

# The name of the method data.
get_alerts_response_alert_method_data_name
 = element name
     {
       text
     }

# Credential information if the data is a credential ID.
get_alerts_response_alert_method_data_credential
 = element credential
     {
       # UUID of the credential.
       attribute id { uuid }?
       & get_alerts_response_alert_method_data_credential_name
       & get_alerts_response_alert_method_data_credential_login
     }

# The name of the credential.
get_alerts_response_alert_method_data_credential_name
 = element name
     {
       name
     }

# The username of the credential.
get_alerts_response_alert_method_data_credential_login
 = element login
     {
       name
     }

get_alerts_response_alert_filter
 = element filter
     {
       attribute id { uuid }?
       & get_alerts_response_alert_filter_name
       & get_alerts_response_alert_filter_permissions?
       & get_alerts_response_alert_filter_trash
     }

# The name of the filter.
get_alerts_response_alert_filter_name
 = element name
     {
       name
     }

# Permissions the user has on the filter.
get_alerts_response_alert_filter_permissions
 = element permissions
     {
       ""
     }

# Whether the filter is in the trashcan.
get_alerts_response_alert_filter_trash
 = element trash
     {
       boolean
     }

# Tasks using the alert.
get_alerts_response_alert_tasks
 = element tasks
     {
       get_alerts_response_alert_tasks_task*
     }

get_alerts_response_alert_tasks_task
 = element task
     {
       attribute id { uuid }
       & get_alerts_response_alert_tasks_task_name
       & get_alerts_response_alert_tasks_task_permissions?
     }

# The name of the task.
get_alerts_response_alert_tasks_task_name
 = element name
     {
       name
     }

# Permissions the user has on the task.
get_alerts_response_alert_tasks_task_permissions
 = element permissions
     {
       ""
     }

get_alerts_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_alerts_response_filters_term
       & get_alerts_response_filters_name?
       & get_alerts_response_filters_keywords
     }

# Filter term.
get_alerts_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_alerts_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_alerts_response_filters_keywords
 = element keywords
     {
       get_alerts_response_filters_keywords_keyword*
     }

get_alerts_response_filters_keywords_keyword
 = element keyword
     {
       get_alerts_response_filters_keywords_keyword_column
       & get_alerts_response_filters_keywords_keyword_relation
       & get_alerts_response_filters_keywords_keyword_value
     }

# Column prefix.
get_alerts_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_alerts_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_alerts_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_alerts_response_sort
 = element sort
     {
       text
       & get_alerts_response_sort_field
     }

get_alerts_response_sort_field
 = element field
     {
       get_alerts_response_sort_field_order
     }

get_alerts_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_alerts_response_alerts
 = element alerts
     {
       # First alert.
       attribute start { integer }
       & # Maximum number of alerts.
       attribute max { integer }
     }

get_alerts_response_alert_count
 = element alert_count
     {
       get_alerts_response_alert_count_filtered
       & get_alerts_response_alert_count_page
     }

# Number of alerts after filtering.
get_alerts_response_alert_count_filtered
 = element filtered
     {
       integer
     }

# Number of alerts on current page.
get_alerts_response_alert_count_page
 = element page
     {
       integer
     }

## Response to get_assets

get_assets_response
 = element get_assets_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_assets_response_asset*
       & get_assets_response_filters
       & get_assets_response_sort
       & get_assets_response_assets
       & get_assets_response_asset_count
     }

get_assets_response_asset
 = element asset
     {
       attribute id { uuid }
       & get_assets_response_asset_owner
       & get_assets_response_asset_name
       & get_assets_response_asset_comment
       & get_assets_response_asset_creation_time
       & get_assets_response_asset_modification_time
       & get_assets_response_asset_writable
       & get_assets_response_asset_in_use
       & get_assets_response_asset_permissions
       & get_assets_response_asset_user_tags
       & get_assets_response_asset_identifiers?
       & ( get_assets_response_asset_host
           | get_assets_response_asset_os )
     }

# Owner of the asset.
get_assets_response_asset_owner
 = element owner
     {
       get_assets_response_asset_owner_name
     }

# The name of the owner.
get_assets_response_asset_owner_name
 = element name
     {
       name
     }

# The name of the asset.
get_assets_response_asset_name
 = element name
     {
       name
     }

# The comment on the asset.
get_assets_response_asset_comment
 = element comment
     {
       text
     }

# Date and time the asset was created.
get_assets_response_asset_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the asset was last modified.
get_assets_response_asset_modification_time
 = element modification_time
     {
       iso_time
     }

# Host identifiers.
get_assets_response_asset_identifiers
 = element identifiers
     {
       get_assets_response_asset_identifiers_identifier
     }

# A single identifier.
get_assets_response_asset_identifiers_identifier
 = element identifier
     {
       get_assets_response_asset_identifiers_identifier_name
       & get_assets_response_asset_identifiers_identifier_value
       & get_assets_response_asset_identifiers_identifier_creation_time
       & get_assets_response_asset_identifiers_identifier_modification_time
       & get_assets_response_asset_identifiers_identifier_source
       & get_assets_response_asset_identifiers_identifier_os?
     }

# The name of the identifier.
get_assets_response_asset_identifiers_identifier_name
 = element name
     {
       name
     }

# The value of the identifier.
get_assets_response_asset_identifiers_identifier_value
 = element value
     {
       text
     }

# Date and time the identifier was created.
get_assets_response_asset_identifiers_identifier_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the identifier was last modified.
get_assets_response_asset_identifiers_identifier_modification_time
 = element modification_time
     {
       iso_time
     }

# The source of the identifier.
get_assets_response_asset_identifiers_identifier_source
 = element source
     {
       attribute id { uuid }
       & get_assets_response_asset_identifiers_identifier_source_type
       & get_assets_response_asset_identifiers_identifier_source_data
       & get_assets_response_asset_identifiers_identifier_source_deleted
     }

# Type of source.
get_assets_response_asset_identifiers_identifier_source_type
 = element type
     {
       text
     }

# Extra data, depends on type of source.
get_assets_response_asset_identifiers_identifier_source_data
 = element data
     {
       text
     }

# Whether the source has been deleted.
get_assets_response_asset_identifiers_identifier_source_deleted
 = element deleted
     {
       boolean
     }

get_assets_response_asset_identifiers_identifier_os
 = element os
     {
       attribute id { uuid }
       & get_assets_response_asset_identifiers_identifier_os_title
     }

# Title of OS.
get_assets_response_asset_identifiers_identifier_os_title
 = element title
     {
       text
     }

# A host.
get_assets_response_asset_host
 = element host
     {
       get_assets_response_asset_host_severity
       & get_assets_response_asset_host_detail*
       & get_assets_response_asset_host_routes
     }

# Severity of the host.
get_assets_response_asset_host_severity
 = element severity
     {
       get_assets_response_asset_host_severity_value
     }

get_assets_response_asset_host_severity_value
 = element value
     {
       severity
     }

# A host detail.
get_assets_response_asset_host_detail
 = element detail
     {
       get_assets_response_asset_host_detail_name
       & get_assets_response_asset_host_detail_value
       & get_assets_response_asset_host_detail_source
     }

# The name of the detail.
get_assets_response_asset_host_detail_name
 = element name
     {
       name
     }

# The value of the detail.
get_assets_response_asset_host_detail_value
 = element value
     {
       text
     }

# The source of the detail.
get_assets_response_asset_host_detail_source
 = element source
     {
       attribute id { uuid }
       & get_assets_response_asset_host_detail_source_type
     }

# Type of source.
get_assets_response_asset_host_detail_source_type
 = element type
     {
       text
     }

# List of routes to the host, with most recent ones first.
get_assets_response_asset_host_routes
 = element routes
     {
       get_assets_response_asset_host_routes_route*
     }

# List of hosts on the route to the host.
get_assets_response_asset_host_routes_route
 = element route
     {
       get_assets_response_asset_host_routes_route_host*
     }

# A host on the route.
get_assets_response_asset_host_routes_route_host
 = element host
     {
       # UUID if the host is in the asset management.
       attribute id { uuid }?
       & # Distance from the scanner.
       attribute distance { number }?
       & # Whether the current host asset has the same source as the target host.
       attribute same_source { boolean }?
       & get_assets_response_asset_host_routes_route_host_ip
     }

# IP address of the host.
get_assets_response_asset_host_routes_route_host_ip
 = element ip
     {
       text
     }

# An OS.
get_assets_response_asset_os
 = element os
     {
       get_assets_response_asset_os_title
       & get_assets_response_asset_os_installs
       & get_assets_response_asset_os_latest_severity
       & get_assets_response_asset_os_highest_severity
       & get_assets_response_asset_os_average_severity
       & get_assets_response_asset_os_hosts
     }

# Title of the OS.
get_assets_response_asset_os_title
 = element title
     {
       text
     }

# Number of hosts on which OS has been detected.
get_assets_response_asset_os_installs
 = element installs
     {
       integer
     }

# Latest severity.
get_assets_response_asset_os_latest_severity
 = element latest_severity
     {
       get_assets_response_asset_os_latest_severity_value
     }

get_assets_response_asset_os_latest_severity_value
 = element value
     {
       text
     }

# Highest severity.
get_assets_response_asset_os_highest_severity
 = element highest_severity
     {
       get_assets_response_asset_os_highest_severity_value
     }

get_assets_response_asset_os_highest_severity_value
 = element value
     {
       text
     }

# Average severity.
get_assets_response_asset_os_average_severity
 = element average_severity
     {
       get_assets_response_asset_os_average_severity_value
     }

get_assets_response_asset_os_average_severity_value
 = element value
     {
       text
     }

# Hosts on which this OS has been detected.
get_assets_response_asset_os_hosts
 = element hosts
     {
       get_assets_response_asset_os_hosts_asset
     }

# The host.
get_assets_response_asset_os_hosts_asset
 = element asset
     {
       attribute id { uuid }
       & get_assets_response_asset_os_hosts_asset_name
       & get_assets_response_asset_os_hosts_asset_severity
     }

# The name of the host.
get_assets_response_asset_os_hosts_asset_name
 = element name
     {
       name
     }

# Severity of the host.
get_assets_response_asset_os_hosts_asset_severity
 = element severity
     {
       get_assets_response_asset_os_hosts_asset_severity_value
     }

get_assets_response_asset_os_hosts_asset_severity_value
 = element value
     {
       text
     }

# Whether any tasks are using the asset.
get_assets_response_asset_in_use
 = element in_use
     {
       boolean
     }

# Whether the asset is writable.
get_assets_response_asset_writable
 = element writable
     {
       boolean
     }

# Permissions that the current user has on the asset.
get_assets_response_asset_permissions
 = element permissions
     {
       get_assets_response_asset_permissions_permission*
     }

get_assets_response_asset_permissions_permission
 = element permission
     {
       get_assets_response_asset_permissions_permission_name
     }

# The name of the permission.
get_assets_response_asset_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the asset.
get_assets_response_asset_user_tags
 = element user_tags
     {
       get_assets_response_asset_user_tags_count
       & get_assets_response_asset_user_tags_tag*
     }

# Number of attached tags.
get_assets_response_asset_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_assets_response_asset_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_assets_response_asset_user_tags_tag_name
       & get_assets_response_asset_user_tags_tag_value
       & get_assets_response_asset_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_assets_response_asset_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_assets_response_asset_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_assets_response_asset_user_tags_tag_comment
 = element comment
     {
       text
     }

get_assets_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_assets_response_filters_term
       & get_assets_response_filters_name?
       & get_assets_response_filters_keywords
     }

# Filter term.
get_assets_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_assets_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_assets_response_filters_keywords
 = element keywords
     {
       get_assets_response_filters_keywords_keyword*
     }

get_assets_response_filters_keywords_keyword
 = element keyword
     {
       get_assets_response_filters_keywords_keyword_column
       & get_assets_response_filters_keywords_keyword_relation
       & get_assets_response_filters_keywords_keyword_value
     }

# Column prefix.
get_assets_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_assets_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_assets_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_assets_response_sort
 = element sort
     {
       text
       & get_assets_response_sort_field
     }

get_assets_response_sort_field
 = element field
     {
       get_assets_response_sort_field_order
     }

get_assets_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_assets_response_assets
 = element assets
     {
       # First asset.
       attribute start { integer }
       & # Maximum number of assets.
       attribute max { integer }
     }

get_assets_response_asset_count
 = element asset_count
     {
       get_assets_response_asset_count_filtered
       & get_assets_response_asset_count_page
     }

# Number of assets after filtering.
get_assets_response_asset_count_filtered
 = element filtered
     {
       integer
     }

# Number of assets on current page.
get_assets_response_asset_count_page
 = element page
     {
       integer
     }

## Response to get_credentials

get_credentials_response
 = element get_credentials_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_credentials_response_credential*
       & get_credentials_response_filters
       & get_credentials_response_sort
       & get_credentials_response_credentials
       & get_credentials_response_credential_count
     }

get_credentials_response_credential
 = element credential
     {
       attribute id { uuid }
       & get_credentials_response_credential_owner
       & get_credentials_response_credential_name
       & get_credentials_response_credential_allow_insecure
       & get_credentials_response_credential_login
       & get_credentials_response_credential_comment
       & get_credentials_response_credential_creation_time
       & get_credentials_response_credential_modification_time
       & get_credentials_response_credential_writable
       & get_credentials_response_credential_in_use
       & get_credentials_response_credential_permissions
       & get_credentials_response_credential_user_tags
       & get_credentials_response_credential_type
       & get_credentials_response_credential_full_type
       & get_credentials_response_credential_auth_algorithm?
       & get_credentials_response_credential_privacy?
       & get_credentials_response_credential_certificate_info?
       & get_credentials_response_credential_scanners?
       & get_credentials_response_credential_targets?
       & ( get_credentials_response_credential_public_key
           | get_credentials_response_credential_package )
     }

# Owner of the credential.
get_credentials_response_credential_owner
 = element owner
     {
       get_credentials_response_credential_owner_name
     }

# The name of the owner.
get_credentials_response_credential_owner_name
 = element name
     {
       name
     }

# The name of the credential.
get_credentials_response_credential_name
 = element name
     {
       name
     }

# Whether insecure use of the credential is allowed.
get_credentials_response_credential_allow_insecure
 = element allow_insecure
     {
       boolean
     }

# The username of the credential.
get_credentials_response_credential_login
 = element login
     {
       name
     }

# The comment on the credential.
get_credentials_response_credential_comment
 = element comment
     {
       text
     }

# Date and time the credential was created.
get_credentials_response_credential_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the credential was last modified.
get_credentials_response_credential_modification_time
 = element modification_time
     {
       iso_time
     }

# Whether this credential is writable.
get_credentials_response_credential_writable
 = element writable
     {
       boolean
     }

# Whether any targets are using the credential.
get_credentials_response_credential_in_use
 = element in_use
     {
       boolean
     }

# Permissions that the current user has on the credential.
get_credentials_response_credential_permissions
 = element permissions
     {
       get_credentials_response_credential_permissions_permission*
     }

get_credentials_response_credential_permissions_permission
 = element permission
     {
       get_credentials_response_credential_permissions_permission_name
     }

# The name of the permission.
get_credentials_response_credential_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the credential.
get_credentials_response_credential_user_tags
 = element user_tags
     {
       get_credentials_response_credential_user_tags_count
       & get_credentials_response_credential_user_tags_tag*
     }

# Number of attached tags.
get_credentials_response_credential_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_credentials_response_credential_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_credentials_response_credential_user_tags_tag_name
       & get_credentials_response_credential_user_tags_tag_value
       & get_credentials_response_credential_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_credentials_response_credential_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_credentials_response_credential_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_credentials_response_credential_user_tags_tag_comment
 = element comment
     {
       text
     }

# The type of the credential.
get_credentials_response_credential_type
 = element type
     {
       xsd:token { pattern = "up|usk" }
     }

# The type of the credential written out.
get_credentials_response_credential_full_type
 = element full_type
     {
       text
     }

# The SNMP authentication algorithm.
get_credentials_response_credential_auth_algorithm
 = element auth_algorithm
     {
       xsd:token { pattern = "md5|sha1" }
     }

get_credentials_response_credential_privacy
 = element privacy
     {
       get_credentials_response_credential_privacy_algorithm
     }

# The SNMP privacy algorithm.
get_credentials_response_credential_privacy_algorithm
 = element algorithm
     {
       xsd:token { pattern = "aes|des" }
     }

# Info about the certificate.
get_credentials_response_credential_certificate_info
 = element certificate_info    # type certificate_info
     {
       certificate_info_time_status
       & certificate_info_activation_time
       & certificate_info_expiration_time
       & certificate_info_issuer
       & certificate_info_md5_fingerprint
     }

# All scanners using this credential.
get_credentials_response_credential_scanners
 = element scanners
     {
       get_credentials_response_credential_scanners_scanner*
     }

get_credentials_response_credential_scanners_scanner
 = element scanner
     {
       attribute id { uuid }
       & get_credentials_response_credential_scanners_scanner_name
       & get_credentials_response_credential_scanners_scanner_permissions?
     }

# The name of the scanner.
get_credentials_response_credential_scanners_scanner_name
 = element name
     {
       name
     }

# Permissions the user has on the scanner.
get_credentials_response_credential_scanners_scanner_permissions
 = element permissions
     {
       ""
     }

# All targets using this credential.
get_credentials_response_credential_targets
 = element targets
     {
       get_credentials_response_credential_targets_target*
     }

get_credentials_response_credential_targets_target
 = element target
     {
       attribute id { uuid }
       & get_credentials_response_credential_targets_target_name
       & get_credentials_response_credential_targets_target_permissions?
     }

# The name of the target.
get_credentials_response_credential_targets_target_name
 = element name
     {
       name
     }

# Permissions the user has on the target.
get_credentials_response_credential_targets_target_permissions
 = element permissions
     {
       ""
     }

get_credentials_response_credential_public_key
 = element public_key
     {
       text
     }

get_credentials_response_credential_package
 = element package
     {
       base64
       & attribute format { xsd:token { pattern = "rpm|deb|exe" } }
     }

get_credentials_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_credentials_response_filters_term
       & get_credentials_response_filters_name?
       & get_credentials_response_filters_keywords
     }

# Filter term.
get_credentials_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_credentials_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_credentials_response_filters_keywords
 = element keywords
     {
       get_credentials_response_filters_keywords_keyword*
     }

get_credentials_response_filters_keywords_keyword
 = element keyword
     {
       get_credentials_response_filters_keywords_keyword_column
       & get_credentials_response_filters_keywords_keyword_relation
       & get_credentials_response_filters_keywords_keyword_value
     }

# Column prefix.
get_credentials_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_credentials_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_credentials_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_credentials_response_sort
 = element sort
     {
       text
       & get_credentials_response_sort_field
     }

get_credentials_response_sort_field
 = element field
     {
       get_credentials_response_sort_field_order
     }

get_credentials_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_credentials_response_credentials
 = element credentials
     {
       # First credential.
       attribute start { integer }
       & # Maximum number of credentials.
       attribute max { integer }
     }

get_credentials_response_credential_count
 = element credential_count
     {
       get_credentials_response_credential_count_filtered
       & get_credentials_response_credential_count_page
     }

# Number of credentials after filtering.
get_credentials_response_credential_count_filtered
 = element filtered
     {
       integer
     }

# Number of credentials on current page.
get_credentials_response_credential_count_page
 = element page
     {
       integer
     }

## Response to get_feeds

get_feeds_response
 = element get_feeds_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_feeds_response_feed*
     }

get_feeds_response_feed
 = element feed
     {
       get_feeds_response_feed_type
       & get_feeds_response_feed_name
       & get_feeds_response_feed_version
       & get_feeds_response_feed_description
       & get_feeds_response_feed_sync_not_available?
       & get_feeds_response_feed_currently_syncing?
     }

# The type of feed: NVT, CERT or SCAP.
get_feeds_response_feed_type
 = element type
     {
       text
     }

# The name of the feed.
get_feeds_response_feed_name
 = element name
     {
       text
     }

# The version of the feed.
get_feeds_response_feed_version
 = element version
     {
       text
     }

# A description of the feed.
get_feeds_response_feed_description
 = element description
     {
       text
     }

# Present if syncing is not available.
get_feeds_response_feed_sync_not_available
 = element sync_not_available
     {
       get_feeds_response_feed_sync_not_available_error
     }

# Description of why sync is not available.
get_feeds_response_feed_sync_not_available_error
 = element error
     {
     }

# Present if a sync of this type is underway.
get_feeds_response_feed_currently_syncing
 = element currently_syncing
     {
       get_feeds_response_feed_currently_syncing_timestamp
       & get_feeds_response_feed_currently_syncing_user
     }

# Time sync started.
get_feeds_response_feed_currently_syncing_timestamp
 = element timestamp
     {
       text
     }

# Name of user who is performing sync.
get_feeds_response_feed_currently_syncing_user
 = element user
     {
       text
     }

## Response to get_filters

get_filters_response
 = element get_filters_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_filters_response_filter*
       & get_filters_response_filters
       & get_filters_response_sort
       & get_filters_response_filters
       & get_filters_response_filter_count
     }

get_filters_response_filter
 = element filter
     {
       attribute id { uuid }
       & get_filters_response_filter_owner
       & get_filters_response_filter_name
       & get_filters_response_filter_comment
       & get_filters_response_filter_term
       & get_filters_response_filter_type
       & get_filters_response_filter_creation_time
       & get_filters_response_filter_modification_time
       & get_filters_response_filter_in_use
       & get_filters_response_filter_writable
       & get_filters_response_filter_permissions
       & get_filters_response_filter_user_tags
       & get_filters_response_filter_alerts?
     }

# Owner of the filter.
get_filters_response_filter_owner
 = element owner
     {
       get_filters_response_filter_owner_name
     }

# The name of the owner.
get_filters_response_filter_owner_name
 = element name
     {
       name
     }

# The name of the filter.
get_filters_response_filter_name
 = element name
     {
       name
     }

# The comment on the filter.
get_filters_response_filter_comment
 = element comment
     {
       text
     }

# The filter term.
get_filters_response_filter_term
 = element term
     {
       text
     }

# Resource type filter applies to. Blank for all.
get_filters_response_filter_type
 = element type
     {
       text
     }

# Date and time the filter was created.
get_filters_response_filter_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the filter was last modified.
get_filters_response_filter_modification_time
 = element modification_time
     {
       iso_time
     }

# Whether any tasks are using the filter.
get_filters_response_filter_in_use
 = element in_use
     {
       boolean
     }

# Whether the filter is writable.
get_filters_response_filter_writable
 = element writable
     {
       boolean
     }

# Permissions that the current user has on the filter.
get_filters_response_filter_permissions
 = element permissions
     {
       get_filters_response_filter_permissions_permission*
     }

get_filters_response_filter_permissions_permission
 = element permission
     {
       get_filters_response_filter_permissions_permission_name
     }

# The name of the permission.
get_filters_response_filter_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the filter.
get_filters_response_filter_user_tags
 = element user_tags
     {
       get_filters_response_filter_user_tags_count
       & get_filters_response_filter_user_tags_tag*
     }

# Number of attached tags.
get_filters_response_filter_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_filters_response_filter_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_filters_response_filter_user_tags_tag_name
       & get_filters_response_filter_user_tags_tag_value
       & get_filters_response_filter_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_filters_response_filter_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_filters_response_filter_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_filters_response_filter_user_tags_tag_comment
 = element comment
     {
       text
     }

# All alerts using the filter.
get_filters_response_filter_alerts
 = element alerts
     {
       get_filters_response_filter_alerts_alert*
     }

get_filters_response_filter_alerts_alert
 = element alert
     {
       attribute id { uuid }
       & get_filters_response_filter_alerts_alert_name
       & get_filters_response_filter_alerts_alert_permissions?
     }

# The name of the alert.
get_filters_response_filter_alerts_alert_name
 = element name
     {
       name
     }

# Permissions the user has on the alert.
get_filters_response_filter_alerts_alert_permissions
 = element permissions
     {
       ""
     }

get_filters_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_filters_response_filters_term
       & get_filters_response_filters_name?
       & get_filters_response_filters_keywords
     }

# Filter term.
get_filters_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_filters_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_filters_response_filters_keywords
 = element keywords
     {
       get_filters_response_filters_keywords_keyword*
     }

get_filters_response_filters_keywords_keyword
 = element keyword
     {
       get_filters_response_filters_keywords_keyword_column
       & get_filters_response_filters_keywords_keyword_relation
       & get_filters_response_filters_keywords_keyword_value
     }

# Column prefix.
get_filters_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_filters_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_filters_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_filters_response_sort
 = element sort
     {
       text
       & get_filters_response_sort_field
     }

get_filters_response_sort_field
 = element field
     {
       get_filters_response_sort_field_order
     }

get_filters_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_filters_response_filters
 = element filters
     {
       # First filter.
       attribute start { integer }
       & # Maximum number of filters.
       attribute max { integer }
     }

get_filters_response_filter_count
 = element filter_count
     {
       get_filters_response_filter_count_filtered
       & get_filters_response_filter_count_page
     }

# Number of filters after filtering.
get_filters_response_filter_count_filtered
 = element filtered
     {
       integer
     }

# Number of filters on current page.
get_filters_response_filter_count_page
 = element page
     {
       integer
     }

## Response to get_groups

get_groups_response
 = element get_groups_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_groups_response_group*
       & get_groups_response_filters
       & get_groups_response_sort
       & get_groups_response_groups
       & get_groups_response_group_count
     }

get_groups_response_group
 = element group
     {
       attribute id { uuid }
       & get_groups_response_group_owner
       & get_groups_response_group_name
       & get_groups_response_group_comment
       & get_groups_response_group_creation_time
       & get_groups_response_group_modification_time
       & get_groups_response_group_writable
       & get_groups_response_group_in_use
       & get_groups_response_group_permissions
       & get_groups_response_group_user_tags
       & get_groups_response_group_users
     }

# Owner of the group.
get_groups_response_group_owner
 = element owner
     {
       get_groups_response_group_owner_name
     }

# The name of the owner.
get_groups_response_group_owner_name
 = element name
     {
       name
     }

# The name of the group.
get_groups_response_group_name
 = element name
     {
       name
     }

# The comment on the group.
get_groups_response_group_comment
 = element comment
     {
       text
     }

# Date and time the group was created.
get_groups_response_group_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the group was last modified.
get_groups_response_group_modification_time
 = element modification_time
     {
       iso_time
     }

# A comma-separated list of the users in the group.
get_groups_response_group_users
 = element users
     {
       text
     }

# Whether the group is writable.
get_groups_response_group_writable
 = element writable
     {
       boolean
     }

# Whether the group is in use.
get_groups_response_group_in_use
 = element in_use
     {
       boolean
     }

# Permissions that the current user has on the group.
get_groups_response_group_permissions
 = element permissions
     {
       get_groups_response_group_permissions_permission*
     }

get_groups_response_group_permissions_permission
 = element permission
     {
       get_groups_response_group_permissions_permission_name
     }

# The name of the permission.
get_groups_response_group_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the group.
get_groups_response_group_user_tags
 = element user_tags
     {
       get_groups_response_group_user_tags_count
       & get_groups_response_group_user_tags_tag*
     }

# Number of attached tags.
get_groups_response_group_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_groups_response_group_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_groups_response_group_user_tags_tag_name
       & get_groups_response_group_user_tags_tag_value
       & get_groups_response_group_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_groups_response_group_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_groups_response_group_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_groups_response_group_user_tags_tag_comment
 = element comment
     {
       text
     }

get_groups_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_groups_response_filters_term
       & get_groups_response_filters_name?
       & get_groups_response_filters_keywords
     }

# Filter term.
get_groups_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_groups_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_groups_response_filters_keywords
 = element keywords
     {
       get_groups_response_filters_keywords_keyword*
     }

get_groups_response_filters_keywords_keyword
 = element keyword
     {
       get_groups_response_filters_keywords_keyword_column
       & get_groups_response_filters_keywords_keyword_relation
       & get_groups_response_filters_keywords_keyword_value
     }

# Column prefix.
get_groups_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_groups_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_groups_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_groups_response_sort
 = element sort
     {
       text
       & get_groups_response_sort_field
     }

get_groups_response_sort_field
 = element field
     {
       get_groups_response_sort_field_order
     }

get_groups_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_groups_response_groups
 = element groups
     {
       # First group.
       attribute start { integer }
       & # Maximum number of groups.
       attribute max { integer }
     }

get_groups_response_group_count
 = element group_count
     {
       get_groups_response_group_count_filtered
       & get_groups_response_group_count_page
     }

# Number of groups after filtering.
get_groups_response_group_count_filtered
 = element filtered
     {
       integer
     }

# Number of groups on current page.
get_groups_response_group_count_page
 = element page
     {
       integer
     }

## Response to get_info

get_info_response
 = element get_info_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_info_response_info*
       & get_info_response_filters
       & get_info_response_sort
       & get_info_response_details
       & get_info_response_info_count
     }

get_info_response_info
 = element info
     {
       # A unique number identifying this info, if available.
       attribute id { integer }?
       & get_info_response_info_owner
       & get_info_response_info_name
       & get_info_response_info_comment
       & get_info_response_info_creation_time
       & get_info_response_info_modification_time
       & get_info_response_info_permissions
       & get_info_response_info_user_tags
       & get_info_response_info_update_time
       & ( get_info_response_info_cert_bund_adv
           | get_info_response_info_cpe
           | get_info_response_info_cve
           | get_info_response_info_dfn_cert_adv
           | get_info_response_info_ovaldef
           | get_info_response_info_nvt
           | get_info_response_info_allinfo )
     }

# Owner of the info.
get_info_response_info_owner
 = element owner
     {
       get_info_response_info_owner_name
     }

# The name of the owner.
get_info_response_info_owner_name
 = element name
     {
       name
     }

# The name of the info.
get_info_response_info_name
 = element name
     {
       name
     }

# The comment on the info.
get_info_response_info_comment
 = element comment
     {
       text
     }

# Date and time the info was created.
get_info_response_info_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the info was last modified.
get_info_response_info_modification_time
 = element modification_time
     {
       iso_time
     }

# Date and time the source of the info was read.
get_info_response_info_update_time
 = element update_time
     {
       iso_time
     }

# Permissions that the current user has on the info.
get_info_response_info_permissions
 = element permissions
     {
       get_info_response_info_permissions_permission*
     }

get_info_response_info_permissions_permission
 = element permission
     {
       get_info_response_info_permissions_permission_name
     }

# The name of the permission.
get_info_response_info_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the info.
get_info_response_info_user_tags
 = element user_tags
     {
       get_info_response_info_user_tags_count
       & get_info_response_info_user_tags_tag*
     }

# Number of attached tags.
get_info_response_info_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_info_response_info_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_info_response_info_user_tags_tag_name
       & get_info_response_info_user_tags_tag_value
       & get_info_response_info_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_info_response_info_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_info_response_info_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_info_response_info_user_tags_tag_comment
 = element comment
     {
       text
     }

# An CERT-Bund advisory info element.
get_info_response_info_cert_bund_adv
 = element cert_bund_adv
     {
       get_info_response_info_cert_bund_adv_title
       & get_info_response_info_cert_bund_adv_summary
       & get_info_response_info_cert_bund_adv_max_cvss
       & get_info_response_info_cert_bund_adv_cve_refs
       & get_info_response_info_cert_bund_adv_raw_data?
     }

# Title of the advisory.
get_info_response_info_cert_bund_adv_title
 = element title
     {
       text
     }

# Summary text of the advisory.
get_info_response_info_cert_bund_adv_summary
 = element summary
     {
       text
     }

# Highest CVSS score of CVEs referenced by the advisory.
get_info_response_info_cert_bund_adv_max_cvss
 = element max_cvss
     {
       text
     }

# Number of CVEs referenced by this advisory.
get_info_response_info_cert_bund_adv_cve_refs
 = element cve_refs
     {
       integer
     }

# Source representation of the information. Only when details were requested.
get_info_response_info_cert_bund_adv_raw_data
 = element raw_data
     {
       text
     }

# A CPE info element.
get_info_response_info_cpe
 = element cpe
     {
       get_info_response_info_cpe_nvd_id
       & get_info_response_info_cpe_title?
       & get_info_response_info_cpe_max_cvss
       & get_info_response_info_cpe_cve_refs
       & get_info_response_info_cpe_status
       & get_info_response_info_cpe_cves?
       & get_info_response_info_cpe_raw_data?
     }

# The NVD ID of the CPE.
get_info_response_info_cpe_nvd_id
 = element nvd_id
     {
       text
     }

# The title of the CPE.
get_info_response_info_cpe_title
 = element title
     {
       text
     }

# The highest CVSS recorder for this CPE.
get_info_response_info_cpe_max_cvss
 = element max_cvss
     {
       integer
     }

# The number CVE of references to this CPE.
get_info_response_info_cpe_cve_refs
 = element cve_refs
     {
       integer
     }

# The status of this CPE.
get_info_response_info_cpe_status
 = element status
     {
       text
     }

# CVEs referring to this CPE. Only when details were requested.
get_info_response_info_cpe_cves
 = element cves
     {
       get_info_response_info_cpe_cves_cve*
     }

# CVE referring to this CPE.
get_info_response_info_cpe_cves_cve
 = element cve
     {
       text
     }

# Source representation of the information. Only when details were requested.
get_info_response_info_cpe_raw_data
 = element raw_data
     {
       text
     }

# A NVT info element.
get_info_response_info_nvt
 = element nvt
     {
       text
     }

# A CVE info element.
get_info_response_info_cve
 = element cve
     {
       get_info_response_info_cve_cvss
       & get_info_response_info_cve_vector
       & get_info_response_info_cve_complexity
       & get_info_response_info_cve_authentication
       & get_info_response_info_cve_confidentiality_impact
       & get_info_response_info_cve_integrity_impact
       & get_info_response_info_cve_availability_impact
       & get_info_response_info_cve_description
       & get_info_response_info_cve_products
       & get_info_response_info_cve_nvts?
       & get_info_response_info_cve_cert?
       & get_info_response_info_cve_raw_data?
     }

# CVSS Base Score.
get_info_response_info_cve_cvss
 = element cvss
     {
       text
     }

# CVSS Access Vector metric.
get_info_response_info_cve_vector
 = element vector
     {
       text
     }

# CVSS Attack Complexity metric.
get_info_response_info_cve_complexity
 = element complexity
     {
       text
     }

# CVSS Authentication metric.
get_info_response_info_cve_authentication
 = element authentication
     {
       text
     }

# CVSS Confidentiality impact metric.
get_info_response_info_cve_confidentiality_impact
 = element confidentiality_impact
     {
       text
     }

# CVSS Integrity impact metric.
get_info_response_info_cve_integrity_impact
 = element integrity_impact
     {
       text
     }

# CVSS Availability impact metric.
get_info_response_info_cve_availability_impact
 = element availability_impact
     {
       text
     }

# The CVE's description.
get_info_response_info_cve_description
 = element description
     {
       text
     }

# Space separated list of CPEs affected by this.
get_info_response_info_cve_products
 = element products
     {
       text
     }

# NVTs addressing this CVE. Only when details were requested.
get_info_response_info_cve_nvts
 = element nvts
     {
       get_info_response_info_cve_nvts_nvt*
     }

# NVT referring to this CPE.
get_info_response_info_cve_nvts_nvt
 = element nvt
     {
       attribute oid { oid }?
       & get_info_response_info_cve_nvts_nvt_name
     }

# Name of the NVT.
get_info_response_info_cve_nvts_nvt_name
 = element name
     {
       text
     }

# List of CERT advisories referencing this CVE.
get_info_response_info_cve_cert
 = element cert
     {
       get_info_response_info_cve_cert_cert_ref*
       & get_info_response_info_cve_cert_warning?
     }

# A CERT advisory reference.
get_info_response_info_cve_cert_cert_ref
 = element cert_ref
     {
       # Type of the advisory (e.g. "DFN-CERT", "CERT-BUND").
       attribute type { text }?
       & get_info_response_info_cve_cert_cert_ref_name
       & get_info_response_info_cve_cert_cert_ref_title
     }

# The name / ID of the advisory.
get_info_response_info_cve_cert_cert_ref_name
 = element name
     {
       text
     }

# The title of the advisory.
get_info_response_info_cve_cert_cert_ref_title
 = element title
     {
       text
     }

# A warning message, e.g. when the database is unavailable.
get_info_response_info_cve_cert_warning
 = element warning
     {
       text
     }

# Source representation of the information. Only when details were requested.
get_info_response_info_cve_raw_data
 = element raw_data
     {
       text
     }

# An DFN-CERT advisory info element.
get_info_response_info_dfn_cert_adv
 = element dfn_cert_adv
     {
       get_info_response_info_dfn_cert_adv_title
       & get_info_response_info_dfn_cert_adv_summary
       & get_info_response_info_dfn_cert_adv_max_cvss
       & get_info_response_info_dfn_cert_adv_cve_refs
       & get_info_response_info_dfn_cert_adv_raw_data?
     }

# Title of the advisory.
get_info_response_info_dfn_cert_adv_title
 = element title
     {
       text
     }

# Summary text of the advisory.
get_info_response_info_dfn_cert_adv_summary
 = element summary
     {
       text
     }

# Highest CVSS score of CVEs referenced by the advisory.
get_info_response_info_dfn_cert_adv_max_cvss
 = element max_cvss
     {
       text
     }

# Number of CVEs referenced by this advisory.
get_info_response_info_dfn_cert_adv_cve_refs
 = element cve_refs
     {
       integer
     }

# Source representation of the information. Only when details were requested.
get_info_response_info_dfn_cert_adv_raw_data
 = element raw_data
     {
       text
     }

# An OVAL definition info element.
get_info_response_info_ovaldef
 = element ovaldef
     {
       get_info_response_info_ovaldef_version
       & get_info_response_info_ovaldef_deprecated
       & get_info_response_info_ovaldef_status
       & get_info_response_info_ovaldef_class
       & get_info_response_info_ovaldef_title
       & get_info_response_info_ovaldef_max_cvss
       & get_info_response_info_ovaldef_cve_refs
       & get_info_response_info_ovaldef_file
       & get_info_response_info_ovaldef_description?
       & get_info_response_info_ovaldef_raw_data?
     }

# Version number of the OVAL definition.
get_info_response_info_ovaldef_version
 = element version
     {
       integer
     }

# Whether the definition is deprecated.
get_info_response_info_ovaldef_deprecated
 = element deprecated
     {
       boolean
     }

# Lifecycle status text of the definition.
get_info_response_info_ovaldef_status
 = element status
     {
       text
     }

# Definition class of the definition.
get_info_response_info_ovaldef_class
 = element class
     {
       text
     }

# Title of the definition.
get_info_response_info_ovaldef_title
 = element title
     {
       text
     }

# Highest CVSS score of CVEs referenced by the definition.
get_info_response_info_ovaldef_max_cvss
 = element max_cvss
     {
       text
     }

# Number of CVEs referenced by the definition.
get_info_response_info_ovaldef_cve_refs
 = element cve_refs
     {
       integer
     }

# Path to the source xml file, relative to the SCAP data directory.
get_info_response_info_ovaldef_file
 = element file
     {
       text
     }

# Longer description of the definition. Only when details were requested.
get_info_response_info_ovaldef_description
 = element description
     {
       text
     }

# Source representation of the information. Only when details were requested.
get_info_response_info_ovaldef_raw_data
 = element raw_data
     {
       text
     }

# A SecInfo entry. Could be CPE, CVE, NVT, OVALDEF or DFN-CERT Advisory.
get_info_response_info_allinfo
 = element allinfo
     {
       get_info_response_info_allinfo_type
       & get_info_response_info_allinfo_extra
       & get_info_response_info_allinfo_severity
     }

# Type of SecInfo entry.
get_info_response_info_allinfo_type
 = element type
     {
       text
     }

# Extra information from the entry like title or description.
get_info_response_info_allinfo_extra
 = element extra
     {
       text
     }

# Severity rating (CVSS score) of the entry.
get_info_response_info_allinfo_severity
 = element severity
     {
       severity
     }

get_info_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_info_response_filters_term
       & get_info_response_filters_name?
       & get_info_response_filters_keywords
     }

# Filter term.
get_info_response_filters_term
 = element term    # type text
     {
     }

# Filter name, if applicable.
get_info_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_info_response_filters_keywords
 = element keywords
     {
       get_info_response_filters_keywords_keyword*
     }

get_info_response_filters_keywords_keyword
 = element keyword
     {
       get_info_response_filters_keywords_keyword_column
       & get_info_response_filters_keywords_keyword_relation
       & get_info_response_filters_keywords_keyword_value
     }

# Column prefix.
get_info_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_info_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_info_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_info_response_sort
 = element sort
     {
       text
       & get_info_response_sort_field
     }

get_info_response_sort_field
 = element field
     {
       get_info_response_sort_field_order
     }

get_info_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_info_response_info_count
 = element info_count
     {
       get_info_response_info_count_filtered
       & get_info_response_info_count_page
     }

# Number of info elements after filtering.
get_info_response_info_count_filtered
 = element filtered
     {
       integer
     }

# Number of info elements on current page.
get_info_response_info_count_page
 = element page
     {
       integer
     }

# Are details included in this response.
get_info_response_details
 = element details    # type boolean
     {
     }

## Response to get_notes

get_notes_response
 = element get_notes_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_notes_response_note*
       & get_notes_response_filters
       & get_notes_response_sort
       & get_notes_response_notes
       & get_notes_response_note_count
     }

get_notes_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_notes_response_filters_term
       & get_notes_response_filters_name?
       & get_notes_response_filters_keywords
     }

# Filter term.
get_notes_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_notes_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_notes_response_filters_keywords
 = element keywords
     {
       get_notes_response_filters_keywords_keyword*
     }

get_notes_response_filters_keywords_keyword
 = element keyword
     {
       get_notes_response_filters_keywords_keyword_column
       & get_notes_response_filters_keywords_keyword_relation
       & get_notes_response_filters_keywords_keyword_value
     }

# Column prefix.
get_notes_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_notes_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_notes_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_notes_response_sort
 = element sort
     {
       text
       & get_notes_response_sort_field
     }

get_notes_response_sort_field
 = element field
     {
       get_notes_response_sort_field_order
     }

get_notes_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_notes_response_notes
 = element notes
     {
       # First note.
       attribute start { integer }
       & # Maximum number of notes.
       attribute max { integer }
     }

get_notes_response_note_count
 = element note_count
     {
       get_notes_response_note_count_filtered
       & get_notes_response_note_count_page
     }

# Number of notes after filtering.
get_notes_response_note_count_filtered
 = element filtered
     {
       integer
     }

# Number of notes on current page.
get_notes_response_note_count_page
 = element page
     {
       integer
     }

get_notes_response_note
 = element note    # type note
     {
       attribute id { uuid }
       & note_permissions
       & note_owner
       & note_nvt
       & note_text
       & note_creation_time
       & note_modification_time
       & note_writable
       & note_in_use
       & note_active
       & note_orphan
       & note_user_tags
       & ( note_hosts
           & note_port
           & note_severity
           & note_threat
           & note_task
           & note_end_time?
           & note_result? )?
     }

## Response to get_nvts

get_nvts_response
 = element get_nvts_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_nvts_response_nvt
     }

get_nvts_response_nvt
 = element nvt
     {
       attribute oid { oid }
       & get_nvts_response_nvt_name
       & get_nvts_response_nvt_user_tags
       & ( get_nvts_response_nvt_creation_time
           & get_nvts_response_nvt_modification_time
           & get_nvts_response_nvt_category
           & get_nvts_response_nvt_copyright
           & get_nvts_response_nvt_summary
           & get_nvts_response_nvt_family
           & get_nvts_response_nvt_version
           & get_nvts_response_nvt_cvss_base
           & get_nvts_response_nvt_qod
           & get_nvts_response_nvt_cve_id
           & get_nvts_response_nvt_cert_refs
           & get_nvts_response_nvt_bugtraq_id
           & get_nvts_response_nvt_xrefs
           & get_nvts_response_nvt_tags
           & get_nvts_response_nvt_preference_count?
           & get_nvts_response_nvt_timeout?
           & get_nvts_response_nvt_preferences? )?
     }

# The name of the NVT.
get_nvts_response_nvt_name
 = element name
     {
       name
     }

# The category of the NVT.
get_nvts_response_nvt_category
 = element category
     {
       text
     }

# The creation time of the NVT.
get_nvts_response_nvt_creation_time
 = element creation_time
     {
       iso_time
     }

# The modification time of the NVT.
get_nvts_response_nvt_modification_time
 = element modification_time
     {
       iso_time
     }

# Info on tags attached to the NVT.
get_nvts_response_nvt_user_tags
 = element user_tags
     {
       get_nvts_response_nvt_user_tags_count
       & get_nvts_response_nvt_user_tags_tag*
     }

# Number of attached tags.
get_nvts_response_nvt_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_nvts_response_nvt_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_nvts_response_nvt_user_tags_tag_name
       & get_nvts_response_nvt_user_tags_tag_value
       & get_nvts_response_nvt_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_nvts_response_nvt_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_nvts_response_nvt_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_nvts_response_nvt_user_tags_tag_comment
 = element comment
     {
       text
     }

# Copyright info of the NVT.
get_nvts_response_nvt_copyright
 = element copyright
     {
       text
     }

# Short description of the NVT.
get_nvts_response_nvt_summary
 = element summary
     {
       text
     }

# Name of the family the NVT belongs to.
get_nvts_response_nvt_family
 = element family
     {
       text
     }

# Version of the NVT.
get_nvts_response_nvt_version
 = element version
     {
       text
     }

# CVSS base score of the NVT.
get_nvts_response_nvt_cvss_base
 = element cvss_base
     {
       text
     }

# The quality of detection (QoD) of the NVT.
get_nvts_response_nvt_qod
 = element qod
     {
       get_nvts_response_nvt_qod_value
       & get_nvts_response_nvt_qod_type
     }

# The numeric QoD value.
get_nvts_response_nvt_qod_value
 = element value
     {
       integer
     }

# The QoD type.
get_nvts_response_nvt_qod_type
 = element type
     {
       text
     }

# IDs of the CVEs the NVT adresses.
get_nvts_response_nvt_cve_id
 = element cve_id
     {
       text
     }

# List of Bugtraq IDs of the NVT.
get_nvts_response_nvt_bugtraq_id
 = element bugtraq_id
     {
       text
     }

# List of CERT advisories referencing this NVT via CVEs.
get_nvts_response_nvt_cert_refs
 = element cert_refs
     {
       get_nvts_response_nvt_cert_refs_cert_ref*
       & get_nvts_response_nvt_cert_refs_warning?
     }

# A CERT advisory reference.
get_nvts_response_nvt_cert_refs_cert_ref
 = element cert_ref
     {
       # ID of the advisory.
       attribute id { text }?
       & # Type of the advisory (e.g. "DFN-CERT", "CERT-BUND").
       attribute type { text }?
     }

# A warning message, e.g. when the database is not.
get_nvts_response_nvt_cert_refs_warning
 = element warning
     {
       text
     }

# List of other references of the NVT.
get_nvts_response_nvt_xrefs
 = element xrefs
     {
       text
     }

# The tags of the NVT, separated by vertical bars.
get_nvts_response_nvt_tags
 = element tags
     {
       text
     }

# The number of preferences for the NVT.
get_nvts_response_nvt_preference_count
 = element preference_count
     {
       text
     }

# The timeout of the NVT.
get_nvts_response_nvt_timeout
 = element timeout
     {
       text
     }

# List of preferences of the NVT.
get_nvts_response_nvt_preferences
 = element preferences
     {
       text
       & get_nvts_response_nvt_preferences_timeout
       & get_nvts_response_nvt_preferences_preference*
     }

# The timeout of the NVT.
get_nvts_response_nvt_preferences_timeout
 = element timeout
     {
       text
     }

get_nvts_response_nvt_preferences_preference
 = element preference
     {
       get_nvts_response_nvt_preferences_preference_nvt
       & get_nvts_response_nvt_preferences_preference_name
       & get_nvts_response_nvt_preferences_preference_type
       & get_nvts_response_nvt_preferences_preference_value
       & get_nvts_response_nvt_preferences_preference_alt*
       & get_nvts_response_nvt_preferences_preference_default
     }

# NVT to which preference applies.
get_nvts_response_nvt_preferences_preference_nvt
 = element nvt
     {
       attribute oid { oid }
       & get_nvts_response_nvt_preferences_preference_nvt_name
     }

# The name of the NVT.
get_nvts_response_nvt_preferences_preference_nvt_name
 = element name
     {
       name
     }

# The name of the preference.
get_nvts_response_nvt_preferences_preference_name
 = element name
     {
       text
     }

# The type of the preference.
get_nvts_response_nvt_preferences_preference_type
 = element type
     {
       text
     }

# The value of the preference.
get_nvts_response_nvt_preferences_preference_value
 = element value
     {
       text
     }

# An alternate value of the preference.
get_nvts_response_nvt_preferences_preference_alt
 = element alt
     {
       text
     }

# The default value of the preference.
get_nvts_response_nvt_preferences_preference_default
 = element default
     {
       text
     }

## Response to get_nvt_families

get_nvt_families_response
 = element get_nvt_families_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_nvt_families_response_families
     }

get_nvt_families_response_families
 = element families
     {
       get_nvt_families_response_families_family*
     }

get_nvt_families_response_families_family
 = element family
     {
       get_nvt_families_response_families_family_name
       & get_nvt_families_response_families_family_max_nvt_count
     }

# The name of the family.
get_nvt_families_response_families_family_name
 = element name
     {
       name
     }

# The number of NVTs in the family.
get_nvt_families_response_families_family_max_nvt_count
 = element max_nvt_count
     {
       integer
     }

## Response to get_overrides

get_overrides_response
 = element get_overrides_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_overrides_response_override*
       & get_overrides_response_filters
       & get_overrides_response_sort
       & get_overrides_response_overrides
       & get_overrides_response_override_count
     }

get_overrides_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_overrides_response_filters_term
       & get_overrides_response_filters_name?
       & get_overrides_response_filters_keywords
     }

# Filter term.
get_overrides_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_overrides_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_overrides_response_filters_keywords
 = element keywords
     {
       get_overrides_response_filters_keywords_keyword*
     }

get_overrides_response_filters_keywords_keyword
 = element keyword
     {
       get_overrides_response_filters_keywords_keyword_column
       & get_overrides_response_filters_keywords_keyword_relation
       & get_overrides_response_filters_keywords_keyword_value
     }

# Column prefix.
get_overrides_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_overrides_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_overrides_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_overrides_response_sort
 = element sort
     {
       text
       & get_overrides_response_sort_field
     }

get_overrides_response_sort_field
 = element field
     {
       get_overrides_response_sort_field_order
     }

get_overrides_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_overrides_response_overrides
 = element overrides
     {
       # First override.
       attribute start { integer }
       & # Maximum number of overrides.
       attribute max { integer }
     }

get_overrides_response_override_count
 = element override_count
     {
       get_overrides_response_override_count_filtered
       & get_overrides_response_override_count_page
     }

# Number of overrides after filtering.
get_overrides_response_override_count_filtered
 = element filtered
     {
       integer
     }

# Number of overrides on current page.
get_overrides_response_override_count_page
 = element page
     {
       integer
     }

get_overrides_response_override
 = element override    # type override
     {
       attribute id { uuid }
       & override_permissions
       & override_owner
       & override_nvt
       & override_creation_time
       & override_modification_time
       & override_writable
       & override_in_use
       & override_active
       & override_text
       & override_threat
       & override_severity
       & override_new_threat
       & override_new_severity
       & override_orphan
       & override_permissions
       & override_user_tags
       & ( override_hosts
           & override_port
           & override_task
           & override_end_time?
           & override_result? )?
     }

## Response to get_permissions

get_permissions_response
 = element get_permissions_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_permissions_response_permission*
       & get_permissions_response_filters
       & get_permissions_response_sort
       & get_permissions_response_permissions
       & get_permissions_response_permission_count
     }

get_permissions_response_permission
 = element permission
     {
       attribute id { uuid }
       & get_permissions_response_permission_owner
       & get_permissions_response_permission_name
       & get_permissions_response_permission_comment
       & get_permissions_response_permission_creation_time
       & get_permissions_response_permission_modification_time
       & get_permissions_response_permission_writable
       & get_permissions_response_permission_in_use
       & get_permissions_response_permission_permissions
       & get_permissions_response_permission_user_tags
       & get_permissions_response_permission_resource
       & get_permissions_response_permission_subject
     }

# Owner of the permission.
get_permissions_response_permission_owner
 = element owner
     {
       get_permissions_response_permission_owner_name
     }

# The name of the owner.
get_permissions_response_permission_owner_name
 = element name
     {
       name
     }

# The name of the permission.
get_permissions_response_permission_name
 = element name
     {
       name
     }

# The comment on the permission.
get_permissions_response_permission_comment
 = element comment
     {
       text
     }

# Date and time the permission was created.
get_permissions_response_permission_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the permission was last modified.
get_permissions_response_permission_modification_time
 = element modification_time
     {
       iso_time
     }

# The resource the permission applies to.
get_permissions_response_permission_resource
 = element resource
     {
       # UUID if permission applies to a resource, else 0.
       attribute id { uuid }?
       & get_permissions_response_permission_resource_name
       & get_permissions_response_permission_resource_permissions?
       & get_permissions_response_permission_resource_type
       & get_permissions_response_permission_resource_trash
       & get_permissions_response_permission_resource_deleted
     }

get_permissions_response_permission_resource_name
 = element name
     {
       text
     }

# Permissions the user has on the resource.
get_permissions_response_permission_resource_permissions
 = element permissions
     {
       ""
     }

# The OMP type of the resource.
get_permissions_response_permission_resource_type
 = element type
     {
       text
     }

# Whether the resource is in the trash.
get_permissions_response_permission_resource_trash
 = element trash
     {
       boolean
     }

# Whether the resource has been deleted.
get_permissions_response_permission_resource_deleted
 = element deleted
     {
       boolean
     }

# The subject the permission applies to.
get_permissions_response_permission_subject
 = element subject
     {
       # UUID of the subject.
       attribute id { uuid }?
       & get_permissions_response_permission_subject_name
       & get_permissions_response_permission_subject_permissions?
       & get_permissions_response_permission_subject_type
       & get_permissions_response_permission_subject_trash
     }

get_permissions_response_permission_subject_name
 = element name
     {
       text
     }

# Permissions the user has on the subject.
get_permissions_response_permission_subject_permissions
 = element permissions
     {
       ""
     }

# The OMP type of the subject: group, role or user.
get_permissions_response_permission_subject_type
 = element type
     {
       text
     }

# Whether the subject is in the trash.
get_permissions_response_permission_subject_trash
 = element trash
     {
       boolean
     }

# Whether the subject has been deleted.
get_permissions_response_permission_subject_deleted
 = element deleted
     {
       boolean
     }

# Whether the permission is writable.
get_permissions_response_permission_writable
 = element writable
     {
       boolean
     }

# Whether the permission is in use.
get_permissions_response_permission_in_use
 = element in_use
     {
       boolean
     }

# Permissions that the current user has on the permission.
get_permissions_response_permission_permissions
 = element permissions
     {
       get_permissions_response_permission_permissions_permission*
     }

get_permissions_response_permission_permissions_permission
 = element permission
     {
       get_permissions_response_permission_permissions_permission_name
     }

# The name of the permission.
get_permissions_response_permission_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the permission.
get_permissions_response_permission_user_tags
 = element user_tags
     {
       get_permissions_response_permission_user_tags_count
       & get_permissions_response_permission_user_tags_tag*
     }

# Number of attached tags.
get_permissions_response_permission_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_permissions_response_permission_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_permissions_response_permission_user_tags_tag_name
       & get_permissions_response_permission_user_tags_tag_value
       & get_permissions_response_permission_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_permissions_response_permission_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_permissions_response_permission_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_permissions_response_permission_user_tags_tag_comment
 = element comment
     {
       text
     }

get_permissions_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_permissions_response_filters_term
       & get_permissions_response_filters_name?
       & get_permissions_response_filters_keywords
     }

# Filter term.
get_permissions_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_permissions_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_permissions_response_filters_keywords
 = element keywords
     {
       get_permissions_response_filters_keywords_keyword*
     }

get_permissions_response_filters_keywords_keyword
 = element keyword
     {
       get_permissions_response_filters_keywords_keyword_column
       & get_permissions_response_filters_keywords_keyword_relation
       & get_permissions_response_filters_keywords_keyword_value
     }

# Column prefix.
get_permissions_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_permissions_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_permissions_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_permissions_response_sort
 = element sort
     {
       text
       & get_permissions_response_sort_field
     }

get_permissions_response_sort_field
 = element field
     {
       get_permissions_response_sort_field_order
     }

get_permissions_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_permissions_response_permissions
 = element permissions
     {
       # First permission.
       attribute start { integer }
       & # Maximum number of permissions.
       attribute max { integer }
     }

get_permissions_response_permission_count
 = element permission_count
     {
       get_permissions_response_permission_count_filtered
       & get_permissions_response_permission_count_page
     }

# Number of permissions after filtering.
get_permissions_response_permission_count_filtered
 = element filtered
     {
       integer
     }

# Number of permissions on current page.
get_permissions_response_permission_count_page
 = element page
     {
       integer
     }

## Response to get_port_lists

get_port_lists_response
 = element get_port_lists_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_port_lists_response_port_list*
       & get_port_lists_response_filters
       & get_port_lists_response_sort
       & get_port_lists_response_port_lists
       & get_port_lists_response_port_list_count
     }

get_port_lists_response_port_list
 = element port_list
     {
       attribute id { uuid }
       & get_port_lists_response_port_list_owner
       & get_port_lists_response_port_list_name
       & get_port_lists_response_port_list_comment
       & get_port_lists_response_port_list_creation_time
       & get_port_lists_response_port_list_modification_time
       & get_port_lists_response_port_list_writable
       & get_port_lists_response_port_list_in_use
       & get_port_lists_response_port_list_permissions
       & get_port_lists_response_port_list_user_tags
       & get_port_lists_response_port_list_port_count
       & get_port_lists_response_port_list_port_ranges?
       & get_port_lists_response_port_list_targets?
     }

# Owner of the port list.
get_port_lists_response_port_list_owner
 = element owner
     {
       get_port_lists_response_port_list_owner_name
     }

# The name of the owner.
get_port_lists_response_port_list_owner_name
 = element name
     {
       name
     }

# The name of the port list.
get_port_lists_response_port_list_name
 = element name
     {
       name
     }

# The comment on the port list.
get_port_lists_response_port_list_comment
 = element comment
     {
       text
     }

get_port_lists_response_port_list_creation_time
 = element creation_time
     {
       iso_time
     }

get_port_lists_response_port_list_modification_time
 = element modification_time
     {
       iso_time
     }

# Whether the port list is writable.
get_port_lists_response_port_list_writable
 = element writable
     {
       boolean
     }

# Whether any targets are using the port list.
get_port_lists_response_port_list_in_use
 = element in_use
     {
       boolean
     }

# Permissions that the current user has on the port list.
get_port_lists_response_port_list_permissions
 = element permissions
     {
       get_port_lists_response_port_list_permissions_permission*
     }

get_port_lists_response_port_list_permissions_permission
 = element permission
     {
       get_port_lists_response_port_list_permissions_permission_name
     }

# The name of the permission.
get_port_lists_response_port_list_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the port list.
get_port_lists_response_port_list_user_tags
 = element user_tags
     {
       get_port_lists_response_port_list_user_tags_count
       & get_port_lists_response_port_list_user_tags_tag*
     }

# Number of attached tags.
get_port_lists_response_port_list_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_port_lists_response_port_list_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_port_lists_response_port_list_user_tags_tag_name
       & get_port_lists_response_port_list_user_tags_tag_value
       & get_port_lists_response_port_list_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_port_lists_response_port_list_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_port_lists_response_port_list_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_port_lists_response_port_list_user_tags_tag_comment
 = element comment
     {
       text
     }

get_port_lists_response_port_list_port_count
 = element port_count
     {
       get_port_lists_response_port_list_port_count_all
       & get_port_lists_response_port_list_port_count_tcp
       & get_port_lists_response_port_list_port_count_udp
     }

# Total number of ports.
get_port_lists_response_port_list_port_count_all
 = element all
     {
       integer
     }

# Total number of TCP ports.
get_port_lists_response_port_list_port_count_tcp
 = element tcp
     {
       integer
     }

# Total number of UDP ports.
get_port_lists_response_port_list_port_count_udp
 = element udp
     {
       integer
     }

get_port_lists_response_port_list_port_ranges
 = element port_ranges
     {
       get_port_lists_response_port_list_port_ranges_port_range*
     }

get_port_lists_response_port_list_port_ranges_port_range
 = element port_range
     {
       attribute id { uuid }
       & get_port_lists_response_port_list_port_ranges_port_range_start
       & get_port_lists_response_port_list_port_ranges_port_range_end
       & get_port_lists_response_port_list_port_ranges_port_range_type
       & get_port_lists_response_port_list_port_ranges_port_range_comment
     }

# First port in range.
get_port_lists_response_port_list_port_ranges_port_range_start
 = element start
     {
       integer
     }

# Last port in range.
get_port_lists_response_port_list_port_ranges_port_range_end
 = element end
     {
       integer
     }

# The type of port: TCP, UDP, ....
get_port_lists_response_port_list_port_ranges_port_range_type
 = element type
     {
       text
     }

# The comment on the port range.
get_port_lists_response_port_list_port_ranges_port_range_comment
 = element comment
     {
       text
     }

# The targets using the port list.
get_port_lists_response_port_list_targets
 = element targets
     {
       get_port_lists_response_port_list_targets_target*
     }

get_port_lists_response_port_list_targets_target
 = element target
     {
       attribute id { uuid }
       & get_port_lists_response_port_list_targets_target_name
       & get_port_lists_response_port_list_targets_target_permissions?
     }

# The name of the target.
get_port_lists_response_port_list_targets_target_name
 = element name
     {
       name
     }

# Permissions the user has on the target.
get_port_lists_response_port_list_targets_target_permissions
 = element permissions
     {
       ""
     }

get_port_lists_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_port_lists_response_filters_term
       & get_port_lists_response_filters_name?
       & get_port_lists_response_filters_keywords
     }

# Filter term.
get_port_lists_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_port_lists_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_port_lists_response_filters_keywords
 = element keywords
     {
       get_port_lists_response_filters_keywords_keyword*
     }

get_port_lists_response_filters_keywords_keyword
 = element keyword
     {
       get_port_lists_response_filters_keywords_keyword_column
       & get_port_lists_response_filters_keywords_keyword_relation
       & get_port_lists_response_filters_keywords_keyword_value
     }

# Column prefix.
get_port_lists_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_port_lists_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_port_lists_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_port_lists_response_sort
 = element sort
     {
       text
       & get_port_lists_response_sort_field
     }

get_port_lists_response_sort_field
 = element field
     {
       get_port_lists_response_sort_field_order
     }

get_port_lists_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_port_lists_response_port_lists
 = element port_lists
     {
       # First port list.
       attribute start { integer }
       & # Maximum number of port lists.
       attribute max { integer }
     }

get_port_lists_response_port_list_count
 = element port_list_count
     {
       get_port_lists_response_port_list_count_filtered
       & get_port_lists_response_port_list_count_page
     }

# Number of port lists after filtering.
get_port_lists_response_port_list_count_filtered
 = element filtered
     {
       integer
     }

# Number of port lists on current page.
get_port_lists_response_port_list_count_page
 = element page
     {
       integer
     }

## Response to get_preferences

get_preferences_response
 = element get_preferences_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_preferences_response_preference*
     }

get_preferences_response_preference
 = element preference
     {
       get_preferences_response_preference_nvt
       & get_preferences_response_preference_name
       & get_preferences_response_preference_type
       & get_preferences_response_preference_value
       & get_preferences_response_preference_alt*
       & get_preferences_response_preference_default
     }

# NVT to which preference applies.
get_preferences_response_preference_nvt
 = element nvt
     {
       attribute oid { oid }
       & get_preferences_response_preference_nvt_name
     }

# The name of the NVT.
get_preferences_response_preference_nvt_name
 = element name
     {
       name
     }

# The name of the preference.
get_preferences_response_preference_name
 = element name
     {
       name
     }

# The type of preference.
get_preferences_response_preference_type
 = element type
     {
       text
     }

# The value of the preference.
get_preferences_response_preference_value
 = element value
     {
       text
     }

# An alternate value of the preference.
get_preferences_response_preference_alt
 = element alt
     {
       text
     }

# The default value of the preference.
get_preferences_response_preference_default
 = element default
     {
       text
     }

## Response to get_reports

get_reports_response
 = element get_reports_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_reports_response_report*
       & ( get_reports_response_filters
           & get_reports_response_sort
           & get_reports_response_reports
           & get_reports_response_report_count )?
     }

# Actually attributes and either base64 or a report.
get_reports_response_report
 = element report    # type report
     {
       text # RNC limitation: base64
       & attribute id { uuid }
       & attribute format_id { uuid }
       & attribute extension { text }
       & attribute content_type { text }
       & attribute type { xsd:token { pattern = "scan|assets|prognostic" } }?
       & report_owner
       & report_name
       & report_comment
       & report_creation_time
       & report_modification_time
       & report_writable
       & report_in_use
       & report_task
       & report_report_format
       & report_report
     }

get_reports_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_reports_response_filters_term
       & get_reports_response_filters_name?
       & get_reports_response_filters_filter*
       & get_reports_response_filters_host?
       & get_reports_response_filters_delta?
       & get_reports_response_filters_keywords
     }

# Filter term.
get_reports_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_reports_response_filters_name
 = element name
     {
       text
     }

# A severity level that is included in the report.
get_reports_response_filters_filter
 = element filter
     {
       xsd:token { pattern = "High|Medium|Low|Log|Debug" }
     }

# Single host selected for prognostic or delta report.
get_reports_response_filters_host
 = element host
     {
       get_reports_response_filters_host_ip
     }

# IP address of the host.
get_reports_response_filters_host_ip
 = element ip
     {
       text
     }

# Delta states.
get_reports_response_filters_delta
 = element delta
     {
       text
       & get_reports_response_filters_delta_changed
       & get_reports_response_filters_delta_gone
       & get_reports_response_filters_delta_new
       & get_reports_response_filters_delta_same
     }

# Whether changed results are included.
get_reports_response_filters_delta_changed
 = element changed
     {
       boolean
     }

# Whether results that have vanished are included.
get_reports_response_filters_delta_gone
 = element gone
     {
       boolean
     }

# Whether new results are included.
get_reports_response_filters_delta_new
 = element new
     {
       boolean
     }

# Whether results that are equal are included.
get_reports_response_filters_delta_same
 = element same
     {
       boolean
     }

# Filter broken down into keywords.
get_reports_response_filters_keywords
 = element keywords
     {
       get_reports_response_filters_keywords_keyword*
     }

get_reports_response_filters_keywords_keyword
 = element keyword
     {
       get_reports_response_filters_keywords_keyword_column
       & get_reports_response_filters_keywords_keyword_relation
       & get_reports_response_filters_keywords_keyword_value
     }

# Column prefix.
get_reports_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_reports_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_reports_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_reports_response_sort
 = element sort
     {
       text
       & get_reports_response_sort_field
     }

get_reports_response_sort_field
 = element field
     {
       get_reports_response_sort_field_order
     }

get_reports_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_reports_response_reports
 = element reports
     {
       # First report.
       attribute start { integer }
       & # Maximum number of reports.
       attribute max { integer }
     }

get_reports_response_report_count
 = element report_count
     {
       get_reports_response_report_count_filtered
       & get_reports_response_report_count_page
     }

# Number of reports after filtering.
get_reports_response_report_count_filtered
 = element filtered
     {
       integer
     }

# Number of reports on current page.
get_reports_response_report_count_page
 = element page
     {
       integer
     }

## Response to get_report_formats

get_report_formats_response
 = element get_report_formats_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_report_formats_response_report_format*
       & get_report_formats_response_filters
       & get_report_formats_response_sort
       & get_report_formats_response_report_formats
       & get_report_formats_response_report_format_count
     }

get_report_formats_response_report_format
 = element report_format
     {
       attribute id { uuid }
       & get_report_formats_response_report_format_owner
       & get_report_formats_response_report_format_name
       & get_report_formats_response_report_format_creation_time
       & get_report_formats_response_report_format_modification_time
       & get_report_formats_response_report_format_writable
       & get_report_formats_response_report_format_in_use
       & get_report_formats_response_report_format_permissions
       & get_report_formats_response_report_format_user_tags
       & get_report_formats_response_report_format_extension
       & get_report_formats_response_report_format_content_type
       & get_report_formats_response_report_format_summary
       & get_report_formats_response_report_format_description
       & get_report_formats_response_report_format_predefined
       & get_report_formats_response_report_format_alerts?
       & ( get_report_formats_response_report_format_file*
           & get_report_formats_response_report_format_signature )?
       & get_report_formats_response_report_format_trust
       & get_report_formats_response_report_format_active
       & get_report_formats_response_report_format_param*
     }

# Owner of the report format.
get_report_formats_response_report_format_owner
 = element owner
     {
       get_report_formats_response_report_format_owner_name
     }

# The name of the owner.
get_report_formats_response_report_format_owner_name
 = element name
     {
       name
     }

# The name of the report format.
get_report_formats_response_report_format_name
 = element name
     {
       name
     }

get_report_formats_response_report_format_creation_time
 = element creation_time
     {
       iso_time
     }

get_report_formats_response_report_format_modification_time
 = element modification_time
     {
       iso_time
     }

# Whether the report format is global or in use.
get_report_formats_response_report_format_writable
 = element writable
     {
       boolean
     }

# Whether any alerts are using the report format.
get_report_formats_response_report_format_in_use
 = element in_use
     {
       boolean
     }

# Permissions that the current user has on the report format.
get_report_formats_response_report_format_permissions
 = element permissions
     {
       get_report_formats_response_report_format_permissions_permission*
     }

get_report_formats_response_report_format_permissions_permission
 = element permission
     {
       get_report_formats_response_report_format_permissions_permission_name
     }

# The name of the permission.
get_report_formats_response_report_format_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the report format.
get_report_formats_response_report_format_user_tags
 = element user_tags
     {
       get_report_formats_response_report_format_user_tags_count
       & get_report_formats_response_report_format_user_tags_tag*
     }

# Number of attached tags.
get_report_formats_response_report_format_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_report_formats_response_report_format_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_report_formats_response_report_format_user_tags_tag_name
       & get_report_formats_response_report_format_user_tags_tag_value
       & get_report_formats_response_report_format_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_report_formats_response_report_format_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_report_formats_response_report_format_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_report_formats_response_report_format_user_tags_tag_comment
 = element comment
     {
       text
     }

get_report_formats_response_report_format_summary
 = element summary
     {
       text
     }

get_report_formats_response_report_format_description
 = element description
     {
       text
     }

get_report_formats_response_report_format_extension
 = element extension
     {
       text
     }

get_report_formats_response_report_format_content_type
 = element content_type
     {
       text
     }

get_report_formats_response_report_format_predefined
 = element predefined
     {
       boolean
     }

# Alerts using the report format.
get_report_formats_response_report_format_alerts
 = element alerts
     {
       get_report_formats_response_report_format_alerts_alert*
     }

get_report_formats_response_report_format_alerts_alert
 = element alert
     {
       # UUID of the alert.
       attribute id { uuid }
       & get_report_formats_response_report_format_alerts_alert_name
       & get_report_formats_response_report_format_alerts_alert_permissions?
     }

# Name of the alert.
get_report_formats_response_report_format_alerts_alert_name
 = element name
     {
       name
     }

# Permissions the user has on the permission.
get_report_formats_response_report_format_alerts_alert_permissions
 = element permissions
     {
       ""
     }

get_report_formats_response_report_format_param
 = element param
     {
       get_report_formats_response_report_format_param_name
       & get_report_formats_response_report_format_param_type
       & get_report_formats_response_report_format_param_value
       & get_report_formats_response_report_format_param_default
     }

# The name of the param.
get_report_formats_response_report_format_param_name
 = element name
     {
       name
     }

# The type of the param.
get_report_formats_response_report_format_param_type
 = element type
     {
       text # RNC limitation: xsd:token { pattern = "boolean|integer|selection|string|text|report_format_list" }
       & get_report_formats_response_report_format_param_type_min?
       & get_report_formats_response_report_format_param_type_max?
       & get_report_formats_response_report_format_param_type_options?
     }

# Minimum.
get_report_formats_response_report_format_param_type_min
 = element min
     {
       text
     }

# Maximum.
get_report_formats_response_report_format_param_type_max
 = element max
     {
       text
     }

# Selection options.
get_report_formats_response_report_format_param_type_options
 = element options
     {
       get_report_formats_response_report_format_param_type_options_option*
     }

# Option value.
get_report_formats_response_report_format_param_type_options_option
 = element option
     {
       text
     }

# The value of the param.
get_report_formats_response_report_format_param_value
 = element value
     {
       get_report_formats_response_report_format_param_value_report_format*
     }

# Report format info if type is report_format_list.
get_report_formats_response_report_format_param_value_report_format
 = element report_format
     {
       attribute id { uuid }
       & get_report_formats_response_report_format_param_value_report_format_name
     }

# Name of the report format if available.
get_report_formats_response_report_format_param_value_report_format_name
 = element name
     {
       text
     }

# The fallback value of the param.
get_report_formats_response_report_format_param_default
 = element default
     {
       text
     }

# One of the files used to generate the report.
get_report_formats_response_report_format_file
 = element file
     {
       text # RNC limitation: base64
       & attribute name { text }
     }

# The report format signature.
get_report_formats_response_report_format_signature
 = element signature
     {
       text
     }

# Whether signature verification succeeded.
get_report_formats_response_report_format_trust
 = element trust
     {
       text # RNC limitation: xsd:token { pattern = "yes|no|unknown" }
       & attribute name { text }
       & get_report_formats_response_report_format_trust_time
     }

# The time the trust was checked.
get_report_formats_response_report_format_trust_time
 = element time
     {
       iso_time
     }

# Whether the report format is active.
get_report_formats_response_report_format_active
 = element active
     {
       boolean
     }

get_report_formats_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_report_formats_response_filters_term
       & get_report_formats_response_filters_name?
       & get_report_formats_response_filters_keywords
     }

# Filter term.
get_report_formats_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_report_formats_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_report_formats_response_filters_keywords
 = element keywords
     {
       get_report_formats_response_filters_keywords_keyword*
     }

get_report_formats_response_filters_keywords_keyword
 = element keyword
     {
       get_report_formats_response_filters_keywords_keyword_column
       & get_report_formats_response_filters_keywords_keyword_relation
       & get_report_formats_response_filters_keywords_keyword_value
     }

# Column prefix.
get_report_formats_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_report_formats_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_report_formats_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_report_formats_response_sort
 = element sort
     {
       text
       & get_report_formats_response_sort_field
     }

get_report_formats_response_sort_field
 = element field
     {
       get_report_formats_response_sort_field_order
     }

get_report_formats_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_report_formats_response_report_formats
 = element report_formats
     {
       # First report format.
       attribute start { integer }
       & # Maximum number of report formats.
       attribute max { integer }
     }

get_report_formats_response_report_format_count
 = element report_format_count
     {
       get_report_formats_response_report_format_count_filtered
       & get_report_formats_response_report_format_count_page
     }

# Number of report formats after filtering.
get_report_formats_response_report_format_count_filtered
 = element filtered
     {
       integer
     }

# Number of report formats on current page.
get_report_formats_response_report_format_count_page
 = element page
     {
       integer
     }

## Response to get_results

get_results_response
 = element get_results_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_results_response_result*
       & get_results_response_filters
       & get_results_response_sort
       & get_results_response_results
       & get_results_response_result_count
     }

get_results_response_result
 = element result    # type result
     {
       attribute id { uuid }
       & result_name
       & result_owner
       & result_comment
       & result_creation_time
       & result_modification_time
       & result_user_tags?
       & result_report?
       & result_task?
       & result_host
       & result_port
       & result_nvt
       & result_scan_nvt_version
       & result_threat
       & result_severity
       & result_qod
       & result_original_threat?
       & result_original_severity?
       & result_description
       & result_delta?
       & result_details
       & result_detection
       & result_notes?
       & result_overrides?
     }

get_results_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_results_response_filters_term
       & get_results_response_filters_name?
       & get_results_response_filters_keywords
     }

# Filter term.
get_results_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_results_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_results_response_filters_keywords
 = element keywords
     {
       get_results_response_filters_keywords_keyword*
     }

get_results_response_filters_keywords_keyword
 = element keyword
     {
       get_results_response_filters_keywords_keyword_column
       & get_results_response_filters_keywords_keyword_relation
       & get_results_response_filters_keywords_keyword_value
     }

# Column prefix.
get_results_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_results_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_results_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_results_response_sort
 = element sort
     {
       text
       & get_results_response_sort_field
     }

get_results_response_sort_field
 = element field
     {
       get_results_response_sort_field_order
     }

get_results_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_results_response_results
 = element results
     {
       # First result.
       attribute start { integer }
       & # Maximum number of results.
       attribute max { integer }
     }

get_results_response_result_count
 = element result_count
     {
       get_results_response_result_count_filtered
       & get_results_response_result_count_page
     }

# Number of results after filtering.
get_results_response_result_count_filtered
 = element filtered
     {
       integer
     }

# Number of results on current page.
get_results_response_result_count_page
 = element page
     {
       integer
     }

## Response to get_roles

get_roles_response
 = element get_roles_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_roles_response_role*
       & get_roles_response_filters
       & get_roles_response_sort
       & get_roles_response_roles
       & get_roles_response_role_count
     }

get_roles_response_role
 = element role
     {
       attribute id { uuid }
       & get_roles_response_role_owner
       & get_roles_response_role_name
       & get_roles_response_role_comment
       & get_roles_response_role_creation_time
       & get_roles_response_role_modification_time
       & get_roles_response_role_writable
       & get_roles_response_role_in_use
       & get_roles_response_role_permissions
       & get_roles_response_role_user_tags
       & get_roles_response_role_users
     }

# Owner of the role.
get_roles_response_role_owner
 = element owner
     {
       get_roles_response_role_owner_name
     }

# The name of the owner.
get_roles_response_role_owner_name
 = element name
     {
       name
     }

# The name of the role.
get_roles_response_role_name
 = element name
     {
       name
     }

# The comment on the role.
get_roles_response_role_comment
 = element comment
     {
       text
     }

# Date and time the role was created.
get_roles_response_role_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the role was last modified.
get_roles_response_role_modification_time
 = element modification_time
     {
       iso_time
     }

# A comma-separated list of the users who have this role.
get_roles_response_role_users
 = element users
     {
       text
     }

# Whether the role is writable.
get_roles_response_role_writable
 = element writable
     {
       boolean
     }

# Whether the role is in use.
get_roles_response_role_in_use
 = element in_use
     {
       boolean
     }

# Permissions that the current user has on the role.
get_roles_response_role_permissions
 = element permissions
     {
       get_roles_response_role_permissions_permission*
     }

get_roles_response_role_permissions_permission
 = element permission
     {
       get_roles_response_role_permissions_permission_name
     }

# The name of the permission.
get_roles_response_role_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the role.
get_roles_response_role_user_tags
 = element user_tags
     {
       get_roles_response_role_user_tags_count
       & get_roles_response_role_user_tags_tag*
     }

# Number of attached tags.
get_roles_response_role_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_roles_response_role_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_roles_response_role_user_tags_tag_name
       & get_roles_response_role_user_tags_tag_value
       & get_roles_response_role_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_roles_response_role_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_roles_response_role_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_roles_response_role_user_tags_tag_comment
 = element comment
     {
       text
     }

get_roles_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_roles_response_filters_term
       & get_roles_response_filters_name?
       & get_roles_response_filters_keywords
     }

# Filter term.
get_roles_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_roles_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_roles_response_filters_keywords
 = element keywords
     {
       get_roles_response_filters_keywords_keyword*
     }

get_roles_response_filters_keywords_keyword
 = element keyword
     {
       get_roles_response_filters_keywords_keyword_column
       & get_roles_response_filters_keywords_keyword_relation
       & get_roles_response_filters_keywords_keyword_value
     }

# Column prefix.
get_roles_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_roles_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_roles_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_roles_response_sort
 = element sort
     {
       text
       & get_roles_response_sort_field
     }

get_roles_response_sort_field
 = element field
     {
       get_roles_response_sort_field_order
     }

get_roles_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_roles_response_roles
 = element roles
     {
       # First role.
       attribute start { integer }
       & # Maximum number of roles.
       attribute max { integer }
     }

get_roles_response_role_count
 = element role_count
     {
       get_roles_response_role_count_filtered
       & get_roles_response_role_count_page
     }

# Number of roles after filtering.
get_roles_response_role_count_filtered
 = element filtered
     {
       integer
     }

# Number of roles on current page.
get_roles_response_role_count_page
 = element page
     {
       integer
     }

## Response to get_scanners

get_scanners_response
 = element get_scanners_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_scanners_response_scanner*
       & get_scanners_response_filters
       & get_scanners_response_sort
       & get_scanners_response_scanners
       & get_scanners_response_scanner_count
     }

get_scanners_response_scanner
 = element scanner
     {
       attribute id { uuid }
       & get_scanners_response_scanner_owner
       & get_scanners_response_scanner_name
       & get_scanners_response_scanner_comment
       & get_scanners_response_scanner_creation_time
       & get_scanners_response_scanner_modification_time
       & get_scanners_response_scanner_writable
       & get_scanners_response_scanner_in_use
       & get_scanners_response_scanner_permissions
       & get_scanners_response_scanner_user_tags
       & get_scanners_response_scanner_ca_pub_info
       & get_scanners_response_scanner_certificate_info
       & get_scanners_response_scanner_host
       & get_scanners_response_scanner_port
       & get_scanners_response_scanner_type
       & get_scanners_response_scanner_ca_pub
       & get_scanners_response_scanner_credential
       & get_scanners_response_scanner_tasks?
     }

# Owner of the scanner.
get_scanners_response_scanner_owner
 = element owner
     {
       get_scanners_response_scanner_owner_name
     }

# The name of the owner.
get_scanners_response_scanner_owner_name
 = element name
     {
       name
     }

# The name of the scanner.
get_scanners_response_scanner_name
 = element name
     {
       name
     }

# The comment on the scanner.
get_scanners_response_scanner_comment
 = element comment
     {
       text
     }

get_scanners_response_scanner_creation_time
 = element creation_time
     {
       iso_time
     }

get_scanners_response_scanner_modification_time
 = element modification_time
     {
       iso_time
     }

# Whether the scanner is writable.
get_scanners_response_scanner_writable
 = element writable
     {
       boolean
     }

# Whether any tasks are using the scanner.
get_scanners_response_scanner_in_use
 = element in_use
     {
       boolean
     }

# Permissions that the current user has on the scanner.
get_scanners_response_scanner_permissions
 = element permissions
     {
       get_scanners_response_scanner_permissions_permission*
     }

get_scanners_response_scanner_permissions_permission
 = element permission
     {
       get_scanners_response_scanner_permissions_permission_name
     }

# The name of the permission.
get_scanners_response_scanner_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the chedule.
get_scanners_response_scanner_user_tags
 = element user_tags
     {
       get_scanners_response_scanner_user_tags_count
       & get_scanners_response_scanner_user_tags_tag*
     }

# Number of attached tags.
get_scanners_response_scanner_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_scanners_response_scanner_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_scanners_response_scanner_user_tags_tag_name
       & get_scanners_response_scanner_user_tags_tag_value
       & get_scanners_response_scanner_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_scanners_response_scanner_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_scanners_response_scanner_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_scanners_response_scanner_user_tags_tag_comment
 = element comment
     {
       text
     }

# Info about the CA certificate.
get_scanners_response_scanner_ca_pub_info
 = element ca_pub_info    # type certificate_info
     {
       certificate_info_time_status
       & certificate_info_activation_time
       & certificate_info_expiration_time
       & certificate_info_issuer
       & certificate_info_md5_fingerprint
     }

# Info about the certificate.
get_scanners_response_scanner_certificate_info
 = element certificate_info    # type certificate_info
     {
       certificate_info_time_status
       & certificate_info_activation_time
       & certificate_info_expiration_time
       & certificate_info_issuer
       & certificate_info_md5_fingerprint
     }

# Host of the scanner.
get_scanners_response_scanner_host
 = element host
     {
       text
     }

# Port of the scanner.
get_scanners_response_scanner_port
 = element port
     {
       text
     }

# Type of the scanner.
get_scanners_response_scanner_type
 = element type
     {
       text
     }

# CA Certificate to verify the scanner's certificate.
get_scanners_response_scanner_ca_pub
 = element ca_pub
     {
       text
     }

# Client certificate credential for the Scanner.
get_scanners_response_scanner_credential
 = element credential
     {
       attribute id { uuid }
       & get_scanners_response_scanner_credential_name
       & get_scanners_response_scanner_credential_trash
     }

# Name of the credential.
get_scanners_response_scanner_credential_name
 = element name
     {
       text
     }

# Username from credential used to login.
get_scanners_response_scanner_credential_login
 = element login
     {
       text
     }

# Whether the credential is in the trashcan.
get_scanners_response_scanner_credential_trash
 = element trash
     {
       boolean
     }

get_scanners_response_scanner_tasks
 = element tasks
     {
       get_scanners_response_scanner_tasks_task*
     }

get_scanners_response_scanner_tasks_task
 = element task
     {
       attribute id { uuid }
       & get_scanners_response_scanner_tasks_task_name
       & get_scanners_response_scanner_tasks_task_permissions?
     }

# The name of the task.
get_scanners_response_scanner_tasks_task_name
 = element name
     {
       name
     }

# Permissions the user has on the task.
get_scanners_response_scanner_tasks_task_permissions
 = element permissions
     {
       ""
     }

get_scanners_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_scanners_response_filters_term
       & get_scanners_response_filters_name?
       & get_scanners_response_filters_keywords
     }

# Filter term.
get_scanners_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_scanners_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_scanners_response_filters_keywords
 = element keywords
     {
       get_scanners_response_filters_keywords_keyword*
     }

get_scanners_response_filters_keywords_keyword
 = element keyword
     {
       get_scanners_response_filters_keywords_keyword_column
       & get_scanners_response_filters_keywords_keyword_relation
       & get_scanners_response_filters_keywords_keyword_value
     }

# Column prefix.
get_scanners_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_scanners_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_scanners_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_scanners_response_sort
 = element sort
     {
       text
       & get_scanners_response_sort_field
     }

get_scanners_response_sort_field
 = element field
     {
       get_scanners_response_sort_field_order
     }

get_scanners_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_scanners_response_scanners
 = element scanners
     {
       # First scanner.
       attribute start { integer }
       & # Maximum number of scanners.
       attribute max { integer }
     }

get_scanners_response_scanner_count
 = element scanner_count
     {
       get_scanners_response_scanner_count_filtered
       & get_scanners_response_scanner_count_page
     }

# Number of scanners after filtering.
get_scanners_response_scanner_count_filtered
 = element filtered
     {
       integer
     }

# Number of scanners on current page.
get_scanners_response_scanner_count_page
 = element page
     {
       integer
     }

## Response to get_schedules

get_schedules_response
 = element get_schedules_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_schedules_response_schedule*
       & get_schedules_response_filters
       & get_schedules_response_sort
       & get_schedules_response_schedules
       & get_schedules_response_schedule_count
     }

get_schedules_response_schedule
 = element schedule
     {
       attribute id { uuid }
       & get_schedules_response_schedule_owner
       & get_schedules_response_schedule_name
       & get_schedules_response_schedule_comment
       & get_schedules_response_schedule_creation_time
       & get_schedules_response_schedule_modification_time
       & get_schedules_response_schedule_writable
       & get_schedules_response_schedule_in_use
       & get_schedules_response_schedule_permissions
       & get_schedules_response_schedule_user_tags
       & get_schedules_response_schedule_first_time
       & get_schedules_response_schedule_next_time
       & get_schedules_response_schedule_timezone
       & get_schedules_response_schedule_timezone_abbrev
       & get_schedules_response_schedule_period
       & get_schedules_response_schedule_period_months
       & get_schedules_response_schedule_simple_period
       & get_schedules_response_schedule_duration
       & get_schedules_response_schedule_simple_duration
       & get_schedules_response_schedule_tasks?
     }

# Owner of the schedule.
get_schedules_response_schedule_owner
 = element owner
     {
       get_schedules_response_schedule_owner_name
     }

# The name of the owner.
get_schedules_response_schedule_owner_name
 = element name
     {
       name
     }

# The name of the schedule.
get_schedules_response_schedule_name
 = element name
     {
       name
     }

# The comment on the schedule.
get_schedules_response_schedule_comment
 = element comment
     {
       text
     }

get_schedules_response_schedule_creation_time
 = element creation_time
     {
       iso_time
     }

get_schedules_response_schedule_modification_time
 = element modification_time
     {
       iso_time
     }

# Whether the schedule is writable.
get_schedules_response_schedule_writable
 = element writable
     {
       boolean
     }

# Whether any tasks are using the schedule.
get_schedules_response_schedule_in_use
 = element in_use
     {
       boolean
     }

# Permissions that the current user has on the schedule.
get_schedules_response_schedule_permissions
 = element permissions
     {
       get_schedules_response_schedule_permissions_permission*
     }

get_schedules_response_schedule_permissions_permission
 = element permission
     {
       get_schedules_response_schedule_permissions_permission_name
     }

# The name of the permission.
get_schedules_response_schedule_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the schedule.
get_schedules_response_schedule_user_tags
 = element user_tags
     {
       get_schedules_response_schedule_user_tags_count
       & get_schedules_response_schedule_user_tags_tag*
     }

# Number of attached tags.
get_schedules_response_schedule_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_schedules_response_schedule_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_schedules_response_schedule_user_tags_tag_name
       & get_schedules_response_schedule_user_tags_tag_value
       & get_schedules_response_schedule_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_schedules_response_schedule_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_schedules_response_schedule_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_schedules_response_schedule_user_tags_tag_comment
 = element comment
     {
       text
     }

# First time the task ran or will run.
get_schedules_response_schedule_first_time
 = element first_time
     {
       iso_time
     }

# The next time the task will run.
get_schedules_response_schedule_next_time
 = element next_time
     {
       iso_time
     }

# The timezone that the schedule follows.
get_schedules_response_schedule_timezone
 = element timezone
     {
       timezone
     }

# The abbreviated name of the timezone.
get_schedules_response_schedule_timezone_abbrev
 = element timezone_abbrev
     {
       text
     }

# How often the task will run, in seconds.
get_schedules_response_schedule_period
 = element period
     {
       integer
     }

# How often the task will run, months portion.
get_schedules_response_schedule_period_months
 = element period_months
     {
       integer
     }

# Simple representation of period, if available.
get_schedules_response_schedule_simple_period
 = element simple_period
     {
       text
       & get_schedules_response_schedule_simple_period_unit?
     }

get_schedules_response_schedule_simple_period_unit
 = element unit
     {
       time_unit
     }

# How long the task will run for (0 for entire task).
get_schedules_response_schedule_duration
 = element duration
     {
       integer
     }

# Simple representation of duration, if available.
get_schedules_response_schedule_simple_duration
 = element simple_duration
     {
       text
       & get_schedules_response_schedule_simple_duration_unit?
     }

get_schedules_response_schedule_simple_duration_unit
 = element unit
     {
       time_unit
     }

get_schedules_response_schedule_tasks
 = element tasks
     {
       get_schedules_response_schedule_tasks_task*
     }

get_schedules_response_schedule_tasks_task
 = element task
     {
       attribute id { uuid }
       & get_schedules_response_schedule_tasks_task_name
       & get_schedules_response_schedule_tasks_task_permissions?
     }

# The name of the task.
get_schedules_response_schedule_tasks_task_name
 = element name
     {
       name
     }

# Permissions the user has on the task.
get_schedules_response_schedule_tasks_task_permissions
 = element permissions
     {
       ""
     }

get_schedules_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_schedules_response_filters_term
       & get_schedules_response_filters_name?
       & get_schedules_response_filters_keywords
     }

# Filter term.
get_schedules_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_schedules_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_schedules_response_filters_keywords
 = element keywords
     {
       get_schedules_response_filters_keywords_keyword*
     }

get_schedules_response_filters_keywords_keyword
 = element keyword
     {
       get_schedules_response_filters_keywords_keyword_column
       & get_schedules_response_filters_keywords_keyword_relation
       & get_schedules_response_filters_keywords_keyword_value
     }

# Column prefix.
get_schedules_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_schedules_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_schedules_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_schedules_response_sort
 = element sort
     {
       text
       & get_schedules_response_sort_field
     }

get_schedules_response_sort_field
 = element field
     {
       get_schedules_response_sort_field_order
     }

get_schedules_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_schedules_response_schedules
 = element schedules
     {
       # First schedule.
       attribute start { integer }
       & # Maximum number of schedules.
       attribute max { integer }
     }

get_schedules_response_schedule_count
 = element schedule_count
     {
       get_schedules_response_schedule_count_filtered
       & get_schedules_response_schedule_count_page
     }

# Number of schedules after filtering.
get_schedules_response_schedule_count_filtered
 = element filtered
     {
       integer
     }

# Number of schedules on current page.
get_schedules_response_schedule_count_page
 = element page
     {
       integer
     }

## Response to get_settings

get_settings_response
 = element get_settings_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_settings_response_filters
       & get_settings_response_settings
       & get_settings_response_setting*
       & get_settings_response_setting_count
     }

get_settings_response_filters
 = element filters
     {
       get_settings_response_filters_term
     }

# Filter term.
get_settings_response_filters_term
 = element term
     {
       text
     }

get_settings_response_settings
 = element settings
     {
       # First setting.
       attribute start { integer }
       & # Maximum number of settings.
       attribute max { integer }
     }

get_settings_response_setting
 = element setting
     {
       get_settings_response_setting_name
       & get_settings_response_setting_comment
       & get_settings_response_setting_value
     }

get_settings_response_setting_name
 = element name
     {
       text
     }

get_settings_response_setting_comment
 = element comment
     {
       text
     }

get_settings_response_setting_value
 = element value
     {
       text
     }

get_settings_response_setting_count
 = element setting_count
     {
       get_settings_response_setting_count_filtered
       & get_settings_response_setting_count_page
     }

# Number of settings after filtering.
get_settings_response_setting_count_filtered
 = element filtered
     {
       integer
     }

# Number of settings on current page.
get_settings_response_setting_count_page
 = element page
     {
       integer
     }

## Response to get_system_reports

get_system_reports_response
 = element get_system_reports_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_system_reports_response_system_report*
     }

get_system_reports_response_system_report
 = element system_report
     {
       get_system_reports_response_system_report_name
       & get_system_reports_response_system_report_title
       & get_system_reports_response_system_report_report?
     }

# The name of the system report.
get_system_reports_response_system_report_name
 = element name
     {
       name
     }

# The title of the system report.
get_system_reports_response_system_report_title
 = element title
     {
       text
     }

get_system_reports_response_system_report_report
 = element report
     {
       text # RNC limitation: base64
       & attribute format { xsd:token { pattern = "png|txt" } }
       & attribute duration { integer }
     }

## Response to get_tags

get_tags_response
 = element get_tags_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_tags_response_tag*
       & get_tags_response_filters
       & get_tags_response_sort
       & get_tags_response_tags
       & get_tags_response_tag_count
     }

# Information on a single tag.
get_tags_response_tag
 = element tag
     {
       # uuid of the tag (omitted when using names_only).
       attribute id { uuid }?
       & get_tags_response_tag_name
       & ( get_tags_response_tag_permissions
           & get_tags_response_tag_owner
           & get_tags_response_tag_comment
           & get_tags_response_tag_creation_time
           & get_tags_response_tag_modification_time
           & get_tags_response_tag_writable
           & get_tags_response_tag_in_use
           & get_tags_response_tag_resource
           & get_tags_response_tag_value
           & get_tags_response_tag_active
           & get_tags_response_tag_orphan )?
     }

# Permissions that the current user has on the tag.
get_tags_response_tag_permissions
 = element permissions
     {
       get_tags_response_tag_permissions_permission*
     }

get_tags_response_tag_permissions_permission
 = element permission
     {
       get_tags_response_tag_permissions_permission_name
     }

# The name of the permission.
get_tags_response_tag_permissions_permission_name
 = element name
     {
       name
     }

# Owner of the tag.
get_tags_response_tag_owner
 = element owner
     {
       get_tags_response_tag_owner_name
     }

# The name of the owner.
get_tags_response_tag_owner_name
 = element name
     {
       name
     }

# Name of the tag (usually namespace:predicate).
get_tags_response_tag_name
 = element name
     {
       text
     }

# Comment for the tag.
get_tags_response_tag_comment
 = element comment
     {
       text
     }

# Date and time the tag was created.
get_tags_response_tag_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the tag was last modified.
get_tags_response_tag_modification_time
 = element modification_time
     {
       iso_time
     }

# Whether the tag is writable.
get_tags_response_tag_writable
 = element writable
     {
       boolean
     }

# Whether any tasks are using the tag.
get_tags_response_tag_in_use
 = element in_use
     {
       boolean
     }

# Identifies a resource the tag is attached to.
get_tags_response_tag_resource
 = element resource
     {
       # ID of the resource the tag is attached to.
       attribute id { uuid }
       & get_tags_response_tag_resource_type
       & get_tags_response_tag_resource_name
       & get_tags_response_tag_resource_trash
       & get_tags_response_tag_resource_permissions?
     }

# OMP type of the resource the tag is attached to.
get_tags_response_tag_resource_type
 = element type
     {
       text
     }

# Name of the attach resource if available, empty otherwise.
get_tags_response_tag_resource_name
 = element name
     {
       text
     }

# Whether the resource is in the trashcan.
get_tags_response_tag_resource_trash
 = element trash
     {
       boolean
     }

# Permissions the user has on the resource.
get_tags_response_tag_resource_permissions
 = element permissions
     {
       ""
     }

# Value associated with the tag.
get_tags_response_tag_value
 = element value
     {
       text
     }

# Whether the tag is active.
get_tags_response_tag_active
 = element active
     {
       boolean
     }

# Whether the tag is attached to a nonexistent resource.
get_tags_response_tag_orphan
 = element orphan
     {
       boolean
     }

get_tags_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_tags_response_filters_term
       & get_tags_response_filters_name?
       & get_tags_response_filters_keywords
     }

# Filter term.
get_tags_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_tags_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_tags_response_filters_keywords
 = element keywords
     {
       get_tags_response_filters_keywords_keyword*
     }

get_tags_response_filters_keywords_keyword
 = element keyword
     {
       get_tags_response_filters_keywords_keyword_column
       & get_tags_response_filters_keywords_keyword_relation
       & get_tags_response_filters_keywords_keyword_value
     }

# Column prefix.
get_tags_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_tags_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_tags_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_tags_response_sort
 = element sort
     {
       text
       & get_tags_response_sort_field
     }

get_tags_response_sort_field
 = element field
     {
       get_tags_response_sort_field_order
     }

get_tags_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_tags_response_tags
 = element tags
     {
       # First tag.
       attribute start { integer }
       & # Maximum number of tags.
       attribute max { integer }
     }

get_tags_response_tag_count
 = element tag_count
     {
       get_tags_response_tag_count_filtered
       & get_tags_response_tag_count_page
     }

# Number of tags after filtering.
get_tags_response_tag_count_filtered
 = element filtered
     {
       integer
     }

# Number of tags on current page.
get_tags_response_tag_count_page
 = element page
     {
       integer
     }

## Response to get_targets

get_targets_response
 = element get_targets_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_targets_response_target*
       & get_targets_response_filters
       & get_targets_response_sort
       & get_targets_response_targets
       & get_targets_response_target_count
     }

get_targets_response_target
 = element target
     {
       attribute id { uuid }
       & get_targets_response_target_owner
       & get_targets_response_target_name
       & get_targets_response_target_comment
       & get_targets_response_target_creation_time
       & get_targets_response_target_modification_time
       & get_targets_response_target_writable
       & get_targets_response_target_in_use
       & get_targets_response_target_permissions
       & get_targets_response_target_user_tags
       & get_targets_response_target_hosts
       & get_targets_response_target_exclude_hosts
       & get_targets_response_target_max_hosts
       & get_targets_response_target_ssh_credential
       & get_targets_response_target_smb_credential
       & get_targets_response_target_esxi_credential
       & get_targets_response_target_snmp_credential
       & get_targets_response_target_permissions
       & get_targets_response_target_port_range
       & get_targets_response_target_port_list
       & get_targets_response_target_alive_tests
       & get_targets_response_target_reverse_lookup_only
       & get_targets_response_target_reverse_lookup_unify
       & get_targets_response_target_tasks?
     }

# Owner of the target.
get_targets_response_target_owner
 = element owner
     {
       get_targets_response_target_owner_name
     }

# The name of the owner.
get_targets_response_target_owner_name
 = element name
     {
       name
     }

# The name of the target.
get_targets_response_target_name
 = element name
     {
       name
     }

# The comment on the target.
get_targets_response_target_comment
 = element comment
     {
       text
     }

# Date and time the target was created.
get_targets_response_target_creation_time
 = element creation_time
     {
       iso_time
     }

# Date and time the target was last modified.
get_targets_response_target_modification_time
 = element modification_time
     {
       iso_time
     }

# A list of hosts.
get_targets_response_target_hosts
 = element hosts
     {
       text
     }

# A list of hosts to exclude.
get_targets_response_target_exclude_hosts
 = element exclude_hosts
     {
       text
     }

# The maximum number of hosts defined by the target.
get_targets_response_target_max_hosts
 = element max_hosts
     {
       integer
     }

# Whether the target is writable.
get_targets_response_target_writable
 = element writable
     {
       boolean
     }

# Whether any tasks are using the target.
get_targets_response_target_in_use
 = element in_use
     {
       boolean
     }

# Permissions that the current user has on the target.
get_targets_response_target_permissions
 = element permissions
     {
       get_targets_response_target_permissions_permission*
     }

get_targets_response_target_permissions_permission
 = element permission
     {
       get_targets_response_target_permissions_permission_name
     }

# The name of the permission.
get_targets_response_target_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the target.
get_targets_response_target_user_tags
 = element user_tags
     {
       get_targets_response_target_user_tags_count
       & get_targets_response_target_user_tags_tag*
     }

# Number of attached tags.
get_targets_response_target_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_targets_response_target_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_targets_response_target_user_tags_tag_name
       & get_targets_response_target_user_tags_tag_value
       & get_targets_response_target_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_targets_response_target_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_targets_response_target_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_targets_response_target_user_tags_tag_comment
 = element comment
     {
       text
     }

get_targets_response_target_ssh_credential
 = element ssh_credential
     {
       attribute id { uuid_or_empty }
       & get_targets_response_target_ssh_credential_name
       & get_targets_response_target_ssh_credential_permissions?
       & get_targets_response_target_ssh_credential_port
       & get_targets_response_target_ssh_credential_trash
     }

# The name of the SSH LSC credential.
get_targets_response_target_ssh_credential_name
 = element name
     {
       name
     }

# Permissions the user has on the task.
get_targets_response_target_ssh_credential_permissions
 = element permissions
     {
       ""
     }

# The port the LSCs will use.
get_targets_response_target_ssh_credential_port
 = element port
     {
       text
     }

# Whether the LSC credential is in the trashcan.
get_targets_response_target_ssh_credential_trash
 = element trash
     {
       boolean
     }

get_targets_response_target_smb_credential
 = element smb_credential
     {
       attribute id { uuid_or_empty }
       & get_targets_response_target_smb_credential_name
       & get_targets_response_target_smb_credential_permissions?
       & get_targets_response_target_smb_credential_trash
     }

# The name of the SMB LSC credential.
get_targets_response_target_smb_credential_name
 = element name
     {
       name
     }

# Permissions the user has on the task.
get_targets_response_target_smb_credential_permissions
 = element permissions
     {
       ""
     }

# Whether the LSC credential is in the trashcan.
get_targets_response_target_smb_credential_trash
 = element trash
     {
       boolean
     }

get_targets_response_target_esxi_credential
 = element esxi_credential
     {
       attribute id { uuid_or_empty }
       & get_targets_response_target_esxi_credential_name
       & get_targets_response_target_esxi_credential_permissions?
       & get_targets_response_target_esxi_credential_trash
     }

# The name of the ESXi LSC credential.
get_targets_response_target_esxi_credential_name
 = element name
     {
       name
     }

# Permissions the user has on the task.
get_targets_response_target_esxi_credential_permissions
 = element permissions
     {
       ""
     }

# Whether the LSC credential is in the trashcan.
get_targets_response_target_esxi_credential_trash
 = element trash
     {
       boolean
     }

get_targets_response_target_snmp_credential
 = element snmp_credential
     {
       attribute id { uuid_or_empty }
       & get_targets_response_target_snmp_credential_name
       & get_targets_response_target_snmp_credential_permissions?
       & get_targets_response_target_snmp_credential_trash
     }

# The name of the SNMP credential.
get_targets_response_target_snmp_credential_name
 = element name
     {
       name
     }

# Permissions the user has on the credential.
get_targets_response_target_snmp_credential_permissions
 = element permissions
     {
       ""
     }

# Whether the credential is in the trashcan.
get_targets_response_target_snmp_credential_trash
 = element trash
     {
       boolean
     }

# Port range of the target.
get_targets_response_target_port_range
 = element port_range
     {
       name
     }

get_targets_response_target_port_list
 = element port_list
     {
       attribute id { uuid }
       & get_targets_response_target_port_list_name
       & get_targets_response_target_port_list_permissions?
       & get_targets_response_target_port_list_trash
     }

# The name of the port_list.
get_targets_response_target_port_list_name
 = element name
     {
       name
     }

# Permissions the user has on the task.
get_targets_response_target_port_list_permissions
 = element permissions
     {
       ""
     }

# Whether the port_list is in the trashcan.
get_targets_response_target_port_list_trash
 = element trash
     {
       boolean
     }

# Which alive tests to use.
get_targets_response_target_alive_tests
 = element alive_tests
     {
       alive_test
     }

# Whether to scan only hosts that have names.
get_targets_response_target_reverse_lookup_only
 = element reverse_lookup_only
     {
       boolean
     }

# Whether to scan only one IP when multiple IPs have the same name.
get_targets_response_target_reverse_lookup_unify
 = element reverse_lookup_unify
     {
       boolean
     }

# All tasks using the target.
get_targets_response_target_tasks
 = element tasks
     {
       get_targets_response_target_tasks_task*
     }

get_targets_response_target_tasks_task
 = element task
     {
       attribute id { uuid }
       & get_targets_response_target_tasks_task_name
       & get_targets_response_target_tasks_task_permissions?
     }

# The name of the task.
get_targets_response_target_tasks_task_name
 = element name
     {
       name
     }

# Permissions the user has on the task.
get_targets_response_target_tasks_task_permissions
 = element permissions
     {
       ""
     }

get_targets_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_targets_response_filters_term
       & get_targets_response_filters_name?
       & get_targets_response_filters_keywords
     }

# Filter term.
get_targets_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_targets_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_targets_response_filters_keywords
 = element keywords
     {
       get_targets_response_filters_keywords_keyword*
     }

get_targets_response_filters_keywords_keyword
 = element keyword
     {
       get_targets_response_filters_keywords_keyword_column
       & get_targets_response_filters_keywords_keyword_relation
       & get_targets_response_filters_keywords_keyword_value
     }

# Column prefix.
get_targets_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_targets_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_targets_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_targets_response_sort
 = element sort
     {
       text
       & get_targets_response_sort_field
     }

get_targets_response_sort_field
 = element field
     {
       get_targets_response_sort_field_order
     }

get_targets_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_targets_response_targets
 = element targets
     {
       # First target.
       attribute start { integer }
       & # Maximum number of targets.
       attribute max { integer }
     }

get_targets_response_target_count
 = element target_count
     {
       get_targets_response_target_count_filtered
       & get_targets_response_target_count_page
     }

# Number of targets after filtering.
get_targets_response_target_count_filtered
 = element filtered
     {
       integer
     }

# Number of targets on current page.
get_targets_response_target_count_page
 = element page
     {
       integer
     }

## Response to get_tasks

get_tasks_response
 = element get_tasks_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_tasks_response_apply_overrides
       & get_tasks_response_task*
       & get_tasks_response_filters
       & get_tasks_response_sort
       & get_tasks_response_tasks
       & get_tasks_response_task_count
     }

get_tasks_response_apply_overrides
 = element apply_overrides
     {
       xsd:token { pattern = "0|1" }
     }

get_tasks_response_task
 = element task
     {
       attribute id { uuid }
       & ( ( get_tasks_response_task_owner
           & get_tasks_response_task_name
           & get_tasks_response_task_comment
           & get_tasks_response_task_creation_time
           & get_tasks_response_task_modification_time
           & get_tasks_response_task_writable
           & get_tasks_response_task_in_use
           & get_tasks_response_task_permissions
           & get_tasks_response_task_user_tags
           & get_tasks_response_task_status
           & get_tasks_response_task_progress
           & get_tasks_response_task_alterable
           & get_tasks_response_task_config
           & get_tasks_response_task_target
           & get_tasks_response_task_hosts_ordering
           & get_tasks_response_task_scanner
           & get_tasks_response_task_alert
           & get_tasks_response_task_observers
           & get_tasks_response_task_schedule
           & get_tasks_response_task_schedule_periods
           & get_tasks_response_task_report_count
           & get_tasks_response_task_trend
           & get_tasks_response_task_current_report?
           & get_tasks_response_task_first_report?
           & get_tasks_response_task_last_report?
           & get_tasks_response_task_second_last_report?
           & get_tasks_response_task_reports*
           & get_tasks_response_task_average_duration?
           & get_tasks_response_task_result_count
           & get_tasks_response_task_preferences )
           | ( get_tasks_response_task_name
           & get_tasks_response_task_schedule
           & get_tasks_response_task_schedule_periods ) )
     }

# Owner of the task.
get_tasks_response_task_owner
 = element owner
     {
       get_tasks_response_task_owner_name
     }

# The name of the owner.
get_tasks_response_task_owner_name
 = element name
     {
       name
     }

# The name of the task.
get_tasks_response_task_name
 = element name
     {
       name
     }

# The comment on the task.
get_tasks_response_task_comment
 = element comment
     {
       text
     }

# Creation time of the task.
get_tasks_response_task_creation_time
 = element creation_time
     {
       iso_time
     }

# Last time the task was modified.
get_tasks_response_task_modification_time
 = element modification_time
     {
       iso_time
     }

# Whether the task is writable.
get_tasks_response_task_writable
 = element writable
     {
       boolean
     }

# Whether this task is currently in use.
get_tasks_response_task_in_use
 = element in_use
     {
       boolean
     }

# Permissions that the current user has on the task.
get_tasks_response_task_permissions
 = element permissions
     {
       get_tasks_response_task_permissions_permission*
     }

get_tasks_response_task_permissions_permission
 = element permission
     {
       get_tasks_response_task_permissions_permission_name
     }

# The name of the permission.
get_tasks_response_task_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the task.
get_tasks_response_task_user_tags
 = element user_tags
     {
       get_tasks_response_task_user_tags_count
       & get_tasks_response_task_user_tags_tag*
     }

# Number of attached tags.
get_tasks_response_task_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_tasks_response_task_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_tasks_response_task_user_tags_tag_name
       & get_tasks_response_task_user_tags_tag_value
       & get_tasks_response_task_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_tasks_response_task_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_tasks_response_task_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_tasks_response_task_user_tags_tag_comment
 = element comment
     {
       text
     }

# The run status of the task.
get_tasks_response_task_status
 = element status
     {
       task_status
     }

# The percentage of the task that is complete.
get_tasks_response_task_progress
 = element progress
     {
       text # RNC limitation: integer
       & get_tasks_response_task_progress_host_progress*
     }

# Percentage complete for a particular host.
get_tasks_response_task_progress_host_progress
 = element host_progress
     {
       text # RNC limitation: integer
       & get_tasks_response_task_progress_host_progress_host
     }

get_tasks_response_task_progress_host_progress_host
 = element host
     {
       text
     }

# Whether the task is an Alterable Task.
get_tasks_response_task_alterable
 = element alterable
     {
       boolean
     }

# The scan configuration used by the task.
get_tasks_response_task_config
 = element config
     {
       attribute id { uuid }
       & get_tasks_response_task_config_name
       & get_tasks_response_task_config_permissions?
       & get_tasks_response_task_config_trash
     }

# The name of the config.
get_tasks_response_task_config_name
 = element name
     {
       name
     }

# Permissions the user has on the config.
get_tasks_response_task_config_permissions
 = element permissions
     {
       ""
     }

# Whether the config is in the trashcan.
get_tasks_response_task_config_trash
 = element trash
     {
       boolean
     }

# The hosts scanned by the task.
get_tasks_response_task_target
 = element target
     {
       attribute id { uuid }
       & get_tasks_response_task_target_name
       & get_tasks_response_task_target_permissions?
       & get_tasks_response_task_target_trash
     }

# The name of the target.
get_tasks_response_task_target_name
 = element name
     {
       name
     }

# Permissions the user has on the target.
get_tasks_response_task_target_permissions
 = element permissions
     {
       ""
     }

# Whether the target is in the trashcan.
get_tasks_response_task_target_trash
 = element trash
     {
       boolean
     }

# The order hosts are scanned in.
get_tasks_response_task_hosts_ordering
 = element hosts_ordering
     {
       text
     }

# The scanner used to scan the target.
get_tasks_response_task_scanner
 = element scanner
     {
       attribute id { uuid }
       & get_tasks_response_task_scanner_name
       & get_tasks_response_task_scanner_permissions?
       & get_tasks_response_task_scanner_type
     }

# The name of the scanner.
get_tasks_response_task_scanner_name
 = element name
     {
       name
     }

# Type of the scanner.
get_tasks_response_task_scanner_type
 = element type
     {
       integer
     }

# Permissions the user has on the task.
get_tasks_response_task_scanner_permissions
 = element permissions
     {
       ""
     }

# An alert that applies to the task.
get_tasks_response_task_alert
 = element alert
     {
       attribute id { uuid_or_empty }
       & get_tasks_response_task_alert_name
       & get_tasks_response_task_alert_permissions?
       & get_tasks_response_task_alert_trash
     }

# The name of the alert.
get_tasks_response_task_alert_name
 = element name
     {
       name
     }

# Permissions the user has on the alert.
get_tasks_response_task_alert_permissions
 = element permissions
     {
       ""
     }

# Whether the alert is in the trashcan.
get_tasks_response_task_alert_trash
 = element trash
     {
       boolean
     }

# Users allowed to observe this task.
get_tasks_response_task_observers
 = element observers
     {
       text # RNC limitation: user_list
       & get_tasks_response_task_observers_group*
       & get_tasks_response_task_observers_role*
     }

# Group allowed to observe this task.
get_tasks_response_task_observers_group
 = element group
     {
       attribute id { uuid }
       & get_tasks_response_task_observers_group_name
     }

# The name of the group.
get_tasks_response_task_observers_group_name
 = element name
     {
       name
     }

# Role allowed to observe this task.
get_tasks_response_task_observers_role
 = element role
     {
       attribute id { uuid }
       & get_tasks_response_task_observers_role_name
     }

# The name of the role.
get_tasks_response_task_observers_role_name
 = element name
     {
       name
     }

# When the task will run.
get_tasks_response_task_schedule
 = element schedule
     {
       attribute id { uuid_or_empty }
       & get_tasks_response_task_schedule_name
       & get_tasks_response_task_schedule_next_time?
       & get_tasks_response_task_schedule_permissions?
       & get_tasks_response_task_schedule_trash
       & get_tasks_response_task_schedule_first_time?
       & get_tasks_response_task_schedule_period?
       & get_tasks_response_task_schedule_period_months?
       & get_tasks_response_task_schedule_duration?
     }

# The name of the schedule.
get_tasks_response_task_schedule_name
 = element name
     {
       name
     }

# The next date and time the schedule will be run in ISO format or "over"..
get_tasks_response_task_schedule_next_time
 = element next_time
     {
       iso_time
     }

# Permissions the user has on the schedule.
get_tasks_response_task_schedule_permissions
 = element permissions
     {
       ""
     }

# Whether the schedule is in the trashcan.
get_tasks_response_task_schedule_trash
 = element trash
     {
       boolean
     }

# The first time was or will be run.
get_tasks_response_task_schedule_first_time
 = element first_time
     {
       iso_time
     }

# The time period between repeated runs of the schedule. Run only once if this and period_months is 0.
get_tasks_response_task_schedule_period
 = element period
     {
       integer
     }

# The number of months between repeated runs of the schedule. Run only once if this and period is 0.
get_tasks_response_task_schedule_period_months
 = element period_months
     {
       integer
     }

# The maximum duration of the task in seconds or 0 for unlimited.
get_tasks_response_task_schedule_duration
 = element duration
     {
       integer
     }

# A limit to the number of times the task will be scheduled, or 0 for no limit.
get_tasks_response_task_schedule_periods
 = element schedule_periods
     {
       integer
     }

# Number of reports.
get_tasks_response_task_report_count
 = element report_count
     {
       text # RNC limitation: integer
       & get_tasks_response_task_report_count_finished
     }

# Number of reports where the scan completed.
get_tasks_response_task_report_count_finished
 = element finished
     {
       integer
     }

get_tasks_response_task_trend
 = element trend
     {
       task_trend
     }

get_tasks_response_task_current_report
 = element current_report
     {
       get_tasks_response_task_current_report_report
     }

get_tasks_response_task_current_report_report
 = element report
     {
       attribute id { uuid }
       & get_tasks_response_task_current_report_report_timestamp
     }

get_tasks_response_task_current_report_report_timestamp
 = element timestamp
     {
       iso_time
     }

get_tasks_response_task_first_report
 = element first_report
     {
       get_tasks_response_task_first_report_report
     }

get_tasks_response_task_first_report_report
 = element report
     {
       attribute id { uuid }
       & get_tasks_response_task_first_report_report_timestamp
       & get_tasks_response_task_first_report_report_scan_end
       & get_tasks_response_task_first_report_report_result_count
       & get_tasks_response_task_first_report_report_severity
     }

get_tasks_response_task_first_report_report_timestamp
 = element timestamp
     {
       iso_time
     }

get_tasks_response_task_first_report_report_scan_end
 = element scan_end
     {
       iso_time
     }

# Result counts for this report.
get_tasks_response_task_first_report_report_result_count
 = element result_count
     {
       get_tasks_response_task_first_report_report_result_count_debug
       & get_tasks_response_task_first_report_report_result_count_false_positive
       & get_tasks_response_task_first_report_report_result_count_log
       & get_tasks_response_task_first_report_report_result_count_info
       & get_tasks_response_task_first_report_report_result_count_warning
       & get_tasks_response_task_first_report_report_result_count_hole
     }

get_tasks_response_task_first_report_report_result_count_debug
 = element debug
     {
       integer
     }

get_tasks_response_task_first_report_report_result_count_false_positive
 = element false_positive
     {
       integer
     }

get_tasks_response_task_first_report_report_result_count_log
 = element log
     {
       integer
     }

get_tasks_response_task_first_report_report_result_count_info
 = element info
     {
       integer
     }

get_tasks_response_task_first_report_report_result_count_warning
 = element warning
     {
       integer
     }

get_tasks_response_task_first_report_report_result_count_hole
 = element hole
     {
       integer
     }

# Maximum severity of the report.
get_tasks_response_task_first_report_report_severity
 = element severity
     {
       severity
     }

get_tasks_response_task_last_report
 = element last_report
     {
       get_tasks_response_task_last_report_report
     }

get_tasks_response_task_last_report_report
 = element report
     {
       attribute id { uuid }
       & get_tasks_response_task_last_report_report_timestamp
       & get_tasks_response_task_last_report_report_scan_end
       & get_tasks_response_task_last_report_report_result_count
       & get_tasks_response_task_last_report_report_severity
     }

get_tasks_response_task_last_report_report_timestamp
 = element timestamp
     {
       iso_time
     }

get_tasks_response_task_last_report_report_scan_end
 = element scan_end
     {
       iso_time
     }

# Result counts for this report.
get_tasks_response_task_last_report_report_result_count
 = element result_count
     {
       get_tasks_response_task_last_report_report_result_count_debug
       & get_tasks_response_task_last_report_report_result_count_false_positive
       & get_tasks_response_task_last_report_report_result_count_log
       & get_tasks_response_task_last_report_report_result_count_info
       & get_tasks_response_task_last_report_report_result_count_warning
       & get_tasks_response_task_last_report_report_result_count_hole
     }

get_tasks_response_task_last_report_report_result_count_debug
 = element debug
     {
       integer
     }

get_tasks_response_task_last_report_report_result_count_false_positive
 = element false_positive
     {
       integer
     }

get_tasks_response_task_last_report_report_result_count_log
 = element log
     {
       integer
     }

get_tasks_response_task_last_report_report_result_count_info
 = element info
     {
       integer
     }

get_tasks_response_task_last_report_report_result_count_warning
 = element warning
     {
       integer
     }

get_tasks_response_task_last_report_report_result_count_hole
 = element hole
     {
       integer
     }

# Maximum severity of the report.
get_tasks_response_task_last_report_report_severity
 = element severity
     {
       severity
     }

get_tasks_response_task_second_last_report
 = element second_last_report
     {
       get_tasks_response_task_second_last_report_report
     }

get_tasks_response_task_second_last_report_report
 = element report
     {
       attribute id { uuid }
       & get_tasks_response_task_second_last_report_report_timestamp
       & get_tasks_response_task_second_last_report_report_scan_end
       & get_tasks_response_task_second_last_report_report_result_count
       & get_tasks_response_task_second_last_report_report_severity
     }

get_tasks_response_task_second_last_report_report_timestamp
 = element timestamp
     {
       iso_time
     }

get_tasks_response_task_second_last_report_report_scan_end
 = element scan_end
     {
       iso_time
     }

# Result counts for this report.
get_tasks_response_task_second_last_report_report_result_count
 = element result_count
     {
       get_tasks_response_task_second_last_report_report_result_count_debug
       & get_tasks_response_task_second_last_report_report_result_count_false_positive
       & get_tasks_response_task_second_last_report_report_result_count_log
       & get_tasks_response_task_second_last_report_report_result_count_info
       & get_tasks_response_task_second_last_report_report_result_count_warning
       & get_tasks_response_task_second_last_report_report_result_count_hole
     }

get_tasks_response_task_second_last_report_report_result_count_debug
 = element debug
     {
       integer
     }

get_tasks_response_task_second_last_report_report_result_count_false_positive
 = element false_positive
     {
       integer
     }

get_tasks_response_task_second_last_report_report_result_count_log
 = element log
     {
       integer
     }

get_tasks_response_task_second_last_report_report_result_count_info
 = element info
     {
       integer
     }

get_tasks_response_task_second_last_report_report_result_count_warning
 = element warning
     {
       integer
     }

get_tasks_response_task_second_last_report_report_result_count_hole
 = element hole
     {
       integer
     }

# Maximum severity of the report.
get_tasks_response_task_second_last_report_report_severity
 = element severity
     {
       severity
     }

get_tasks_response_task_reports
 = element reports
     {
       get_tasks_response_task_reports_report*
     }

get_tasks_response_task_reports_report
 = element report
     {
       attribute id { uuid }
       & get_tasks_response_task_reports_report_timestamp
       & get_tasks_response_task_reports_report_scan_end
       & get_tasks_response_task_reports_report_scan_run_status
       & get_tasks_response_task_reports_report_result_count
       & get_tasks_response_task_reports_report_severity
     }

get_tasks_response_task_reports_report_timestamp
 = element timestamp
     {
       iso_time
     }

get_tasks_response_task_reports_report_scan_end
 = element scan_end
     {
       iso_time
     }

# Run status of task scan.
get_tasks_response_task_reports_report_scan_run_status
 = element scan_run_status
     {
       task_status
     }

# Result counts for this report.
get_tasks_response_task_reports_report_result_count
 = element result_count
     {
       get_tasks_response_task_reports_report_result_count_debug
       & get_tasks_response_task_reports_report_result_count_false_positive
       & get_tasks_response_task_reports_report_result_count_log
       & get_tasks_response_task_reports_report_result_count_info
       & get_tasks_response_task_reports_report_result_count_warning
       & get_tasks_response_task_reports_report_result_count_hole
     }

get_tasks_response_task_reports_report_result_count_debug
 = element debug
     {
       integer
     }

get_tasks_response_task_reports_report_result_count_false_positive
 = element false_positive
     {
       integer
     }

get_tasks_response_task_reports_report_result_count_log
 = element log
     {
       integer
     }

get_tasks_response_task_reports_report_result_count_info
 = element info
     {
       integer
     }

get_tasks_response_task_reports_report_result_count_warning
 = element warning
     {
       integer
     }

get_tasks_response_task_reports_report_result_count_hole
 = element hole
     {
       integer
     }

# Maximum severity of the report.
get_tasks_response_task_reports_report_severity
 = element severity
     {
       severity
     }

# Average scan duration in seconds.
get_tasks_response_task_average_duration
 = element average_duration
     {
       text
     }

# Result count for the entire task.
get_tasks_response_task_result_count
 = element result_count
     {
       text
     }

get_tasks_response_task_preferences
 = element preferences
     {
       get_tasks_response_task_preferences_preference*
     }

get_tasks_response_task_preferences_preference
 = element preference
     {
       get_tasks_response_task_preferences_preference_name
       & get_tasks_response_task_preferences_preference_scanner_name
       & get_tasks_response_task_preferences_preference_value
     }

# Full name of preference, suitable for end users.
get_tasks_response_task_preferences_preference_name
 = element name
     {
       text
     }

# Compact name of preference, from scanner.
get_tasks_response_task_preferences_preference_scanner_name
 = element scanner_name
     {
       text
     }

get_tasks_response_task_preferences_preference_value
 = element value
     {
       text
     }

get_tasks_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_tasks_response_filters_term
       & get_tasks_response_filters_name?
       & get_tasks_response_filters_keywords
     }

# Filter term.
get_tasks_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_tasks_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_tasks_response_filters_keywords
 = element keywords
     {
       get_tasks_response_filters_keywords_keyword*
     }

get_tasks_response_filters_keywords_keyword
 = element keyword
     {
       get_tasks_response_filters_keywords_keyword_column
       & get_tasks_response_filters_keywords_keyword_relation
       & get_tasks_response_filters_keywords_keyword_value
     }

# Column prefix.
get_tasks_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_tasks_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_tasks_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_tasks_response_sort
 = element sort
     {
       text
       & get_tasks_response_sort_field
     }

get_tasks_response_sort_field
 = element field
     {
       get_tasks_response_sort_field_order
     }

get_tasks_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_tasks_response_tasks
 = element tasks
     {
       # First task.
       attribute start { integer }
       & # Maximum number of tasks.
       attribute max { integer }
     }

get_tasks_response_task_count
 = element task_count
     {
       get_tasks_response_task_count_filtered
       & get_tasks_response_task_count_page
     }

# Number of tasks after filtering.
get_tasks_response_task_count_filtered
 = element filtered
     {
       integer
     }

# Number of tasks on current page.
get_tasks_response_task_count_page
 = element page
     {
       integer
     }

## Response to get_users

get_users_response
 = element get_users_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_users_response_user*
       & get_users_response_filters
       & get_users_response_sort
       & get_users_response_users
       & get_users_response_user_count
     }

get_users_response_user
 = element user
     {
       # ID of user.
       attribute id { uuid }
       & get_users_response_user_owner
       & get_users_response_user_name
       & get_users_response_user_comment
       & get_users_response_user_creation_time
       & get_users_response_user_modification_time
       & get_users_response_user_writable
       & get_users_response_user_in_use
       & get_users_response_user_role*
       & get_users_response_user_groups
       & get_users_response_user_hosts
       & get_users_response_user_ifaces
       & get_users_response_user_permissions
       & get_users_response_user_user_tags
       & get_users_response_user_sources
     }

# Owner of the user.
get_users_response_user_owner
 = element owner
     {
       get_users_response_user_owner_name
     }

# The name of the owner.
get_users_response_user_owner_name
 = element name
     {
       name
     }

# The name of the user.
get_users_response_user_name
 = element name
     {
       text
     }

# The comment on the user.
get_users_response_user_comment
 = element comment
     {
       text
     }

# Creation time of the user.
get_users_response_user_creation_time
 = element creation_time
     {
       iso_time
     }

# Last time the user was modified.
get_users_response_user_modification_time
 = element modification_time
     {
       iso_time
     }

# Whether the user is writable.
get_users_response_user_writable
 = element writable
     {
       boolean
     }

# Whether this user is currently in use.
get_users_response_user_in_use
 = element in_use
     {
       boolean
     }

# The role of the user.
get_users_response_user_role
 = element role
     {
       attribute id { uuid }
       & get_users_response_user_role_name
       & get_users_response_user_role_permissions?
     }

# Name of role.
get_users_response_user_role_name
 = element name
     {
       name
     }

# Permissions the user has on the role.
get_users_response_user_role_permissions
 = element permissions
     {
       ""
     }

# The groups the user belongs to.
get_users_response_user_groups
 = element groups
     {
       get_users_response_user_groups_group
     }

get_users_response_user_groups_group
 = element group
     {
       attribute id { uuid }
       & get_users_response_user_groups_group_name
       & get_users_response_user_groups_group_permissions?
     }

# Name of group.
get_users_response_user_groups_group_name
 = element name
     {
       name
     }

# Permissions the user has on the group.
get_users_response_user_groups_group_permissions
 = element permissions
     {
       ""
     }

# Host access rule for the user.
get_users_response_user_hosts
 = element hosts
     {
       text
       & # 0 forbidden, 1 allowed, 2 all allowed, 3 custom.
       attribute allow { xsd:token { pattern = "0|1|2|3" } }
     }

# Iface access rule for the user.
get_users_response_user_ifaces
 = element ifaces
     {
       text
       & # 0 forbidden, 1 allowed, 2 all allowed, 3 custom.
       attribute allow { xsd:token { pattern = "0|1|2|3" } }
     }

# Permissions that the current user has on the user.
get_users_response_user_permissions
 = element permissions
     {
       get_users_response_user_permissions_permission*
     }

get_users_response_user_permissions_permission
 = element permission
     {
       get_users_response_user_permissions_permission_name
     }

# The name of the permission.
get_users_response_user_permissions_permission_name
 = element name
     {
       name
     }

# Info on tags attached to the user.
get_users_response_user_user_tags
 = element user_tags
     {
       get_users_response_user_user_tags_count
       & get_users_response_user_user_tags_tag*
     }

# Number of attached tags.
get_users_response_user_user_tags_count
 = element count
     {
       integer
     }

# Short info on an individual tag (only if details were requested).
get_users_response_user_user_tags_tag
 = element tag
     {
       # UUID of the tag.
       attribute id { uuid }
       & get_users_response_user_user_tags_tag_name
       & get_users_response_user_user_tags_tag_value
       & get_users_response_user_user_tags_tag_comment
     }

# Name of the tag (usually namespace:predicate).
get_users_response_user_user_tags_tag_name
 = element name
     {
       text
     }

# Value of the tag.
get_users_response_user_user_tags_tag_value
 = element value
     {
       text
     }

# Comment for the tag.
get_users_response_user_user_tags_tag_comment
 = element comment
     {
       text
     }

# Sources allowed for authentication for this user.
get_users_response_user_sources
 = element sources    # type sources
     {
     }

get_users_response_filters
 = element filters
     {
       # UUID of filter if any, else 0.
       attribute id { uuid }
       & get_users_response_filters_term
       & get_users_response_filters_name?
       & get_users_response_filters_keywords
     }

# Filter term.
get_users_response_filters_term
 = element term
     {
       text
     }

# Filter name, if applicable.
get_users_response_filters_name
 = element name
     {
       text
     }

# Filter broken down into keywords.
get_users_response_filters_keywords
 = element keywords
     {
       get_users_response_filters_keywords_keyword*
     }

get_users_response_filters_keywords_keyword
 = element keyword
     {
       get_users_response_filters_keywords_keyword_column
       & get_users_response_filters_keywords_keyword_relation
       & get_users_response_filters_keywords_keyword_value
     }

# Column prefix.
get_users_response_filters_keywords_keyword_column
 = element column
     {
       text
     }

# Relation operator.
get_users_response_filters_keywords_keyword_relation
 = element relation
     {
       
        ERROR
      
     }

# The filter text.
get_users_response_filters_keywords_keyword_value
 = element value
     {
       text
     }

get_users_response_sort
 = element sort
     {
       text
       & get_users_response_sort_field
     }

get_users_response_sort_field
 = element field
     {
       get_users_response_sort_field_order
     }

get_users_response_sort_field_order
 = element order
     {
       xsd:token { pattern = "ascending|descending" }
     }

get_users_response_users
 = element users
     {
       # First user.
       attribute start { integer }
       & # Maximum number of users.
       attribute max { integer }
     }

get_users_response_user_count
 = element user_count
     {
       get_users_response_user_count_filtered
       & get_users_response_user_count_page
     }

# Number of users after filtering.
get_users_response_user_count_filtered
 = element filtered
     {
       integer
     }

# Number of users on current page.
get_users_response_user_count_page
 = element page
     {
       integer
     }

## Response to get_version

get_version_response
 = element get_version_response
     {
       attribute status { status }
       & attribute status_text { text }
       & get_version_response_version
     }

get_version_response_version
 = element version
     {
       text
     }

## Response to help

help_response
 = element help_response
     {
       text
       & attribute status { status }
       & attribute status_text { text }
       & help_response_schema?
     }

help_response_schema
 = element schema
     {
       help_response_schema_protocol
     }

help_response_schema_protocol
 = element protocol
     {
       # The help format.
       attribute format { text }?
       & # The suggested file extension for the help.
       attribute extension { text }?
       & # The MIME content-type of the help.
       attribute content_type { text }?
       & help_response_schema_protocol_name
       & help_response_schema_protocol_abbreviation?
       & help_response_schema_protocol_summary?
       & help_response_schema_protocol_version?
       & help_response_schema_protocol_type*
       & help_response_schema_protocol_command*
     }

# The full name of the protocol.
help_response_schema_protocol_name
 = element name
     {
       text
     }

# The abbreviated name of the protocol.
help_response_schema_protocol_abbreviation
 = element abbreviation
     {
       text
     }

# A summary of the protocol.
help_response_schema_protocol_summary
 = element summary
     {
       text
     }

# The version number of the protocol.
help_response_schema_protocol_version
 = element version
     {
       text
     }

# A data type.
help_response_schema_protocol_type
 = element type
     {
       help_response_schema_protocol_type_name
       & help_response_schema_protocol_type_summary?
       & help_response_schema_protocol_type_description?
       & help_response_schema_protocol_type_pattern
     }

# The name of the data type.
help_response_schema_protocol_type_name
 = element name
     {
       type_name
     }

# A summary of the data type.
help_response_schema_protocol_type_summary
 = element summary
     {
       text
     }

# A description of the data type.
help_response_schema_protocol_type_description
 = element description
     {
       text
       & help_response_schema_protocol_type_description_p*
     }

# A paragraph.
help_response_schema_protocol_type_description_p
 = element p
     {
       text
     }

# The RNC pattern for the data type.
help_response_schema_protocol_type_pattern
 = element pattern
     {
       text
     }

# A command.
help_response_schema_protocol_command
 = element command    # type command_definition
     {
       command_definition_name
       & command_definition_summary?
       & command_definition_description?
       & ( ( command_definition_pattern
           & command_definition_response )
           | ( command_definition_type
           & command_definition_ele* ) )
       & command_definition_example*
     }

## Response to modify_agent

modify_agent_response
 = element modify_agent_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_alert

modify_alert_response
 = element modify_alert_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_asset

modify_asset_response
 = element modify_asset_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_auth

modify_auth_response
 = element modify_auth_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_config

modify_config_response
 = element modify_config_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_credential

modify_credential_response
 = element modify_credential_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_filter

modify_filter_response
 = element modify_filter_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_group

modify_group_response
 = element modify_group_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_note

modify_note_response
 = element modify_note_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_override

modify_override_response
 = element modify_override_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_permission

modify_permission_response
 = element modify_permission_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_port_list

modify_port_list_response
 = element modify_port_list_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_report

modify_report_response
 = element modify_report_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_report_format

modify_report_format_response
 = element modify_report_format_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_role

modify_role_response
 = element modify_role_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_scanner

modify_scanner_response
 = element modify_scanner_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_schedule

modify_schedule_response
 = element modify_schedule_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_setting

modify_setting_response
 = element modify_setting_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_target

modify_target_response
 = element modify_target_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_tag

modify_tag_response
 = element modify_tag_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_task

modify_task_response
 = element modify_task_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to modify_user

modify_user_response
 = element modify_user_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to move_task

move_task_response
 = element move_task_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to restore

restore_response
 = element restore_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to resume_task

resume_task_response
 = element resume_task_response
     {
       attribute status { status }
       & attribute status_text { text }
       & resume_task_response_report_id
     }

# The id of the report.
resume_task_response_report_id
 = element report_id
     {
       uuid
     }

## Response to run_wizard

run_wizard_response
 = element run_wizard_response
     {
       attribute status { status }
       & attribute status_text { text }
       & run_wizard_response_response
     }

# Contains the response of the command run in the last step.
run_wizard_response_response
 = element response
     {
       ""
     }

## Response to start_task

start_task_response
 = element start_task_response
     {
       attribute status { status }
       & attribute status_text { text }
       & start_task_response_report_id
     }

# The id of the report.
start_task_response_report_id
 = element report_id
     {
       uuid
     }

## Response to stop_task

stop_task_response
 = element stop_task_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to sync_cert

sync_cert_response
 = element sync_cert_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to sync_feed

sync_feed_response
 = element sync_feed_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to sync_config

sync_config_response
 = element sync_config_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to sync_scap

sync_scap_response
 = element sync_scap_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to test_alert

test_alert_response
 = element test_alert_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to verify_agent

verify_agent_response
 = element verify_agent_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to verify_report_format

verify_report_format_response
 = element verify_report_format_response
     {
       attribute status { status }
       & attribute status_text { text }
     }

## Response to verify_scanner

verify_scanner_response
 = element verify_scanner_response
     {
       attribute status { status }
       & attribute status_text { text }
     }
