#![allow(unknown_lints)]
#![allow(clippy)]
#![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(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
#[derive(PartialEq,Clone,Default)]
pub struct Agent {
pub org_id: ::std::string::String,
pub public_key: ::std::string::String,
pub active: bool,
pub roles: ::protobuf::RepeatedField<::std::string::String>,
pub metadata: ::protobuf::RepeatedField<KeyValueEntry>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Agent {
fn default() -> &'a Agent {
<Agent as ::protobuf::Message>::default_instance()
}
}
impl Agent {
pub fn new() -> Agent {
::std::default::Default::default()
}
pub fn get_org_id(&self) -> &str {
&self.org_id
}
pub fn clear_org_id(&mut self) {
self.org_id.clear();
}
pub fn set_org_id(&mut self, v: ::std::string::String) {
self.org_id = v;
}
pub fn mut_org_id(&mut self) -> &mut ::std::string::String {
&mut self.org_id
}
pub fn take_org_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.org_id, ::std::string::String::new())
}
pub fn get_public_key(&self) -> &str {
&self.public_key
}
pub fn clear_public_key(&mut self) {
self.public_key.clear();
}
pub fn set_public_key(&mut self, v: ::std::string::String) {
self.public_key = v;
}
pub fn mut_public_key(&mut self) -> &mut ::std::string::String {
&mut self.public_key
}
pub fn take_public_key(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.public_key, ::std::string::String::new())
}
pub fn get_active(&self) -> bool {
self.active
}
pub fn clear_active(&mut self) {
self.active = false;
}
pub fn set_active(&mut self, v: bool) {
self.active = v;
}
pub fn get_roles(&self) -> &[::std::string::String] {
&self.roles
}
pub fn clear_roles(&mut self) {
self.roles.clear();
}
pub fn set_roles(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
self.roles = v;
}
pub fn mut_roles(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
&mut self.roles
}
pub fn take_roles(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
::std::mem::replace(&mut self.roles, ::protobuf::RepeatedField::new())
}
pub fn get_metadata(&self) -> &[KeyValueEntry] {
&self.metadata
}
pub fn clear_metadata(&mut self) {
self.metadata.clear();
}
pub fn set_metadata(&mut self, v: ::protobuf::RepeatedField<KeyValueEntry>) {
self.metadata = v;
}
pub fn mut_metadata(&mut self) -> &mut ::protobuf::RepeatedField<KeyValueEntry> {
&mut self.metadata
}
pub fn take_metadata(&mut self) -> ::protobuf::RepeatedField<KeyValueEntry> {
::std::mem::replace(&mut self.metadata, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for Agent {
fn is_initialized(&self) -> bool {
for v in &self.metadata {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.org_id)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.public_key)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.active = tmp;
},
4 => {
::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.roles)?;
},
5 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.metadata)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.org_id.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.org_id);
}
if !self.public_key.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.public_key);
}
if self.active != false {
my_size += 2;
}
for value in &self.roles {
my_size += ::protobuf::rt::string_size(4, &value);
};
for value in &self.metadata {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if !self.org_id.is_empty() {
os.write_string(1, &self.org_id)?;
}
if !self.public_key.is_empty() {
os.write_string(2, &self.public_key)?;
}
if self.active != false {
os.write_bool(3, self.active)?;
}
for v in &self.roles {
os.write_string(4, &v)?;
};
for v in &self.metadata {
os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Agent {
Agent::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"org_id",
|m: &Agent| { &m.org_id },
|m: &mut Agent| { &mut m.org_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"public_key",
|m: &Agent| { &m.public_key },
|m: &mut Agent| { &mut m.public_key },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"active",
|m: &Agent| { &m.active },
|m: &mut Agent| { &mut m.active },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"roles",
|m: &Agent| { &m.roles },
|m: &mut Agent| { &mut m.roles },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<KeyValueEntry>>(
"metadata",
|m: &Agent| { &m.metadata },
|m: &mut Agent| { &mut m.metadata },
));
::protobuf::reflect::MessageDescriptor::new::<Agent>(
"Agent",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Agent {
static mut instance: ::protobuf::lazy::Lazy<Agent> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Agent,
};
unsafe {
instance.get(Agent::new)
}
}
}
impl ::protobuf::Clear for Agent {
fn clear(&mut self) {
self.org_id.clear();
self.public_key.clear();
self.active = false;
self.roles.clear();
self.metadata.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Agent {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Agent {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct AgentList {
pub agents: ::protobuf::RepeatedField<Agent>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a AgentList {
fn default() -> &'a AgentList {
<AgentList as ::protobuf::Message>::default_instance()
}
}
impl AgentList {
pub fn new() -> AgentList {
::std::default::Default::default()
}
pub fn get_agents(&self) -> &[Agent] {
&self.agents
}
pub fn clear_agents(&mut self) {
self.agents.clear();
}
pub fn set_agents(&mut self, v: ::protobuf::RepeatedField<Agent>) {
self.agents = v;
}
pub fn mut_agents(&mut self) -> &mut ::protobuf::RepeatedField<Agent> {
&mut self.agents
}
pub fn take_agents(&mut self) -> ::protobuf::RepeatedField<Agent> {
::std::mem::replace(&mut self.agents, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for AgentList {
fn is_initialized(&self) -> bool {
for v in &self.agents {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.agents)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.agents {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
for v in &self.agents {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> AgentList {
AgentList::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Agent>>(
"agents",
|m: &AgentList| { &m.agents },
|m: &mut AgentList| { &mut m.agents },
));
::protobuf::reflect::MessageDescriptor::new::<AgentList>(
"AgentList",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static AgentList {
static mut instance: ::protobuf::lazy::Lazy<AgentList> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const AgentList,
};
unsafe {
instance.get(AgentList::new)
}
}
}
impl ::protobuf::Clear for AgentList {
fn clear(&mut self) {
self.agents.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for AgentList {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for AgentList {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct KeyValueEntry {
pub key: ::std::string::String,
pub value: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a KeyValueEntry {
fn default() -> &'a KeyValueEntry {
<KeyValueEntry as ::protobuf::Message>::default_instance()
}
}
impl KeyValueEntry {
pub fn new() -> KeyValueEntry {
::std::default::Default::default()
}
pub fn get_key(&self) -> &str {
&self.key
}
pub fn clear_key(&mut self) {
self.key.clear();
}
pub fn set_key(&mut self, v: ::std::string::String) {
self.key = v;
}
pub fn mut_key(&mut self) -> &mut ::std::string::String {
&mut self.key
}
pub fn take_key(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.key, ::std::string::String::new())
}
pub fn get_value(&self) -> &str {
&self.value
}
pub fn clear_value(&mut self) {
self.value.clear();
}
pub fn set_value(&mut self, v: ::std::string::String) {
self.value = v;
}
pub fn mut_value(&mut self) -> &mut ::std::string::String {
&mut self.value
}
pub fn take_value(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.value, ::std::string::String::new())
}
}
impl ::protobuf::Message for KeyValueEntry {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.key)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
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::string_size(2, &self.value);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if !self.key.is_empty() {
os.write_string(1, &self.key)?;
}
if !self.value.is_empty() {
os.write_string(2, &self.value)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> KeyValueEntry {
KeyValueEntry::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"key",
|m: &KeyValueEntry| { &m.key },
|m: &mut KeyValueEntry| { &mut m.key },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"value",
|m: &KeyValueEntry| { &m.value },
|m: &mut KeyValueEntry| { &mut m.value },
));
::protobuf::reflect::MessageDescriptor::new::<KeyValueEntry>(
"KeyValueEntry",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static KeyValueEntry {
static mut instance: ::protobuf::lazy::Lazy<KeyValueEntry> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const KeyValueEntry,
};
unsafe {
instance.get(KeyValueEntry::new)
}
}
}
impl ::protobuf::Clear for KeyValueEntry {
fn clear(&mut self) {
self.key.clear();
self.value.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for KeyValueEntry {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for KeyValueEntry {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Organization {
pub org_id: ::std::string::String,
pub name: ::std::string::String,
pub address: ::std::string::String,
pub metadata: ::protobuf::RepeatedField<KeyValueEntry>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Organization {
fn default() -> &'a Organization {
<Organization as ::protobuf::Message>::default_instance()
}
}
impl Organization {
pub fn new() -> Organization {
::std::default::Default::default()
}
pub fn get_org_id(&self) -> &str {
&self.org_id
}
pub fn clear_org_id(&mut self) {
self.org_id.clear();
}
pub fn set_org_id(&mut self, v: ::std::string::String) {
self.org_id = v;
}
pub fn mut_org_id(&mut self) -> &mut ::std::string::String {
&mut self.org_id
}
pub fn take_org_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.org_id, ::std::string::String::new())
}
pub fn get_name(&self) -> &str {
&self.name
}
pub fn clear_name(&mut self) {
self.name.clear();
}
pub fn set_name(&mut self, v: ::std::string::String) {
self.name = v;
}
pub fn mut_name(&mut self) -> &mut ::std::string::String {
&mut self.name
}
pub fn take_name(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.name, ::std::string::String::new())
}
pub fn get_address(&self) -> &str {
&self.address
}
pub fn clear_address(&mut self) {
self.address.clear();
}
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = v;
}
pub fn mut_address(&mut self) -> &mut ::std::string::String {
&mut self.address
}
pub fn take_address(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.address, ::std::string::String::new())
}
pub fn get_metadata(&self) -> &[KeyValueEntry] {
&self.metadata
}
pub fn clear_metadata(&mut self) {
self.metadata.clear();
}
pub fn set_metadata(&mut self, v: ::protobuf::RepeatedField<KeyValueEntry>) {
self.metadata = v;
}
pub fn mut_metadata(&mut self) -> &mut ::protobuf::RepeatedField<KeyValueEntry> {
&mut self.metadata
}
pub fn take_metadata(&mut self) -> ::protobuf::RepeatedField<KeyValueEntry> {
::std::mem::replace(&mut self.metadata, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for Organization {
fn is_initialized(&self) -> bool {
for v in &self.metadata {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.org_id)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.address)?;
},
4 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.metadata)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.org_id.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.org_id);
}
if !self.name.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.name);
}
if !self.address.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.address);
}
for value in &self.metadata {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if !self.org_id.is_empty() {
os.write_string(1, &self.org_id)?;
}
if !self.name.is_empty() {
os.write_string(2, &self.name)?;
}
if !self.address.is_empty() {
os.write_string(3, &self.address)?;
}
for v in &self.metadata {
os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Organization {
Organization::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"org_id",
|m: &Organization| { &m.org_id },
|m: &mut Organization| { &mut m.org_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"name",
|m: &Organization| { &m.name },
|m: &mut Organization| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"address",
|m: &Organization| { &m.address },
|m: &mut Organization| { &mut m.address },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<KeyValueEntry>>(
"metadata",
|m: &Organization| { &m.metadata },
|m: &mut Organization| { &mut m.metadata },
));
::protobuf::reflect::MessageDescriptor::new::<Organization>(
"Organization",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Organization {
static mut instance: ::protobuf::lazy::Lazy<Organization> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Organization,
};
unsafe {
instance.get(Organization::new)
}
}
}
impl ::protobuf::Clear for Organization {
fn clear(&mut self) {
self.org_id.clear();
self.name.clear();
self.address.clear();
self.metadata.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Organization {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Organization {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct OrganizationList {
pub organizations: ::protobuf::RepeatedField<Organization>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a OrganizationList {
fn default() -> &'a OrganizationList {
<OrganizationList as ::protobuf::Message>::default_instance()
}
}
impl OrganizationList {
pub fn new() -> OrganizationList {
::std::default::Default::default()
}
pub fn get_organizations(&self) -> &[Organization] {
&self.organizations
}
pub fn clear_organizations(&mut self) {
self.organizations.clear();
}
pub fn set_organizations(&mut self, v: ::protobuf::RepeatedField<Organization>) {
self.organizations = v;
}
pub fn mut_organizations(&mut self) -> &mut ::protobuf::RepeatedField<Organization> {
&mut self.organizations
}
pub fn take_organizations(&mut self) -> ::protobuf::RepeatedField<Organization> {
::std::mem::replace(&mut self.organizations, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for OrganizationList {
fn is_initialized(&self) -> bool {
for v in &self.organizations {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.organizations)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.organizations {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
for v in &self.organizations {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> OrganizationList {
OrganizationList::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Organization>>(
"organizations",
|m: &OrganizationList| { &m.organizations },
|m: &mut OrganizationList| { &mut m.organizations },
));
::protobuf::reflect::MessageDescriptor::new::<OrganizationList>(
"OrganizationList",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static OrganizationList {
static mut instance: ::protobuf::lazy::Lazy<OrganizationList> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const OrganizationList,
};
unsafe {
instance.get(OrganizationList::new)
}
}
}
impl ::protobuf::Clear for OrganizationList {
fn clear(&mut self) {
self.organizations.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for OrganizationList {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for OrganizationList {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x10pike_state.proto\"\x97\x01\n\x05Agent\x12\x15\n\x06org_id\x18\x01\
\x20\x01(\tR\x05orgId\x12\x1d\n\npublic_key\x18\x02\x20\x01(\tR\tpublicK\
ey\x12\x16\n\x06active\x18\x03\x20\x01(\x08R\x06active\x12\x14\n\x05role\
s\x18\x04\x20\x03(\tR\x05roles\x12*\n\x08metadata\x18\x05\x20\x03(\x0b2\
\x0e.KeyValueEntryR\x08metadata\"+\n\tAgentList\x12\x1e\n\x06agents\x18\
\x01\x20\x03(\x0b2\x06.AgentR\x06agents\"7\n\rKeyValueEntry\x12\x10\n\
\x03key\x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\t\
R\x05value\"\x7f\n\x0cOrganization\x12\x15\n\x06org_id\x18\x01\x20\x01(\
\tR\x05orgId\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x18\n\x07\
address\x18\x03\x20\x01(\tR\x07address\x12*\n\x08metadata\x18\x04\x20\
\x03(\x0b2\x0e.KeyValueEntryR\x08metadata\"G\n\x10OrganizationList\x123\
\n\rorganizations\x18\x01\x20\x03(\x0b2\r.OrganizationR\rorganizationsb\
\x06proto3\
";
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
};
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
unsafe {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
}