// Generated by Cap'n Proto compiler, DO NOT EDIT
// source: rime_ipc.capnp

#pragma once

#include <capnp/generated-header-support.h>
#include <kj/windows-sanity.h>

#ifndef CAPNP_VERSION
#error "CAPNP_VERSION is not defined, is capnp/generated-header-support.h missing?"
#elif CAPNP_VERSION != 1005000
#error "Version mismatch between generated code and library headers.  You must use the same version of the Cap'n Proto compiler and library."
#endif

#include <rime_proto.capnp.h>

CAPNP_BEGIN_HEADER

namespace capnp {
namespace schemas {

CAPNP_DECLARE_SCHEMA(e78e451126c0702a);

}  // namespace schemas
}  // namespace capnp


struct RimeIpcResponse {
  RimeIpcResponse() = delete;

  class Reader;
  class Builder;
  class Pipeline;

  struct _capnpPrivate {
    CAPNP_DECLARE_STRUCT_HEADER(e78e451126c0702a, 0, 3)
    #if !CAPNP_LITE
    static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
    #endif  // !CAPNP_LITE
  };
};

// =======================================================================================

class RimeIpcResponse::Reader {
public:
  typedef RimeIpcResponse Reads;

  Reader() = default;
  inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}

  inline ::capnp::MessageSize totalSize() const {
    return _reader.totalSize().asPublic();
  }

#if !CAPNP_LITE
  inline ::kj::StringTree toString() const {
    return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
  }
#endif  // !CAPNP_LITE

  inline bool hasCommit() const;
  inline  ::rime::proto::Commit::Reader getCommit() const;

  inline bool hasContext() const;
  inline  ::rime::proto::Context::Reader getContext() const;

  inline bool hasStatus() const;
  inline  ::rime::proto::Status::Reader getStatus() const;

private:
  ::capnp::_::StructReader _reader;
  template <typename, ::capnp::Kind>
  friend struct ::capnp::ToDynamic_;
  template <typename, ::capnp::Kind>
  friend struct ::capnp::_::PointerHelpers;
  template <typename, ::capnp::Kind>
  friend struct ::capnp::List;
  friend class ::capnp::MessageBuilder;
  friend class ::capnp::Orphanage;
};

class RimeIpcResponse::Builder {
public:
  typedef RimeIpcResponse Builds;

  Builder() = delete;  // Deleted to discourage incorrect usage.
                       // You can explicitly initialize to nullptr instead.
  inline Builder(decltype(nullptr)) {}
  inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
  inline operator Reader() const { return Reader(_builder.asReader()); }
  inline Reader asReader() const { return *this; }

  inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
#if !CAPNP_LITE
  inline ::kj::StringTree toString() const { return asReader().toString(); }
#endif  // !CAPNP_LITE

  inline bool hasCommit();
  inline  ::rime::proto::Commit::Builder getCommit();
  inline void setCommit( ::rime::proto::Commit::Reader value);
  inline  ::rime::proto::Commit::Builder initCommit();
  inline void adoptCommit(::capnp::Orphan< ::rime::proto::Commit>&& value);
  inline ::capnp::Orphan< ::rime::proto::Commit> disownCommit();

  inline bool hasContext();
  inline  ::rime::proto::Context::Builder getContext();
  inline void setContext( ::rime::proto::Context::Reader value);
  inline  ::rime::proto::Context::Builder initContext();
  inline void adoptContext(::capnp::Orphan< ::rime::proto::Context>&& value);
  inline ::capnp::Orphan< ::rime::proto::Context> disownContext();

  inline bool hasStatus();
  inline  ::rime::proto::Status::Builder getStatus();
  inline void setStatus( ::rime::proto::Status::Reader value);
  inline  ::rime::proto::Status::Builder initStatus();
  inline void adoptStatus(::capnp::Orphan< ::rime::proto::Status>&& value);
  inline ::capnp::Orphan< ::rime::proto::Status> disownStatus();

private:
  ::capnp::_::StructBuilder _builder;
  template <typename, ::capnp::Kind>
  friend struct ::capnp::ToDynamic_;
  friend class ::capnp::Orphanage;
  template <typename, ::capnp::Kind>
  friend struct ::capnp::_::PointerHelpers;
};

#if !CAPNP_LITE
class RimeIpcResponse::Pipeline {
public:
  typedef RimeIpcResponse Pipelines;

  inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
  inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
      : _typeless(kj::mv(typeless)) {}

  inline  ::rime::proto::Commit::Pipeline getCommit();
  inline  ::rime::proto::Context::Pipeline getContext();
  inline  ::rime::proto::Status::Pipeline getStatus();
private:
  ::capnp::AnyPointer::Pipeline _typeless;
  friend class ::capnp::PipelineHook;
  template <typename, ::capnp::Kind>
  friend struct ::capnp::ToDynamic_;
};
#endif  // !CAPNP_LITE

// =======================================================================================

inline bool RimeIpcResponse::Reader::hasCommit() const {
  return !_reader.getPointerField(
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
}
inline bool RimeIpcResponse::Builder::hasCommit() {
  return !_builder.getPointerField(
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
}
inline  ::rime::proto::Commit::Reader RimeIpcResponse::Reader::getCommit() const {
  return ::capnp::_::PointerHelpers< ::rime::proto::Commit>::get(_reader.getPointerField(
      ::capnp::bounded<0>() * ::capnp::POINTERS));
}
inline  ::rime::proto::Commit::Builder RimeIpcResponse::Builder::getCommit() {
  return ::capnp::_::PointerHelpers< ::rime::proto::Commit>::get(_builder.getPointerField(
      ::capnp::bounded<0>() * ::capnp::POINTERS));
}
#if !CAPNP_LITE
inline  ::rime::proto::Commit::Pipeline RimeIpcResponse::Pipeline::getCommit() {
  return  ::rime::proto::Commit::Pipeline(_typeless.getPointerField(0));
}
#endif  // !CAPNP_LITE
inline void RimeIpcResponse::Builder::setCommit( ::rime::proto::Commit::Reader value) {
  ::capnp::_::PointerHelpers< ::rime::proto::Commit>::set(_builder.getPointerField(
      ::capnp::bounded<0>() * ::capnp::POINTERS), value);
}
inline  ::rime::proto::Commit::Builder RimeIpcResponse::Builder::initCommit() {
  return ::capnp::_::PointerHelpers< ::rime::proto::Commit>::init(_builder.getPointerField(
      ::capnp::bounded<0>() * ::capnp::POINTERS));
}
inline void RimeIpcResponse::Builder::adoptCommit(
    ::capnp::Orphan< ::rime::proto::Commit>&& value) {
  ::capnp::_::PointerHelpers< ::rime::proto::Commit>::adopt(_builder.getPointerField(
      ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::rime::proto::Commit> RimeIpcResponse::Builder::disownCommit() {
  return ::capnp::_::PointerHelpers< ::rime::proto::Commit>::disown(_builder.getPointerField(
      ::capnp::bounded<0>() * ::capnp::POINTERS));
}

inline bool RimeIpcResponse::Reader::hasContext() const {
  return !_reader.getPointerField(
      ::capnp::bounded<1>() * ::capnp::POINTERS).isNull();
}
inline bool RimeIpcResponse::Builder::hasContext() {
  return !_builder.getPointerField(
      ::capnp::bounded<1>() * ::capnp::POINTERS).isNull();
}
inline  ::rime::proto::Context::Reader RimeIpcResponse::Reader::getContext() const {
  return ::capnp::_::PointerHelpers< ::rime::proto::Context>::get(_reader.getPointerField(
      ::capnp::bounded<1>() * ::capnp::POINTERS));
}
inline  ::rime::proto::Context::Builder RimeIpcResponse::Builder::getContext() {
  return ::capnp::_::PointerHelpers< ::rime::proto::Context>::get(_builder.getPointerField(
      ::capnp::bounded<1>() * ::capnp::POINTERS));
}
#if !CAPNP_LITE
inline  ::rime::proto::Context::Pipeline RimeIpcResponse::Pipeline::getContext() {
  return  ::rime::proto::Context::Pipeline(_typeless.getPointerField(1));
}
#endif  // !CAPNP_LITE
inline void RimeIpcResponse::Builder::setContext( ::rime::proto::Context::Reader value) {
  ::capnp::_::PointerHelpers< ::rime::proto::Context>::set(_builder.getPointerField(
      ::capnp::bounded<1>() * ::capnp::POINTERS), value);
}
inline  ::rime::proto::Context::Builder RimeIpcResponse::Builder::initContext() {
  return ::capnp::_::PointerHelpers< ::rime::proto::Context>::init(_builder.getPointerField(
      ::capnp::bounded<1>() * ::capnp::POINTERS));
}
inline void RimeIpcResponse::Builder::adoptContext(
    ::capnp::Orphan< ::rime::proto::Context>&& value) {
  ::capnp::_::PointerHelpers< ::rime::proto::Context>::adopt(_builder.getPointerField(
      ::capnp::bounded<1>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::rime::proto::Context> RimeIpcResponse::Builder::disownContext() {
  return ::capnp::_::PointerHelpers< ::rime::proto::Context>::disown(_builder.getPointerField(
      ::capnp::bounded<1>() * ::capnp::POINTERS));
}

inline bool RimeIpcResponse::Reader::hasStatus() const {
  return !_reader.getPointerField(
      ::capnp::bounded<2>() * ::capnp::POINTERS).isNull();
}
inline bool RimeIpcResponse::Builder::hasStatus() {
  return !_builder.getPointerField(
      ::capnp::bounded<2>() * ::capnp::POINTERS).isNull();
}
inline  ::rime::proto::Status::Reader RimeIpcResponse::Reader::getStatus() const {
  return ::capnp::_::PointerHelpers< ::rime::proto::Status>::get(_reader.getPointerField(
      ::capnp::bounded<2>() * ::capnp::POINTERS));
}
inline  ::rime::proto::Status::Builder RimeIpcResponse::Builder::getStatus() {
  return ::capnp::_::PointerHelpers< ::rime::proto::Status>::get(_builder.getPointerField(
      ::capnp::bounded<2>() * ::capnp::POINTERS));
}
#if !CAPNP_LITE
inline  ::rime::proto::Status::Pipeline RimeIpcResponse::Pipeline::getStatus() {
  return  ::rime::proto::Status::Pipeline(_typeless.getPointerField(2));
}
#endif  // !CAPNP_LITE
inline void RimeIpcResponse::Builder::setStatus( ::rime::proto::Status::Reader value) {
  ::capnp::_::PointerHelpers< ::rime::proto::Status>::set(_builder.getPointerField(
      ::capnp::bounded<2>() * ::capnp::POINTERS), value);
}
inline  ::rime::proto::Status::Builder RimeIpcResponse::Builder::initStatus() {
  return ::capnp::_::PointerHelpers< ::rime::proto::Status>::init(_builder.getPointerField(
      ::capnp::bounded<2>() * ::capnp::POINTERS));
}
inline void RimeIpcResponse::Builder::adoptStatus(
    ::capnp::Orphan< ::rime::proto::Status>&& value) {
  ::capnp::_::PointerHelpers< ::rime::proto::Status>::adopt(_builder.getPointerField(
      ::capnp::bounded<2>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::rime::proto::Status> RimeIpcResponse::Builder::disownStatus() {
  return ::capnp::_::PointerHelpers< ::rime::proto::Status>::disown(_builder.getPointerField(
      ::capnp::bounded<2>() * ::capnp::POINTERS));
}


CAPNP_END_HEADER

