{
    "properties": {
      "spec": {
        "properties": {
          "account": {
            "description": "Name of the account to which the Stream belongs.",
            "pattern": "^[^.*>]*$",
            "type": "string"
          },
          "allowAtomicPublish": {
            "default": false,
            "description": "When true, enables atomic batch publishing.",
            "type": "boolean"
          },
          "allowDirect": {
            "default": false,
            "description": "When true, allow higher performance, direct access to get individual messages.",
            "type": "boolean"
          },
          "allowMsgCounter": {
            "default": false,
            "description": "When true, enables message counters for the stream.",
            "type": "boolean"
          },
          "allowMsgSchedules": {
            "default": false,
            "description": "When true, enables message scheduling.",
            "type": "boolean"
          },
          "allowMsgTtl": {
            "default": false,
            "description": "When true, allows header initiated per-message TTLs. If disabled, then the `NATS-TTL` header will be ignored.",
            "type": "boolean"
          },
          "allowRollup": {
            "default": false,
            "description": "When true, allows the use of the Nats-Rollup header to replace all contents of a stream, or subject in a stream, with a single new message.",
            "type": "boolean"
          },
          "compression": {
            "default": "",
            "description": "Stream specific compression.",
            "enum": [
              "s2",
              "none",
              ""
            ],
            "type": "string"
          },
          "consumerLimits": {
            "description": "Consumer limits for the stream.",
            "properties": {
              "inactiveThreshold": {
                "description": "The duration of inactivity after which a consumer is considered inactive.",
                "type": "string"
              },
              "maxAckPending": {
                "description": "Maximum number of outstanding unacknowledged messages.",
                "type": "integer"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "creds": {
            "default": "",
            "description": "NATS user credentials for connecting to servers. Please make sure your controller has mounted the creds on this path.",
            "type": "string"
          },
          "denyDelete": {
            "default": false,
            "description": "When true, restricts the ability to delete messages from a stream via the API. Cannot be changed once set to true.",
            "type": "boolean"
          },
          "denyPurge": {
            "default": false,
            "description": "When true, restricts the ability to purge a stream via the API. Cannot be changed once set to true.",
            "type": "boolean"
          },
          "description": {
            "description": "The description of the stream.",
            "type": "string"
          },
          "discard": {
            "default": "old",
            "description": "When a Stream reach it's limits either old messages are deleted or new ones are denied.",
            "enum": [
              "old",
              "new"
            ],
            "type": "string"
          },
          "discardPerSubject": {
            "default": false,
            "description": "Applies discard policy on a per-subject basis. Requires discard policy 'new' and 'maxMsgs' to be set.",
            "type": "boolean"
          },
          "duplicateWindow": {
            "description": "The duration window to track duplicate messages for.",
            "type": "string"
          },
          "firstSequence": {
            "default": 0,
            "description": "Sequence number from which the Stream will start.",
            "type": "number"
          },
          "jsDomain": {
            "description": "The JetStream domain to use for the stream.",
            "type": "string"
          },
          "maxAge": {
            "default": "",
            "description": "Maximum age of any message in the stream, expressed in Go's time.Duration format. Empty for unlimited.",
            "type": "string"
          },
          "maxBytes": {
            "default": -1,
            "description": "How big the Stream may be, when the combined stream size exceeds this old messages are removed. -1 for unlimited.",
            "minimum": -1,
            "type": "integer"
          },
          "maxConsumers": {
            "default": -1,
            "description": "How many Consumers can be defined for a given Stream. -1 for unlimited.",
            "minimum": -1,
            "type": "integer"
          },
          "maxMsgSize": {
            "default": -1,
            "description": "The largest message that will be accepted by the Stream. -1 for unlimited.",
            "minimum": -1,
            "type": "integer"
          },
          "maxMsgs": {
            "default": -1,
            "description": "How many messages may be in a Stream, oldest messages will be removed if the Stream exceeds this size. -1 for unlimited.",
            "minimum": -1,
            "type": "integer"
          },
          "maxMsgsPerSubject": {
            "default": 0,
            "description": "The maximum number of messages per subject.",
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Additional Stream metadata.",
            "type": "object"
          },
          "mirror": {
            "description": "A stream mirror.",
            "properties": {
              "externalApiPrefix": {
                "type": "string"
              },
              "externalDeliverPrefix": {
                "type": "string"
              },
              "filterSubject": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "optStartSeq": {
                "type": "integer"
              },
              "optStartTime": {
                "description": "Time format must be RFC3339.",
                "type": "string"
              },
              "subjectTransforms": {
                "description": "List of subject transforms for this mirror.",
                "items": {
                  "description": "A subject transform pair.",
                  "properties": {
                    "dest": {
                      "description": "Destination subject.",
                      "type": "string"
                    },
                    "source": {
                      "description": "Source subject.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "mirrorDirect": {
            "default": false,
            "description": "When true, enables direct access to messages from the origin stream.",
            "type": "boolean"
          },
          "name": {
            "description": "A unique name for the Stream.",
            "minLength": 1,
            "pattern": "^[^.*>]*$",
            "type": "string"
          },
          "nkey": {
            "default": "",
            "description": "NATS user NKey for connecting to servers.",
            "type": "string"
          },
          "noAck": {
            "default": false,
            "description": "Disables acknowledging messages that are received by the Stream.",
            "type": "boolean"
          },
          "persistMode": {
            "default": "",
            "description": "Configures stream persistence settings (async or default).",
            "type": "string"
          },
          "placement": {
            "description": "A stream's placement.",
            "properties": {
              "cluster": {
                "type": "string"
              },
              "tags": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "preventDelete": {
            "default": false,
            "description": "When true, the managed Stream will not be deleted when the resource is deleted.",
            "type": "boolean"
          },
          "preventUpdate": {
            "default": false,
            "description": "When true, the managed Stream will not be updated when the resource is updated.",
            "type": "boolean"
          },
          "replicas": {
            "default": 1,
            "description": "How many replicas to keep for each message.",
            "minimum": 1,
            "type": "integer"
          },
          "republish": {
            "description": "Republish configuration of the stream.",
            "properties": {
              "destination": {
                "description": "Messages will be additionally published to this subject.",
                "type": "string"
              },
              "source": {
                "description": "Messages will be published from this subject to the destination subject.",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "retention": {
            "default": "limits",
            "description": "How messages are retained in the Stream, once this is exceeded old messages are removed.",
            "enum": [
              "limits",
              "interest",
              "workqueue"
            ],
            "type": "string"
          },
          "sealed": {
            "default": false,
            "description": "Seal an existing stream so no new messages may be added.",
            "type": "boolean"
          },
          "servers": {
            "default": [],
            "description": "A list of servers for creating stream.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "sources": {
            "description": "A stream's sources.",
            "items": {
              "properties": {
                "externalApiPrefix": {
                  "type": "string"
                },
                "externalDeliverPrefix": {
                  "type": "string"
                },
                "filterSubject": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "optStartSeq": {
                  "type": "integer"
                },
                "optStartTime": {
                  "description": "Time format must be RFC3339.",
                  "type": "string"
                },
                "subjectTransforms": {
                  "description": "List of subject transforms for this mirror.",
                  "items": {
                    "description": "A subject transform pair.",
                    "properties": {
                      "dest": {
                        "description": "Destination subject.",
                        "type": "string"
                      },
                      "source": {
                        "description": "Source subject.",
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "type": "array"
          },
          "storage": {
            "default": "memory",
            "description": "The storage backend to use for the Stream.",
            "enum": [
              "file",
              "memory"
            ],
            "type": "string"
          },
          "subjectDeleteMarkerTtl": {
            "default": "",
            "description": "Enables and sets a duration for adding server markers for delete, purge and max age limits.",
            "type": "string"
          },
          "subjectTransform": {
            "description": "SubjectTransform is for applying a subject transform (to matching messages) when a new message is received.",
            "properties": {
              "dest": {
                "description": "Destination subject to transform into.",
                "type": "string"
              },
              "source": {
                "description": "Source subject.",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "subjects": {
            "description": "A list of subjects to consume, supports wildcards.",
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "minLength": 1,
            "type": "array"
          },
          "tls": {
            "description": "A client's TLS certs and keys.",
            "properties": {
              "clientCert": {
                "description": "A client's cert filepath. Should be mounted.",
                "type": "string"
              },
              "clientKey": {
                "description": "A client's key filepath. Should be mounted.",
                "type": "string"
              },
              "rootCas": {
                "description": "A list of filepaths to CAs. Should be mounted.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "tlsFirst": {
            "default": false,
            "description": "When true, the KV Store will initiate TLS before server INFO.",
            "type": "boolean"
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "status": {
        "properties": {
          "conditions": {
            "items": {
              "properties": {
                "lastTransitionTime": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "type": "array"
          },
          "observedGeneration": {
            "type": "integer"
          }
        },
        "type": "object",
        "additionalProperties": false
      }
    },
    "type": "object"
  }
