{
  "name"      : "ICDx Sender - AMQP",
  "desc"      : "Send data over AMQP to another ICDx instance.",
  "help_token": "ICDX_Configuration_ICDx_Chaining_Sender_AMQP",
  "attributes": {
    "name"  : {"desc": "The name of the sender."},
    "desc"  : {"desc": "The description of the sender."},
    "uuid"  : {"desc": "The unique identifier of the sender."},
    "config": {
      "attributes": {
        "events"   : {
          "name"      : "Events",
          "type"      : "object",
          "subtype"   : "source",
          "attributes": {
            "archives"  : {
              "name"       : "Source",
              "desc"       : "Select archives to forward events.",
              "requirement": "required",
              "type"       : "string",
              "subtype"    : "archive",
              "default"    : ["default"],
              "is_array"   : true
            },
            "when"      : {
              "name"       : "Filter",
              "desc"       : "The filter that specifies the subset of events to forward.",
              "requirement": "optional",
              "type"       : "string",
              "subtype"    : "filter"
            },
            // attribute filters, only one can be used
            "include"   : {
              "name"       : "Included Attributes",
              "desc"       : "The comma-delimited list of attributes to include in the forwarded data; takes precedence over the Excluded Attributes.",
              "requirement": "optional",
              "type"       : "string",
              "subtype"    : "field_name",
              "is_array"   : true
            },
            "exclude"   : {
              "name"       : "Excluded Attributes",
              "desc"       : "The comma-delimited list of attributes to exclude from the forwarded data.",
              "requirement": "optional",
              "type"       : "string",
              "subtype"    : "field_name",
              "is_array"   : true
            },
            "batch_size": {
              "name"       : "Batch Size",
              "desc"       : "Select the batch size.",
              "requirement": "optional",
              "type"       : "integer",
              "enum"       : {
                "10"  : {"name": "10"},
                "50"  : {"name": "50"},
                "100" : {"name": "100"},
                "500" : {"name": "500"},
                "1000": {"name": "1000"}
              },
              "default"    : 100
            },
            "rate_limit": {
              "name"       : "Rate Limit",
              "desc"       : "Select the rate limit (events per second).",
              "requirement": "optional",
              "type"       : "integer",
              "enum"       : {
                "0"    : {"name": "Unlimited"},
                "500"  : {"name": "500"},
                "1000" : {"name": "1000"},
                "5000" : {"name": "5000"},
                "10000": {"name": "10000"}
              },
              "default"    : 5000
            }
          }
        },
        "forwarder": {
          "name"       : "ICDx Destination",
          "desc"       : "The configuration for sending data to a specific ICDx receiver on a remote ICDx over AMQP.",
          "requirement": "required",
          "type"       : "object",
          "attributes" : {
            "remote_uuid"    : {
              "name"       : "ICDx Receiver UUID",
              "desc"       : "The destination ICDx receiver's UUID.",
              "requirement": "required",
              "max_len"    : 40,
              "type"       : "string"
            },
            "host"           : {
              "name"       : "Host",
              "desc"       : "The host name or IP address of the destination ICDx.",
              "requirement": "required",
              "pattern"    : "host_name",
              "localhost"  : false,
              "max_len"    : 256,
              "type"       : "string"
            },
            "username"       : {
              "name"       : "User Name",
              "desc"       : "The User Name of the destination ICDx's RabbitMQ.",
              "requirement": "required",
              "type"       : "string",
              "max_len"    : 256,
              "default"    : "admin"
            },
            "password"       : {
              "name"       : "Password",
              "desc"       : "The password of the destination ICDx's RabbitMQ.",
              "requirement": "required",
              "subtype"    : "password",
              "max_len"    : 256,
              "type"       : "string"
            },
            "vhost"          : {
              "name"       : "AMQP Virtual Host",
              "desc"       : "The AMQP virtual host used by the destination ICDx.",
              "requirement": "optional",
              "max_len"    : 256,
              "type"       : "string",
              "default"    : "dx"
            },
            "use_ssl"        : {
              "name"       : "Use SSL",
              "desc"       : "Use AMQPS (AMQP over SSL, port 5671) instead of AMQP (port 5672).",
              "requirement": "required",
              "type"       : "boolean",
              "default"    : false
            },
            "trust_cert_path": {
              "name"       : "SSL Certificate Path",
              "desc"       : "The local path to the destination ICDx's SSL certificate; needed for secure communication with self-signed certificates.",
              "requirement": "optional",
              "advanced"   : false,
              "type"       : "string"
            }
          }
        }
      }
    }
  }
}