#[allow(non_camel_case_types)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
#[repr(i32)]
pub enum MessageKind {
LIFECYCLE = 0i32,
APPLICATION = 1i32,
}
impl MessageKind {
#[allow(non_upper_case_globals)]
pub const Lifecycle: Self = Self::LIFECYCLE;
#[allow(non_upper_case_globals)]
pub const Application: Self = Self::APPLICATION;
}
impl ::core::default::Default for MessageKind {
fn default() -> Self {
Self::LIFECYCLE
}
}
impl ::buffa::Enumeration for MessageKind {
fn from_i32(value: i32) -> ::core::option::Option<Self> {
match value {
0i32 => ::core::option::Option::Some(Self::LIFECYCLE),
1i32 => ::core::option::Option::Some(Self::APPLICATION),
_ => ::core::option::Option::None,
}
}
fn to_i32(&self) -> i32 {
*self as i32
}
fn proto_name(&self) -> &'static str {
match self {
Self::LIFECYCLE => "LIFECYCLE",
Self::APPLICATION => "APPLICATION",
}
}
fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
match name {
"LIFECYCLE" => ::core::option::Option::Some(Self::LIFECYCLE),
"APPLICATION" => ::core::option::Option::Some(Self::APPLICATION),
_ => ::core::option::Option::None,
}
}
fn values() -> &'static [Self] {
&[Self::LIFECYCLE, Self::APPLICATION]
}
}
#[derive(Clone, PartialEq, Default)]
pub struct Hello {
pub minimum: u32,
pub maximum: u32,
pub supported: u64,
pub required: u64,
pub max_frame: u32,
pub application: ::buffa::alloc::string::String,
pub profile: ::buffa::alloc::string::String,
pub instance: ::buffa::alloc::string::String,
pub service_id: ::buffa::alloc::vec::Vec<u8>,
#[doc(hidden)]
pub __buffa_unknown_fields: ::buffa::UnknownFields,
}
impl ::core::fmt::Debug for Hello {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("Hello")
.field("minimum", &self.minimum)
.field("maximum", &self.maximum)
.field("supported", &self.supported)
.field("required", &self.required)
.field("max_frame", &self.max_frame)
.field("application", &self.application)
.field("profile", &self.profile)
.field("instance", &self.instance)
.field("service_id", &self.service_id)
.finish()
}
}
impl Hello {
pub const TYPE_URL: &'static str = "type.googleapis.com/kunobi.daemon.v2.Hello";
}
::buffa::impl_default_instance!(Hello);
impl ::buffa::MessageName for Hello {
const PACKAGE: &'static str = "kunobi.daemon.v2";
const NAME: &'static str = "Hello";
const FULL_NAME: &'static str = "kunobi.daemon.v2.Hello";
const TYPE_URL: &'static str = "type.googleapis.com/kunobi.daemon.v2.Hello";
}
impl ::buffa::Message for Hello {
#[allow(clippy::let_and_return)]
fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
let mut size = 0u64;
if self.minimum != 0u32 {
size += 1u64 + ::buffa::types::uint32_encoded_len(self.minimum) as u64;
}
if self.maximum != 0u32 {
size += 1u64 + ::buffa::types::uint32_encoded_len(self.maximum) as u64;
}
if self.supported != 0u64 {
size += 1u64 + ::buffa::types::uint64_encoded_len(self.supported) as u64;
}
if self.required != 0u64 {
size += 1u64 + ::buffa::types::uint64_encoded_len(self.required) as u64;
}
if self.max_frame != 0u32 {
size += 1u64 + ::buffa::types::uint32_encoded_len(self.max_frame) as u64;
}
if !self.application.is_empty() {
size += 1u64 + ::buffa::types::string_encoded_len(&self.application) as u64;
}
if !self.profile.is_empty() {
size += 1u64 + ::buffa::types::string_encoded_len(&self.profile) as u64;
}
if !self.instance.is_empty() {
size += 1u64 + ::buffa::types::string_encoded_len(&self.instance) as u64;
}
if !self.service_id.is_empty() {
size += 1u64 + ::buffa::types::bytes_encoded_len(&self.service_id) as u64;
}
size += self.__buffa_unknown_fields.encoded_len() as u64;
::buffa::saturate_size(size)
}
fn write_to(
&self,
_cache: &mut ::buffa::SizeCache,
buf: &mut impl ::buffa::EncodeSink,
) {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
if self.minimum != 0u32 {
::buffa::types::put_uint32_field(1u32, self.minimum, buf);
}
if self.maximum != 0u32 {
::buffa::types::put_uint32_field(2u32, self.maximum, buf);
}
if self.supported != 0u64 {
::buffa::types::put_uint64_field(3u32, self.supported, buf);
}
if self.required != 0u64 {
::buffa::types::put_uint64_field(4u32, self.required, buf);
}
if self.max_frame != 0u32 {
::buffa::types::put_uint32_field(5u32, self.max_frame, buf);
}
if !self.application.is_empty() {
::buffa::types::put_string_field(6u32, &self.application, buf);
}
if !self.profile.is_empty() {
::buffa::types::put_string_field(7u32, &self.profile, buf);
}
if !self.instance.is_empty() {
::buffa::types::put_string_field(8u32, &self.instance, buf);
}
if !self.service_id.is_empty() {
::buffa::types::put_shared_bytes_field(9u32, &self.service_id, buf);
}
self.__buffa_unknown_fields.write_to(buf);
}
fn merge_field(
&mut self,
tag: ::buffa::encoding::Tag,
buf: &mut impl ::buffa::bytes::Buf,
ctx: ::buffa::DecodeContext<'_>,
) -> ::core::result::Result<(), ::buffa::DecodeError> {
#[allow(unused_imports)]
use ::buffa::bytes::Buf as _;
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
match tag.field_number() {
1u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.minimum = ::buffa::types::decode_uint32(buf)?;
}
2u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.maximum = ::buffa::types::decode_uint32(buf)?;
}
3u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.supported = ::buffa::types::decode_uint64(buf)?;
}
4u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.required = ::buffa::types::decode_uint64(buf)?;
}
5u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.max_frame = ::buffa::types::decode_uint32(buf)?;
}
6u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
::buffa::types::merge_string(&mut self.application, buf)?;
}
7u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
::buffa::types::merge_string(&mut self.profile, buf)?;
}
8u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
::buffa::types::merge_string(&mut self.instance, buf)?;
}
9u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
::buffa::types::merge_bytes(&mut self.service_id, buf)?;
}
_ => {
self.__buffa_unknown_fields
.push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
}
}
::core::result::Result::Ok(())
}
fn clear(&mut self) {
self.minimum = 0u32;
self.maximum = 0u32;
self.supported = 0u64;
self.required = 0u64;
self.max_frame = 0u32;
self.application.clear();
self.profile.clear();
self.instance.clear();
self.service_id.clear();
self.__buffa_unknown_fields.clear();
}
}
impl ::buffa::ExtensionSet for Hello {
const PROTO_FQN: &'static str = "kunobi.daemon.v2.Hello";
fn unknown_fields(&self) -> &::buffa::UnknownFields {
&self.__buffa_unknown_fields
}
fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
&mut self.__buffa_unknown_fields
}
}
#[derive(Clone, PartialEq, Default)]
pub struct Control {
pub operation: u32,
pub request_id: u64,
pub generation: u64,
pub token: ::buffa::alloc::vec::Vec<u8>,
pub offset: ::core::option::Option<u64>,
pub payload: ::buffa::alloc::vec::Vec<u8>,
pub kind: ::buffa::EnumValue<MessageKind>,
#[doc(hidden)]
pub __buffa_unknown_fields: ::buffa::UnknownFields,
}
impl ::core::fmt::Debug for Control {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("Control")
.field("operation", &self.operation)
.field("request_id", &self.request_id)
.field("generation", &self.generation)
.field("token", &self.token)
.field("offset", &self.offset)
.field("payload", &self.payload)
.field("kind", &self.kind)
.finish()
}
}
impl Control {
pub const TYPE_URL: &'static str = "type.googleapis.com/kunobi.daemon.v2.Control";
}
impl Control {
#[must_use = "with_* setters return `self` by value; assign or chain the result"]
#[inline]
pub fn with_offset(mut self, value: u64) -> Self {
self.offset = Some(value);
self
}
}
::buffa::impl_default_instance!(Control);
impl ::buffa::MessageName for Control {
const PACKAGE: &'static str = "kunobi.daemon.v2";
const NAME: &'static str = "Control";
const FULL_NAME: &'static str = "kunobi.daemon.v2.Control";
const TYPE_URL: &'static str = "type.googleapis.com/kunobi.daemon.v2.Control";
}
impl ::buffa::Message for Control {
#[allow(clippy::let_and_return)]
fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
let mut size = 0u64;
if self.operation != 0u32 {
size += 1u64 + ::buffa::types::uint32_encoded_len(self.operation) as u64;
}
if self.request_id != 0u64 {
size += 1u64 + ::buffa::types::uint64_encoded_len(self.request_id) as u64;
}
if self.generation != 0u64 {
size += 1u64 + ::buffa::types::uint64_encoded_len(self.generation) as u64;
}
if !self.token.is_empty() {
size += 1u64 + ::buffa::types::bytes_encoded_len(&self.token) as u64;
}
if let Some(v) = self.offset {
size += 1u64 + ::buffa::types::uint64_encoded_len(v) as u64;
}
if !self.payload.is_empty() {
size += 1u64 + ::buffa::types::bytes_encoded_len(&self.payload) as u64;
}
{
let val = self.kind.to_i32();
if val != 0 {
size += 1u64 + ::buffa::types::int32_encoded_len(val) as u64;
}
}
size += self.__buffa_unknown_fields.encoded_len() as u64;
::buffa::saturate_size(size)
}
fn write_to(
&self,
_cache: &mut ::buffa::SizeCache,
buf: &mut impl ::buffa::EncodeSink,
) {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
if self.operation != 0u32 {
::buffa::types::put_uint32_field(1u32, self.operation, buf);
}
if self.request_id != 0u64 {
::buffa::types::put_uint64_field(2u32, self.request_id, buf);
}
if self.generation != 0u64 {
::buffa::types::put_uint64_field(3u32, self.generation, buf);
}
if !self.token.is_empty() {
::buffa::types::put_shared_bytes_field(4u32, &self.token, buf);
}
if let Some(v) = self.offset {
::buffa::types::put_uint64_field(5u32, v, buf);
}
if !self.payload.is_empty() {
::buffa::types::put_shared_bytes_field(6u32, &self.payload, buf);
}
{
let val = self.kind.to_i32();
if val != 0 {
::buffa::types::put_int32_field(7u32, val, buf);
}
}
self.__buffa_unknown_fields.write_to(buf);
}
fn merge_field(
&mut self,
tag: ::buffa::encoding::Tag,
buf: &mut impl ::buffa::bytes::Buf,
ctx: ::buffa::DecodeContext<'_>,
) -> ::core::result::Result<(), ::buffa::DecodeError> {
#[allow(unused_imports)]
use ::buffa::bytes::Buf as _;
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
match tag.field_number() {
1u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.operation = ::buffa::types::decode_uint32(buf)?;
}
2u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.request_id = ::buffa::types::decode_uint64(buf)?;
}
3u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.generation = ::buffa::types::decode_uint64(buf)?;
}
4u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
::buffa::types::merge_bytes(&mut self.token, buf)?;
}
5u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.offset = ::core::option::Option::Some(
::buffa::types::decode_uint64(buf)?,
);
}
6u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
::buffa::types::merge_bytes(&mut self.payload, buf)?;
}
7u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.kind = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
}
_ => {
self.__buffa_unknown_fields
.push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
}
}
::core::result::Result::Ok(())
}
fn clear(&mut self) {
self.operation = 0u32;
self.request_id = 0u64;
self.generation = 0u64;
self.token.clear();
self.offset = ::core::option::Option::None;
self.payload.clear();
self.kind = ::buffa::EnumValue::from(0);
self.__buffa_unknown_fields.clear();
}
}
impl ::buffa::ExtensionSet for Control {
const PROTO_FQN: &'static str = "kunobi.daemon.v2.Control";
fn unknown_fields(&self) -> &::buffa::UnknownFields {
&self.__buffa_unknown_fields
}
fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
&mut self.__buffa_unknown_fields
}
}
#[derive(Clone, PartialEq, Default)]
pub struct Health {
pub process_id: u32,
pub generation: u64,
pub build: ::buffa::alloc::string::String,
pub revision: u64,
pub ready: bool,
pub draining: bool,
pub active: u64,
#[doc(hidden)]
pub __buffa_unknown_fields: ::buffa::UnknownFields,
}
impl ::core::fmt::Debug for Health {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("Health")
.field("process_id", &self.process_id)
.field("generation", &self.generation)
.field("build", &self.build)
.field("revision", &self.revision)
.field("ready", &self.ready)
.field("draining", &self.draining)
.field("active", &self.active)
.finish()
}
}
impl Health {
pub const TYPE_URL: &'static str = "type.googleapis.com/kunobi.daemon.v2.Health";
}
::buffa::impl_default_instance!(Health);
impl ::buffa::MessageName for Health {
const PACKAGE: &'static str = "kunobi.daemon.v2";
const NAME: &'static str = "Health";
const FULL_NAME: &'static str = "kunobi.daemon.v2.Health";
const TYPE_URL: &'static str = "type.googleapis.com/kunobi.daemon.v2.Health";
}
impl ::buffa::Message for Health {
#[allow(clippy::let_and_return)]
fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
let mut size = 0u64;
if self.process_id != 0u32 {
size += 1u64 + ::buffa::types::uint32_encoded_len(self.process_id) as u64;
}
if self.generation != 0u64 {
size += 1u64 + ::buffa::types::uint64_encoded_len(self.generation) as u64;
}
if !self.build.is_empty() {
size += 1u64 + ::buffa::types::string_encoded_len(&self.build) as u64;
}
if self.revision != 0u64 {
size += 1u64 + ::buffa::types::uint64_encoded_len(self.revision) as u64;
}
if self.ready {
size += 1u64 + ::buffa::types::BOOL_ENCODED_LEN as u64;
}
if self.draining {
size += 1u64 + ::buffa::types::BOOL_ENCODED_LEN as u64;
}
if self.active != 0u64 {
size += 1u64 + ::buffa::types::uint64_encoded_len(self.active) as u64;
}
size += self.__buffa_unknown_fields.encoded_len() as u64;
::buffa::saturate_size(size)
}
fn write_to(
&self,
_cache: &mut ::buffa::SizeCache,
buf: &mut impl ::buffa::EncodeSink,
) {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
if self.process_id != 0u32 {
::buffa::types::put_uint32_field(1u32, self.process_id, buf);
}
if self.generation != 0u64 {
::buffa::types::put_uint64_field(2u32, self.generation, buf);
}
if !self.build.is_empty() {
::buffa::types::put_string_field(3u32, &self.build, buf);
}
if self.revision != 0u64 {
::buffa::types::put_uint64_field(4u32, self.revision, buf);
}
if self.ready {
::buffa::types::put_bool_field(5u32, self.ready, buf);
}
if self.draining {
::buffa::types::put_bool_field(6u32, self.draining, buf);
}
if self.active != 0u64 {
::buffa::types::put_uint64_field(7u32, self.active, buf);
}
self.__buffa_unknown_fields.write_to(buf);
}
fn merge_field(
&mut self,
tag: ::buffa::encoding::Tag,
buf: &mut impl ::buffa::bytes::Buf,
ctx: ::buffa::DecodeContext<'_>,
) -> ::core::result::Result<(), ::buffa::DecodeError> {
#[allow(unused_imports)]
use ::buffa::bytes::Buf as _;
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
match tag.field_number() {
1u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.process_id = ::buffa::types::decode_uint32(buf)?;
}
2u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.generation = ::buffa::types::decode_uint64(buf)?;
}
3u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
::buffa::types::merge_string(&mut self.build, buf)?;
}
4u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.revision = ::buffa::types::decode_uint64(buf)?;
}
5u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.ready = ::buffa::types::decode_bool(buf)?;
}
6u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.draining = ::buffa::types::decode_bool(buf)?;
}
7u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.active = ::buffa::types::decode_uint64(buf)?;
}
_ => {
self.__buffa_unknown_fields
.push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
}
}
::core::result::Result::Ok(())
}
fn clear(&mut self) {
self.process_id = 0u32;
self.generation = 0u64;
self.build.clear();
self.revision = 0u64;
self.ready = false;
self.draining = false;
self.active = 0u64;
self.__buffa_unknown_fields.clear();
}
}
impl ::buffa::ExtensionSet for Health {
const PROTO_FQN: &'static str = "kunobi.daemon.v2.Health";
fn unknown_fields(&self) -> &::buffa::UnknownFields {
&self.__buffa_unknown_fields
}
fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
&mut self.__buffa_unknown_fields
}
}