// Code generated by capnpc-go. DO NOT EDIT.

package protocol

import (
	math "math"
	capnp "zombiezen.com/go/capnproto2"
	text "zombiezen.com/go/capnproto2/encoding/text"
	schemas "zombiezen.com/go/capnproto2/schemas"
)

type Film struct{ capnp.Struct }

// Film_TypeID is the unique identifier for the type Film.
const Film_TypeID = 0x8662baafda730202

func NewFilm(s *capnp.Segment) (Film, error) {
	st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 32, PointerCount: 11})
	return Film{st}, err
}

func NewRootFilm(s *capnp.Segment) (Film, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 32, PointerCount: 11})
	return Film{st}, err
}

func ReadRootFilm(msg *capnp.Message) (Film, error) {
	root, err := msg.RootPtr()
	return Film{root.Struct()}, err
}

func (s Film) String() string {
	str, _ := text.Marshal(0x8662baafda730202, s.Struct)
	return str
}

func (s Film) Id() uint64 {
	return s.Struct.Uint64(0)
}

func (s Film) SetId(v uint64) {
	s.Struct.SetUint64(0, v)
}

func (s Film) Title() (string, error) {
	p, err := s.Struct.Ptr(0)
	return p.Text(), err
}

func (s Film) HasTitle() bool {
	p, err := s.Struct.Ptr(0)
	return p.IsValid() || err != nil
}

func (s Film) TitleBytes() ([]byte, error) {
	p, err := s.Struct.Ptr(0)
	return p.TextBytes(), err
}

func (s Film) SetTitle(v string) error {
	return s.Struct.SetText(0, v)
}

func (s Film) Genres() (capnp.TextList, error) {
	p, err := s.Struct.Ptr(1)
	return capnp.TextList{List: p.List()}, err
}

func (s Film) HasGenres() bool {
	p, err := s.Struct.Ptr(1)
	return p.IsValid() || err != nil
}

func (s Film) SetGenres(v capnp.TextList) error {
	return s.Struct.SetPtr(1, v.List.ToPtr())
}

// NewGenres sets the genres field to a newly
// allocated capnp.TextList, preferring placement in s's segment.
func (s Film) NewGenres(n int32) (capnp.TextList, error) {
	l, err := capnp.NewTextList(s.Struct.Segment(), n)
	if err != nil {
		return capnp.TextList{}, err
	}
	err = s.Struct.SetPtr(1, l.List.ToPtr())
	return l, err
}

func (s Film) ReleaseDate() (Film_Date, error) {
	p, err := s.Struct.Ptr(2)
	return Film_Date{Struct: p.Struct()}, err
}

func (s Film) HasReleaseDate() bool {
	p, err := s.Struct.Ptr(2)
	return p.IsValid() || err != nil
}

func (s Film) SetReleaseDate(v Film_Date) error {
	return s.Struct.SetPtr(2, v.Struct.ToPtr())
}

// NewReleaseDate sets the releaseDate field to a newly
// allocated Film_Date struct, preferring placement in s's segment.
func (s Film) NewReleaseDate() (Film_Date, error) {
	ss, err := NewFilm_Date(s.Struct.Segment())
	if err != nil {
		return Film_Date{}, err
	}
	err = s.Struct.SetPtr(2, ss.Struct.ToPtr())
	return ss, err
}

func (s Film) OriginalTitle() (string, error) {
	p, err := s.Struct.Ptr(3)
	return p.Text(), err
}

func (s Film) HasOriginalTitle() bool {
	p, err := s.Struct.Ptr(3)
	return p.IsValid() || err != nil
}

func (s Film) OriginalTitleBytes() ([]byte, error) {
	p, err := s.Struct.Ptr(3)
	return p.TextBytes(), err
}

func (s Film) SetOriginalTitle(v string) error {
	return s.Struct.SetText(3, v)
}

func (s Film) Overview() (string, error) {
	p, err := s.Struct.Ptr(4)
	return p.Text(), err
}

func (s Film) HasOverview() bool {
	p, err := s.Struct.Ptr(4)
	return p.IsValid() || err != nil
}

func (s Film) OverviewBytes() ([]byte, error) {
	p, err := s.Struct.Ptr(4)
	return p.TextBytes(), err
}

func (s Film) SetOverview(v string) error {
	return s.Struct.SetText(4, v)
}

func (s Film) Tagline() (string, error) {
	p, err := s.Struct.Ptr(5)
	return p.Text(), err
}

func (s Film) HasTagline() bool {
	p, err := s.Struct.Ptr(5)
	return p.IsValid() || err != nil
}

func (s Film) TaglineBytes() ([]byte, error) {
	p, err := s.Struct.Ptr(5)
	return p.TextBytes(), err
}

func (s Film) SetTagline(v string) error {
	return s.Struct.SetText(5, v)
}

func (s Film) Runtime() uint16 {
	return s.Struct.Uint16(8)
}

func (s Film) SetRuntime(v uint16) {
	s.Struct.SetUint16(8, v)
}

func (s Film) IsAdult() bool {
	return s.Struct.Bit(80)
}

func (s Film) SetIsAdult(v bool) {
	s.Struct.SetBit(80, v)
}

func (s Film) Mark() float32 {
	return math.Float32frombits(s.Struct.Uint32(12))
}

func (s Film) SetMark(v float32) {
	s.Struct.SetUint32(12, math.Float32bits(v))
}

func (s Film) VoteCount() uint64 {
	return s.Struct.Uint64(16)
}

func (s Film) SetVoteCount(v uint64) {
	s.Struct.SetUint64(16, v)
}

func (s Film) Status() Film_Status {
	return Film_Status(s.Struct.Uint16(24))
}

func (s Film) SetStatus(v Film_Status) {
	s.Struct.SetUint16(24, uint16(v))
}

func (s Film) PosterPath() (string, error) {
	p, err := s.Struct.Ptr(6)
	return p.Text(), err
}

func (s Film) HasPosterPath() bool {
	p, err := s.Struct.Ptr(6)
	return p.IsValid() || err != nil
}

func (s Film) PosterPathBytes() ([]byte, error) {
	p, err := s.Struct.Ptr(6)
	return p.TextBytes(), err
}

func (s Film) SetPosterPath(v string) error {
	return s.Struct.SetText(6, v)
}

func (s Film) BackdropPath() (string, error) {
	p, err := s.Struct.Ptr(7)
	return p.Text(), err
}

func (s Film) HasBackdropPath() bool {
	p, err := s.Struct.Ptr(7)
	return p.IsValid() || err != nil
}

func (s Film) BackdropPathBytes() ([]byte, error) {
	p, err := s.Struct.Ptr(7)
	return p.TextBytes(), err
}

func (s Film) SetBackdropPath(v string) error {
	return s.Struct.SetText(7, v)
}

func (s Film) Collection() (Film_Collection, error) {
	p, err := s.Struct.Ptr(8)
	return Film_Collection{Struct: p.Struct()}, err
}

func (s Film) HasCollection() bool {
	p, err := s.Struct.Ptr(8)
	return p.IsValid() || err != nil
}

func (s Film) SetCollection(v Film_Collection) error {
	return s.Struct.SetPtr(8, v.Struct.ToPtr())
}

// NewCollection sets the collection field to a newly
// allocated Film_Collection struct, preferring placement in s's segment.
func (s Film) NewCollection() (Film_Collection, error) {
	ss, err := NewFilm_Collection(s.Struct.Segment())
	if err != nil {
		return Film_Collection{}, err
	}
	err = s.Struct.SetPtr(8, ss.Struct.ToPtr())
	return ss, err
}

func (s Film) Cast() (Film_Character_List, error) {
	p, err := s.Struct.Ptr(9)
	return Film_Character_List{List: p.List()}, err
}

func (s Film) HasCast() bool {
	p, err := s.Struct.Ptr(9)
	return p.IsValid() || err != nil
}

func (s Film) SetCast(v Film_Character_List) error {
	return s.Struct.SetPtr(9, v.List.ToPtr())
}

// NewCast sets the cast field to a newly
// allocated Film_Character_List, preferring placement in s's segment.
func (s Film) NewCast(n int32) (Film_Character_List, error) {
	l, err := NewFilm_Character_List(s.Struct.Segment(), n)
	if err != nil {
		return Film_Character_List{}, err
	}
	err = s.Struct.SetPtr(9, l.List.ToPtr())
	return l, err
}

func (s Film) Crew() (Film_CrewMember_List, error) {
	p, err := s.Struct.Ptr(10)
	return Film_CrewMember_List{List: p.List()}, err
}

func (s Film) HasCrew() bool {
	p, err := s.Struct.Ptr(10)
	return p.IsValid() || err != nil
}

func (s Film) SetCrew(v Film_CrewMember_List) error {
	return s.Struct.SetPtr(10, v.List.ToPtr())
}

// NewCrew sets the crew field to a newly
// allocated Film_CrewMember_List, preferring placement in s's segment.
func (s Film) NewCrew(n int32) (Film_CrewMember_List, error) {
	l, err := NewFilm_CrewMember_List(s.Struct.Segment(), n)
	if err != nil {
		return Film_CrewMember_List{}, err
	}
	err = s.Struct.SetPtr(10, l.List.ToPtr())
	return l, err
}

// Film_List is a list of Film.
type Film_List struct{ capnp.List }

// NewFilm creates a new list of Film.
func NewFilm_List(s *capnp.Segment, sz int32) (Film_List, error) {
	l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 32, PointerCount: 11}, sz)
	return Film_List{l}, err
}

func (s Film_List) At(i int) Film { return Film{s.List.Struct(i)} }

func (s Film_List) Set(i int, v Film) error { return s.List.SetStruct(i, v.Struct) }

func (s Film_List) String() string {
	str, _ := text.MarshalList(0x8662baafda730202, s.List)
	return str
}

// Film_Promise is a wrapper for a Film promised by a client call.
type Film_Promise struct{ *capnp.Pipeline }

func (p Film_Promise) Struct() (Film, error) {
	s, err := p.Pipeline.Struct()
	return Film{s}, err
}

func (p Film_Promise) ReleaseDate() Film_Date_Promise {
	return Film_Date_Promise{Pipeline: p.Pipeline.GetPipeline(2)}
}

func (p Film_Promise) Collection() Film_Collection_Promise {
	return Film_Collection_Promise{Pipeline: p.Pipeline.GetPipeline(8)}
}

type Film_Date struct{ capnp.Struct }

// Film_Date_TypeID is the unique identifier for the type Film_Date.
const Film_Date_TypeID = 0xc1264952b8db1201

func NewFilm_Date(s *capnp.Segment) (Film_Date, error) {
	st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 0})
	return Film_Date{st}, err
}

func NewRootFilm_Date(s *capnp.Segment) (Film_Date, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 0})
	return Film_Date{st}, err
}

func ReadRootFilm_Date(msg *capnp.Message) (Film_Date, error) {
	root, err := msg.RootPtr()
	return Film_Date{root.Struct()}, err
}

func (s Film_Date) String() string {
	str, _ := text.Marshal(0xc1264952b8db1201, s.Struct)
	return str
}

func (s Film_Date) Year() int16 {
	return int16(s.Struct.Uint16(0))
}

func (s Film_Date) SetYear(v int16) {
	s.Struct.SetUint16(0, uint16(v))
}

func (s Film_Date) Month() uint8 {
	return s.Struct.Uint8(2)
}

func (s Film_Date) SetMonth(v uint8) {
	s.Struct.SetUint8(2, v)
}

func (s Film_Date) Day() uint8 {
	return s.Struct.Uint8(3)
}

func (s Film_Date) SetDay(v uint8) {
	s.Struct.SetUint8(3, v)
}

// Film_Date_List is a list of Film_Date.
type Film_Date_List struct{ capnp.List }

// NewFilm_Date creates a new list of Film_Date.
func NewFilm_Date_List(s *capnp.Segment, sz int32) (Film_Date_List, error) {
	l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 0}, sz)
	return Film_Date_List{l}, err
}

func (s Film_Date_List) At(i int) Film_Date { return Film_Date{s.List.Struct(i)} }

func (s Film_Date_List) Set(i int, v Film_Date) error { return s.List.SetStruct(i, v.Struct) }

func (s Film_Date_List) String() string {
	str, _ := text.MarshalList(0xc1264952b8db1201, s.List)
	return str
}

// Film_Date_Promise is a wrapper for a Film_Date promised by a client call.
type Film_Date_Promise struct{ *capnp.Pipeline }

func (p Film_Date_Promise) Struct() (Film_Date, error) {
	s, err := p.Pipeline.Struct()
	return Film_Date{s}, err
}

type Film_Status uint16

// Film_Status_TypeID is the unique identifier for the type Film_Status.
const Film_Status_TypeID = 0xbacdba448901b941

// Values of Film_Status.
const (
	Film_Status_rumored        Film_Status = 0
	Film_Status_planned        Film_Status = 1
	Film_Status_inProduction   Film_Status = 2
	Film_Status_postProduction Film_Status = 3
	Film_Status_released       Film_Status = 4
	Film_Status_cancelled      Film_Status = 5
)

// String returns the enum's constant name.
func (c Film_Status) String() string {
	switch c {
	case Film_Status_rumored:
		return "Rumored"
	case Film_Status_planned:
		return "Planned"
	case Film_Status_inProduction:
		return "In Production"
	case Film_Status_postProduction:
		return "Post Production"
	case Film_Status_released:
		return "Released"
	case Film_Status_cancelled:
		return "Cancelled"

	default:
		return ""
	}
}

// Film_StatusFromString returns the enum value with a name,
// or the zero value if there's no such value.
func Film_StatusFromString(c string) Film_Status {
	switch c {
	case "Rumored":
		return Film_Status_rumored
	case "Planned":
		return Film_Status_planned
	case "In Production":
		return Film_Status_inProduction
	case "Post Production":
		return Film_Status_postProduction
	case "Released":
		return Film_Status_released
	case "Cancelled":
		return Film_Status_cancelled

	default:
		return 0
	}
}

type Film_Status_List struct{ capnp.List }

func NewFilm_Status_List(s *capnp.Segment, sz int32) (Film_Status_List, error) {
	l, err := capnp.NewUInt16List(s, sz)
	return Film_Status_List{l.List}, err
}

func (l Film_Status_List) At(i int) Film_Status {
	ul := capnp.UInt16List{List: l.List}
	return Film_Status(ul.At(i))
}

func (l Film_Status_List) Set(i int, v Film_Status) {
	ul := capnp.UInt16List{List: l.List}
	ul.Set(i, uint16(v))
}

type Film_Collection struct{ capnp.Struct }

// Film_Collection_TypeID is the unique identifier for the type Film_Collection.
const Film_Collection_TypeID = 0xd4e4ef9e83a4bc53

func NewFilm_Collection(s *capnp.Segment) (Film_Collection, error) {
	st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
	return Film_Collection{st}, err
}

func NewRootFilm_Collection(s *capnp.Segment) (Film_Collection, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
	return Film_Collection{st}, err
}

func ReadRootFilm_Collection(msg *capnp.Message) (Film_Collection, error) {
	root, err := msg.RootPtr()
	return Film_Collection{root.Struct()}, err
}

func (s Film_Collection) String() string {
	str, _ := text.Marshal(0xd4e4ef9e83a4bc53, s.Struct)
	return str
}

func (s Film_Collection) Name() (string, error) {
	p, err := s.Struct.Ptr(0)
	return p.Text(), err
}

func (s Film_Collection) HasName() bool {
	p, err := s.Struct.Ptr(0)
	return p.IsValid() || err != nil
}

func (s Film_Collection) NameBytes() ([]byte, error) {
	p, err := s.Struct.Ptr(0)
	return p.TextBytes(), err
}

func (s Film_Collection) SetName(v string) error {
	return s.Struct.SetText(0, v)
}

func (s Film_Collection) Parts() (Film_Collection_CollectionPart_List, error) {
	p, err := s.Struct.Ptr(1)
	return Film_Collection_CollectionPart_List{List: p.List()}, err
}

func (s Film_Collection) HasParts() bool {
	p, err := s.Struct.Ptr(1)
	return p.IsValid() || err != nil
}

func (s Film_Collection) SetParts(v Film_Collection_CollectionPart_List) error {
	return s.Struct.SetPtr(1, v.List.ToPtr())
}

// NewParts sets the parts field to a newly
// allocated Film_Collection_CollectionPart_List, preferring placement in s's segment.
func (s Film_Collection) NewParts(n int32) (Film_Collection_CollectionPart_List, error) {
	l, err := NewFilm_Collection_CollectionPart_List(s.Struct.Segment(), n)
	if err != nil {
		return Film_Collection_CollectionPart_List{}, err
	}
	err = s.Struct.SetPtr(1, l.List.ToPtr())
	return l, err
}

// Film_Collection_List is a list of Film_Collection.
type Film_Collection_List struct{ capnp.List }

// NewFilm_Collection creates a new list of Film_Collection.
func NewFilm_Collection_List(s *capnp.Segment, sz int32) (Film_Collection_List, error) {
	l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2}, sz)
	return Film_Collection_List{l}, err
}

func (s Film_Collection_List) At(i int) Film_Collection { return Film_Collection{s.List.Struct(i)} }

func (s Film_Collection_List) Set(i int, v Film_Collection) error {
	return s.List.SetStruct(i, v.Struct)
}

func (s Film_Collection_List) String() string {
	str, _ := text.MarshalList(0xd4e4ef9e83a4bc53, s.List)
	return str
}

// Film_Collection_Promise is a wrapper for a Film_Collection promised by a client call.
type Film_Collection_Promise struct{ *capnp.Pipeline }

func (p Film_Collection_Promise) Struct() (Film_Collection, error) {
	s, err := p.Pipeline.Struct()
	return Film_Collection{s}, err
}

type Film_Collection_CollectionPart struct{ capnp.Struct }

// Film_Collection_CollectionPart_TypeID is the unique identifier for the type Film_Collection_CollectionPart.
const Film_Collection_CollectionPart_TypeID = 0xa0d6cbb1ccac3e25

func NewFilm_Collection_CollectionPart(s *capnp.Segment) (Film_Collection_CollectionPart, error) {
	st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 3})
	return Film_Collection_CollectionPart{st}, err
}

func NewRootFilm_Collection_CollectionPart(s *capnp.Segment) (Film_Collection_CollectionPart, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 3})
	return Film_Collection_CollectionPart{st}, err
}

func ReadRootFilm_Collection_CollectionPart(msg *capnp.Message) (Film_Collection_CollectionPart, error) {
	root, err := msg.RootPtr()
	return Film_Collection_CollectionPart{root.Struct()}, err
}

func (s Film_Collection_CollectionPart) String() string {
	str, _ := text.Marshal(0xa0d6cbb1ccac3e25, s.Struct)
	return str
}

func (s Film_Collection_CollectionPart) Id() uint64 {
	return s.Struct.Uint64(0)
}

func (s Film_Collection_CollectionPart) SetId(v uint64) {
	s.Struct.SetUint64(0, v)
}

func (s Film_Collection_CollectionPart) Title() (string, error) {
	p, err := s.Struct.Ptr(0)
	return p.Text(), err
}

func (s Film_Collection_CollectionPart) HasTitle() bool {
	p, err := s.Struct.Ptr(0)
	return p.IsValid() || err != nil
}

func (s Film_Collection_CollectionPart) TitleBytes() ([]byte, error) {
	p, err := s.Struct.Ptr(0)
	return p.TextBytes(), err
}

func (s Film_Collection_CollectionPart) SetTitle(v string) error {
	return s.Struct.SetText(0, v)
}

func (s Film_Collection_CollectionPart) ReleaseDate() (Film_Date, error) {
	p, err := s.Struct.Ptr(1)
	return Film_Date{Struct: p.Struct()}, err
}

func (s Film_Collection_CollectionPart) HasReleaseDate() bool {
	p, err := s.Struct.Ptr(1)
	return p.IsValid() || err != nil
}

func (s Film_Collection_CollectionPart) SetReleaseDate(v Film_Date) error {
	return s.Struct.SetPtr(1, v.Struct.ToPtr())
}

// NewReleaseDate sets the releaseDate field to a newly
// allocated Film_Date struct, preferring placement in s's segment.
func (s Film_Collection_CollectionPart) NewReleaseDate() (Film_Date, error) {
	ss, err := NewFilm_Date(s.Struct.Segment())
	if err != nil {
		return Film_Date{}, err
	}
	err = s.Struct.SetPtr(1, ss.Struct.ToPtr())
	return ss, err
}

func (s Film_Collection_CollectionPart) PosterPath() (string, error) {
	p, err := s.Struct.Ptr(2)
	return p.Text(), err
}

func (s Film_Collection_CollectionPart) HasPosterPath() bool {
	p, err := s.Struct.Ptr(2)
	return p.IsValid() || err != nil
}

func (s Film_Collection_CollectionPart) PosterPathBytes() ([]byte, error) {
	p, err := s.Struct.Ptr(2)
	return p.TextBytes(), err
}

func (s Film_Collection_CollectionPart) SetPosterPath(v string) error {
	return s.Struct.SetText(2, v)
}

// Film_Collection_CollectionPart_List is a list of Film_Collection_CollectionPart.
type Film_Collection_CollectionPart_List struct{ capnp.List }

// NewFilm_Collection_CollectionPart creates a new list of Film_Collection_CollectionPart.
func NewFilm_Collection_CollectionPart_List(s *capnp.Segment, sz int32) (Film_Collection_CollectionPart_List, error) {
	l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 3}, sz)
	return Film_Collection_CollectionPart_List{l}, err
}

func (s Film_Collection_CollectionPart_List) At(i int) Film_Collection_CollectionPart {
	return Film_Collection_CollectionPart{s.List.Struct(i)}
}

func (s Film_Collection_CollectionPart_List) Set(i int, v Film_Collection_CollectionPart) error {
	return s.List.SetStruct(i, v.Struct)
}

func (s Film_Collection_CollectionPart_List) String() string {
	str, _ := text.MarshalList(0xa0d6cbb1ccac3e25, s.List)
	return str
}

// Film_Collection_CollectionPart_Promise is a wrapper for a Film_Collection_CollectionPart promised by a client call.
type Film_Collection_CollectionPart_Promise struct{ *capnp.Pipeline }

func (p Film_Collection_CollectionPart_Promise) Struct() (Film_Collection_CollectionPart, error) {
	s, err := p.Pipeline.Struct()
	return Film_Collection_CollectionPart{s}, err
}

func (p Film_Collection_CollectionPart_Promise) ReleaseDate() Film_Date_Promise {
	return Film_Date_Promise{Pipeline: p.Pipeline.GetPipeline(1)}
}

type Film_Character struct{ capnp.Struct }

// Film_Character_TypeID is the unique identifier for the type Film_Character.
const Film_Character_TypeID = 0xfc58a269203af0a8

func NewFilm_Character(s *capnp.Segment) (Film_Character, error) {
	st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
	return Film_Character{st}, err
}

func NewRootFilm_Character(s *capnp.Segment) (Film_Character, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
	return Film_Character{st}, err
}

func ReadRootFilm_Character(msg *capnp.Message) (Film_Character, error) {
	root, err := msg.RootPtr()
	return Film_Character{root.Struct()}, err
}

func (s Film_Character) String() string {
	str, _ := text.Marshal(0xfc58a269203af0a8, s.Struct)
	return str
}

func (s Film_Character) Person() (Person, error) {
	p, err := s.Struct.Ptr(0)
	return Person{Struct: p.Struct()}, err
}

func (s Film_Character) HasPerson() bool {
	p, err := s.Struct.Ptr(0)
	return p.IsValid() || err != nil
}

func (s Film_Character) SetPerson(v Person) error {
	return s.Struct.SetPtr(0, v.Struct.ToPtr())
}

// NewPerson sets the person field to a newly
// allocated Person struct, preferring placement in s's segment.
func (s Film_Character) NewPerson() (Person, error) {
	ss, err := NewPerson(s.Struct.Segment())
	if err != nil {
		return Person{}, err
	}
	err = s.Struct.SetPtr(0, ss.Struct.ToPtr())
	return ss, err
}

func (s Film_Character) Name() (string, error) {
	p, err := s.Struct.Ptr(1)
	return p.Text(), err
}

func (s Film_Character) HasName() bool {
	p, err := s.Struct.Ptr(1)
	return p.IsValid() || err != nil
}

func (s Film_Character) NameBytes() ([]byte, error) {
	p, err := s.Struct.Ptr(1)
	return p.TextBytes(), err
}

func (s Film_Character) SetName(v string) error {
	return s.Struct.SetText(1, v)
}

// Film_Character_List is a list of Film_Character.
type Film_Character_List struct{ capnp.List }

// NewFilm_Character creates a new list of Film_Character.
func NewFilm_Character_List(s *capnp.Segment, sz int32) (Film_Character_List, error) {
	l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2}, sz)
	return Film_Character_List{l}, err
}

func (s Film_Character_List) At(i int) Film_Character { return Film_Character{s.List.Struct(i)} }

func (s Film_Character_List) Set(i int, v Film_Character) error { return s.List.SetStruct(i, v.Struct) }

func (s Film_Character_List) String() string {
	str, _ := text.MarshalList(0xfc58a269203af0a8, s.List)
	return str
}

// Film_Character_Promise is a wrapper for a Film_Character promised by a client call.
type Film_Character_Promise struct{ *capnp.Pipeline }

func (p Film_Character_Promise) Struct() (Film_Character, error) {
	s, err := p.Pipeline.Struct()
	return Film_Character{s}, err
}

func (p Film_Character_Promise) Person() Person_Promise {
	return Person_Promise{Pipeline: p.Pipeline.GetPipeline(0)}
}

type Film_CrewMember struct{ capnp.Struct }

// Film_CrewMember_TypeID is the unique identifier for the type Film_CrewMember.
const Film_CrewMember_TypeID = 0x8afd64c84282f606

func NewFilm_CrewMember(s *capnp.Segment) (Film_CrewMember, error) {
	st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
	return Film_CrewMember{st}, err
}

func NewRootFilm_CrewMember(s *capnp.Segment) (Film_CrewMember, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
	return Film_CrewMember{st}, err
}

func ReadRootFilm_CrewMember(msg *capnp.Message) (Film_CrewMember, error) {
	root, err := msg.RootPtr()
	return Film_CrewMember{root.Struct()}, err
}

func (s Film_CrewMember) String() string {
	str, _ := text.Marshal(0x8afd64c84282f606, s.Struct)
	return str
}

func (s Film_CrewMember) Person() (Person, error) {
	p, err := s.Struct.Ptr(0)
	return Person{Struct: p.Struct()}, err
}

func (s Film_CrewMember) HasPerson() bool {
	p, err := s.Struct.Ptr(0)
	return p.IsValid() || err != nil
}

func (s Film_CrewMember) SetPerson(v Person) error {
	return s.Struct.SetPtr(0, v.Struct.ToPtr())
}

// NewPerson sets the person field to a newly
// allocated Person struct, preferring placement in s's segment.
func (s Film_CrewMember) NewPerson() (Person, error) {
	ss, err := NewPerson(s.Struct.Segment())
	if err != nil {
		return Person{}, err
	}
	err = s.Struct.SetPtr(0, ss.Struct.ToPtr())
	return ss, err
}

func (s Film_CrewMember) Job() (string, error) {
	p, err := s.Struct.Ptr(1)
	return p.Text(), err
}

func (s Film_CrewMember) HasJob() bool {
	p, err := s.Struct.Ptr(1)
	return p.IsValid() || err != nil
}

func (s Film_CrewMember) JobBytes() ([]byte, error) {
	p, err := s.Struct.Ptr(1)
	return p.TextBytes(), err
}

func (s Film_CrewMember) SetJob(v string) error {
	return s.Struct.SetText(1, v)
}

// Film_CrewMember_List is a list of Film_CrewMember.
type Film_CrewMember_List struct{ capnp.List }

// NewFilm_CrewMember creates a new list of Film_CrewMember.
func NewFilm_CrewMember_List(s *capnp.Segment, sz int32) (Film_CrewMember_List, error) {
	l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2}, sz)
	return Film_CrewMember_List{l}, err
}

func (s Film_CrewMember_List) At(i int) Film_CrewMember { return Film_CrewMember{s.List.Struct(i)} }

func (s Film_CrewMember_List) Set(i int, v Film_CrewMember) error {
	return s.List.SetStruct(i, v.Struct)
}

func (s Film_CrewMember_List) String() string {
	str, _ := text.MarshalList(0x8afd64c84282f606, s.List)
	return str
}

// Film_CrewMember_Promise is a wrapper for a Film_CrewMember promised by a client call.
type Film_CrewMember_Promise struct{ *capnp.Pipeline }

func (p Film_CrewMember_Promise) Struct() (Film_CrewMember, error) {
	s, err := p.Pipeline.Struct()
	return Film_CrewMember{s}, err
}

func (p Film_CrewMember_Promise) Person() Person_Promise {
	return Person_Promise{Pipeline: p.Pipeline.GetPipeline(0)}
}

type Person struct{ capnp.Struct }

// Person_TypeID is the unique identifier for the type Person.
const Person_TypeID = 0xbe38be3daa02cbbb

func NewPerson(s *capnp.Segment) (Person, error) {
	st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 2})
	return Person{st}, err
}

func NewRootPerson(s *capnp.Segment) (Person, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 2})
	return Person{st}, err
}

func ReadRootPerson(msg *capnp.Message) (Person, error) {
	root, err := msg.RootPtr()
	return Person{root.Struct()}, err
}

func (s Person) String() string {
	str, _ := text.Marshal(0xbe38be3daa02cbbb, s.Struct)
	return str
}

func (s Person) Id() uint64 {
	return s.Struct.Uint64(0)
}

func (s Person) SetId(v uint64) {
	s.Struct.SetUint64(0, v)
}

func (s Person) Name() (string, error) {
	p, err := s.Struct.Ptr(0)
	return p.Text(), err
}

func (s Person) HasName() bool {
	p, err := s.Struct.Ptr(0)
	return p.IsValid() || err != nil
}

func (s Person) NameBytes() ([]byte, error) {
	p, err := s.Struct.Ptr(0)
	return p.TextBytes(), err
}

func (s Person) SetName(v string) error {
	return s.Struct.SetText(0, v)
}

func (s Person) PhotoPath() (string, error) {
	p, err := s.Struct.Ptr(1)
	return p.Text(), err
}

func (s Person) HasPhotoPath() bool {
	p, err := s.Struct.Ptr(1)
	return p.IsValid() || err != nil
}

func (s Person) PhotoPathBytes() ([]byte, error) {
	p, err := s.Struct.Ptr(1)
	return p.TextBytes(), err
}

func (s Person) SetPhotoPath(v string) error {
	return s.Struct.SetText(1, v)
}

// Person_List is a list of Person.
type Person_List struct{ capnp.List }

// NewPerson creates a new list of Person.
func NewPerson_List(s *capnp.Segment, sz int32) (Person_List, error) {
	l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 2}, sz)
	return Person_List{l}, err
}

func (s Person_List) At(i int) Person { return Person{s.List.Struct(i)} }

func (s Person_List) Set(i int, v Person) error { return s.List.SetStruct(i, v.Struct) }

func (s Person_List) String() string {
	str, _ := text.MarshalList(0xbe38be3daa02cbbb, s.List)
	return str
}

// Person_Promise is a wrapper for a Person promised by a client call.
type Person_Promise struct{ *capnp.Pipeline }

func (p Person_Promise) Struct() (Person, error) {
	s, err := p.Pipeline.Struct()
	return Person{s}, err
}

const schema_cd7129bab3129d29 = "x\xda\x8c\x96\xef\x8bSW\x1e\xc6\x9f\xe7\x9c$w\x12" +
	"\xe3$\xd7{\x97\xdd\x11%\xee\xa2\x8b\x0e\xab\x8c\xa3." +
	"2\xb0;\xce\x8f]vD!7\x11V\x86\x15\xbc\x93" +
	"\\\x9ch\x92\x1bon\x1c\x94]\x86ua\xa1\xfe\x03" +
	"\x85\x82\xa5-\x15\xdaR\x90\xfex\xd1N\x8b\xc5B\xa9" +
	"T\x85\x0aZ\x8a}'-\xadP\xd1B-\x15,\xb7" +
	"\x9c\x9b\x1f7S\xa7\xea\xbb\xc3'\xdfs\xcf\xf3=\xe7" +
	"y\xce\xc9\xc8\x9f\xe5\x1e\xb1=\xbe\x18\x03\xac\x9d\xf1D" +
	" D\xf3\xe6\xf9\xa5\xb9\xff\xc3J3\x16l9\xbb\xe6" +
	"\xad\xa5-\xc7\xaf\"\xbeJ\x03\x8cM\xe2\x8c\xb1U\xfc" +
	"\x13\xd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a1\xe2\xf1\x98\xc98`<\xe0^\xa0\xf8\xa3" +
	"\xe21!\xa8'\xe2&\x13\x80A1\x09\x14\x1f*>" +
	"\xa0\xb8\x163\xa9v0\xaexAH\x16\xd3\x0a\x0f\xe4" +
	"M\x0e\x00F2,\x8f)\x9eU<)M&\x01c" +
	"\xb5\x18\x06\x8a\x03\x8a\x9b\x8a\xa7\x84\xc9\x94\xb2\x98(\x00" +
	"\xc5\xac\xe2\xeb\x14_\x956\xb9\x0a0\x86\x84j\xcbT" +
	"|\x83\xe2\xe9\x84\xc94`\xac\x17\xb3@q\x9d\xe2\x9b" +
	"\x15_\xad\x99\\\x1d\xe6\xe1(P\xdc\xa8\xf8\x88\xe2\x83" +
	"\x03&\x07\x95\xed\xc2\xfa?)\xbe[\xf1L\xd2d\x06" +
	"0v\x85zF\x14\xdf\xa7x6e2\x0b\x183!" +
	"\x9fV\xfc\xb0\x10\x94\x952\x93\x10L\x829\xbf\xe2W" +
	"\x1d\xa6!\x98\x06\xc7\x8f8u\xcfir\x10\xccK\x86" +
	"t\x10\x0c<\xa7\xea\xd8Mg\x1a\x9a\xed;\xccFN" +
	"\x02\x99\x05\x03\xd7\xab\x1c\xa9\xd4\xed*r\x07\xfa\xbf\x16" +
	"\xb8'\x1c\xefD\xc5Y\x00\xd0e\x8b\xbe}\xa4Z\xa9" +
	"\xf7j\x16\xbdV\xdd\xaf\xd4\x1cj\x10\xd4\xc0\xc5Js" +
	"\xa2\xdc\xaa\xfa$\x04\x09fj\xb6w\x8c)\x08\xa6\xc0" +
	"\xe0\x84\xeb;Sn\xab\x0e\xfa\xdd\x06\xc6\x9b\xa1!\x99" +
	"\x89,\x0d2\x03\x06\x0d\xb7\xe9;^\xde\x86\xf4\xe7{" +
	"\x92\xe6\xec\xd2\xb1\xb2\xe76\x90\xc9\xdb}\xb8\xd4gg" +
	"f\xa3@\xb4\x1b\xcc\x94\xec\xa6\xdf\xdd\x94l\x94\x10P" +
	"\xc1L\xc9s\x16\xa2_{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	"\x80\xb5O\xd2:\xb8\xcc:\x99\xba]\x8b\x9c\xd3\x98w" +
	"}7o\xfb\xe0\xa3\xc6\xe8=v\xb9m\xea\x99\xfa\x85" +
	"\x8c\xe1H\x86N\xd1\xd11\xda\xafCvt\xa8\xb0\xfd" +
	"C\xd2: \x989\xe9\xd8\x1e%\x04%\x98\xab\xb9u" +
	"\x7f\x9e\x09\x08&@\xadl\x9f\xec\x8eW\x0ax;c" +
	"Z\xfb\xf8\xfa\xfe\x99\xe8<\x15\xbd\x9c\xe3*\x82\x9e\xdf" +
	"\x9f\xff\xe1\x95\xf2?\xda\xc9\xff\xb4X\xbe\x1f\xb9\x86\xed" +
	"\xf9\xcd\xe8\xe2\xe9\xad\xf2\xeb\x17O\xfb\x9d\x96Ow\xef" +
	"\x0c?\xc5\xbd\xb3L\xd0\xcf\x01\x00\x00\xff\xff\xd0*V" +
	"\x11"

func init() {
	schemas.Register(schema_cd7129bab3129d29,
		0x8662baafda730202,
		0x8afd64c84282f606,
		0xa0d6cbb1ccac3e25,
		0xbacdba448901b941,
		0xbe38be3daa02cbbb,
		0xc1264952b8db1201,
		0xd4e4ef9e83a4bc53,
		0xfc58a269203af0a8)
}
