# typed: strict
# ----------------------------------------------------------------------------
#
#  Welcome to Baml! To use this generated code, please run the following:
#
#  $ gem install baml
#
# ----------------------------------------------------------------------------

# This file was generated by BAML: please do not edit it. Instead, edit the
# BAML files and re-generate this code using: baml-cli generate
# baml-cli is available with the baml package.
# gem install baml
require "sorbet-runtime"
require "baml"

module BamlClient

  module StreamTypes

  class StreamState < T::Struct
      extend T::Sig
      extend T::Generic
      Value = type_member
      const :value, Value
      const :state, Symbol
  end
  # #########################################################################
  # Generated classes (104)
  # #########################################################################


  class AddTodoItem < T::Struct
      include Baml::Sorbet::Struct
      const :type, String
      const :item, T.nilable(String)
      const :time, T.nilable(String)
      const :description, T.nilable(String)
  end


  class AnotherObject < T::Struct
      include Baml::Sorbet::Struct
      const :id, T.nilable(String)
      const :thingy2, T.nilable(String)
      const :thingy3, T.nilable(String)
  end


  class BigNumbers < T::Struct
      include Baml::Sorbet::Struct
      const :a, T.nilable(Integer)
      const :b, T.nilable(Float)
  end


  class BinaryNode < T::Struct
      include Baml::Sorbet::Struct
      const :data, T.nilable(Integer)
      const :left, T.nilable(BinaryNode)
      const :right, T.nilable(BinaryNode)
  end


  class Blah < T::Struct
      include Baml::Sorbet::Struct
      const :prop4, T.nilable(String)
  end


  class BlockConstraint < T::Struct
      include Baml::Sorbet::Struct
      const :foo, T.nilable(Integer)
      const :bar, T.nilable(String)
  end


  class BlockConstraintForParam < T::Struct
      include Baml::Sorbet::Struct
      const :bcfp, T.nilable(Integer)
      const :bcfp2, T.nilable(String)
  end


  class BookOrder < T::Struct
      include Baml::Sorbet::Struct
      const :orderId, T.nilable(String)
      const :title, T.nilable(String)
      const :quantity, T.nilable(Integer)
      const :price, T.nilable(Float)
  end


  class ClassForNullLiteral < T::Struct
      include Baml::Sorbet::Struct
      const :a, T.nilable(String)
  end


  class ClassOptionalOutput < T::Struct
      include Baml::Sorbet::Struct
      const :prop1, T.nilable(String)
      const :prop2, T.nilable(String)
  end


  class ClassOptionalOutput2 < T::Struct
      include Baml::Sorbet::Struct
      const :prop1, T.nilable(String)
      const :prop2, T.nilable(String)
      const :prop3, T.nilable(Blah)
  end


  class ClassToRecAlias < T::Struct
      include Baml::Sorbet::Struct
      const :list, T.nilable(LinkedListAliasNode)
  end


  class ClassWithBlockDone < T::Struct
      include Baml::Sorbet::Struct
      const :i_16_digits, T.nilable(Integer)
      const :s_20_words, T.nilable(String)
  end


  class ClassWithImage < T::Struct
      include Baml::Sorbet::Struct
      const :myImage, T.nilable(Baml::Image)
      const :param2, T.nilable(String)
      const :fake_image, T.nilable(FakeImage)
  end


  class ClassWithoutDone < T::Struct
      include Baml::Sorbet::Struct
      const :i_16_digits, T.nilable(Integer)
      const :s_20_words, StreamState[T.nilable(String)]
  end


  class ClientDetails1559 < T::Struct
      include Baml::Sorbet::Struct
      const :client_name, T.nilable(String)
      const :client_address, T.nilable(String)
      const :client_postal_code, T.nilable(String)
      const :client_city, T.nilable(String)
      const :client_country, T.nilable(String)
      const :client_phone, T.nilable(String)
      const :client_email, T.nilable(String)
  end


  class ComplexMemoryObject < T::Struct
      include Baml::Sorbet::Struct
      const :id, T.nilable(String)
      const :name, T.nilable(String)
      const :description, T.nilable(String)
      const :metadata, T::Array[T.any(String, Integer, Float)]
  end


  class CompoundBigNumbers < T::Struct
      include Baml::Sorbet::Struct
      const :big, T.nilable(BigNumbers)
      const :big_nums, T::Array[BigNumbers]
      const :another, T.nilable(BigNumbers)
  end


  class ContactInfo < T::Struct
      include Baml::Sorbet::Struct
      const :primary, T.nilable(T.any(PhoneNumber, EmailAddress))
      const :secondary, T.nilable(T.any(PhoneNumber, EmailAddress))
  end


  class CustomStory < T::Struct
      include Baml::Sorbet::Struct
      const :title, T.nilable(String)
      const :characters, T::Array[String]
      const :content, T.nilable(String)
  end


  class CustomTaskResult < T::Struct
      include Baml::Sorbet::Struct
      const :bookOrder, T.nilable(BookOrder)
      const :flightConfirmation, T.nilable(FlightConfirmation)
      const :groceryReceipt, T.nilable(GroceryReceipt)
  end


  class Document1559 < T::Struct
      include Baml::Sorbet::Struct
      const :client_details, T.nilable(ClientDetails1559)
      const :notes, T::Array[Note1599]
  end


  class DummyJsonTodo < T::Struct
      include Baml::Sorbet::Struct
      const :id, T.nilable(Integer)
      const :todo, T.nilable(String)
      const :completed, T.nilable(T::Boolean)
      const :userId, T.nilable(Integer)
  end


  class DummyOutput < T::Struct
      include Baml::Sorbet::Struct
      const :nonce, T.nilable(String)
      const :nonce2, T.nilable(String)
  end


  class DynInputOutput < T::Struct
      include Baml::Sorbet::Struct
      const :testKey, T.nilable(String)
  end


  class DynamicClassOne < T::Struct
      include Baml::Sorbet::Struct
  end


  class DynamicClassTwo < T::Struct
      include Baml::Sorbet::Struct
      const :hi, T.nilable(String)
      const :some_class, T.nilable(SomeClassNestedDynamic)
      const :status, T.nilable(T.any(BamlClient::Types::DynEnumOne, String))
  end


  class DynamicOutput < T::Struct
      include Baml::Sorbet::Struct
  end


  class DynamicSchema < T::Struct
      include Baml::Sorbet::Struct
  end


  class Earthling < T::Struct
      include Baml::Sorbet::Struct
      const :age, T.nilable(BamlClient::Types::Checked[Integer])
  end


  class Education < T::Struct
      include Baml::Sorbet::Struct
      const :institution, T.nilable(String)
      const :location, T.nilable(String)
      const :degree, T.nilable(String)
      const :major, T::Array[String]
      const :graduation_date, T.nilable(String)
  end


  class Email < T::Struct
      include Baml::Sorbet::Struct
      const :subject, T.nilable(String)
      const :body, T.nilable(String)
      const :from_address, T.nilable(String)
  end


  class EmailAddress < T::Struct
      include Baml::Sorbet::Struct
      const :value, T.nilable(String)
  end


  class Event < T::Struct
      include Baml::Sorbet::Struct
      const :title, T.nilable(String)
      const :date, T.nilable(String)
      const :location, T.nilable(String)
      const :description, T.nilable(String)
  end


  class FakeImage < T::Struct
      include Baml::Sorbet::Struct
      const :url, T.nilable(String)
  end


  class FlightConfirmation < T::Struct
      include Baml::Sorbet::Struct
      const :confirmationNumber, T.nilable(String)
      const :flightNumber, T.nilable(String)
      const :departureTime, T.nilable(String)
      const :arrivalTime, T.nilable(String)
      const :seatNumber, T.nilable(String)
  end


  class FooAny < T::Struct
      include Baml::Sorbet::Struct
      const :planetary_age, T.nilable(T.any(Martian, Earthling))
      const :certainty, T.nilable(BamlClient::Types::Checked[Integer])
      const :species, T.nilable(BamlClient::Types::Checked[String])
  end


  class Forest < T::Struct
      include Baml::Sorbet::Struct
      const :trees, T::Array[Tree]
  end


  class FormatterTest0 < T::Struct
      include Baml::Sorbet::Struct
      const :lorem, T.nilable(String)
      const :ipsum, T.nilable(String)
  end


  class FormatterTest1 < T::Struct
      include Baml::Sorbet::Struct
      const :lorem, T.nilable(String)
      const :ipsum, T.nilable(String)
  end


  class FormatterTest2 < T::Struct
      include Baml::Sorbet::Struct
      const :lorem, T.nilable(String)
      const :ipsum, T.nilable(String)
  end


  class FormatterTest3 < T::Struct
      include Baml::Sorbet::Struct
      const :lorem, T.nilable(String)
      const :ipsum, T.nilable(String)
  end


  class GroceryReceipt < T::Struct
      include Baml::Sorbet::Struct
      const :receiptId, T.nilable(String)
      const :storeName, T.nilable(String)
      const :items, T::Array[T.any(String, Integer, Float)]
      const :totalAmount, T.nilable(Float)
  end


  class Haiku < T::Struct
      include Baml::Sorbet::Struct
      const :line1, T.nilable(String)
      const :line2, T.nilable(String)
      const :line3, T.nilable(String)
  end


  class InnerClass < T::Struct
      include Baml::Sorbet::Struct
      const :prop1, T.nilable(String)
      const :prop2, T.nilable(String)
      const :inner, T.nilable(InnerClass2)
  end


  class InnerClass2 < T::Struct
      include Baml::Sorbet::Struct
      const :prop2, T.nilable(Integer)
      const :prop3, T.nilable(Float)
  end


  class InputClass < T::Struct
      include Baml::Sorbet::Struct
      const :key, T.nilable(String)
      const :key2, T.nilable(String)
  end


  class InputClassNested < T::Struct
      include Baml::Sorbet::Struct
      const :key, T.nilable(String)
      const :nested, T.nilable(InputClass)
  end


  class LinkedList < T::Struct
      include Baml::Sorbet::Struct
      const :head, T.nilable(Node)
      const :len, T.nilable(Integer)
  end


  class LinkedListAliasNode < T::Struct
      include Baml::Sorbet::Struct
      const :value, T.nilable(Integer)
      const :next, T.nilable(LinkedListAliasNode)
  end


  class LiteralClassHello < T::Struct
      include Baml::Sorbet::Struct
      const :prop, T.nilable(String)
  end


  class LiteralClassOne < T::Struct
      include Baml::Sorbet::Struct
      const :prop, T.nilable(String)
  end


  class LiteralClassTwo < T::Struct
      include Baml::Sorbet::Struct
      const :prop, T.nilable(String)
  end


  class MaintainFieldOrder < T::Struct
      include Baml::Sorbet::Struct
      const :a, T.nilable(String)
      const :b, T.nilable(String)
      const :c, T.nilable(String)
  end


  class MalformedConstraints < T::Struct
      include Baml::Sorbet::Struct
      const :foo, T.nilable(BamlClient::Types::Checked[Integer])
  end


  class MalformedConstraints2 < T::Struct
      include Baml::Sorbet::Struct
      const :foo, T.nilable(Integer)
  end


  # A Martian organism with an age.
  # Such a nice type.
  class Martian < T::Struct
      include Baml::Sorbet::Struct
      # The age of the Martian in Mars years.
      # So many Mars years.

      const :age, T.nilable(BamlClient::Types::Checked[Integer])
  end


  class MemoryObject < T::Struct
      include Baml::Sorbet::Struct
      const :id, T.nilable(String)
      const :name, T.nilable(String)
      const :description, T.nilable(String)
  end


  class MergeAttrs < T::Struct
      include Baml::Sorbet::Struct
      const :amount, T.nilable(BamlClient::Types::Checked[Integer])
  end


  class NamedArgsSingleClass < T::Struct
      include Baml::Sorbet::Struct
      const :key, T.nilable(String)
      const :key_two, T.nilable(T::Boolean)
      const :key_three, T.nilable(Integer)
  end


  class Nested < T::Struct
      include Baml::Sorbet::Struct
      const :prop3, T.nilable(String)
      const :prop4, T.nilable(String)
      const :prop20, T.nilable(Nested2)
  end


  class Nested2 < T::Struct
      include Baml::Sorbet::Struct
      const :prop11, T.nilable(String)
      const :prop12, T.nilable(String)
  end


  class NestedBlockConstraint < T::Struct
      include Baml::Sorbet::Struct
      const :nbc, T.nilable(BamlClient::Types::Checked[BlockConstraint])
  end


  class NestedBlockConstraintForParam < T::Struct
      include Baml::Sorbet::Struct
      const :nbcfp, T.nilable(BlockConstraintForParam)
  end


  class Node < T::Struct
      include Baml::Sorbet::Struct
      const :data, T.nilable(Integer)
      const :next, T.nilable(Node)
  end


  class NodeWithAliasIndirection < T::Struct
      include Baml::Sorbet::Struct
      const :value, T.nilable(Integer)
      const :next, T.nilable(NodeWithAliasIndirection)
  end


  class Note1599 < T::Struct
      include Baml::Sorbet::Struct
      const :note_title, T.nilable(String)
      const :note_description, T.nilable(String)
      const :note_amount, T.nilable(String)
  end


  class OptionalListAndMap < T::Struct
      include Baml::Sorbet::Struct
      const :p, T.nilable(T::Array[String])
      const :q, T.nilable(T::Hash[String, String])
  end


  class OptionalTest_Prop1 < T::Struct
      include Baml::Sorbet::Struct
      const :omega_a, T.nilable(String)
      const :omega_b, T.nilable(Integer)
  end


  class OptionalTest_ReturnType < T::Struct
      include Baml::Sorbet::Struct
      const :omega_1, T.nilable(OptionalTest_Prop1)
      const :omega_2, T.nilable(String)
      const :omega_3, T::Array[T.nilable(BamlClient::Types::OptionalTest_CategoryType)]
  end


  class OrderInfo < T::Struct
      include Baml::Sorbet::Struct
      const :order_status, T.nilable(BamlClient::Types::OrderStatus)
      const :tracking_number, T.nilable(String)
      const :estimated_arrival_date, T.nilable(String)
  end


  class OriginalA < T::Struct
      include Baml::Sorbet::Struct
      const :value, T.nilable(Integer)
  end


  class OriginalB < T::Struct
      include Baml::Sorbet::Struct
      const :value, T.nilable(Integer)
  end


  class Person < T::Struct
      include Baml::Sorbet::Struct
      const :name, T.nilable(String)
      const :hair_color, T.nilable(T.any(BamlClient::Types::Color, String))
  end


  class PhoneNumber < T::Struct
      include Baml::Sorbet::Struct
      const :value, T.nilable(String)
  end


  class Quantity < T::Struct
      include Baml::Sorbet::Struct
      const :amount, T.nilable(T.any(Integer, Float))
      const :unit, T.nilable(String)
  end


  class RaysData < T::Struct
      include Baml::Sorbet::Struct
      const :dataType, T.nilable(BamlClient::Types::DataType)
      const :value, T.nilable(T.any(Resume, Event))
  end


  class ReceiptInfo < T::Struct
      include Baml::Sorbet::Struct
      const :items, T::Array[ReceiptItem]
      const :total_cost, T.nilable(Float)
      const :venue, T.nilable(T.any(String, String))
  end


  class ReceiptItem < T::Struct
      include Baml::Sorbet::Struct
      const :name, T.nilable(String)
      const :description, T.nilable(String)
      const :quantity, T.nilable(Integer)
      const :price, T.nilable(Float)
  end


  class Recipe < T::Struct
      include Baml::Sorbet::Struct
      const :ingredients, T::Hash[String, Quantity]
      const :recipe_type, T.nilable(T.any(String, String))
  end


  class RecursiveAliasDependency < T::Struct
      include Baml::Sorbet::Struct
      const :value, T.nilable(JsonValue)
  end


  class RenderEnumInput < T::Struct
      include Baml::Sorbet::Struct
      const :testKey, T.nilable(String)
  end


  class RenderTestClass < T::Struct
      include Baml::Sorbet::Struct
      const :name, T.nilable(String)
      const :status, T.nilable(T.any(BamlClient::Types::RenderStatusEnum, String))
  end


  class Resume < T::Struct
      include Baml::Sorbet::Struct
      const :name, T.nilable(String)
      const :email, T.nilable(String)
      const :phone, T.nilable(String)
      const :experience, T::Array[String]
      const :education, T::Array[Education]
      const :skills, T::Array[String]
  end


  class Schema < T::Struct
      include Baml::Sorbet::Struct
      const :prop1, T.nilable(String)
      const :prop2, T.nilable(T.any(Nested, String))
      const :prop5, T::Array[T.nilable(String)]
      const :prop6, T.nilable(T.any(String, T::Array[Nested]))
      const :nested_attrs, T::Array[T.nilable(T.any(String, Nested))]
      const :parens, T.nilable(String)
      const :other_group, T.nilable(T.any(String, Integer))
  end


  class SearchParams < T::Struct
      include Baml::Sorbet::Struct
      const :dateRange, T.nilable(Integer)
      const :location, T::Array[String]
      const :jobTitle, T.nilable(WithReasoning)
      const :company, T.nilable(WithReasoning)
      const :description, T::Array[WithReasoning]
      const :tags, T::Array[T.any(BamlClient::Types::Tag, String)]
  end


  class SemanticContainer < T::Struct
      include Baml::Sorbet::Struct
      const :sixteen_digit_number, T.nilable(Integer)
      const :string_with_twenty_words, T.nilable(String)
      const :class_1, T.nilable(ClassWithoutDone)
      const :class_2, T.nilable(BamlClient::Types::ClassWithBlockDone)
      const :class_done_needed, BamlClient::Types::ClassWithBlockDone
      const :class_needed, ClassWithoutDone
      const :three_small_things, T::Array[SmallThing]
      const :final_string, T.nilable(String)
  end


  class SimpleTag < T::Struct
      include Baml::Sorbet::Struct
      const :field, T.nilable(String)
  end


  class SmallThing < T::Struct
      include Baml::Sorbet::Struct
      const :i_16_digits, Integer
      const :i_8_digits, T.nilable(Integer)
  end


  class SomeClassNestedDynamic < T::Struct
      include Baml::Sorbet::Struct
      const :hi, T.nilable(String)
  end


  class StringToClassEntry < T::Struct
      include Baml::Sorbet::Struct
      const :word, T.nilable(String)
  end


  class TestClassAlias < T::Struct
      include Baml::Sorbet::Struct
      const :key, T.nilable(String)
      const :key2, T.nilable(String)
      const :key3, T.nilable(String)
      const :key4, T.nilable(String)
      const :key5, T.nilable(String)
  end


  class TestClassNested < T::Struct
      include Baml::Sorbet::Struct
      const :prop1, T.nilable(String)
      const :prop2, T.nilable(InnerClass)
  end


  class TestClassWithEnum < T::Struct
      include Baml::Sorbet::Struct
      const :prop1, T.nilable(String)
      const :prop2, T.nilable(BamlClient::Types::EnumInClass)
  end


  class TestMemoryOutput < T::Struct
      include Baml::Sorbet::Struct
      const :items, T::Array[T.any(MemoryObject, ComplexMemoryObject, AnotherObject)]
      const :more_items, T::Array[T.any(MemoryObject, ComplexMemoryObject, AnotherObject)]
  end


  class TestOutputClass < T::Struct
      include Baml::Sorbet::Struct
      const :prop1, T.nilable(String)
      const :prop2, T.nilable(Integer)
  end


  class TodoMessageToUser < T::Struct
      include Baml::Sorbet::Struct
      const :type, String
      const :message, T.nilable(String)
  end


  class Tree < T::Struct
      include Baml::Sorbet::Struct
      const :data, T.nilable(Integer)
      const :children, T.nilable(Forest)
  end


  class TwoStoriesOneTitle < T::Struct
      include Baml::Sorbet::Struct
      const :title, T.nilable(String)
      const :story_a, T.nilable(String)
      const :story_b, T.nilable(String)
  end


  class TwoStoriesOneTitleCheck < T::Struct
      include Baml::Sorbet::Struct
      const :title, T.nilable(String)
      const :story_a, T.nilable(BamlClient::Types::Checked[String])
      const :story_b, T.nilable(BamlClient::Types::Checked[String])
  end


  class UnionTest_ReturnType < T::Struct
      include Baml::Sorbet::Struct
      const :prop1, T.nilable(T.any(String, T::Boolean))
      const :prop2, T::Array[T.any(Float, T::Boolean)]
      const :prop3, T.nilable(T.any(T::Array[T::Boolean], T::Array[Integer]))
  end


  # my docs
  class UniverseQuestion < T::Struct
      include Baml::Sorbet::Struct
      const :question, T.nilable(String)
      const :answer, T.nilable(String)
  end


  class UniverseQuestionInput < T::Struct
      include Baml::Sorbet::Struct
      const :question, T.nilable(String)
  end


  class WithReasoning < T::Struct
      include Baml::Sorbet::Struct
      const :value, T.nilable(String)
      const :reasoning, T.nilable(String)
  end

  # #########################################################################
  # Generated type aliases (21)
  # #########################################################################


  Amount = T.type_alias{ T.nilable(Integer) }


  Combination = T.type_alias{ T.nilable(T.any(Integer, String, T::Boolean, Float, T::Array[String], T::Hash[String, T::Array[String]])) }


  Currency = T.type_alias{ T.nilable(BamlClient::Types::Checked[Integer]) }


  Graph = T.type_alias{ T::Hash[String, T::Array[String]] }


  JsonArray = T.type_alias{ T::Array[JsonValue] }


  JsonEntry = T.type_alias{ T.nilable(T.any(SimpleTag, JsonTemplate)) }


  JsonObject = T.type_alias{ T::Hash[String, JsonValue] }


  JsonTemplate = T.type_alias{ T::Hash[String, JsonEntry] }


  JsonValue = T.type_alias{ T.nilable(T.any(Integer, String, T::Boolean, Float, JsonObject, JsonArray)) }


  LinkedListAlias = T.type_alias{ T.nilable(LinkedListAliasNode) }


  List = T.type_alias{ T::Array[String] }


  MultipleAttrs = T.type_alias{ T.nilable(BamlClient::Types::Checked[Integer]) }


  NodeIndirection = T.type_alias{ T.nilable(NodeWithAliasIndirection) }


  Primitive = T.type_alias{ T.nilable(T.any(Integer, String, T::Boolean, Float)) }


  RecAliasOne = T.type_alias{ T.nilable(RecAliasTwo) }


  RecAliasThree = T.type_alias{ T::Array[RecAliasOne] }


  RecAliasTwo = T.type_alias{ T.nilable(RecAliasThree) }


  RecursiveListAlias = T.type_alias{ T::Array[T.anything] }


  RecursiveMapAlias = T.type_alias{ T::Hash[String, T.anything] }


  RecursiveUnion = T.type_alias{ T.nilable(T.any(String, T::Hash[String, T.anything])) }


  TodoTool = T.type_alias{ T.nilable(T.any(AddTodoItem, TodoMessageToUser)) }


  end


end
