// This file is generated by rust-protobuf 3.3.0. Do not edit
// .proto file is parsed by protoc --rust-out=...
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]

#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]

//! Generated file from `sp_kv.proto`

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_3_0;

///  KVObject represents a single KV object used in protos.KVInstruction; this is
///  constructed by server and broadcast out to other server nodes.
// @@protoc_insertion_point(message:protos.KVObject)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct KVObject {
    // message fields
    ///  Valid key regex: /^[a-zA-Z0-9_-:]+$/)
    // @@protoc_insertion_point(field:protos.KVObject.key)
    pub key: ::std::string::String,
    ///  KV value
    // @@protoc_insertion_point(field:protos.KVObject.value)
    pub value: ::std::vec::Vec<u8>,
    ///  When was this object created
    // @@protoc_insertion_point(field:protos.KVObject.created_at_unix_ts_nano_utc)
    pub created_at_unix_ts_nano_utc: i64,
    ///  Last time the object was updated
    // @@protoc_insertion_point(field:protos.KVObject.updated_at_unix_ts_nano_utc)
    pub updated_at_unix_ts_nano_utc: i64,
    // special fields
    // @@protoc_insertion_point(special_field:protos.KVObject.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a KVObject {
    fn default() -> &'a KVObject {
        <KVObject as ::protobuf::Message>::default_instance()
    }
}

impl KVObject {
    pub fn new() -> KVObject {
        ::std::default::Default::default()
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(4);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "key",
            |m: &KVObject| { &m.key },
            |m: &mut KVObject| { &mut m.key },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "value",
            |m: &KVObject| { &m.value },
            |m: &mut KVObject| { &mut m.value },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "created_at_unix_ts_nano_utc",
            |m: &KVObject| { &m.created_at_unix_ts_nano_utc },
            |m: &mut KVObject| { &mut m.created_at_unix_ts_nano_utc },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "updated_at_unix_ts_nano_utc",
            |m: &KVObject| { &m.updated_at_unix_ts_nano_utc },
            |m: &mut KVObject| { &mut m.updated_at_unix_ts_nano_utc },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<KVObject>(
            "KVObject",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for KVObject {
    const NAME: &'static str = "KVObject";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self.key = is.read_string()?;
                },
                18 => {
                    self.value = is.read_bytes()?;
                },
                24 => {
                    self.created_at_unix_ts_nano_utc = is.read_int64()?;
                },
                32 => {
                    self.updated_at_unix_ts_nano_utc = is.read_int64()?;
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if !self.key.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.key);
        }
        if !self.value.is_empty() {
            my_size += ::protobuf::rt::bytes_size(2, &self.value);
        }
        if self.created_at_unix_ts_nano_utc != 0 {
            my_size += ::protobuf::rt::int64_size(3, self.created_at_unix_ts_nano_utc);
        }
        if self.updated_at_unix_ts_nano_utc != 0 {
            my_size += ::protobuf::rt::int64_size(4, self.updated_at_unix_ts_nano_utc);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if !self.key.is_empty() {
            os.write_string(1, &self.key)?;
        }
        if !self.value.is_empty() {
            os.write_bytes(2, &self.value)?;
        }
        if self.created_at_unix_ts_nano_utc != 0 {
            os.write_int64(3, self.created_at_unix_ts_nano_utc)?;
        }
        if self.updated_at_unix_ts_nano_utc != 0 {
            os.write_int64(4, self.updated_at_unix_ts_nano_utc)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> KVObject {
        KVObject::new()
    }

    fn clear(&mut self) {
        self.key.clear();
        self.value.clear();
        self.created_at_unix_ts_nano_utc = 0;
        self.updated_at_unix_ts_nano_utc = 0;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static KVObject {
        static instance: KVObject = KVObject {
            key: ::std::string::String::new(),
            value: ::std::vec::Vec::new(),
            created_at_unix_ts_nano_utc: 0,
            updated_at_unix_ts_nano_utc: 0,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for KVObject {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("KVObject").unwrap()).clone()
    }
}

impl ::std::fmt::Display for KVObject {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for KVObject {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

///  Container for one or more KVObject's; server broadcasts KVCommand that
///  contains one or more of these instructions when a "POST /api/v1/kv" request
///  is made.
// @@protoc_insertion_point(message:protos.KVInstruction)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct KVInstruction {
    // message fields
    ///  Unique ID for this instruction
    // @@protoc_insertion_point(field:protos.KVInstruction.id)
    pub id: ::std::string::String,
    ///  What kind of an action is this?
    // @@protoc_insertion_point(field:protos.KVInstruction.action)
    pub action: ::protobuf::EnumOrUnknown<super::sp_shared::KVAction>,
    ///  KV object
    // @@protoc_insertion_point(field:protos.KVInstruction.object)
    pub object: ::protobuf::MessageField<KVObject>,
    ///  When this instruction was requested (usually will be the HTTP API request time)
    // @@protoc_insertion_point(field:protos.KVInstruction.requested_at_unix_ts_nano_utc)
    pub requested_at_unix_ts_nano_utc: i64,
    // special fields
    // @@protoc_insertion_point(special_field:protos.KVInstruction.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a KVInstruction {
    fn default() -> &'a KVInstruction {
        <KVInstruction as ::protobuf::Message>::default_instance()
    }
}

impl KVInstruction {
    pub fn new() -> KVInstruction {
        ::std::default::Default::default()
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(4);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "id",
            |m: &KVInstruction| { &m.id },
            |m: &mut KVInstruction| { &mut m.id },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "action",
            |m: &KVInstruction| { &m.action },
            |m: &mut KVInstruction| { &mut m.action },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, KVObject>(
            "object",
            |m: &KVInstruction| { &m.object },
            |m: &mut KVInstruction| { &mut m.object },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "requested_at_unix_ts_nano_utc",
            |m: &KVInstruction| { &m.requested_at_unix_ts_nano_utc },
            |m: &mut KVInstruction| { &mut m.requested_at_unix_ts_nano_utc },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<KVInstruction>(
            "KVInstruction",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for KVInstruction {
    const NAME: &'static str = "KVInstruction";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self.id = is.read_string()?;
                },
                16 => {
                    self.action = is.read_enum_or_unknown()?;
                },
                26 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.object)?;
                },
                32 => {
                    self.requested_at_unix_ts_nano_utc = is.read_int64()?;
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if !self.id.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.id);
        }
        if self.action != ::protobuf::EnumOrUnknown::new(super::sp_shared::KVAction::KV_ACTION_UNSET) {
            my_size += ::protobuf::rt::int32_size(2, self.action.value());
        }
        if let Some(v) = self.object.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if self.requested_at_unix_ts_nano_utc != 0 {
            my_size += ::protobuf::rt::int64_size(4, self.requested_at_unix_ts_nano_utc);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if !self.id.is_empty() {
            os.write_string(1, &self.id)?;
        }
        if self.action != ::protobuf::EnumOrUnknown::new(super::sp_shared::KVAction::KV_ACTION_UNSET) {
            os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.action))?;
        }
        if let Some(v) = self.object.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
        }
        if self.requested_at_unix_ts_nano_utc != 0 {
            os.write_int64(4, self.requested_at_unix_ts_nano_utc)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> KVInstruction {
        KVInstruction::new()
    }

    fn clear(&mut self) {
        self.id.clear();
        self.action = ::protobuf::EnumOrUnknown::new(super::sp_shared::KVAction::KV_ACTION_UNSET);
        self.object.clear();
        self.requested_at_unix_ts_nano_utc = 0;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static KVInstruction {
        static instance: KVInstruction = KVInstruction {
            id: ::std::string::String::new(),
            action: ::protobuf::EnumOrUnknown::from_i32(0),
            object: ::protobuf::MessageField::none(),
            requested_at_unix_ts_nano_utc: 0,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for KVInstruction {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("KVInstruction").unwrap()).clone()
    }
}

impl ::std::fmt::Display for KVInstruction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for KVInstruction {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

///  Used for broadcasting KV instructions to other server nodes.
///  NOTE: While this data structure is similar to KVCommand it makes sense to
///  keep them separate. It would cause more confusion if we tried to re-use
///  KVCommand for the purpose of broadcasting AND for sending SDK commands. ~DS
///
///  This request structure is used for including all updates - create/update/delete.
// @@protoc_insertion_point(message:protos.KVRequest)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct KVRequest {
    // message fields
    // @@protoc_insertion_point(field:protos.KVRequest.instructions)
    pub instructions: ::std::vec::Vec<KVInstruction>,
    // @@protoc_insertion_point(field:protos.KVRequest.overwrite)
    pub overwrite: bool,
    // special fields
    // @@protoc_insertion_point(special_field:protos.KVRequest.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a KVRequest {
    fn default() -> &'a KVRequest {
        <KVRequest as ::protobuf::Message>::default_instance()
    }
}

impl KVRequest {
    pub fn new() -> KVRequest {
        ::std::default::Default::default()
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(2);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "instructions",
            |m: &KVRequest| { &m.instructions },
            |m: &mut KVRequest| { &mut m.instructions },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "overwrite",
            |m: &KVRequest| { &m.overwrite },
            |m: &mut KVRequest| { &mut m.overwrite },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<KVRequest>(
            "KVRequest",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for KVRequest {
    const NAME: &'static str = "KVRequest";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self.instructions.push(is.read_message()?);
                },
                16 => {
                    self.overwrite = is.read_bool()?;
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        for value in &self.instructions {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        if self.overwrite != false {
            my_size += 1 + 1;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        for v in &self.instructions {
            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
        };
        if self.overwrite != false {
            os.write_bool(2, self.overwrite)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> KVRequest {
        KVRequest::new()
    }

    fn clear(&mut self) {
        self.instructions.clear();
        self.overwrite = false;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static KVRequest {
        static instance: KVRequest = KVRequest {
            instructions: ::std::vec::Vec::new(),
            overwrite: false,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for KVRequest {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("KVRequest").unwrap()).clone()
    }
}

impl ::std::fmt::Display for KVRequest {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for KVRequest {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

///  "POST /api/v1/kv" accepts JSON of this type for it's request payload. This is
///  converted by BroadcastKV() to a KVCommand
// @@protoc_insertion_point(message:protos.KVCreateHTTPRequest)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct KVCreateHTTPRequest {
    // message fields
    // @@protoc_insertion_point(field:protos.KVCreateHTTPRequest.kvs)
    pub kvs: ::std::vec::Vec<KVObject>,
    ///  Whether to treat create as upsert -- ie. do not error if key already exists
    // @@protoc_insertion_point(field:protos.KVCreateHTTPRequest.overwrite)
    pub overwrite: bool,
    // special fields
    // @@protoc_insertion_point(special_field:protos.KVCreateHTTPRequest.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a KVCreateHTTPRequest {
    fn default() -> &'a KVCreateHTTPRequest {
        <KVCreateHTTPRequest as ::protobuf::Message>::default_instance()
    }
}

impl KVCreateHTTPRequest {
    pub fn new() -> KVCreateHTTPRequest {
        ::std::default::Default::default()
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(2);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "kvs",
            |m: &KVCreateHTTPRequest| { &m.kvs },
            |m: &mut KVCreateHTTPRequest| { &mut m.kvs },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "overwrite",
            |m: &KVCreateHTTPRequest| { &m.overwrite },
            |m: &mut KVCreateHTTPRequest| { &mut m.overwrite },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<KVCreateHTTPRequest>(
            "KVCreateHTTPRequest",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for KVCreateHTTPRequest {
    const NAME: &'static str = "KVCreateHTTPRequest";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self.kvs.push(is.read_message()?);
                },
                16 => {
                    self.overwrite = is.read_bool()?;
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        for value in &self.kvs {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        if self.overwrite != false {
            my_size += 1 + 1;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        for v in &self.kvs {
            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
        };
        if self.overwrite != false {
            os.write_bool(2, self.overwrite)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> KVCreateHTTPRequest {
        KVCreateHTTPRequest::new()
    }

    fn clear(&mut self) {
        self.kvs.clear();
        self.overwrite = false;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static KVCreateHTTPRequest {
        static instance: KVCreateHTTPRequest = KVCreateHTTPRequest {
            kvs: ::std::vec::Vec::new(),
            overwrite: false,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for KVCreateHTTPRequest {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("KVCreateHTTPRequest").unwrap()).clone()
    }
}

impl ::std::fmt::Display for KVCreateHTTPRequest {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for KVCreateHTTPRequest {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:protos.KVUpdateHTTPRequest)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct KVUpdateHTTPRequest {
    // message fields
    // @@protoc_insertion_point(field:protos.KVUpdateHTTPRequest.kvs)
    pub kvs: ::std::vec::Vec<KVObject>,
    // special fields
    // @@protoc_insertion_point(special_field:protos.KVUpdateHTTPRequest.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a KVUpdateHTTPRequest {
    fn default() -> &'a KVUpdateHTTPRequest {
        <KVUpdateHTTPRequest as ::protobuf::Message>::default_instance()
    }
}

impl KVUpdateHTTPRequest {
    pub fn new() -> KVUpdateHTTPRequest {
        ::std::default::Default::default()
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(1);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "kvs",
            |m: &KVUpdateHTTPRequest| { &m.kvs },
            |m: &mut KVUpdateHTTPRequest| { &mut m.kvs },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<KVUpdateHTTPRequest>(
            "KVUpdateHTTPRequest",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for KVUpdateHTTPRequest {
    const NAME: &'static str = "KVUpdateHTTPRequest";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self.kvs.push(is.read_message()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        for value in &self.kvs {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        for v in &self.kvs {
            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
        };
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> KVUpdateHTTPRequest {
        KVUpdateHTTPRequest::new()
    }

    fn clear(&mut self) {
        self.kvs.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static KVUpdateHTTPRequest {
        static instance: KVUpdateHTTPRequest = KVUpdateHTTPRequest {
            kvs: ::std::vec::Vec::new(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for KVUpdateHTTPRequest {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("KVUpdateHTTPRequest").unwrap()).clone()
    }
}

impl ::std::fmt::Display for KVUpdateHTTPRequest {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for KVUpdateHTTPRequest {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x0bsp_kv.proto\x12\x06protos\x1a\x16shared/sp_shared.proto\"\xac\x01\
    \n\x08KVObject\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05\
    value\x18\x02\x20\x01(\x0cR\x05value\x12;\n\x1bcreated_at_unix_ts_nano_u\
    tc\x18\x03\x20\x01(\x03R\x16createdAtUnixTsNanoUtc\x12;\n\x1bupdated_at_\
    unix_ts_nano_utc\x18\x04\x20\x01(\x03R\x16updatedAtUnixTsNanoUtc\"\xbb\
    \x01\n\rKVInstruction\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12/\n\
    \x06action\x18\x02\x20\x01(\x0e2\x17.protos.shared.KVActionR\x06action\
    \x12(\n\x06object\x18\x03\x20\x01(\x0b2\x10.protos.KVObjectR\x06object\
    \x12?\n\x1drequested_at_unix_ts_nano_utc\x18\x04\x20\x01(\x03R\x18reques\
    tedAtUnixTsNanoUtc\"d\n\tKVRequest\x129\n\x0cinstructions\x18\x01\x20\
    \x03(\x0b2\x15.protos.KVInstructionR\x0cinstructions\x12\x1c\n\toverwrit\
    e\x18\x02\x20\x01(\x08R\toverwrite\"W\n\x13KVCreateHTTPRequest\x12\"\n\
    \x03kvs\x18\x01\x20\x03(\x0b2\x10.protos.KVObjectR\x03kvs\x12\x1c\n\tove\
    rwrite\x18\x02\x20\x01(\x08R\toverwrite\"9\n\x13KVUpdateHTTPRequest\x12\
    \"\n\x03kvs\x18\x01\x20\x03(\x0b2\x10.protos.KVObjectR\x03kvsB-Z+github.\
    com/streamdal/protos/build/go/protosJ\x8e\x11\n\x06\x12\x04\0\0A\x01\n\
    \x08\n\x01\x0c\x12\x03\0\0\x12\n\x08\n\x01\x02\x12\x03\x02\0\x0f\n\t\n\
    \x02\x03\0\x12\x03\x04\0\x20\n\x08\n\x01\x08\x12\x03\x06\0B\n\t\n\x02\
    \x08\x0b\x12\x03\x06\0B\n\x9b\x01\n\x02\x04\0\x12\x04\n\0\x16\x01\x1a\
    \x8e\x01\x20KVObject\x20represents\x20a\x20single\x20KV\x20object\x20use\
    d\x20in\x20protos.KVInstruction;\x20this\x20is\n\x20constructed\x20by\
    \x20server\x20and\x20broadcast\x20out\x20to\x20other\x20server\x20nodes.\
    \n\n\n\n\x03\x04\0\x01\x12\x03\n\x08\x10\n4\n\x04\x04\0\x02\0\x12\x03\
    \x0c\x02\x11\x1a'\x20Valid\x20key\x20regex:\x20/^[a-zA-Z0-9_-:]+$/)\n\n\
    \x0c\n\x05\x04\0\x02\0\x05\x12\x03\x0c\x02\x08\n\x0c\n\x05\x04\0\x02\0\
    \x01\x12\x03\x0c\t\x0c\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x0c\x0f\x10\n\
    \x17\n\x04\x04\0\x02\x01\x12\x03\x0f\x02\x12\x1a\n\x20KV\x20value\n\n\
    \x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x0f\x02\x07\n\x0c\n\x05\x04\0\x02\
    \x01\x01\x12\x03\x0f\x08\r\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x0f\x10\
    \x11\n+\n\x04\x04\0\x02\x02\x12\x03\x12\x02(\x1a\x1e\x20When\x20was\x20t\
    his\x20object\x20created\n\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x12\x02\
    \x07\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x12\x08#\n\x0c\n\x05\x04\0\
    \x02\x02\x03\x12\x03\x12&'\n/\n\x04\x04\0\x02\x03\x12\x03\x15\x02(\x1a\"\
    \x20Last\x20time\x20the\x20object\x20was\x20updated\n\n\x0c\n\x05\x04\0\
    \x02\x03\x05\x12\x03\x15\x02\x07\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\
    \x15\x08#\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x15&'\n\xac\x01\n\x02\
    \x04\x01\x12\x04\x1b\0'\x01\x1a\x9f\x01\x20Container\x20for\x20one\x20or\
    \x20more\x20KVObject's;\x20server\x20broadcasts\x20KVCommand\x20that\n\
    \x20contains\x20one\x20or\x20more\x20of\x20these\x20instructions\x20when\
    \x20a\x20\"POST\x20/api/v1/kv\"\x20request\n\x20is\x20made.\n\n\n\n\x03\
    \x04\x01\x01\x12\x03\x1b\x08\x15\n-\n\x04\x04\x01\x02\0\x12\x03\x1d\x02\
    \x10\x1a\x20\x20Unique\x20ID\x20for\x20this\x20instruction\n\n\x0c\n\x05\
    \x04\x01\x02\0\x05\x12\x03\x1d\x02\x08\n\x0c\n\x05\x04\x01\x02\0\x01\x12\
    \x03\x1d\t\x0b\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x1d\x0e\x0f\n.\n\
    \x04\x04\x01\x02\x01\x12\x03\x20\x02\x1d\x1a!\x20What\x20kind\x20of\x20a\
    n\x20action\x20is\x20this?\n\n\x0c\n\x05\x04\x01\x02\x01\x06\x12\x03\x20\
    \x02\x11\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x20\x12\x18\n\x0c\n\x05\
    \x04\x01\x02\x01\x03\x12\x03\x20\x1b\x1c\n\x18\n\x04\x04\x01\x02\x02\x12\
    \x03#\x02\x16\x1a\x0b\x20KV\x20object\n\n\x0c\n\x05\x04\x01\x02\x02\x06\
    \x12\x03#\x02\n\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03#\x0b\x11\n\x0c\n\
    \x05\x04\x01\x02\x02\x03\x12\x03#\x14\x15\n^\n\x04\x04\x01\x02\x03\x12\
    \x03&\x02*\x1aQ\x20When\x20this\x20instruction\x20was\x20requested\x20(u\
    sually\x20will\x20be\x20the\x20HTTP\x20API\x20request\x20time)\n\n\x0c\n\
    \x05\x04\x01\x02\x03\x05\x12\x03&\x02\x07\n\x0c\n\x05\x04\x01\x02\x03\
    \x01\x12\x03&\x08%\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03&()\n\xff\x02\
    \n\x02\x04\x02\x12\x04/\02\x01\x1a\xf2\x02\x20Used\x20for\x20broadcastin\
    g\x20KV\x20instructions\x20to\x20other\x20server\x20nodes.\n\x20NOTE:\
    \x20While\x20this\x20data\x20structure\x20is\x20similar\x20to\x20KVComma\
    nd\x20it\x20makes\x20sense\x20to\n\x20keep\x20them\x20separate.\x20It\
    \x20would\x20cause\x20more\x20confusion\x20if\x20we\x20tried\x20to\x20re\
    -use\n\x20KVCommand\x20for\x20the\x20purpose\x20of\x20broadcasting\x20AN\
    D\x20for\x20sending\x20SDK\x20commands.\x20~DS\n\n\x20This\x20request\
    \x20structure\x20is\x20used\x20for\x20including\x20all\x20updates\x20-\
    \x20create/update/delete.\n\n\n\n\x03\x04\x02\x01\x12\x03/\x08\x11\n\x0b\
    \n\x04\x04\x02\x02\0\x12\x030\x02*\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03\
    0\x02\n\n\x0c\n\x05\x04\x02\x02\0\x06\x12\x030\x0b\x18\n\x0c\n\x05\x04\
    \x02\x02\0\x01\x12\x030\x19%\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x030()\n\
    \x0b\n\x04\x04\x02\x02\x01\x12\x031\x02\x15\n\x0c\n\x05\x04\x02\x02\x01\
    \x05\x12\x031\x02\x06\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x031\x07\x10\n\
    \x0c\n\x05\x04\x02\x02\x01\x03\x12\x031\x13\x14\n\xd6\x01\n\x02\x04\x03\
    \x12\x048\0=\x01\x1az\x20\"POST\x20/api/v1/kv\"\x20accepts\x20JSON\x20of\
    \x20this\x20type\x20for\x20it's\x20request\x20payload.\x20This\x20is\n\
    \x20converted\x20by\x20BroadcastKV()\x20to\x20a\x20KVCommand\n2N////////\
    ///////////////\x20Data\x20Types\x20Used\x20in\x20APIs\x20//////////////\
    ///////////////\n\n\n\n\x03\x04\x03\x01\x12\x038\x08\x1b\n\x0b\n\x04\x04\
    \x03\x02\0\x12\x039\x02\x1c\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x039\x02\n\
    \n\x0c\n\x05\x04\x03\x02\0\x06\x12\x039\x0b\x13\n\x0c\n\x05\x04\x03\x02\
    \0\x01\x12\x039\x14\x17\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x039\x1a\x1b\n\
    Z\n\x04\x04\x03\x02\x01\x12\x03<\x02\x15\x1aM\x20Whether\x20to\x20treat\
    \x20create\x20as\x20upsert\x20--\x20ie.\x20do\x20not\x20error\x20if\x20k\
    ey\x20already\x20exists\n\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03<\x02\
    \x06\n\x0c\n\x05\x04\x03\x02\x01\x01\x12\x03<\x07\x10\n\x0c\n\x05\x04\
    \x03\x02\x01\x03\x12\x03<\x13\x14\n\n\n\x02\x04\x04\x12\x04?\0A\x01\n\n\
    \n\x03\x04\x04\x01\x12\x03?\x08\x1b\n\x0b\n\x04\x04\x04\x02\0\x12\x03@\
    \x02\x1c\n\x0c\n\x05\x04\x04\x02\0\x04\x12\x03@\x02\n\n\x0c\n\x05\x04\
    \x04\x02\0\x06\x12\x03@\x0b\x13\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03@\
    \x14\x17\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03@\x1a\x1bb\x06proto3\
";

/// `FileDescriptorProto` object which was a source for this generated file
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
    file_descriptor_proto_lazy.get(|| {
        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
    })
}

/// `FileDescriptor` object which allows dynamic access to files
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
    file_descriptor.get(|| {
        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
            let mut deps = ::std::vec::Vec::with_capacity(1);
            deps.push(super::sp_shared::file_descriptor().clone());
            let mut messages = ::std::vec::Vec::with_capacity(5);
            messages.push(KVObject::generated_message_descriptor_data());
            messages.push(KVInstruction::generated_message_descriptor_data());
            messages.push(KVRequest::generated_message_descriptor_data());
            messages.push(KVCreateHTTPRequest::generated_message_descriptor_data());
            messages.push(KVUpdateHTTPRequest::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(0);
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}
