diff --git a/components/builder-api/Cargo.lock b/components/builder-api/Cargo.lock index 16a326b742..4ec368c214 100644 --- a/components/builder-api/Cargo.lock +++ b/components/builder-api/Cargo.lock @@ -46,6 +46,18 @@ name = "bitflags" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bodyparser" +version = "0.3.0" +source = "git+https://github.com/iron/body-parser.git#6d214973beeb9f886d3c9926dc592d12b18a8749" +dependencies = [ + "iron 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "persistent 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bodyparser" version = "0.3.0" @@ -194,11 +206,13 @@ name = "habitat_depot" version = "0.6.0" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bodyparser 0.3.0 (git+https://github.com/iron/body-parser.git)", "clap 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "habitat_builder_dbcache 0.6.0", "habitat_builder_protocol 0.6.0", "habitat_core 0.6.0", + "habitat_net 0.6.0", "hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", "iron 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -220,6 +234,7 @@ dependencies = [ "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "urlencoded 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "zmq 0.7.0 (git+https://github.com/reset/rust-zmq.git?branch=habitat)", ] [[package]] diff --git a/components/builder-api/src/http/handlers.rs b/components/builder-api/src/http/handlers.rs index 086ea36e06..c52af048fd 100644 --- a/components/builder-api/src/http/handlers.rs +++ b/components/builder-api/src/http/handlers.rs @@ -18,7 +18,7 @@ use iron::headers::{Authorization, Bearer}; use protobuf; use protocol::jobsrv::{Job, JobCreate, JobGet}; use protocol::sessionsrv::{OAuthProvider, Session, SessionCreate, SessionGet}; -use protocol::vault::{Origin, OriginCreate, OriginGet}; +use protocol::vault::*; use protocol::net::{self, NetError, ErrCode}; use router::Router; use rustc_serialize::json::{self, ToJson}; @@ -47,6 +47,7 @@ pub fn authenticate(req: &mut Request, let err: NetError = protobuf::parse_from_bytes(rep.get_body()).unwrap(); Err(render_net_error(&err)) } + _ => unreachable!("unexpected msg: {:?}", rep), } } @@ -78,7 +79,7 @@ pub fn session_create(req: &mut Request, request.set_token(token); request.set_extern_id(user.id); request.set_email(user.email); - request.set_name(user.name); + request.set_name(user.login); request.set_provider(OAuthProvider::GitHub); conn.route(&request).unwrap(); match conn.recv() { @@ -296,3 +297,134 @@ fn render_net_error(err: &NetError) -> Response { }; Response::with((status, encoded)) } + +pub fn list_account_invitations(req: &mut Request, + ctx: &Arc>) + -> IronResult { + debug!("list_account_invitations"); + let session = match authenticate(req, ctx) { + Ok(session) => session, + Err(response) => return Ok(response), + }; + + let mut conn = Broker::connect(&ctx).unwrap(); + let mut request = AccountInvitationListRequest::new(); + request.set_account_id(session.get_id()); + conn.route(&request).unwrap(); + match conn.recv() { + Ok(rep) => { + match rep.get_message_id() { + "AccountInvitationListResponse" => { + let invites: AccountInvitationListResponse = + protobuf::parse_from_bytes(rep.get_body()).unwrap(); + let encoded = json::encode(&invites.to_json()).unwrap(); + Ok(Response::with((status::Ok, encoded))) + } + "NetError" => { + let err: NetError = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + Ok(render_net_error(&err)) + } + _ => unreachable!("unexpected msg: {:?}", rep), + } + } + Err(e) => { + error!("{:?}", e); + Ok(Response::with(status::ServiceUnavailable)) + } + } +} + +pub fn list_user_origins(req: &mut Request, + ctx: &Arc>) + -> IronResult { + debug!("list_user_origins"); + let session = match authenticate(req, ctx) { + Ok(session) => session, + Err(response) => return Ok(response), + }; + + let mut conn = Broker::connect(&ctx).unwrap(); + + + let mut request = AccountOriginListRequest::new(); + request.set_account_id(session.get_id()); + conn.route(&request).unwrap(); + match conn.recv() { + Ok(rep) => { + match rep.get_message_id() { + "AccountOriginListResponse" => { + let invites: AccountOriginListResponse = + protobuf::parse_from_bytes(rep.get_body()).unwrap(); + let encoded = json::encode(&invites.to_json()).unwrap(); + Ok(Response::with((status::Ok, encoded))) + } + "NetError" => { + let err: NetError = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + Ok(render_net_error(&err)) + } + _ => unreachable!("unexpected msg: {:?}", rep), + } + } + Err(e) => { + error!("{:?}", e); + Ok(Response::with(status::ServiceUnavailable)) + } + } +} + + + +pub fn accept_invitation(req: &mut Request, + ctx: &Arc>) + -> IronResult { + debug!("accept_invitation"); + let session = match authenticate(req, ctx) { + Ok(session) => session, + Err(response) => return Ok(response), + }; + let params = &req.extensions.get::().unwrap(); + + let invitation_id = match params.find("invitation_id") { + Some(ref invitation_id) => { + match invitation_id.parse::() { + Ok(v) => v, + Err(_) => return Ok(Response::with(status::BadRequest)), + } + } + None => return Ok(Response::with(status::BadRequest)), + }; + + // TODO: read the body to determine "ignore" + let ignore_val = false; + + let mut conn = Broker::connect(&ctx).unwrap(); + let mut request = OriginInvitationAcceptRequest::new(); + + // make sure we're not trying to accept someone else's request + request.set_account_accepting_request(session.get_id()); + request.set_invite_id(invitation_id); + request.set_ignore(ignore_val); + + conn.route(&request).unwrap(); + match conn.recv() { + Ok(rep) => { + match rep.get_message_id() { + "OriginInvitationAcceptResponse" => { + let _invites: OriginInvitationAcceptResponse = + protobuf::parse_from_bytes(rep.get_body()).unwrap(); + // empty response + Ok(Response::with(status::Ok)) + } + "NetError" => { + let err: NetError = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + Ok(render_net_error(&err)) + } + _ => unreachable!("unexpected msg: {:?}", rep), + } + } + Err(e) => { + error!("{:?}", e); + Ok(Response::with(status::ServiceUnavailable)) + } + } +} diff --git a/components/builder-api/src/http/mod.rs b/components/builder-api/src/http/mod.rs index 5f2c4af274..f1f390919e 100644 --- a/components/builder-api/src/http/mod.rs +++ b/components/builder-api/src/http/mod.rs @@ -33,14 +33,18 @@ pub fn router(config: Arc, context: Arc>) -> Result< let ctx3 = context.clone(); let ctx4 = context.clone(); let ctx5 = context.clone(); + let ctx6 = context.clone(); + let router = router!( get "/authenticate/:code" => move |r: &mut Request| session_create(r, &github, &ctx1), - post "/origins" => move |r: &mut Request| origin_create(r, &ctx2), - get "/origins/:origin" => move |r: &mut Request| origin_show(r, &ctx3), + post "/jobs" => move |r: &mut Request| job_create(r, &ctx2), + get "/jobs/:id" => move |r: &mut Request| job_show(r, &ctx3), + + get "/user/invitations" => move |r: &mut Request| list_account_invitations(r, &ctx4), + put "/user/invitations/:invitation_id" => move |r: &mut Request| accept_invitation(r, &ctx5), + get "/user/origins" => move |r: &mut Request| list_user_origins(r, &ctx6), - post "/jobs" => move |r: &mut Request| job_create(r, &ctx4), - get "/jobs/:id" => move |r: &mut Request| job_show(r, &ctx5), ); let mut chain = Chain::new(router); chain.link_after(Cors); @@ -60,11 +64,15 @@ pub fn router(config: Arc, context: Arc>) -> Result< /// * Listener crashed during startup pub fn run(config: Arc, context: Arc>) -> Result> { let (tx, rx) = mpsc::sync_channel(1); + let addr = config.http_addr.clone(); - let depot = try!(depot::server::router(config.depot.clone())); + let ctx = context.clone(); + let depot = try!(depot::Depot::new(config.depot.clone(), ctx)); + let depot_chain = try!(depot::server::router(depot)); let chain = try!(router(config, context)); + let mut mount = Mount::new(); - mount.mount("/v1", chain).mount("/v1/depot", depot); + mount.mount("/v1", chain).mount("/v1/depot", depot_chain); let handle = thread::Builder::new() .name("http-srv".to_string()) .spawn(move || { diff --git a/components/builder-protocol/build.rs b/components/builder-protocol/build.rs index bb3961fa56..a1211f1788 100644 --- a/components/builder-protocol/build.rs +++ b/components/builder-protocol/build.rs @@ -42,6 +42,10 @@ fn protocol_files() -> Vec { let mut files = vec![]; for entry in fs::read_dir("protocols").unwrap() { let file = entry.unwrap(); + // skip vim temp files + if file.file_name().to_str().unwrap().starts_with(".") { + continue; + } if file.metadata().unwrap().is_file() { files.push(file.path()); } diff --git a/components/builder-protocol/protocols/net.proto b/components/builder-protocol/protocols/net.proto index 67f0299ab2..070f97f850 100644 --- a/components/builder-protocol/protocols/net.proto +++ b/components/builder-protocol/protocols/net.proto @@ -27,6 +27,7 @@ enum ErrCode { ENTITY_NOT_FOUND = 4; INTERNAL = 5; NO_SHARD = 6; + ACCESS_DENIED = 7; } message NetError { diff --git a/components/builder-protocol/protocols/sessionsrv.proto b/components/builder-protocol/protocols/sessionsrv.proto index 9b3e91378f..f9d729de9e 100644 --- a/components/builder-protocol/protocols/sessionsrv.proto +++ b/components/builder-protocol/protocols/sessionsrv.proto @@ -10,6 +10,11 @@ message Account { required string name = 3; } +// get an account by GH username +message AccountGet { + required string name = 1; +} + message Session { required uint64 id = 1; required string email = 2; @@ -33,3 +38,5 @@ message SessionCreate { message SessionGet { required string token = 1; } + + diff --git a/components/builder-protocol/protocols/vault.proto b/components/builder-protocol/protocols/vault.proto index 6aee099575..6f1685ccaf 100644 --- a/components/builder-protocol/protocols/vault.proto +++ b/components/builder-protocol/protocols/vault.proto @@ -1,5 +1,6 @@ package vault; +// stored entity message Origin { required uint64 id = 1; required string name = 2; @@ -9,8 +10,140 @@ message Origin { message OriginCreate { required string name = 1; required uint64 owner_id = 2; + required string owner_name = 3; +} + +message OriginDelete { + required string name = 1; } message OriginGet { required string name = 1; } + +message OriginMemberRemove { + required uint64 origin_id = 1; + required uint64 user_id = 2; +} + +// list all members of an origin +message OriginMemberListRequest { + required uint64 origin_id = 1; +} + +message OriginMemberListResponse { + required uint64 origin_id = 1; + repeated string members = 2; +} + + +message AccountOriginListRequest { + required uint64 account_id = 1; +} + +message AccountOriginListResponse { + required uint64 account_id = 1; + repeated string origins = 2; +} + +// !!!NOTE!!! +// !!!NOTE!!! +// only account_id and origin_name are implemented +// !!!NOTE!!! +// !!!NOTE!!! +message CheckOriginAccessRequest { + oneof account_info { + uint64 account_id = 1; + string account_name = 2; + } + oneof origin_info { + uint64 origin_id = 3; + string origin_name = 4; + } +} + +message CheckOriginAccessResponse { + required bool has_access = 1; +} + +// list all pending invitations for a given account +message AccountInvitationListRequest { + required uint64 account_id = 1; +} + +message AccountInvitationListResponse { + required uint64 account_id = 1; + repeated OriginInvitation invitations = 2; +} + +// list all pending invitations for a given origin +message OriginInvitationListRequest { + required uint64 origin_id = 1; +} + +message OriginInvitationListResponse { + required uint64 origin_id = 1; + repeated OriginInvitation invitations = 2; +} + +// stored entity +message OriginInvitation { + required uint64 id = 1; + + // the user/account being invited + required uint64 account_id = 2; + required string account_name = 3; + + // the origin id that account_id is being invited to + required uint64 origin_id = 4; + required string origin_name = 5; + + // the user that created the invitation + required uint64 owner_id = 6; +} + +message OriginInvitationCreate { + // the user being invited + required uint64 account_id = 1; + required string account_name = 2; + + // the origin id that account_id is being invited to + required uint64 origin_id = 3; + required string origin_name = 4; + + // the user that created the invitation + required uint64 owner_id = 5; +} + +message OriginInvitationAcceptRequest { + required uint64 account_accepting_request = 1; + required uint64 invite_id = 2; + // if ignore == true, then they're not joining the origin + required bool ignore = 3; +} + +message OriginInvitationAcceptResponse{ +} + +// stored entity +message OriginSecretKey { + // pk for the public key + required uint64 id = 1; + // the parent origin + required uint64 origin_id = 2; + // key name + required string name = 3; + required string revision = 4; + required bytes body = 5; + // account id that stored the key + required uint64 owner_id = 6; +} + +message OriginSecretKeyCreate { + required uint64 origin_id = 1; + required string name = 2; + required string revision = 3; + required bytes body = 4; + required uint64 owner_id = 5; +} + diff --git a/components/builder-protocol/src/message/net.rs b/components/builder-protocol/src/message/net.rs index ebd2a2c7e0..995c2cc023 100644 --- a/components/builder-protocol/src/message/net.rs +++ b/components/builder-protocol/src/message/net.rs @@ -1074,6 +1074,7 @@ pub enum ErrCode { ENTITY_NOT_FOUND = 4, INTERNAL = 5, NO_SHARD = 6, + ACCESS_DENIED = 7, } impl ::protobuf::ProtobufEnum for ErrCode { @@ -1090,6 +1091,7 @@ impl ::protobuf::ProtobufEnum for ErrCode { 4 => ::std::option::Option::Some(ErrCode::ENTITY_NOT_FOUND), 5 => ::std::option::Option::Some(ErrCode::INTERNAL), 6 => ::std::option::Option::Some(ErrCode::NO_SHARD), + 7 => ::std::option::Option::Some(ErrCode::ACCESS_DENIED), _ => ::std::option::Option::None } } @@ -1103,6 +1105,7 @@ impl ::protobuf::ProtobufEnum for ErrCode { ErrCode::ENTITY_NOT_FOUND, ErrCode::INTERNAL, ErrCode::NO_SHARD, + ErrCode::ACCESS_DENIED, ]; values } @@ -1143,87 +1146,91 @@ static file_descriptor_proto_data: &'static [u8] = &[ 0x08, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x72, 0x76, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x72, 0x76, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x72, 0x76, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x4a, 0x6f, 0x62, - 0x53, 0x72, 0x76, 0x10, 0x04, 0x2a, 0x7c, 0x0a, 0x07, 0x45, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, - 0x12, 0x07, 0x0a, 0x03, 0x42, 0x55, 0x47, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, - 0x45, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, - 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x42, - 0x41, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x59, 0x10, - 0x03, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, - 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, - 0x4e, 0x41, 0x4c, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x5f, 0x53, 0x48, 0x41, 0x52, - 0x44, 0x10, 0x06, 0x4a, 0x87, 0x09, 0x0a, 0x06, 0x12, 0x04, 0x00, 0x00, 0x25, 0x0f, 0x0a, 0x08, - 0x0a, 0x01, 0x02, 0x12, 0x03, 0x00, 0x08, 0x0b, 0x0a, 0x0a, 0x0a, 0x02, 0x05, 0x00, 0x12, 0x04, - 0x02, 0x00, 0x08, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x05, 0x00, 0x01, 0x12, 0x03, 0x02, 0x05, 0x0d, - 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x00, 0x02, 0x00, 0x12, 0x03, 0x03, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, - 0x05, 0x05, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x03, 0x02, 0x05, 0x0a, 0x0c, 0x0a, 0x05, 0x05, - 0x00, 0x02, 0x00, 0x02, 0x12, 0x03, 0x03, 0x08, 0x09, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x00, 0x02, - 0x01, 0x12, 0x03, 0x04, 0x02, 0x0f, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x01, 0x01, 0x12, - 0x03, 0x04, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x01, 0x02, 0x12, 0x03, 0x04, - 0x0d, 0x0e, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x00, 0x02, 0x02, 0x12, 0x03, 0x05, 0x02, 0x11, 0x0a, - 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x02, 0x01, 0x12, 0x03, 0x05, 0x02, 0x0c, 0x0a, 0x0c, 0x0a, - 0x05, 0x05, 0x00, 0x02, 0x02, 0x02, 0x12, 0x03, 0x05, 0x0f, 0x10, 0x0a, 0x0b, 0x0a, 0x04, 0x05, - 0x00, 0x02, 0x03, 0x12, 0x03, 0x06, 0x02, 0x0f, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x03, - 0x01, 0x12, 0x03, 0x06, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x03, 0x02, 0x12, - 0x03, 0x06, 0x0d, 0x0e, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x00, 0x02, 0x04, 0x12, 0x03, 0x07, 0x02, - 0x0d, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x04, 0x01, 0x12, 0x03, 0x07, 0x02, 0x08, 0x0a, - 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x04, 0x02, 0x12, 0x03, 0x07, 0x0b, 0x0c, 0x0a, 0x0a, 0x0a, - 0x02, 0x04, 0x00, 0x12, 0x04, 0x0a, 0x00, 0x0d, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x00, 0x01, - 0x12, 0x03, 0x0a, 0x08, 0x11, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x00, 0x12, 0x03, 0x0b, - 0x02, 0x21, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x04, 0x12, 0x03, 0x0b, 0x02, 0x0a, - 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x06, 0x12, 0x03, 0x0b, 0x0b, 0x13, 0x0a, 0x0c, - 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x0b, 0x14, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, - 0x04, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x0b, 0x1f, 0x20, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, - 0x02, 0x01, 0x12, 0x03, 0x0c, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x04, - 0x12, 0x03, 0x0c, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x05, 0x12, 0x03, - 0x0c, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03, 0x0c, 0x12, - 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x0c, 0x19, 0x1a, 0x0a, - 0x0a, 0x0a, 0x02, 0x04, 0x01, 0x12, 0x04, 0x0f, 0x00, 0x13, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, - 0x01, 0x01, 0x12, 0x03, 0x0f, 0x08, 0x0b, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x00, 0x12, - 0x03, 0x10, 0x02, 0x21, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x04, 0x12, 0x03, 0x10, - 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x05, 0x12, 0x03, 0x10, 0x0b, 0x11, - 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x01, 0x12, 0x03, 0x10, 0x12, 0x1c, 0x0a, 0x0c, - 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x03, 0x12, 0x03, 0x10, 0x1f, 0x20, 0x0a, 0x0b, 0x0a, 0x04, - 0x04, 0x01, 0x02, 0x01, 0x12, 0x03, 0x11, 0x02, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, - 0x01, 0x04, 0x12, 0x03, 0x11, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, 0x05, - 0x12, 0x03, 0x11, 0x0b, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, 0x01, 0x12, 0x03, - 0x11, 0x11, 0x15, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, 0x03, 0x12, 0x03, 0x11, 0x18, - 0x19, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x02, 0x12, 0x03, 0x12, 0x02, 0x24, 0x0a, 0x0c, - 0x0a, 0x05, 0x04, 0x01, 0x02, 0x02, 0x04, 0x12, 0x03, 0x12, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, - 0x04, 0x01, 0x02, 0x02, 0x06, 0x12, 0x03, 0x12, 0x0b, 0x14, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, - 0x02, 0x02, 0x01, 0x12, 0x03, 0x12, 0x15, 0x1f, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x02, - 0x03, 0x12, 0x03, 0x12, 0x22, 0x23, 0x0a, 0x0a, 0x0a, 0x02, 0x05, 0x01, 0x12, 0x04, 0x15, 0x00, - 0x1d, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x05, 0x01, 0x01, 0x12, 0x03, 0x15, 0x05, 0x0c, 0x0a, 0x0b, - 0x0a, 0x04, 0x05, 0x01, 0x02, 0x00, 0x12, 0x03, 0x16, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x05, - 0x01, 0x02, 0x00, 0x01, 0x12, 0x03, 0x16, 0x02, 0x05, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, - 0x00, 0x02, 0x12, 0x03, 0x16, 0x08, 0x09, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x01, 0x02, 0x01, 0x12, - 0x03, 0x17, 0x02, 0x0e, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x01, 0x01, 0x12, 0x03, 0x17, - 0x02, 0x09, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x01, 0x02, 0x12, 0x03, 0x17, 0x0c, 0x0d, - 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x01, 0x02, 0x02, 0x12, 0x03, 0x18, 0x02, 0x16, 0x0a, 0x0c, 0x0a, - 0x05, 0x05, 0x01, 0x02, 0x02, 0x01, 0x12, 0x03, 0x18, 0x02, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x05, - 0x01, 0x02, 0x02, 0x02, 0x12, 0x03, 0x18, 0x14, 0x15, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x01, 0x02, - 0x03, 0x12, 0x03, 0x19, 0x02, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x03, 0x01, 0x12, - 0x03, 0x19, 0x02, 0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x03, 0x02, 0x12, 0x03, 0x19, - 0x15, 0x16, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x01, 0x02, 0x04, 0x12, 0x03, 0x1a, 0x02, 0x17, 0x0a, - 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x04, 0x01, 0x12, 0x03, 0x1a, 0x02, 0x12, 0x0a, 0x0c, 0x0a, - 0x05, 0x05, 0x01, 0x02, 0x04, 0x02, 0x12, 0x03, 0x1a, 0x15, 0x16, 0x0a, 0x0b, 0x0a, 0x04, 0x05, - 0x01, 0x02, 0x05, 0x12, 0x03, 0x1b, 0x02, 0x0f, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x05, - 0x01, 0x12, 0x03, 0x1b, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x05, 0x02, 0x12, - 0x03, 0x1b, 0x0d, 0x0e, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x01, 0x02, 0x06, 0x12, 0x03, 0x1c, 0x02, - 0x0f, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x06, 0x01, 0x12, 0x03, 0x1c, 0x02, 0x0a, 0x0a, - 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x06, 0x02, 0x12, 0x03, 0x1c, 0x0d, 0x0e, 0x0a, 0x0a, 0x0a, - 0x02, 0x04, 0x02, 0x12, 0x04, 0x1f, 0x00, 0x22, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x02, 0x01, - 0x12, 0x03, 0x1f, 0x08, 0x10, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x00, 0x12, 0x03, 0x20, - 0x02, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x04, 0x12, 0x03, 0x20, 0x02, 0x0a, - 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x06, 0x12, 0x03, 0x20, 0x0b, 0x12, 0x0a, 0x0c, - 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x01, 0x12, 0x03, 0x20, 0x13, 0x17, 0x0a, 0x0c, 0x0a, 0x05, - 0x04, 0x02, 0x02, 0x00, 0x03, 0x12, 0x03, 0x20, 0x1a, 0x1b, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, - 0x02, 0x01, 0x12, 0x03, 0x21, 0x02, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x04, - 0x12, 0x03, 0x21, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x05, 0x12, 0x03, - 0x21, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x01, 0x12, 0x03, 0x21, 0x12, - 0x15, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x03, 0x12, 0x03, 0x21, 0x18, 0x19, 0x0a, - 0x09, 0x0a, 0x02, 0x04, 0x03, 0x12, 0x03, 0x24, 0x00, 0x0f, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x03, - 0x01, 0x12, 0x03, 0x24, 0x08, 0x0c, 0x0a, 0x09, 0x0a, 0x02, 0x04, 0x04, 0x12, 0x03, 0x25, 0x00, - 0x0f, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x04, 0x01, 0x12, 0x03, 0x25, 0x08, 0x0c, + 0x53, 0x72, 0x76, 0x10, 0x04, 0x2a, 0x8f, 0x01, 0x0a, 0x07, 0x45, 0x72, 0x72, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x55, 0x47, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, + 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x4d, 0x4f, 0x54, + 0x45, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, + 0x42, 0x41, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x59, + 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x4e, 0x4f, 0x54, + 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, + 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x5f, 0x53, 0x48, 0x41, + 0x52, 0x44, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x44, + 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x07, 0x4a, 0xb0, 0x09, 0x0a, 0x06, 0x12, 0x04, 0x00, 0x00, + 0x26, 0x0f, 0x0a, 0x08, 0x0a, 0x01, 0x02, 0x12, 0x03, 0x00, 0x08, 0x0b, 0x0a, 0x0a, 0x0a, 0x02, + 0x05, 0x00, 0x12, 0x04, 0x02, 0x00, 0x08, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x05, 0x00, 0x01, 0x12, + 0x03, 0x02, 0x05, 0x0d, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x00, 0x02, 0x00, 0x12, 0x03, 0x03, 0x02, + 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x03, 0x02, 0x05, 0x0a, + 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x00, 0x02, 0x12, 0x03, 0x03, 0x08, 0x09, 0x0a, 0x0b, 0x0a, + 0x04, 0x05, 0x00, 0x02, 0x01, 0x12, 0x03, 0x04, 0x02, 0x0f, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, + 0x02, 0x01, 0x01, 0x12, 0x03, 0x04, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x01, + 0x02, 0x12, 0x03, 0x04, 0x0d, 0x0e, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x00, 0x02, 0x02, 0x12, 0x03, + 0x05, 0x02, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x02, 0x01, 0x12, 0x03, 0x05, 0x02, + 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x02, 0x02, 0x12, 0x03, 0x05, 0x0f, 0x10, 0x0a, + 0x0b, 0x0a, 0x04, 0x05, 0x00, 0x02, 0x03, 0x12, 0x03, 0x06, 0x02, 0x0f, 0x0a, 0x0c, 0x0a, 0x05, + 0x05, 0x00, 0x02, 0x03, 0x01, 0x12, 0x03, 0x06, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, + 0x02, 0x03, 0x02, 0x12, 0x03, 0x06, 0x0d, 0x0e, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x00, 0x02, 0x04, + 0x12, 0x03, 0x07, 0x02, 0x0d, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x04, 0x01, 0x12, 0x03, + 0x07, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x04, 0x02, 0x12, 0x03, 0x07, 0x0b, + 0x0c, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x00, 0x12, 0x04, 0x0a, 0x00, 0x0d, 0x01, 0x0a, 0x0a, 0x0a, + 0x03, 0x04, 0x00, 0x01, 0x12, 0x03, 0x0a, 0x08, 0x11, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, + 0x00, 0x12, 0x03, 0x0b, 0x02, 0x21, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x04, 0x12, + 0x03, 0x0b, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x06, 0x12, 0x03, 0x0b, + 0x0b, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x0b, 0x14, 0x1c, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x0b, 0x1f, 0x20, 0x0a, 0x0b, + 0x0a, 0x04, 0x04, 0x00, 0x02, 0x01, 0x12, 0x03, 0x0c, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x00, 0x02, 0x01, 0x04, 0x12, 0x03, 0x0c, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, + 0x01, 0x05, 0x12, 0x03, 0x0c, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x01, + 0x12, 0x03, 0x0c, 0x12, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, + 0x0c, 0x19, 0x1a, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x01, 0x12, 0x04, 0x0f, 0x00, 0x13, 0x01, 0x0a, + 0x0a, 0x0a, 0x03, 0x04, 0x01, 0x01, 0x12, 0x03, 0x0f, 0x08, 0x0b, 0x0a, 0x0b, 0x0a, 0x04, 0x04, + 0x01, 0x02, 0x00, 0x12, 0x03, 0x10, 0x02, 0x21, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, + 0x04, 0x12, 0x03, 0x10, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x05, 0x12, + 0x03, 0x10, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x01, 0x12, 0x03, 0x10, + 0x12, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x03, 0x12, 0x03, 0x10, 0x1f, 0x20, + 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x01, 0x12, 0x03, 0x11, 0x02, 0x1a, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x01, 0x02, 0x01, 0x04, 0x12, 0x03, 0x11, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x01, 0x02, 0x01, 0x05, 0x12, 0x03, 0x11, 0x0b, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, + 0x01, 0x01, 0x12, 0x03, 0x11, 0x11, 0x15, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, 0x03, + 0x12, 0x03, 0x11, 0x18, 0x19, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x02, 0x12, 0x03, 0x12, + 0x02, 0x24, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x02, 0x04, 0x12, 0x03, 0x12, 0x02, 0x0a, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x02, 0x06, 0x12, 0x03, 0x12, 0x0b, 0x14, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x01, 0x02, 0x02, 0x01, 0x12, 0x03, 0x12, 0x15, 0x1f, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x01, 0x02, 0x02, 0x03, 0x12, 0x03, 0x12, 0x22, 0x23, 0x0a, 0x0a, 0x0a, 0x02, 0x05, 0x01, + 0x12, 0x04, 0x15, 0x00, 0x1e, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x05, 0x01, 0x01, 0x12, 0x03, 0x15, + 0x05, 0x0c, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x01, 0x02, 0x00, 0x12, 0x03, 0x16, 0x02, 0x0a, 0x0a, + 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x00, 0x01, 0x12, 0x03, 0x16, 0x02, 0x05, 0x0a, 0x0c, 0x0a, + 0x05, 0x05, 0x01, 0x02, 0x00, 0x02, 0x12, 0x03, 0x16, 0x08, 0x09, 0x0a, 0x0b, 0x0a, 0x04, 0x05, + 0x01, 0x02, 0x01, 0x12, 0x03, 0x17, 0x02, 0x0e, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x01, + 0x01, 0x12, 0x03, 0x17, 0x02, 0x09, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x01, 0x02, 0x12, + 0x03, 0x17, 0x0c, 0x0d, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x01, 0x02, 0x02, 0x12, 0x03, 0x18, 0x02, + 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x02, 0x01, 0x12, 0x03, 0x18, 0x02, 0x11, 0x0a, + 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x02, 0x02, 0x12, 0x03, 0x18, 0x14, 0x15, 0x0a, 0x0b, 0x0a, + 0x04, 0x05, 0x01, 0x02, 0x03, 0x12, 0x03, 0x19, 0x02, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, + 0x02, 0x03, 0x01, 0x12, 0x03, 0x19, 0x02, 0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x03, + 0x02, 0x12, 0x03, 0x19, 0x15, 0x16, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x01, 0x02, 0x04, 0x12, 0x03, + 0x1a, 0x02, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x04, 0x01, 0x12, 0x03, 0x1a, 0x02, + 0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x04, 0x02, 0x12, 0x03, 0x1a, 0x15, 0x16, 0x0a, + 0x0b, 0x0a, 0x04, 0x05, 0x01, 0x02, 0x05, 0x12, 0x03, 0x1b, 0x02, 0x0f, 0x0a, 0x0c, 0x0a, 0x05, + 0x05, 0x01, 0x02, 0x05, 0x01, 0x12, 0x03, 0x1b, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, + 0x02, 0x05, 0x02, 0x12, 0x03, 0x1b, 0x0d, 0x0e, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x01, 0x02, 0x06, + 0x12, 0x03, 0x1c, 0x02, 0x0f, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x06, 0x01, 0x12, 0x03, + 0x1c, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x01, 0x02, 0x06, 0x02, 0x12, 0x03, 0x1c, 0x0d, + 0x0e, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x01, 0x02, 0x07, 0x12, 0x03, 0x1d, 0x02, 0x14, 0x0a, 0x0c, + 0x0a, 0x05, 0x05, 0x01, 0x02, 0x07, 0x01, 0x12, 0x03, 0x1d, 0x02, 0x0f, 0x0a, 0x0c, 0x0a, 0x05, + 0x05, 0x01, 0x02, 0x07, 0x02, 0x12, 0x03, 0x1d, 0x12, 0x13, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x02, + 0x12, 0x04, 0x20, 0x00, 0x23, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x02, 0x01, 0x12, 0x03, 0x20, + 0x08, 0x10, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x00, 0x12, 0x03, 0x21, 0x02, 0x1c, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x04, 0x12, 0x03, 0x21, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x02, 0x02, 0x00, 0x06, 0x12, 0x03, 0x21, 0x0b, 0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x02, 0x02, 0x00, 0x01, 0x12, 0x03, 0x21, 0x13, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, + 0x00, 0x03, 0x12, 0x03, 0x21, 0x1a, 0x1b, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x01, 0x12, + 0x03, 0x22, 0x02, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x04, 0x12, 0x03, 0x22, + 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x05, 0x12, 0x03, 0x22, 0x0b, 0x11, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x01, 0x12, 0x03, 0x22, 0x12, 0x15, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x03, 0x12, 0x03, 0x22, 0x18, 0x19, 0x0a, 0x09, 0x0a, 0x02, + 0x04, 0x03, 0x12, 0x03, 0x25, 0x00, 0x0f, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x03, 0x01, 0x12, 0x03, + 0x25, 0x08, 0x0c, 0x0a, 0x09, 0x0a, 0x02, 0x04, 0x04, 0x12, 0x03, 0x26, 0x00, 0x0f, 0x0a, 0x0a, + 0x0a, 0x03, 0x04, 0x04, 0x01, 0x12, 0x03, 0x26, 0x08, 0x0c, ]; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/components/builder-protocol/src/message/sessionsrv.rs b/components/builder-protocol/src/message/sessionsrv.rs index 87bb076ec7..4aef1e5481 100644 --- a/components/builder-protocol/src/message/sessionsrv.rs +++ b/components/builder-protocol/src/message/sessionsrv.rs @@ -303,6 +303,192 @@ impl ::std::fmt::Debug for Account { } } +#[derive(Clone,Default)] +pub struct AccountGet { + // message fields + name: ::protobuf::SingularField<::std::string::String>, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for AccountGet {} + +impl AccountGet { + pub fn new() -> AccountGet { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static AccountGet { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const AccountGet, + }; + unsafe { + instance.get(|| { + AccountGet { + name: ::protobuf::SingularField::none(), + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required string name = 1; + + pub fn clear_name(&mut self) { + self.name.clear(); + } + + pub fn has_name(&self) -> bool { + self.name.is_some() + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.name = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_name(&mut self) -> &mut ::std::string::String { + if self.name.is_none() { + self.name.set_default(); + }; + self.name.as_mut().unwrap() + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + self.name.take().unwrap_or_else(|| ::std::string::String::new()) + } + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } +} + +impl ::protobuf::Message for AccountGet { + fn is_initialized(&self) -> bool { + if self.name.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + try!(::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.name.iter() { + my_size += ::protobuf::rt::string_size(1, &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 let Some(v) = self.name.as_ref() { + try!(os.write_string(1, &v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for AccountGet { + fn new() -> AccountGet { + AccountGet::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_string_accessor( + "name", + AccountGet::has_name, + AccountGet::get_name, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "AccountGet", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for AccountGet { + fn clear(&mut self) { + self.clear_name(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for AccountGet { + fn eq(&self, other: &AccountGet) -> bool { + self.name == other.name && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for AccountGet { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + #[derive(Clone,Default)] pub struct Session { // message fields @@ -1497,103 +1683,113 @@ static file_descriptor_proto_data: &'static [u8] = &[ 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x72, 0x76, 0x22, 0x32, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x12, 0x0d, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x12, 0x0c, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x22, 0x41, 0x0a, 0x07, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x02, 0x28, 0x04, 0x12, 0x0d, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x02, - 0x28, 0x09, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, - 0x12, 0x0d, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x02, 0x28, 0x09, 0x22, - 0x2f, 0x0a, 0x0c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, - 0x0d, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x12, 0x10, - 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, - 0x22, 0x7b, 0x0a, 0x0d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x12, 0x0d, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, - 0x12, 0x11, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x02, 0x28, 0x04, 0x12, 0x0d, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x02, - 0x28, 0x09, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x09, - 0x12, 0x2b, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x02, - 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x72, 0x76, 0x2e, - 0x4f, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x1b, 0x0a, - 0x0a, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x12, 0x0d, 0x0a, 0x05, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x2a, 0x1b, 0x0a, 0x0d, 0x4f, 0x41, - 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x0a, 0x0a, 0x06, 0x47, - 0x69, 0x74, 0x48, 0x75, 0x62, 0x10, 0x00, 0x4a, 0xd6, 0x09, 0x0a, 0x06, 0x12, 0x04, 0x00, 0x00, - 0x22, 0x01, 0x0a, 0x08, 0x0a, 0x01, 0x02, 0x12, 0x03, 0x00, 0x08, 0x12, 0x0a, 0x0a, 0x0a, 0x02, - 0x05, 0x00, 0x12, 0x04, 0x02, 0x00, 0x04, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x05, 0x00, 0x01, 0x12, - 0x03, 0x02, 0x05, 0x12, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x00, 0x02, 0x00, 0x12, 0x03, 0x03, 0x02, - 0x0d, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x03, 0x02, 0x08, 0x0a, - 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x00, 0x02, 0x12, 0x03, 0x03, 0x0b, 0x0c, 0x0a, 0x0a, 0x0a, - 0x02, 0x04, 0x00, 0x12, 0x04, 0x06, 0x00, 0x0a, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x00, 0x01, - 0x12, 0x03, 0x06, 0x08, 0x0f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x00, 0x12, 0x03, 0x07, - 0x02, 0x19, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x04, 0x12, 0x03, 0x07, 0x02, 0x0a, - 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x05, 0x12, 0x03, 0x07, 0x0b, 0x11, 0x0a, 0x0c, - 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x07, 0x12, 0x14, 0x0a, 0x0c, 0x0a, 0x05, - 0x04, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x07, 0x17, 0x18, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, - 0x02, 0x01, 0x12, 0x03, 0x08, 0x02, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x04, - 0x12, 0x03, 0x08, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x05, 0x12, 0x03, - 0x08, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03, 0x08, 0x12, - 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x08, 0x1a, 0x1b, 0x0a, - 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x02, 0x12, 0x03, 0x09, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, - 0x04, 0x00, 0x02, 0x02, 0x04, 0x12, 0x03, 0x09, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, - 0x02, 0x02, 0x05, 0x12, 0x03, 0x09, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, - 0x01, 0x12, 0x03, 0x09, 0x12, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x03, 0x12, - 0x03, 0x09, 0x19, 0x1a, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x01, 0x12, 0x04, 0x0c, 0x00, 0x11, 0x01, - 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x01, 0x01, 0x12, 0x03, 0x0c, 0x08, 0x0f, 0x0a, 0x0b, 0x0a, 0x04, - 0x04, 0x01, 0x02, 0x00, 0x12, 0x03, 0x0d, 0x02, 0x19, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, - 0x00, 0x04, 0x12, 0x03, 0x0d, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x05, - 0x12, 0x03, 0x0d, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x01, 0x12, 0x03, - 0x0d, 0x12, 0x14, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x03, 0x12, 0x03, 0x0d, 0x17, - 0x18, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x01, 0x12, 0x03, 0x0e, 0x02, 0x1c, 0x0a, 0x0c, - 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, 0x04, 0x12, 0x03, 0x0e, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, - 0x04, 0x01, 0x02, 0x01, 0x05, 0x12, 0x03, 0x0e, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, - 0x02, 0x01, 0x01, 0x12, 0x03, 0x0e, 0x12, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, - 0x03, 0x12, 0x03, 0x0e, 0x1a, 0x1b, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x02, 0x12, 0x03, - 0x0f, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x02, 0x04, 0x12, 0x03, 0x0f, 0x02, - 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x02, 0x05, 0x12, 0x03, 0x0f, 0x0b, 0x11, 0x0a, - 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x02, 0x01, 0x12, 0x03, 0x0f, 0x12, 0x16, 0x0a, 0x0c, 0x0a, - 0x05, 0x04, 0x01, 0x02, 0x02, 0x03, 0x12, 0x03, 0x0f, 0x19, 0x1a, 0x0a, 0x0b, 0x0a, 0x04, 0x04, - 0x01, 0x02, 0x03, 0x12, 0x03, 0x10, 0x02, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x03, - 0x04, 0x12, 0x03, 0x10, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x03, 0x05, 0x12, - 0x03, 0x10, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x03, 0x01, 0x12, 0x03, 0x10, - 0x12, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x03, 0x03, 0x12, 0x03, 0x10, 0x1a, 0x1b, - 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x02, 0x12, 0x04, 0x13, 0x00, 0x16, 0x01, 0x0a, 0x0a, 0x0a, 0x03, - 0x04, 0x02, 0x01, 0x12, 0x03, 0x13, 0x08, 0x14, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x00, - 0x12, 0x03, 0x14, 0x02, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x04, 0x12, 0x03, - 0x14, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x05, 0x12, 0x03, 0x14, 0x0b, - 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x01, 0x12, 0x03, 0x14, 0x12, 0x17, 0x0a, - 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x03, 0x12, 0x03, 0x14, 0x1a, 0x1b, 0x0a, 0x0b, 0x0a, - 0x04, 0x04, 0x02, 0x02, 0x01, 0x12, 0x03, 0x15, 0x02, 0x1f, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, - 0x02, 0x01, 0x04, 0x12, 0x03, 0x15, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, - 0x05, 0x12, 0x03, 0x15, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x01, 0x12, - 0x03, 0x15, 0x12, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x03, 0x12, 0x03, 0x15, - 0x1d, 0x1e, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x03, 0x12, 0x04, 0x18, 0x00, 0x1e, 0x01, 0x0a, 0x0a, - 0x0a, 0x03, 0x04, 0x03, 0x01, 0x12, 0x03, 0x18, 0x08, 0x15, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x03, - 0x02, 0x00, 0x12, 0x03, 0x19, 0x02, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00, 0x04, - 0x12, 0x03, 0x19, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00, 0x05, 0x12, 0x03, - 0x19, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00, 0x01, 0x12, 0x03, 0x19, 0x12, - 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00, 0x03, 0x12, 0x03, 0x19, 0x1a, 0x1b, 0x0a, - 0x0b, 0x0a, 0x04, 0x04, 0x03, 0x02, 0x01, 0x12, 0x03, 0x1a, 0x02, 0x20, 0x0a, 0x0c, 0x0a, 0x05, - 0x04, 0x03, 0x02, 0x01, 0x04, 0x12, 0x03, 0x1a, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, - 0x02, 0x01, 0x05, 0x12, 0x03, 0x1a, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x01, - 0x01, 0x12, 0x03, 0x1a, 0x12, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x03, 0x12, - 0x03, 0x1a, 0x1e, 0x1f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x03, 0x02, 0x02, 0x12, 0x03, 0x1b, 0x02, - 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x02, 0x04, 0x12, 0x03, 0x1b, 0x02, 0x0a, 0x0a, - 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x02, 0x05, 0x12, 0x03, 0x1b, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, - 0x05, 0x04, 0x03, 0x02, 0x02, 0x01, 0x12, 0x03, 0x1b, 0x12, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, - 0x03, 0x02, 0x02, 0x03, 0x12, 0x03, 0x1b, 0x1a, 0x1b, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x03, 0x02, - 0x03, 0x12, 0x03, 0x1c, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x03, 0x04, 0x12, - 0x03, 0x1c, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x03, 0x05, 0x12, 0x03, 0x1c, - 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x03, 0x01, 0x12, 0x03, 0x1c, 0x12, 0x16, - 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x03, 0x03, 0x12, 0x03, 0x1c, 0x19, 0x1a, 0x0a, 0x0b, - 0x0a, 0x04, 0x04, 0x03, 0x02, 0x04, 0x12, 0x03, 0x1d, 0x02, 0x26, 0x0a, 0x0c, 0x0a, 0x05, 0x04, - 0x03, 0x02, 0x04, 0x04, 0x12, 0x03, 0x1d, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, - 0x04, 0x06, 0x12, 0x03, 0x1d, 0x0b, 0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x04, 0x01, - 0x12, 0x03, 0x1d, 0x19, 0x21, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x04, 0x03, 0x12, 0x03, - 0x1d, 0x24, 0x25, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x04, 0x12, 0x04, 0x20, 0x00, 0x22, 0x01, 0x0a, - 0x0a, 0x0a, 0x03, 0x04, 0x04, 0x01, 0x12, 0x03, 0x20, 0x08, 0x12, 0x0a, 0x0b, 0x0a, 0x04, 0x04, - 0x04, 0x02, 0x00, 0x12, 0x03, 0x21, 0x02, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, - 0x04, 0x12, 0x03, 0x21, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x05, 0x12, - 0x03, 0x21, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x01, 0x12, 0x03, 0x21, - 0x12, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x03, 0x12, 0x03, 0x21, 0x1a, 0x1b, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x22, 0x1a, 0x0a, 0x0a, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x47, 0x65, 0x74, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x22, 0x41, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x12, + 0x0d, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x12, 0x0c, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x12, 0x0d, 0x0a, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x02, 0x28, 0x09, 0x22, 0x2f, 0x0a, 0x0c, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x0d, 0x0a, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x12, 0x10, 0x0a, 0x08, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x22, 0x7b, 0x0a, 0x0d, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, + 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x12, 0x11, 0x0a, 0x09, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x12, + 0x0d, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x12, 0x0c, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x09, 0x12, 0x2b, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x19, + 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x72, 0x76, 0x2e, 0x4f, 0x41, 0x75, 0x74, + 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x1b, 0x0a, 0x0a, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x12, 0x0d, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x2a, 0x1b, 0x0a, 0x0d, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x69, 0x74, 0x48, 0x75, + 0x62, 0x10, 0x00, 0x4a, 0xd4, 0x0a, 0x0a, 0x06, 0x12, 0x04, 0x00, 0x00, 0x27, 0x01, 0x0a, 0x08, + 0x0a, 0x01, 0x02, 0x12, 0x03, 0x00, 0x08, 0x12, 0x0a, 0x0a, 0x0a, 0x02, 0x05, 0x00, 0x12, 0x04, + 0x02, 0x00, 0x04, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x05, 0x00, 0x01, 0x12, 0x03, 0x02, 0x05, 0x12, + 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x00, 0x02, 0x00, 0x12, 0x03, 0x03, 0x02, 0x0d, 0x0a, 0x0c, 0x0a, + 0x05, 0x05, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x03, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x05, + 0x00, 0x02, 0x00, 0x02, 0x12, 0x03, 0x03, 0x0b, 0x0c, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x00, 0x12, + 0x04, 0x06, 0x00, 0x0a, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x00, 0x01, 0x12, 0x03, 0x06, 0x08, + 0x0f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x00, 0x12, 0x03, 0x07, 0x02, 0x19, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x04, 0x12, 0x03, 0x07, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x00, 0x02, 0x00, 0x05, 0x12, 0x03, 0x07, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, + 0x02, 0x00, 0x01, 0x12, 0x03, 0x07, 0x12, 0x14, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, + 0x03, 0x12, 0x03, 0x07, 0x17, 0x18, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x01, 0x12, 0x03, + 0x08, 0x02, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x04, 0x12, 0x03, 0x08, 0x02, + 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x05, 0x12, 0x03, 0x08, 0x0b, 0x11, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03, 0x08, 0x12, 0x17, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x08, 0x1a, 0x1b, 0x0a, 0x0b, 0x0a, 0x04, 0x04, + 0x00, 0x02, 0x02, 0x12, 0x03, 0x09, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, + 0x04, 0x12, 0x03, 0x09, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x05, 0x12, + 0x03, 0x09, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x01, 0x12, 0x03, 0x09, + 0x12, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x03, 0x12, 0x03, 0x09, 0x19, 0x1a, + 0x0a, 0x2b, 0x0a, 0x02, 0x04, 0x01, 0x12, 0x04, 0x0d, 0x00, 0x0f, 0x01, 0x1a, 0x1f, 0x20, 0x67, + 0x65, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x62, 0x79, + 0x20, 0x47, 0x48, 0x20, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x0a, 0x0a, 0x0a, 0x0a, + 0x03, 0x04, 0x01, 0x01, 0x12, 0x03, 0x0d, 0x08, 0x12, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, + 0x00, 0x12, 0x03, 0x0e, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x04, 0x12, + 0x03, 0x0e, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x05, 0x12, 0x03, 0x0e, + 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x01, 0x12, 0x03, 0x0e, 0x12, 0x16, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x03, 0x12, 0x03, 0x0e, 0x19, 0x1a, 0x0a, 0x0a, + 0x0a, 0x02, 0x04, 0x02, 0x12, 0x04, 0x11, 0x00, 0x16, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x02, + 0x01, 0x12, 0x03, 0x11, 0x08, 0x0f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x00, 0x12, 0x03, + 0x12, 0x02, 0x19, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x04, 0x12, 0x03, 0x12, 0x02, + 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x05, 0x12, 0x03, 0x12, 0x0b, 0x11, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x01, 0x12, 0x03, 0x12, 0x12, 0x14, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x02, 0x02, 0x00, 0x03, 0x12, 0x03, 0x12, 0x17, 0x18, 0x0a, 0x0b, 0x0a, 0x04, 0x04, + 0x02, 0x02, 0x01, 0x12, 0x03, 0x13, 0x02, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, + 0x04, 0x12, 0x03, 0x13, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x05, 0x12, + 0x03, 0x13, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x01, 0x12, 0x03, 0x13, + 0x12, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x03, 0x12, 0x03, 0x13, 0x1a, 0x1b, + 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x02, 0x12, 0x03, 0x14, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x02, 0x02, 0x02, 0x04, 0x12, 0x03, 0x14, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x02, 0x02, 0x02, 0x05, 0x12, 0x03, 0x14, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, + 0x02, 0x01, 0x12, 0x03, 0x14, 0x12, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x02, 0x03, + 0x12, 0x03, 0x14, 0x19, 0x1a, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x03, 0x12, 0x03, 0x15, + 0x02, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x03, 0x04, 0x12, 0x03, 0x15, 0x02, 0x0a, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x03, 0x05, 0x12, 0x03, 0x15, 0x0b, 0x11, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x02, 0x02, 0x03, 0x01, 0x12, 0x03, 0x15, 0x12, 0x17, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x02, 0x02, 0x03, 0x03, 0x12, 0x03, 0x15, 0x1a, 0x1b, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x03, + 0x12, 0x04, 0x18, 0x00, 0x1b, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x03, 0x01, 0x12, 0x03, 0x18, + 0x08, 0x14, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x03, 0x02, 0x00, 0x12, 0x03, 0x19, 0x02, 0x1c, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00, 0x04, 0x12, 0x03, 0x19, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x03, 0x02, 0x00, 0x05, 0x12, 0x03, 0x19, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x03, 0x02, 0x00, 0x01, 0x12, 0x03, 0x19, 0x12, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, + 0x00, 0x03, 0x12, 0x03, 0x19, 0x1a, 0x1b, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x03, 0x02, 0x01, 0x12, + 0x03, 0x1a, 0x02, 0x1f, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x04, 0x12, 0x03, 0x1a, + 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x05, 0x12, 0x03, 0x1a, 0x0b, 0x11, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x01, 0x12, 0x03, 0x1a, 0x12, 0x1a, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x03, 0x12, 0x03, 0x1a, 0x1d, 0x1e, 0x0a, 0x0a, 0x0a, 0x02, + 0x04, 0x04, 0x12, 0x04, 0x1d, 0x00, 0x23, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x04, 0x01, 0x12, + 0x03, 0x1d, 0x08, 0x15, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x04, 0x02, 0x00, 0x12, 0x03, 0x1e, 0x02, + 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x04, 0x12, 0x03, 0x1e, 0x02, 0x0a, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x05, 0x12, 0x03, 0x1e, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x04, 0x02, 0x00, 0x01, 0x12, 0x03, 0x1e, 0x12, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x04, 0x02, 0x00, 0x03, 0x12, 0x03, 0x1e, 0x1a, 0x1b, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x04, 0x02, + 0x01, 0x12, 0x03, 0x1f, 0x02, 0x20, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x01, 0x04, 0x12, + 0x03, 0x1f, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x01, 0x05, 0x12, 0x03, 0x1f, + 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x01, 0x01, 0x12, 0x03, 0x1f, 0x12, 0x1b, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x01, 0x03, 0x12, 0x03, 0x1f, 0x1e, 0x1f, 0x0a, 0x0b, + 0x0a, 0x04, 0x04, 0x04, 0x02, 0x02, 0x12, 0x03, 0x20, 0x02, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x04, 0x02, 0x02, 0x04, 0x12, 0x03, 0x20, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, + 0x02, 0x05, 0x12, 0x03, 0x20, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x02, 0x01, + 0x12, 0x03, 0x20, 0x12, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x02, 0x03, 0x12, 0x03, + 0x20, 0x1a, 0x1b, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x04, 0x02, 0x03, 0x12, 0x03, 0x21, 0x02, 0x1b, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x03, 0x04, 0x12, 0x03, 0x21, 0x02, 0x0a, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x04, 0x02, 0x03, 0x05, 0x12, 0x03, 0x21, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x04, 0x02, 0x03, 0x01, 0x12, 0x03, 0x21, 0x12, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, + 0x02, 0x03, 0x03, 0x12, 0x03, 0x21, 0x19, 0x1a, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x04, 0x02, 0x04, + 0x12, 0x03, 0x22, 0x02, 0x26, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x04, 0x04, 0x12, 0x03, + 0x22, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x04, 0x06, 0x12, 0x03, 0x22, 0x0b, + 0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x04, 0x01, 0x12, 0x03, 0x22, 0x19, 0x21, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x04, 0x03, 0x12, 0x03, 0x22, 0x24, 0x25, 0x0a, 0x0a, 0x0a, + 0x02, 0x04, 0x05, 0x12, 0x04, 0x25, 0x00, 0x27, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x05, 0x01, + 0x12, 0x03, 0x25, 0x08, 0x12, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x05, 0x02, 0x00, 0x12, 0x03, 0x26, + 0x02, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x04, 0x12, 0x03, 0x26, 0x02, 0x0a, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x05, 0x12, 0x03, 0x26, 0x0b, 0x11, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x01, 0x12, 0x03, 0x26, 0x12, 0x17, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x05, 0x02, 0x00, 0x03, 0x12, 0x03, 0x26, 0x1a, 0x1b, ]; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/components/builder-protocol/src/message/vault.rs b/components/builder-protocol/src/message/vault.rs index ddcbaaff6e..d8c1d46dc6 100644 --- a/components/builder-protocol/src/message/vault.rs +++ b/components/builder-protocol/src/message/vault.rs @@ -295,6 +295,7 @@ pub struct OriginCreate { // message fields name: ::protobuf::SingularField<::std::string::String>, owner_id: ::std::option::Option, + owner_name: ::protobuf::SingularField<::std::string::String>, // special fields unknown_fields: ::protobuf::UnknownFields, cached_size: ::std::cell::Cell, @@ -318,6 +319,7 @@ impl OriginCreate { OriginCreate { name: ::protobuf::SingularField::none(), owner_id: ::std::option::Option::None, + owner_name: ::protobuf::SingularField::none(), unknown_fields: ::protobuf::UnknownFields::new(), cached_size: ::std::cell::Cell::new(0), } @@ -379,6 +381,42 @@ impl OriginCreate { pub fn get_owner_id(&self) -> u64 { self.owner_id.unwrap_or(0) } + + // required string owner_name = 3; + + pub fn clear_owner_name(&mut self) { + self.owner_name.clear(); + } + + pub fn has_owner_name(&self) -> bool { + self.owner_name.is_some() + } + + // Param is passed by value, moved + pub fn set_owner_name(&mut self, v: ::std::string::String) { + self.owner_name = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_owner_name(&mut self) -> &mut ::std::string::String { + if self.owner_name.is_none() { + self.owner_name.set_default(); + }; + self.owner_name.as_mut().unwrap() + } + + // Take field + pub fn take_owner_name(&mut self) -> ::std::string::String { + self.owner_name.take().unwrap_or_else(|| ::std::string::String::new()) + } + + pub fn get_owner_name(&self) -> &str { + match self.owner_name.as_ref() { + Some(v) => &v, + None => "", + } + } } impl ::protobuf::Message for OriginCreate { @@ -389,6 +427,9 @@ impl ::protobuf::Message for OriginCreate { if self.owner_id.is_none() { return false; }; + if self.owner_name.is_none() { + return false; + }; true } @@ -406,6 +447,9 @@ impl ::protobuf::Message for OriginCreate { let tmp = try!(is.read_uint64()); self.owner_id = ::std::option::Option::Some(tmp); }, + 3 => { + try!(::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.owner_name)); + }, _ => { try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); }, @@ -424,6 +468,9 @@ impl ::protobuf::Message for OriginCreate { for value in self.owner_id.iter() { my_size += ::protobuf::rt::value_size(2, *value, ::protobuf::wire_format::WireTypeVarint); }; + for value in self.owner_name.iter() { + my_size += ::protobuf::rt::string_size(3, &value); + }; my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size @@ -436,6 +483,9 @@ impl ::protobuf::Message for OriginCreate { if let Some(v) = self.owner_id { try!(os.write_uint64(2, v)); }; + if let Some(v) = self.owner_name.as_ref() { + try!(os.write_string(3, &v)); + }; try!(os.write_unknown_fields(self.get_unknown_fields())); ::std::result::Result::Ok(()) } @@ -488,6 +538,11 @@ impl ::protobuf::MessageStatic for OriginCreate { OriginCreate::has_owner_id, OriginCreate::get_owner_id, )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor( + "owner_name", + OriginCreate::has_owner_name, + OriginCreate::get_owner_name, + )); ::protobuf::reflect::MessageDescriptor::new::( "OriginCreate", fields, @@ -502,6 +557,7 @@ impl ::protobuf::Clear for OriginCreate { fn clear(&mut self) { self.clear_name(); self.clear_owner_id(); + self.clear_owner_name(); self.unknown_fields.clear(); } } @@ -510,6 +566,7 @@ impl ::std::cmp::PartialEq for OriginCreate { fn eq(&self, other: &OriginCreate) -> bool { self.name == other.name && self.owner_id == other.owner_id && + self.owner_name == other.owner_name && self.unknown_fields == other.unknown_fields } } @@ -520,6 +577,192 @@ impl ::std::fmt::Debug for OriginCreate { } } +#[derive(Clone,Default)] +pub struct OriginDelete { + // message fields + name: ::protobuf::SingularField<::std::string::String>, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for OriginDelete {} + +impl OriginDelete { + pub fn new() -> OriginDelete { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static OriginDelete { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const OriginDelete, + }; + unsafe { + instance.get(|| { + OriginDelete { + name: ::protobuf::SingularField::none(), + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required string name = 1; + + pub fn clear_name(&mut self) { + self.name.clear(); + } + + pub fn has_name(&self) -> bool { + self.name.is_some() + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.name = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_name(&mut self) -> &mut ::std::string::String { + if self.name.is_none() { + self.name.set_default(); + }; + self.name.as_mut().unwrap() + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + self.name.take().unwrap_or_else(|| ::std::string::String::new()) + } + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } +} + +impl ::protobuf::Message for OriginDelete { + fn is_initialized(&self) -> bool { + if self.name.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + try!(::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.name.iter() { + my_size += ::protobuf::rt::string_size(1, &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 let Some(v) = self.name.as_ref() { + try!(os.write_string(1, &v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for OriginDelete { + fn new() -> OriginDelete { + OriginDelete::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_string_accessor( + "name", + OriginDelete::has_name, + OriginDelete::get_name, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "OriginDelete", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for OriginDelete { + fn clear(&mut self) { + self.clear_name(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for OriginDelete { + fn eq(&self, other: &OriginDelete) -> bool { + self.name == other.name && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for OriginDelete { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + #[derive(Clone,Default)] pub struct OriginGet { // message fields @@ -706,49 +949,4747 @@ impl ::std::fmt::Debug for OriginGet { } } +#[derive(Clone,Default)] +pub struct OriginMemberRemove { + // message fields + origin_id: ::std::option::Option, + user_id: ::std::option::Option, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for OriginMemberRemove {} + +impl OriginMemberRemove { + pub fn new() -> OriginMemberRemove { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static OriginMemberRemove { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const OriginMemberRemove, + }; + unsafe { + instance.get(|| { + OriginMemberRemove { + origin_id: ::std::option::Option::None, + user_id: ::std::option::Option::None, + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 origin_id = 1; + + pub fn clear_origin_id(&mut self) { + self.origin_id = ::std::option::Option::None; + } + + pub fn has_origin_id(&self) -> bool { + self.origin_id.is_some() + } + + // Param is passed by value, moved + pub fn set_origin_id(&mut self, v: u64) { + self.origin_id = ::std::option::Option::Some(v); + } + + pub fn get_origin_id(&self) -> u64 { + self.origin_id.unwrap_or(0) + } + + // required uint64 user_id = 2; + + pub fn clear_user_id(&mut self) { + self.user_id = ::std::option::Option::None; + } + + pub fn has_user_id(&self) -> bool { + self.user_id.is_some() + } + + // Param is passed by value, moved + pub fn set_user_id(&mut self, v: u64) { + self.user_id = ::std::option::Option::Some(v); + } + + pub fn get_user_id(&self) -> u64 { + self.user_id.unwrap_or(0) + } +} + +impl ::protobuf::Message for OriginMemberRemove { + fn is_initialized(&self) -> bool { + if self.origin_id.is_none() { + return false; + }; + if self.user_id.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.origin_id = ::std::option::Option::Some(tmp); + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.user_id = ::std::option::Option::Some(tmp); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.origin_id.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.user_id.iter() { + my_size += ::protobuf::rt::value_size(2, *value, ::protobuf::wire_format::WireTypeVarint); + }; + 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 let Some(v) = self.origin_id { + try!(os.write_uint64(1, v)); + }; + if let Some(v) = self.user_id { + try!(os.write_uint64(2, v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for OriginMemberRemove { + fn new() -> OriginMemberRemove { + OriginMemberRemove::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "origin_id", + OriginMemberRemove::has_origin_id, + OriginMemberRemove::get_origin_id, + )); + fields.push(::protobuf::reflect::accessor::make_singular_u64_accessor( + "user_id", + OriginMemberRemove::has_user_id, + OriginMemberRemove::get_user_id, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "OriginMemberRemove", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for OriginMemberRemove { + fn clear(&mut self) { + self.clear_origin_id(); + self.clear_user_id(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for OriginMemberRemove { + fn eq(&self, other: &OriginMemberRemove) -> bool { + self.origin_id == other.origin_id && + self.user_id == other.user_id && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for OriginMemberRemove { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct OriginMemberListRequest { + // message fields + origin_id: ::std::option::Option, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for OriginMemberListRequest {} + +impl OriginMemberListRequest { + pub fn new() -> OriginMemberListRequest { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static OriginMemberListRequest { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const OriginMemberListRequest, + }; + unsafe { + instance.get(|| { + OriginMemberListRequest { + origin_id: ::std::option::Option::None, + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 origin_id = 1; + + pub fn clear_origin_id(&mut self) { + self.origin_id = ::std::option::Option::None; + } + + pub fn has_origin_id(&self) -> bool { + self.origin_id.is_some() + } + + // Param is passed by value, moved + pub fn set_origin_id(&mut self, v: u64) { + self.origin_id = ::std::option::Option::Some(v); + } + + pub fn get_origin_id(&self) -> u64 { + self.origin_id.unwrap_or(0) + } +} + +impl ::protobuf::Message for OriginMemberListRequest { + fn is_initialized(&self) -> bool { + if self.origin_id.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.origin_id = ::std::option::Option::Some(tmp); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.origin_id.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + 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 let Some(v) = self.origin_id { + try!(os.write_uint64(1, v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for OriginMemberListRequest { + fn new() -> OriginMemberListRequest { + OriginMemberListRequest::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "origin_id", + OriginMemberListRequest::has_origin_id, + OriginMemberListRequest::get_origin_id, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "OriginMemberListRequest", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for OriginMemberListRequest { + fn clear(&mut self) { + self.clear_origin_id(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for OriginMemberListRequest { + fn eq(&self, other: &OriginMemberListRequest) -> bool { + self.origin_id == other.origin_id && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for OriginMemberListRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct OriginMemberListResponse { + // message fields + origin_id: ::std::option::Option, + members: ::protobuf::RepeatedField<::std::string::String>, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for OriginMemberListResponse {} + +impl OriginMemberListResponse { + pub fn new() -> OriginMemberListResponse { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static OriginMemberListResponse { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const OriginMemberListResponse, + }; + unsafe { + instance.get(|| { + OriginMemberListResponse { + origin_id: ::std::option::Option::None, + members: ::protobuf::RepeatedField::new(), + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 origin_id = 1; + + pub fn clear_origin_id(&mut self) { + self.origin_id = ::std::option::Option::None; + } + + pub fn has_origin_id(&self) -> bool { + self.origin_id.is_some() + } + + // Param is passed by value, moved + pub fn set_origin_id(&mut self, v: u64) { + self.origin_id = ::std::option::Option::Some(v); + } + + pub fn get_origin_id(&self) -> u64 { + self.origin_id.unwrap_or(0) + } + + // repeated string members = 2; + + pub fn clear_members(&mut self) { + self.members.clear(); + } + + // Param is passed by value, moved + pub fn set_members(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { + self.members = v; + } + + // Mutable pointer to the field. + pub fn mut_members(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { + &mut self.members + } + + // Take field + pub fn take_members(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { + ::std::mem::replace(&mut self.members, ::protobuf::RepeatedField::new()) + } + + pub fn get_members(&self) -> &[::std::string::String] { + &self.members + } +} + +impl ::protobuf::Message for OriginMemberListResponse { + fn is_initialized(&self) -> bool { + if self.origin_id.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.origin_id = ::std::option::Option::Some(tmp); + }, + 2 => { + try!(::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.members)); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.origin_id.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.members.iter() { + my_size += ::protobuf::rt::string_size(2, &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 let Some(v) = self.origin_id { + try!(os.write_uint64(1, v)); + }; + for v in self.members.iter() { + try!(os.write_string(2, &v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for OriginMemberListResponse { + fn new() -> OriginMemberListResponse { + OriginMemberListResponse::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "origin_id", + OriginMemberListResponse::has_origin_id, + OriginMemberListResponse::get_origin_id, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_string_accessor( + "members", + OriginMemberListResponse::get_members, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "OriginMemberListResponse", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for OriginMemberListResponse { + fn clear(&mut self) { + self.clear_origin_id(); + self.clear_members(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for OriginMemberListResponse { + fn eq(&self, other: &OriginMemberListResponse) -> bool { + self.origin_id == other.origin_id && + self.members == other.members && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for OriginMemberListResponse { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct AccountOriginListRequest { + // message fields + account_id: ::std::option::Option, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for AccountOriginListRequest {} + +impl AccountOriginListRequest { + pub fn new() -> AccountOriginListRequest { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static AccountOriginListRequest { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const AccountOriginListRequest, + }; + unsafe { + instance.get(|| { + AccountOriginListRequest { + account_id: ::std::option::Option::None, + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 account_id = 1; + + pub fn clear_account_id(&mut self) { + self.account_id = ::std::option::Option::None; + } + + pub fn has_account_id(&self) -> bool { + self.account_id.is_some() + } + + // Param is passed by value, moved + pub fn set_account_id(&mut self, v: u64) { + self.account_id = ::std::option::Option::Some(v); + } + + pub fn get_account_id(&self) -> u64 { + self.account_id.unwrap_or(0) + } +} + +impl ::protobuf::Message for AccountOriginListRequest { + fn is_initialized(&self) -> bool { + if self.account_id.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.account_id = ::std::option::Option::Some(tmp); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.account_id.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + 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 let Some(v) = self.account_id { + try!(os.write_uint64(1, v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for AccountOriginListRequest { + fn new() -> AccountOriginListRequest { + AccountOriginListRequest::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "account_id", + AccountOriginListRequest::has_account_id, + AccountOriginListRequest::get_account_id, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "AccountOriginListRequest", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for AccountOriginListRequest { + fn clear(&mut self) { + self.clear_account_id(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for AccountOriginListRequest { + fn eq(&self, other: &AccountOriginListRequest) -> bool { + self.account_id == other.account_id && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for AccountOriginListRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct AccountOriginListResponse { + // message fields + account_id: ::std::option::Option, + origins: ::protobuf::RepeatedField<::std::string::String>, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for AccountOriginListResponse {} + +impl AccountOriginListResponse { + pub fn new() -> AccountOriginListResponse { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static AccountOriginListResponse { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const AccountOriginListResponse, + }; + unsafe { + instance.get(|| { + AccountOriginListResponse { + account_id: ::std::option::Option::None, + origins: ::protobuf::RepeatedField::new(), + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 account_id = 1; + + pub fn clear_account_id(&mut self) { + self.account_id = ::std::option::Option::None; + } + + pub fn has_account_id(&self) -> bool { + self.account_id.is_some() + } + + // Param is passed by value, moved + pub fn set_account_id(&mut self, v: u64) { + self.account_id = ::std::option::Option::Some(v); + } + + pub fn get_account_id(&self) -> u64 { + self.account_id.unwrap_or(0) + } + + // repeated string origins = 2; + + pub fn clear_origins(&mut self) { + self.origins.clear(); + } + + // Param is passed by value, moved + pub fn set_origins(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { + self.origins = v; + } + + // Mutable pointer to the field. + pub fn mut_origins(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { + &mut self.origins + } + + // Take field + pub fn take_origins(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { + ::std::mem::replace(&mut self.origins, ::protobuf::RepeatedField::new()) + } + + pub fn get_origins(&self) -> &[::std::string::String] { + &self.origins + } +} + +impl ::protobuf::Message for AccountOriginListResponse { + fn is_initialized(&self) -> bool { + if self.account_id.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.account_id = ::std::option::Option::Some(tmp); + }, + 2 => { + try!(::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.origins)); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.account_id.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.origins.iter() { + my_size += ::protobuf::rt::string_size(2, &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 let Some(v) = self.account_id { + try!(os.write_uint64(1, v)); + }; + for v in self.origins.iter() { + try!(os.write_string(2, &v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for AccountOriginListResponse { + fn new() -> AccountOriginListResponse { + AccountOriginListResponse::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "account_id", + AccountOriginListResponse::has_account_id, + AccountOriginListResponse::get_account_id, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_string_accessor( + "origins", + AccountOriginListResponse::get_origins, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "AccountOriginListResponse", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for AccountOriginListResponse { + fn clear(&mut self) { + self.clear_account_id(); + self.clear_origins(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for AccountOriginListResponse { + fn eq(&self, other: &AccountOriginListResponse) -> bool { + self.account_id == other.account_id && + self.origins == other.origins && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for AccountOriginListResponse { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct CheckOriginAccessRequest { + // message oneof groups + account_info: ::std::option::Option, + origin_info: ::std::option::Option, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for CheckOriginAccessRequest {} + +#[derive(Clone,PartialEq)] +pub enum CheckOriginAccessRequest_oneof_account_info { + account_id(u64), + account_name(::std::string::String), +} + +#[derive(Clone,PartialEq)] +pub enum CheckOriginAccessRequest_oneof_origin_info { + origin_id(u64), + origin_name(::std::string::String), +} + +impl CheckOriginAccessRequest { + pub fn new() -> CheckOriginAccessRequest { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static CheckOriginAccessRequest { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const CheckOriginAccessRequest, + }; + unsafe { + instance.get(|| { + CheckOriginAccessRequest { + account_info: ::std::option::Option::None, + origin_info: ::std::option::Option::None, + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // optional uint64 account_id = 1; + + pub fn clear_account_id(&mut self) { + self.account_info = ::std::option::Option::None; + } + + pub fn has_account_id(&self) -> bool { + match self.account_info { + ::std::option::Option::Some(CheckOriginAccessRequest_oneof_account_info::account_id(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_account_id(&mut self, v: u64) { + self.account_info = ::std::option::Option::Some(CheckOriginAccessRequest_oneof_account_info::account_id(v)) + } + + pub fn get_account_id(&self) -> u64 { + match self.account_info { + ::std::option::Option::Some(CheckOriginAccessRequest_oneof_account_info::account_id(v)) => v, + _ => 0, + } + } + + // optional string account_name = 2; + + pub fn clear_account_name(&mut self) { + self.account_info = ::std::option::Option::None; + } + + pub fn has_account_name(&self) -> bool { + match self.account_info { + ::std::option::Option::Some(CheckOriginAccessRequest_oneof_account_info::account_name(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_account_name(&mut self, v: ::std::string::String) { + self.account_info = ::std::option::Option::Some(CheckOriginAccessRequest_oneof_account_info::account_name(v)) + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_account_name(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(CheckOriginAccessRequest_oneof_account_info::account_name(_)) = self.account_info { + } else { + self.account_info = ::std::option::Option::Some(CheckOriginAccessRequest_oneof_account_info::account_name(::std::string::String::new())); + } + match self.account_info { + ::std::option::Option::Some(CheckOriginAccessRequest_oneof_account_info::account_name(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_account_name(&mut self) -> ::std::string::String { + if self.has_account_name() { + match self.account_info.take() { + ::std::option::Option::Some(CheckOriginAccessRequest_oneof_account_info::account_name(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } + + pub fn get_account_name(&self) -> &str { + match self.account_info { + ::std::option::Option::Some(CheckOriginAccessRequest_oneof_account_info::account_name(ref v)) => v, + _ => "", + } + } + + // optional uint64 origin_id = 3; + + pub fn clear_origin_id(&mut self) { + self.origin_info = ::std::option::Option::None; + } + + pub fn has_origin_id(&self) -> bool { + match self.origin_info { + ::std::option::Option::Some(CheckOriginAccessRequest_oneof_origin_info::origin_id(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_origin_id(&mut self, v: u64) { + self.origin_info = ::std::option::Option::Some(CheckOriginAccessRequest_oneof_origin_info::origin_id(v)) + } + + pub fn get_origin_id(&self) -> u64 { + match self.origin_info { + ::std::option::Option::Some(CheckOriginAccessRequest_oneof_origin_info::origin_id(v)) => v, + _ => 0, + } + } + + // optional string origin_name = 4; + + pub fn clear_origin_name(&mut self) { + self.origin_info = ::std::option::Option::None; + } + + pub fn has_origin_name(&self) -> bool { + match self.origin_info { + ::std::option::Option::Some(CheckOriginAccessRequest_oneof_origin_info::origin_name(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_origin_name(&mut self, v: ::std::string::String) { + self.origin_info = ::std::option::Option::Some(CheckOriginAccessRequest_oneof_origin_info::origin_name(v)) + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_origin_name(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(CheckOriginAccessRequest_oneof_origin_info::origin_name(_)) = self.origin_info { + } else { + self.origin_info = ::std::option::Option::Some(CheckOriginAccessRequest_oneof_origin_info::origin_name(::std::string::String::new())); + } + match self.origin_info { + ::std::option::Option::Some(CheckOriginAccessRequest_oneof_origin_info::origin_name(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_origin_name(&mut self) -> ::std::string::String { + if self.has_origin_name() { + match self.origin_info.take() { + ::std::option::Option::Some(CheckOriginAccessRequest_oneof_origin_info::origin_name(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } + + pub fn get_origin_name(&self) -> &str { + match self.origin_info { + ::std::option::Option::Some(CheckOriginAccessRequest_oneof_origin_info::origin_name(ref v)) => v, + _ => "", + } + } +} + +impl ::protobuf::Message for CheckOriginAccessRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + self.account_info = ::std::option::Option::Some(CheckOriginAccessRequest_oneof_account_info::account_id(try!(is.read_uint64()))); + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + self.account_info = ::std::option::Option::Some(CheckOriginAccessRequest_oneof_account_info::account_name(try!(is.read_string()))); + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + self.origin_info = ::std::option::Option::Some(CheckOriginAccessRequest_oneof_origin_info::origin_id(try!(is.read_uint64()))); + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + self.origin_info = ::std::option::Option::Some(CheckOriginAccessRequest_oneof_origin_info::origin_name(try!(is.read_string()))); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let ::std::option::Option::Some(ref v) = self.account_info { + match v { + &CheckOriginAccessRequest_oneof_account_info::account_id(v) => { + my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint); + }, + &CheckOriginAccessRequest_oneof_account_info::account_name(ref v) => { + my_size += ::protobuf::rt::string_size(2, &v); + }, + }; + }; + if let ::std::option::Option::Some(ref v) = self.origin_info { + match v { + &CheckOriginAccessRequest_oneof_origin_info::origin_id(v) => { + my_size += ::protobuf::rt::value_size(3, v, ::protobuf::wire_format::WireTypeVarint); + }, + &CheckOriginAccessRequest_oneof_origin_info::origin_name(ref v) => { + my_size += ::protobuf::rt::string_size(4, &v); + }, + }; + }; + 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 let ::std::option::Option::Some(ref v) = self.account_info { + match v { + &CheckOriginAccessRequest_oneof_account_info::account_id(v) => { + try!(os.write_uint64(1, v)); + }, + &CheckOriginAccessRequest_oneof_account_info::account_name(ref v) => { + try!(os.write_string(2, v)); + }, + }; + }; + if let ::std::option::Option::Some(ref v) = self.origin_info { + match v { + &CheckOriginAccessRequest_oneof_origin_info::origin_id(v) => { + try!(os.write_uint64(3, v)); + }, + &CheckOriginAccessRequest_oneof_origin_info::origin_name(ref v) => { + try!(os.write_string(4, v)); + }, + }; + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for CheckOriginAccessRequest { + fn new() -> CheckOriginAccessRequest { + CheckOriginAccessRequest::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "account_id", + CheckOriginAccessRequest::has_account_id, + CheckOriginAccessRequest::get_account_id, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor( + "account_name", + CheckOriginAccessRequest::has_account_name, + CheckOriginAccessRequest::get_account_name, + )); + fields.push(::protobuf::reflect::accessor::make_singular_u64_accessor( + "origin_id", + CheckOriginAccessRequest::has_origin_id, + CheckOriginAccessRequest::get_origin_id, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor( + "origin_name", + CheckOriginAccessRequest::has_origin_name, + CheckOriginAccessRequest::get_origin_name, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "CheckOriginAccessRequest", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for CheckOriginAccessRequest { + fn clear(&mut self) { + self.clear_account_id(); + self.clear_account_name(); + self.clear_origin_id(); + self.clear_origin_name(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for CheckOriginAccessRequest { + fn eq(&self, other: &CheckOriginAccessRequest) -> bool { + self.account_info == other.account_info && + self.origin_info == other.origin_info && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for CheckOriginAccessRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct CheckOriginAccessResponse { + // message fields + has_access: ::std::option::Option, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for CheckOriginAccessResponse {} + +impl CheckOriginAccessResponse { + pub fn new() -> CheckOriginAccessResponse { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static CheckOriginAccessResponse { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const CheckOriginAccessResponse, + }; + unsafe { + instance.get(|| { + CheckOriginAccessResponse { + has_access: ::std::option::Option::None, + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required bool has_access = 1; + + pub fn clear_has_access(&mut self) { + self.has_access = ::std::option::Option::None; + } + + pub fn has_has_access(&self) -> bool { + self.has_access.is_some() + } + + // Param is passed by value, moved + pub fn set_has_access(&mut self, v: bool) { + self.has_access = ::std::option::Option::Some(v); + } + + pub fn get_has_access(&self) -> bool { + self.has_access.unwrap_or(false) + } +} + +impl ::protobuf::Message for CheckOriginAccessResponse { + fn is_initialized(&self) -> bool { + if self.has_access.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_bool()); + self.has_access = ::std::option::Option::Some(tmp); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.has_access.is_some() { + my_size += 2; + }; + 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 let Some(v) = self.has_access { + try!(os.write_bool(1, v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for CheckOriginAccessResponse { + fn new() -> CheckOriginAccessResponse { + CheckOriginAccessResponse::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_bool_accessor( + "has_access", + CheckOriginAccessResponse::has_has_access, + CheckOriginAccessResponse::get_has_access, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "CheckOriginAccessResponse", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for CheckOriginAccessResponse { + fn clear(&mut self) { + self.clear_has_access(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for CheckOriginAccessResponse { + fn eq(&self, other: &CheckOriginAccessResponse) -> bool { + self.has_access == other.has_access && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for CheckOriginAccessResponse { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct AccountInvitationListRequest { + // message fields + account_id: ::std::option::Option, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for AccountInvitationListRequest {} + +impl AccountInvitationListRequest { + pub fn new() -> AccountInvitationListRequest { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static AccountInvitationListRequest { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const AccountInvitationListRequest, + }; + unsafe { + instance.get(|| { + AccountInvitationListRequest { + account_id: ::std::option::Option::None, + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 account_id = 1; + + pub fn clear_account_id(&mut self) { + self.account_id = ::std::option::Option::None; + } + + pub fn has_account_id(&self) -> bool { + self.account_id.is_some() + } + + // Param is passed by value, moved + pub fn set_account_id(&mut self, v: u64) { + self.account_id = ::std::option::Option::Some(v); + } + + pub fn get_account_id(&self) -> u64 { + self.account_id.unwrap_or(0) + } +} + +impl ::protobuf::Message for AccountInvitationListRequest { + fn is_initialized(&self) -> bool { + if self.account_id.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.account_id = ::std::option::Option::Some(tmp); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.account_id.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + 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 let Some(v) = self.account_id { + try!(os.write_uint64(1, v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for AccountInvitationListRequest { + fn new() -> AccountInvitationListRequest { + AccountInvitationListRequest::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "account_id", + AccountInvitationListRequest::has_account_id, + AccountInvitationListRequest::get_account_id, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "AccountInvitationListRequest", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for AccountInvitationListRequest { + fn clear(&mut self) { + self.clear_account_id(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for AccountInvitationListRequest { + fn eq(&self, other: &AccountInvitationListRequest) -> bool { + self.account_id == other.account_id && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for AccountInvitationListRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct AccountInvitationListResponse { + // message fields + account_id: ::std::option::Option, + invitations: ::protobuf::RepeatedField, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for AccountInvitationListResponse {} + +impl AccountInvitationListResponse { + pub fn new() -> AccountInvitationListResponse { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static AccountInvitationListResponse { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const AccountInvitationListResponse, + }; + unsafe { + instance.get(|| { + AccountInvitationListResponse { + account_id: ::std::option::Option::None, + invitations: ::protobuf::RepeatedField::new(), + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 account_id = 1; + + pub fn clear_account_id(&mut self) { + self.account_id = ::std::option::Option::None; + } + + pub fn has_account_id(&self) -> bool { + self.account_id.is_some() + } + + // Param is passed by value, moved + pub fn set_account_id(&mut self, v: u64) { + self.account_id = ::std::option::Option::Some(v); + } + + pub fn get_account_id(&self) -> u64 { + self.account_id.unwrap_or(0) + } + + // repeated .vault.OriginInvitation invitations = 2; + + pub fn clear_invitations(&mut self) { + self.invitations.clear(); + } + + // Param is passed by value, moved + pub fn set_invitations(&mut self, v: ::protobuf::RepeatedField) { + self.invitations = v; + } + + // Mutable pointer to the field. + pub fn mut_invitations(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.invitations + } + + // Take field + pub fn take_invitations(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.invitations, ::protobuf::RepeatedField::new()) + } + + pub fn get_invitations(&self) -> &[OriginInvitation] { + &self.invitations + } +} + +impl ::protobuf::Message for AccountInvitationListResponse { + fn is_initialized(&self) -> bool { + if self.account_id.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.account_id = ::std::option::Option::Some(tmp); + }, + 2 => { + try!(::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.invitations)); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.account_id.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.invitations.iter() { + 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 let Some(v) = self.account_id { + try!(os.write_uint64(1, v)); + }; + for v in self.invitations.iter() { + try!(os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)); + try!(os.write_raw_varint32(v.get_cached_size())); + try!(v.write_to_with_cached_sizes(os)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for AccountInvitationListResponse { + fn new() -> AccountInvitationListResponse { + AccountInvitationListResponse::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "account_id", + AccountInvitationListResponse::has_account_id, + AccountInvitationListResponse::get_account_id, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_message_accessor( + "invitations", + AccountInvitationListResponse::get_invitations, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "AccountInvitationListResponse", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for AccountInvitationListResponse { + fn clear(&mut self) { + self.clear_account_id(); + self.clear_invitations(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for AccountInvitationListResponse { + fn eq(&self, other: &AccountInvitationListResponse) -> bool { + self.account_id == other.account_id && + self.invitations == other.invitations && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for AccountInvitationListResponse { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct OriginInvitationListRequest { + // message fields + origin_id: ::std::option::Option, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for OriginInvitationListRequest {} + +impl OriginInvitationListRequest { + pub fn new() -> OriginInvitationListRequest { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static OriginInvitationListRequest { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const OriginInvitationListRequest, + }; + unsafe { + instance.get(|| { + OriginInvitationListRequest { + origin_id: ::std::option::Option::None, + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 origin_id = 1; + + pub fn clear_origin_id(&mut self) { + self.origin_id = ::std::option::Option::None; + } + + pub fn has_origin_id(&self) -> bool { + self.origin_id.is_some() + } + + // Param is passed by value, moved + pub fn set_origin_id(&mut self, v: u64) { + self.origin_id = ::std::option::Option::Some(v); + } + + pub fn get_origin_id(&self) -> u64 { + self.origin_id.unwrap_or(0) + } +} + +impl ::protobuf::Message for OriginInvitationListRequest { + fn is_initialized(&self) -> bool { + if self.origin_id.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.origin_id = ::std::option::Option::Some(tmp); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.origin_id.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + 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 let Some(v) = self.origin_id { + try!(os.write_uint64(1, v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for OriginInvitationListRequest { + fn new() -> OriginInvitationListRequest { + OriginInvitationListRequest::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "origin_id", + OriginInvitationListRequest::has_origin_id, + OriginInvitationListRequest::get_origin_id, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "OriginInvitationListRequest", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for OriginInvitationListRequest { + fn clear(&mut self) { + self.clear_origin_id(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for OriginInvitationListRequest { + fn eq(&self, other: &OriginInvitationListRequest) -> bool { + self.origin_id == other.origin_id && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for OriginInvitationListRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct OriginInvitationListResponse { + // message fields + origin_id: ::std::option::Option, + invitations: ::protobuf::RepeatedField, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for OriginInvitationListResponse {} + +impl OriginInvitationListResponse { + pub fn new() -> OriginInvitationListResponse { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static OriginInvitationListResponse { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const OriginInvitationListResponse, + }; + unsafe { + instance.get(|| { + OriginInvitationListResponse { + origin_id: ::std::option::Option::None, + invitations: ::protobuf::RepeatedField::new(), + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 origin_id = 1; + + pub fn clear_origin_id(&mut self) { + self.origin_id = ::std::option::Option::None; + } + + pub fn has_origin_id(&self) -> bool { + self.origin_id.is_some() + } + + // Param is passed by value, moved + pub fn set_origin_id(&mut self, v: u64) { + self.origin_id = ::std::option::Option::Some(v); + } + + pub fn get_origin_id(&self) -> u64 { + self.origin_id.unwrap_or(0) + } + + // repeated .vault.OriginInvitation invitations = 2; + + pub fn clear_invitations(&mut self) { + self.invitations.clear(); + } + + // Param is passed by value, moved + pub fn set_invitations(&mut self, v: ::protobuf::RepeatedField) { + self.invitations = v; + } + + // Mutable pointer to the field. + pub fn mut_invitations(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.invitations + } + + // Take field + pub fn take_invitations(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.invitations, ::protobuf::RepeatedField::new()) + } + + pub fn get_invitations(&self) -> &[OriginInvitation] { + &self.invitations + } +} + +impl ::protobuf::Message for OriginInvitationListResponse { + fn is_initialized(&self) -> bool { + if self.origin_id.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.origin_id = ::std::option::Option::Some(tmp); + }, + 2 => { + try!(::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.invitations)); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.origin_id.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.invitations.iter() { + 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 let Some(v) = self.origin_id { + try!(os.write_uint64(1, v)); + }; + for v in self.invitations.iter() { + try!(os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)); + try!(os.write_raw_varint32(v.get_cached_size())); + try!(v.write_to_with_cached_sizes(os)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for OriginInvitationListResponse { + fn new() -> OriginInvitationListResponse { + OriginInvitationListResponse::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "origin_id", + OriginInvitationListResponse::has_origin_id, + OriginInvitationListResponse::get_origin_id, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_message_accessor( + "invitations", + OriginInvitationListResponse::get_invitations, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "OriginInvitationListResponse", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for OriginInvitationListResponse { + fn clear(&mut self) { + self.clear_origin_id(); + self.clear_invitations(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for OriginInvitationListResponse { + fn eq(&self, other: &OriginInvitationListResponse) -> bool { + self.origin_id == other.origin_id && + self.invitations == other.invitations && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for OriginInvitationListResponse { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct OriginInvitation { + // message fields + id: ::std::option::Option, + account_id: ::std::option::Option, + account_name: ::protobuf::SingularField<::std::string::String>, + origin_id: ::std::option::Option, + origin_name: ::protobuf::SingularField<::std::string::String>, + owner_id: ::std::option::Option, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for OriginInvitation {} + +impl OriginInvitation { + pub fn new() -> OriginInvitation { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static OriginInvitation { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const OriginInvitation, + }; + unsafe { + instance.get(|| { + OriginInvitation { + id: ::std::option::Option::None, + account_id: ::std::option::Option::None, + account_name: ::protobuf::SingularField::none(), + origin_id: ::std::option::Option::None, + origin_name: ::protobuf::SingularField::none(), + owner_id: ::std::option::Option::None, + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 id = 1; + + pub fn clear_id(&mut self) { + self.id = ::std::option::Option::None; + } + + pub fn has_id(&self) -> bool { + self.id.is_some() + } + + // Param is passed by value, moved + pub fn set_id(&mut self, v: u64) { + self.id = ::std::option::Option::Some(v); + } + + pub fn get_id(&self) -> u64 { + self.id.unwrap_or(0) + } + + // required uint64 account_id = 2; + + pub fn clear_account_id(&mut self) { + self.account_id = ::std::option::Option::None; + } + + pub fn has_account_id(&self) -> bool { + self.account_id.is_some() + } + + // Param is passed by value, moved + pub fn set_account_id(&mut self, v: u64) { + self.account_id = ::std::option::Option::Some(v); + } + + pub fn get_account_id(&self) -> u64 { + self.account_id.unwrap_or(0) + } + + // required string account_name = 3; + + pub fn clear_account_name(&mut self) { + self.account_name.clear(); + } + + pub fn has_account_name(&self) -> bool { + self.account_name.is_some() + } + + // Param is passed by value, moved + pub fn set_account_name(&mut self, v: ::std::string::String) { + self.account_name = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_account_name(&mut self) -> &mut ::std::string::String { + if self.account_name.is_none() { + self.account_name.set_default(); + }; + self.account_name.as_mut().unwrap() + } + + // Take field + pub fn take_account_name(&mut self) -> ::std::string::String { + self.account_name.take().unwrap_or_else(|| ::std::string::String::new()) + } + + pub fn get_account_name(&self) -> &str { + match self.account_name.as_ref() { + Some(v) => &v, + None => "", + } + } + + // required uint64 origin_id = 4; + + pub fn clear_origin_id(&mut self) { + self.origin_id = ::std::option::Option::None; + } + + pub fn has_origin_id(&self) -> bool { + self.origin_id.is_some() + } + + // Param is passed by value, moved + pub fn set_origin_id(&mut self, v: u64) { + self.origin_id = ::std::option::Option::Some(v); + } + + pub fn get_origin_id(&self) -> u64 { + self.origin_id.unwrap_or(0) + } + + // required string origin_name = 5; + + pub fn clear_origin_name(&mut self) { + self.origin_name.clear(); + } + + pub fn has_origin_name(&self) -> bool { + self.origin_name.is_some() + } + + // Param is passed by value, moved + pub fn set_origin_name(&mut self, v: ::std::string::String) { + self.origin_name = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_origin_name(&mut self) -> &mut ::std::string::String { + if self.origin_name.is_none() { + self.origin_name.set_default(); + }; + self.origin_name.as_mut().unwrap() + } + + // Take field + pub fn take_origin_name(&mut self) -> ::std::string::String { + self.origin_name.take().unwrap_or_else(|| ::std::string::String::new()) + } + + pub fn get_origin_name(&self) -> &str { + match self.origin_name.as_ref() { + Some(v) => &v, + None => "", + } + } + + // required uint64 owner_id = 6; + + pub fn clear_owner_id(&mut self) { + self.owner_id = ::std::option::Option::None; + } + + pub fn has_owner_id(&self) -> bool { + self.owner_id.is_some() + } + + // Param is passed by value, moved + pub fn set_owner_id(&mut self, v: u64) { + self.owner_id = ::std::option::Option::Some(v); + } + + pub fn get_owner_id(&self) -> u64 { + self.owner_id.unwrap_or(0) + } +} + +impl ::protobuf::Message for OriginInvitation { + fn is_initialized(&self) -> bool { + if self.id.is_none() { + return false; + }; + if self.account_id.is_none() { + return false; + }; + if self.account_name.is_none() { + return false; + }; + if self.origin_id.is_none() { + return false; + }; + if self.origin_name.is_none() { + return false; + }; + if self.owner_id.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.id = ::std::option::Option::Some(tmp); + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.account_id = ::std::option::Option::Some(tmp); + }, + 3 => { + try!(::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.account_name)); + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.origin_id = ::std::option::Option::Some(tmp); + }, + 5 => { + try!(::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.origin_name)); + }, + 6 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.owner_id = ::std::option::Option::Some(tmp); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.id.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.account_id.iter() { + my_size += ::protobuf::rt::value_size(2, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.account_name.iter() { + my_size += ::protobuf::rt::string_size(3, &value); + }; + for value in self.origin_id.iter() { + my_size += ::protobuf::rt::value_size(4, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.origin_name.iter() { + my_size += ::protobuf::rt::string_size(5, &value); + }; + for value in self.owner_id.iter() { + my_size += ::protobuf::rt::value_size(6, *value, ::protobuf::wire_format::WireTypeVarint); + }; + 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 let Some(v) = self.id { + try!(os.write_uint64(1, v)); + }; + if let Some(v) = self.account_id { + try!(os.write_uint64(2, v)); + }; + if let Some(v) = self.account_name.as_ref() { + try!(os.write_string(3, &v)); + }; + if let Some(v) = self.origin_id { + try!(os.write_uint64(4, v)); + }; + if let Some(v) = self.origin_name.as_ref() { + try!(os.write_string(5, &v)); + }; + if let Some(v) = self.owner_id { + try!(os.write_uint64(6, v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for OriginInvitation { + fn new() -> OriginInvitation { + OriginInvitation::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "id", + OriginInvitation::has_id, + OriginInvitation::get_id, + )); + fields.push(::protobuf::reflect::accessor::make_singular_u64_accessor( + "account_id", + OriginInvitation::has_account_id, + OriginInvitation::get_account_id, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor( + "account_name", + OriginInvitation::has_account_name, + OriginInvitation::get_account_name, + )); + fields.push(::protobuf::reflect::accessor::make_singular_u64_accessor( + "origin_id", + OriginInvitation::has_origin_id, + OriginInvitation::get_origin_id, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor( + "origin_name", + OriginInvitation::has_origin_name, + OriginInvitation::get_origin_name, + )); + fields.push(::protobuf::reflect::accessor::make_singular_u64_accessor( + "owner_id", + OriginInvitation::has_owner_id, + OriginInvitation::get_owner_id, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "OriginInvitation", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for OriginInvitation { + fn clear(&mut self) { + self.clear_id(); + self.clear_account_id(); + self.clear_account_name(); + self.clear_origin_id(); + self.clear_origin_name(); + self.clear_owner_id(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for OriginInvitation { + fn eq(&self, other: &OriginInvitation) -> bool { + self.id == other.id && + self.account_id == other.account_id && + self.account_name == other.account_name && + self.origin_id == other.origin_id && + self.origin_name == other.origin_name && + self.owner_id == other.owner_id && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for OriginInvitation { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct OriginInvitationCreate { + // message fields + account_id: ::std::option::Option, + account_name: ::protobuf::SingularField<::std::string::String>, + origin_id: ::std::option::Option, + origin_name: ::protobuf::SingularField<::std::string::String>, + owner_id: ::std::option::Option, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for OriginInvitationCreate {} + +impl OriginInvitationCreate { + pub fn new() -> OriginInvitationCreate { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static OriginInvitationCreate { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const OriginInvitationCreate, + }; + unsafe { + instance.get(|| { + OriginInvitationCreate { + account_id: ::std::option::Option::None, + account_name: ::protobuf::SingularField::none(), + origin_id: ::std::option::Option::None, + origin_name: ::protobuf::SingularField::none(), + owner_id: ::std::option::Option::None, + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 account_id = 1; + + pub fn clear_account_id(&mut self) { + self.account_id = ::std::option::Option::None; + } + + pub fn has_account_id(&self) -> bool { + self.account_id.is_some() + } + + // Param is passed by value, moved + pub fn set_account_id(&mut self, v: u64) { + self.account_id = ::std::option::Option::Some(v); + } + + pub fn get_account_id(&self) -> u64 { + self.account_id.unwrap_or(0) + } + + // required string account_name = 2; + + pub fn clear_account_name(&mut self) { + self.account_name.clear(); + } + + pub fn has_account_name(&self) -> bool { + self.account_name.is_some() + } + + // Param is passed by value, moved + pub fn set_account_name(&mut self, v: ::std::string::String) { + self.account_name = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_account_name(&mut self) -> &mut ::std::string::String { + if self.account_name.is_none() { + self.account_name.set_default(); + }; + self.account_name.as_mut().unwrap() + } + + // Take field + pub fn take_account_name(&mut self) -> ::std::string::String { + self.account_name.take().unwrap_or_else(|| ::std::string::String::new()) + } + + pub fn get_account_name(&self) -> &str { + match self.account_name.as_ref() { + Some(v) => &v, + None => "", + } + } + + // required uint64 origin_id = 3; + + pub fn clear_origin_id(&mut self) { + self.origin_id = ::std::option::Option::None; + } + + pub fn has_origin_id(&self) -> bool { + self.origin_id.is_some() + } + + // Param is passed by value, moved + pub fn set_origin_id(&mut self, v: u64) { + self.origin_id = ::std::option::Option::Some(v); + } + + pub fn get_origin_id(&self) -> u64 { + self.origin_id.unwrap_or(0) + } + + // required string origin_name = 4; + + pub fn clear_origin_name(&mut self) { + self.origin_name.clear(); + } + + pub fn has_origin_name(&self) -> bool { + self.origin_name.is_some() + } + + // Param is passed by value, moved + pub fn set_origin_name(&mut self, v: ::std::string::String) { + self.origin_name = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_origin_name(&mut self) -> &mut ::std::string::String { + if self.origin_name.is_none() { + self.origin_name.set_default(); + }; + self.origin_name.as_mut().unwrap() + } + + // Take field + pub fn take_origin_name(&mut self) -> ::std::string::String { + self.origin_name.take().unwrap_or_else(|| ::std::string::String::new()) + } + + pub fn get_origin_name(&self) -> &str { + match self.origin_name.as_ref() { + Some(v) => &v, + None => "", + } + } + + // required uint64 owner_id = 5; + + pub fn clear_owner_id(&mut self) { + self.owner_id = ::std::option::Option::None; + } + + pub fn has_owner_id(&self) -> bool { + self.owner_id.is_some() + } + + // Param is passed by value, moved + pub fn set_owner_id(&mut self, v: u64) { + self.owner_id = ::std::option::Option::Some(v); + } + + pub fn get_owner_id(&self) -> u64 { + self.owner_id.unwrap_or(0) + } +} + +impl ::protobuf::Message for OriginInvitationCreate { + fn is_initialized(&self) -> bool { + if self.account_id.is_none() { + return false; + }; + if self.account_name.is_none() { + return false; + }; + if self.origin_id.is_none() { + return false; + }; + if self.origin_name.is_none() { + return false; + }; + if self.owner_id.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.account_id = ::std::option::Option::Some(tmp); + }, + 2 => { + try!(::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.account_name)); + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.origin_id = ::std::option::Option::Some(tmp); + }, + 4 => { + try!(::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.origin_name)); + }, + 5 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.owner_id = ::std::option::Option::Some(tmp); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.account_id.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.account_name.iter() { + my_size += ::protobuf::rt::string_size(2, &value); + }; + for value in self.origin_id.iter() { + my_size += ::protobuf::rt::value_size(3, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.origin_name.iter() { + my_size += ::protobuf::rt::string_size(4, &value); + }; + for value in self.owner_id.iter() { + my_size += ::protobuf::rt::value_size(5, *value, ::protobuf::wire_format::WireTypeVarint); + }; + 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 let Some(v) = self.account_id { + try!(os.write_uint64(1, v)); + }; + if let Some(v) = self.account_name.as_ref() { + try!(os.write_string(2, &v)); + }; + if let Some(v) = self.origin_id { + try!(os.write_uint64(3, v)); + }; + if let Some(v) = self.origin_name.as_ref() { + try!(os.write_string(4, &v)); + }; + if let Some(v) = self.owner_id { + try!(os.write_uint64(5, v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for OriginInvitationCreate { + fn new() -> OriginInvitationCreate { + OriginInvitationCreate::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "account_id", + OriginInvitationCreate::has_account_id, + OriginInvitationCreate::get_account_id, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor( + "account_name", + OriginInvitationCreate::has_account_name, + OriginInvitationCreate::get_account_name, + )); + fields.push(::protobuf::reflect::accessor::make_singular_u64_accessor( + "origin_id", + OriginInvitationCreate::has_origin_id, + OriginInvitationCreate::get_origin_id, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor( + "origin_name", + OriginInvitationCreate::has_origin_name, + OriginInvitationCreate::get_origin_name, + )); + fields.push(::protobuf::reflect::accessor::make_singular_u64_accessor( + "owner_id", + OriginInvitationCreate::has_owner_id, + OriginInvitationCreate::get_owner_id, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "OriginInvitationCreate", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for OriginInvitationCreate { + fn clear(&mut self) { + self.clear_account_id(); + self.clear_account_name(); + self.clear_origin_id(); + self.clear_origin_name(); + self.clear_owner_id(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for OriginInvitationCreate { + fn eq(&self, other: &OriginInvitationCreate) -> bool { + self.account_id == other.account_id && + self.account_name == other.account_name && + self.origin_id == other.origin_id && + self.origin_name == other.origin_name && + self.owner_id == other.owner_id && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for OriginInvitationCreate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct OriginInvitationAcceptRequest { + // message fields + account_accepting_request: ::std::option::Option, + invite_id: ::std::option::Option, + ignore: ::std::option::Option, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for OriginInvitationAcceptRequest {} + +impl OriginInvitationAcceptRequest { + pub fn new() -> OriginInvitationAcceptRequest { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static OriginInvitationAcceptRequest { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const OriginInvitationAcceptRequest, + }; + unsafe { + instance.get(|| { + OriginInvitationAcceptRequest { + account_accepting_request: ::std::option::Option::None, + invite_id: ::std::option::Option::None, + ignore: ::std::option::Option::None, + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 account_accepting_request = 1; + + pub fn clear_account_accepting_request(&mut self) { + self.account_accepting_request = ::std::option::Option::None; + } + + pub fn has_account_accepting_request(&self) -> bool { + self.account_accepting_request.is_some() + } + + // Param is passed by value, moved + pub fn set_account_accepting_request(&mut self, v: u64) { + self.account_accepting_request = ::std::option::Option::Some(v); + } + + pub fn get_account_accepting_request(&self) -> u64 { + self.account_accepting_request.unwrap_or(0) + } + + // required uint64 invite_id = 2; + + pub fn clear_invite_id(&mut self) { + self.invite_id = ::std::option::Option::None; + } + + pub fn has_invite_id(&self) -> bool { + self.invite_id.is_some() + } + + // Param is passed by value, moved + pub fn set_invite_id(&mut self, v: u64) { + self.invite_id = ::std::option::Option::Some(v); + } + + pub fn get_invite_id(&self) -> u64 { + self.invite_id.unwrap_or(0) + } + + // required bool ignore = 3; + + pub fn clear_ignore(&mut self) { + self.ignore = ::std::option::Option::None; + } + + pub fn has_ignore(&self) -> bool { + self.ignore.is_some() + } + + // Param is passed by value, moved + pub fn set_ignore(&mut self, v: bool) { + self.ignore = ::std::option::Option::Some(v); + } + + pub fn get_ignore(&self) -> bool { + self.ignore.unwrap_or(false) + } +} + +impl ::protobuf::Message for OriginInvitationAcceptRequest { + fn is_initialized(&self) -> bool { + if self.account_accepting_request.is_none() { + return false; + }; + if self.invite_id.is_none() { + return false; + }; + if self.ignore.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.account_accepting_request = ::std::option::Option::Some(tmp); + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.invite_id = ::std::option::Option::Some(tmp); + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_bool()); + self.ignore = ::std::option::Option::Some(tmp); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.account_accepting_request.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.invite_id.iter() { + my_size += ::protobuf::rt::value_size(2, *value, ::protobuf::wire_format::WireTypeVarint); + }; + if self.ignore.is_some() { + my_size += 2; + }; + 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 let Some(v) = self.account_accepting_request { + try!(os.write_uint64(1, v)); + }; + if let Some(v) = self.invite_id { + try!(os.write_uint64(2, v)); + }; + if let Some(v) = self.ignore { + try!(os.write_bool(3, v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for OriginInvitationAcceptRequest { + fn new() -> OriginInvitationAcceptRequest { + OriginInvitationAcceptRequest::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "account_accepting_request", + OriginInvitationAcceptRequest::has_account_accepting_request, + OriginInvitationAcceptRequest::get_account_accepting_request, + )); + fields.push(::protobuf::reflect::accessor::make_singular_u64_accessor( + "invite_id", + OriginInvitationAcceptRequest::has_invite_id, + OriginInvitationAcceptRequest::get_invite_id, + )); + fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor( + "ignore", + OriginInvitationAcceptRequest::has_ignore, + OriginInvitationAcceptRequest::get_ignore, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "OriginInvitationAcceptRequest", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for OriginInvitationAcceptRequest { + fn clear(&mut self) { + self.clear_account_accepting_request(); + self.clear_invite_id(); + self.clear_ignore(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for OriginInvitationAcceptRequest { + fn eq(&self, other: &OriginInvitationAcceptRequest) -> bool { + self.account_accepting_request == other.account_accepting_request && + self.invite_id == other.invite_id && + self.ignore == other.ignore && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for OriginInvitationAcceptRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct OriginInvitationAcceptResponse { + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for OriginInvitationAcceptResponse {} + +impl OriginInvitationAcceptResponse { + pub fn new() -> OriginInvitationAcceptResponse { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static OriginInvitationAcceptResponse { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const OriginInvitationAcceptResponse, + }; + unsafe { + instance.get(|| { + OriginInvitationAcceptResponse { + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } +} + +impl ::protobuf::Message for OriginInvitationAcceptResponse { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + 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<()> { + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for OriginInvitationAcceptResponse { + fn new() -> OriginInvitationAcceptResponse { + OriginInvitationAcceptResponse::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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 fields = ::std::vec::Vec::new(); + ::protobuf::reflect::MessageDescriptor::new::( + "OriginInvitationAcceptResponse", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for OriginInvitationAcceptResponse { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for OriginInvitationAcceptResponse { + fn eq(&self, other: &OriginInvitationAcceptResponse) -> bool { + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for OriginInvitationAcceptResponse { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct OriginSecretKey { + // message fields + id: ::std::option::Option, + origin_id: ::std::option::Option, + name: ::protobuf::SingularField<::std::string::String>, + revision: ::protobuf::SingularField<::std::string::String>, + body: ::protobuf::SingularField<::std::vec::Vec>, + owner_id: ::std::option::Option, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for OriginSecretKey {} + +impl OriginSecretKey { + pub fn new() -> OriginSecretKey { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static OriginSecretKey { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const OriginSecretKey, + }; + unsafe { + instance.get(|| { + OriginSecretKey { + id: ::std::option::Option::None, + origin_id: ::std::option::Option::None, + name: ::protobuf::SingularField::none(), + revision: ::protobuf::SingularField::none(), + body: ::protobuf::SingularField::none(), + owner_id: ::std::option::Option::None, + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 id = 1; + + pub fn clear_id(&mut self) { + self.id = ::std::option::Option::None; + } + + pub fn has_id(&self) -> bool { + self.id.is_some() + } + + // Param is passed by value, moved + pub fn set_id(&mut self, v: u64) { + self.id = ::std::option::Option::Some(v); + } + + pub fn get_id(&self) -> u64 { + self.id.unwrap_or(0) + } + + // required uint64 origin_id = 2; + + pub fn clear_origin_id(&mut self) { + self.origin_id = ::std::option::Option::None; + } + + pub fn has_origin_id(&self) -> bool { + self.origin_id.is_some() + } + + // Param is passed by value, moved + pub fn set_origin_id(&mut self, v: u64) { + self.origin_id = ::std::option::Option::Some(v); + } + + pub fn get_origin_id(&self) -> u64 { + self.origin_id.unwrap_or(0) + } + + // required string name = 3; + + pub fn clear_name(&mut self) { + self.name.clear(); + } + + pub fn has_name(&self) -> bool { + self.name.is_some() + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.name = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_name(&mut self) -> &mut ::std::string::String { + if self.name.is_none() { + self.name.set_default(); + }; + self.name.as_mut().unwrap() + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + self.name.take().unwrap_or_else(|| ::std::string::String::new()) + } + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } + + // required string revision = 4; + + pub fn clear_revision(&mut self) { + self.revision.clear(); + } + + pub fn has_revision(&self) -> bool { + self.revision.is_some() + } + + // Param is passed by value, moved + pub fn set_revision(&mut self, v: ::std::string::String) { + self.revision = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_revision(&mut self) -> &mut ::std::string::String { + if self.revision.is_none() { + self.revision.set_default(); + }; + self.revision.as_mut().unwrap() + } + + // Take field + pub fn take_revision(&mut self) -> ::std::string::String { + self.revision.take().unwrap_or_else(|| ::std::string::String::new()) + } + + pub fn get_revision(&self) -> &str { + match self.revision.as_ref() { + Some(v) => &v, + None => "", + } + } + + // required bytes body = 5; + + pub fn clear_body(&mut self) { + self.body.clear(); + } + + pub fn has_body(&self) -> bool { + self.body.is_some() + } + + // Param is passed by value, moved + pub fn set_body(&mut self, v: ::std::vec::Vec) { + self.body = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_body(&mut self) -> &mut ::std::vec::Vec { + if self.body.is_none() { + self.body.set_default(); + }; + self.body.as_mut().unwrap() + } + + // Take field + pub fn take_body(&mut self) -> ::std::vec::Vec { + self.body.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + pub fn get_body(&self) -> &[u8] { + match self.body.as_ref() { + Some(v) => &v, + None => &[], + } + } + + // required uint64 owner_id = 6; + + pub fn clear_owner_id(&mut self) { + self.owner_id = ::std::option::Option::None; + } + + pub fn has_owner_id(&self) -> bool { + self.owner_id.is_some() + } + + // Param is passed by value, moved + pub fn set_owner_id(&mut self, v: u64) { + self.owner_id = ::std::option::Option::Some(v); + } + + pub fn get_owner_id(&self) -> u64 { + self.owner_id.unwrap_or(0) + } +} + +impl ::protobuf::Message for OriginSecretKey { + fn is_initialized(&self) -> bool { + if self.id.is_none() { + return false; + }; + if self.origin_id.is_none() { + return false; + }; + if self.name.is_none() { + return false; + }; + if self.revision.is_none() { + return false; + }; + if self.body.is_none() { + return false; + }; + if self.owner_id.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.id = ::std::option::Option::Some(tmp); + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.origin_id = ::std::option::Option::Some(tmp); + }, + 3 => { + try!(::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)); + }, + 4 => { + try!(::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.revision)); + }, + 5 => { + try!(::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.body)); + }, + 6 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.owner_id = ::std::option::Option::Some(tmp); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.id.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.origin_id.iter() { + my_size += ::protobuf::rt::value_size(2, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.name.iter() { + my_size += ::protobuf::rt::string_size(3, &value); + }; + for value in self.revision.iter() { + my_size += ::protobuf::rt::string_size(4, &value); + }; + for value in self.body.iter() { + my_size += ::protobuf::rt::bytes_size(5, &value); + }; + for value in self.owner_id.iter() { + my_size += ::protobuf::rt::value_size(6, *value, ::protobuf::wire_format::WireTypeVarint); + }; + 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 let Some(v) = self.id { + try!(os.write_uint64(1, v)); + }; + if let Some(v) = self.origin_id { + try!(os.write_uint64(2, v)); + }; + if let Some(v) = self.name.as_ref() { + try!(os.write_string(3, &v)); + }; + if let Some(v) = self.revision.as_ref() { + try!(os.write_string(4, &v)); + }; + if let Some(v) = self.body.as_ref() { + try!(os.write_bytes(5, &v)); + }; + if let Some(v) = self.owner_id { + try!(os.write_uint64(6, v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for OriginSecretKey { + fn new() -> OriginSecretKey { + OriginSecretKey::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "id", + OriginSecretKey::has_id, + OriginSecretKey::get_id, + )); + fields.push(::protobuf::reflect::accessor::make_singular_u64_accessor( + "origin_id", + OriginSecretKey::has_origin_id, + OriginSecretKey::get_origin_id, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor( + "name", + OriginSecretKey::has_name, + OriginSecretKey::get_name, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor( + "revision", + OriginSecretKey::has_revision, + OriginSecretKey::get_revision, + )); + fields.push(::protobuf::reflect::accessor::make_singular_bytes_accessor( + "body", + OriginSecretKey::has_body, + OriginSecretKey::get_body, + )); + fields.push(::protobuf::reflect::accessor::make_singular_u64_accessor( + "owner_id", + OriginSecretKey::has_owner_id, + OriginSecretKey::get_owner_id, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "OriginSecretKey", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for OriginSecretKey { + fn clear(&mut self) { + self.clear_id(); + self.clear_origin_id(); + self.clear_name(); + self.clear_revision(); + self.clear_body(); + self.clear_owner_id(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for OriginSecretKey { + fn eq(&self, other: &OriginSecretKey) -> bool { + self.id == other.id && + self.origin_id == other.origin_id && + self.name == other.name && + self.revision == other.revision && + self.body == other.body && + self.owner_id == other.owner_id && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for OriginSecretKey { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +#[derive(Clone,Default)] +pub struct OriginSecretKeyCreate { + // message fields + origin_id: ::std::option::Option, + name: ::protobuf::SingularField<::std::string::String>, + revision: ::protobuf::SingularField<::std::string::String>, + body: ::protobuf::SingularField<::std::vec::Vec>, + owner_id: ::std::option::Option, + // special fields + unknown_fields: ::protobuf::UnknownFields, + cached_size: ::std::cell::Cell, +} + +// see codegen.rs for the explanation why impl Sync explicitly +unsafe impl ::std::marker::Sync for OriginSecretKeyCreate {} + +impl OriginSecretKeyCreate { + pub fn new() -> OriginSecretKeyCreate { + ::std::default::Default::default() + } + + pub fn default_instance() -> &'static OriginSecretKeyCreate { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const OriginSecretKeyCreate, + }; + unsafe { + instance.get(|| { + OriginSecretKeyCreate { + origin_id: ::std::option::Option::None, + name: ::protobuf::SingularField::none(), + revision: ::protobuf::SingularField::none(), + body: ::protobuf::SingularField::none(), + owner_id: ::std::option::Option::None, + unknown_fields: ::protobuf::UnknownFields::new(), + cached_size: ::std::cell::Cell::new(0), + } + }) + } + } + + // required uint64 origin_id = 1; + + pub fn clear_origin_id(&mut self) { + self.origin_id = ::std::option::Option::None; + } + + pub fn has_origin_id(&self) -> bool { + self.origin_id.is_some() + } + + // Param is passed by value, moved + pub fn set_origin_id(&mut self, v: u64) { + self.origin_id = ::std::option::Option::Some(v); + } + + pub fn get_origin_id(&self) -> u64 { + self.origin_id.unwrap_or(0) + } + + // required string name = 2; + + pub fn clear_name(&mut self) { + self.name.clear(); + } + + pub fn has_name(&self) -> bool { + self.name.is_some() + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.name = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_name(&mut self) -> &mut ::std::string::String { + if self.name.is_none() { + self.name.set_default(); + }; + self.name.as_mut().unwrap() + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + self.name.take().unwrap_or_else(|| ::std::string::String::new()) + } + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } + + // required string revision = 3; + + pub fn clear_revision(&mut self) { + self.revision.clear(); + } + + pub fn has_revision(&self) -> bool { + self.revision.is_some() + } + + // Param is passed by value, moved + pub fn set_revision(&mut self, v: ::std::string::String) { + self.revision = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_revision(&mut self) -> &mut ::std::string::String { + if self.revision.is_none() { + self.revision.set_default(); + }; + self.revision.as_mut().unwrap() + } + + // Take field + pub fn take_revision(&mut self) -> ::std::string::String { + self.revision.take().unwrap_or_else(|| ::std::string::String::new()) + } + + pub fn get_revision(&self) -> &str { + match self.revision.as_ref() { + Some(v) => &v, + None => "", + } + } + + // required bytes body = 4; + + pub fn clear_body(&mut self) { + self.body.clear(); + } + + pub fn has_body(&self) -> bool { + self.body.is_some() + } + + // Param is passed by value, moved + pub fn set_body(&mut self, v: ::std::vec::Vec) { + self.body = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_body(&mut self) -> &mut ::std::vec::Vec { + if self.body.is_none() { + self.body.set_default(); + }; + self.body.as_mut().unwrap() + } + + // Take field + pub fn take_body(&mut self) -> ::std::vec::Vec { + self.body.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + pub fn get_body(&self) -> &[u8] { + match self.body.as_ref() { + Some(v) => &v, + None => &[], + } + } + + // required uint64 owner_id = 5; + + pub fn clear_owner_id(&mut self) { + self.owner_id = ::std::option::Option::None; + } + + pub fn has_owner_id(&self) -> bool { + self.owner_id.is_some() + } + + // Param is passed by value, moved + pub fn set_owner_id(&mut self, v: u64) { + self.owner_id = ::std::option::Option::Some(v); + } + + pub fn get_owner_id(&self) -> u64 { + self.owner_id.unwrap_or(0) + } +} + +impl ::protobuf::Message for OriginSecretKeyCreate { + fn is_initialized(&self) -> bool { + if self.origin_id.is_none() { + return false; + }; + if self.name.is_none() { + return false; + }; + if self.revision.is_none() { + return false; + }; + if self.body.is_none() { + return false; + }; + if self.owner_id.is_none() { + return false; + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + while !try!(is.eof()) { + let (field_number, wire_type) = try!(is.read_tag_unpack()); + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.origin_id = ::std::option::Option::Some(tmp); + }, + 2 => { + try!(::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)); + }, + 3 => { + try!(::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.revision)); + }, + 4 => { + try!(::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.body)); + }, + 5 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + }; + let tmp = try!(is.read_uint64()); + self.owner_id = ::std::option::Option::Some(tmp); + }, + _ => { + try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())); + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in self.origin_id.iter() { + my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint); + }; + for value in self.name.iter() { + my_size += ::protobuf::rt::string_size(2, &value); + }; + for value in self.revision.iter() { + my_size += ::protobuf::rt::string_size(3, &value); + }; + for value in self.body.iter() { + my_size += ::protobuf::rt::bytes_size(4, &value); + }; + for value in self.owner_id.iter() { + my_size += ::protobuf::rt::value_size(5, *value, ::protobuf::wire_format::WireTypeVarint); + }; + 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 let Some(v) = self.origin_id { + try!(os.write_uint64(1, v)); + }; + if let Some(v) = self.name.as_ref() { + try!(os.write_string(2, &v)); + }; + if let Some(v) = self.revision.as_ref() { + try!(os.write_string(3, &v)); + }; + if let Some(v) = self.body.as_ref() { + try!(os.write_bytes(4, &v)); + }; + if let Some(v) = self.owner_id { + try!(os.write_uint64(5, v)); + }; + try!(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 type_id(&self) -> ::std::any::TypeId { + ::std::any::TypeId::of::() + } + + fn as_any(&self) -> &::std::any::Any { + self as &::std::any::Any + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + ::protobuf::MessageStatic::descriptor_static(None::) + } +} + +impl ::protobuf::MessageStatic for OriginSecretKeyCreate { + fn new() -> OriginSecretKeyCreate { + OriginSecretKeyCreate::new() + } + + fn descriptor_static(_: ::std::option::Option) -> &'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_singular_u64_accessor( + "origin_id", + OriginSecretKeyCreate::has_origin_id, + OriginSecretKeyCreate::get_origin_id, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor( + "name", + OriginSecretKeyCreate::has_name, + OriginSecretKeyCreate::get_name, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor( + "revision", + OriginSecretKeyCreate::has_revision, + OriginSecretKeyCreate::get_revision, + )); + fields.push(::protobuf::reflect::accessor::make_singular_bytes_accessor( + "body", + OriginSecretKeyCreate::has_body, + OriginSecretKeyCreate::get_body, + )); + fields.push(::protobuf::reflect::accessor::make_singular_u64_accessor( + "owner_id", + OriginSecretKeyCreate::has_owner_id, + OriginSecretKeyCreate::get_owner_id, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "OriginSecretKeyCreate", + fields, + file_descriptor_proto() + ) + }) + } + } +} + +impl ::protobuf::Clear for OriginSecretKeyCreate { + fn clear(&mut self) { + self.clear_origin_id(); + self.clear_name(); + self.clear_revision(); + self.clear_body(); + self.clear_owner_id(); + self.unknown_fields.clear(); + } +} + +impl ::std::cmp::PartialEq for OriginSecretKeyCreate { + fn eq(&self, other: &OriginSecretKeyCreate) -> bool { + self.origin_id == other.origin_id && + self.name == other.name && + self.revision == other.revision && + self.body == other.body && + self.owner_id == other.owner_id && + self.unknown_fields == other.unknown_fields + } +} + +impl ::std::fmt::Debug for OriginSecretKeyCreate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + static file_descriptor_proto_data: &'static [u8] = &[ 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x34, 0x0a, 0x06, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x12, 0x10, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x02, 0x28, 0x04, 0x22, 0x2e, 0x0a, 0x0c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x72, + 0x20, 0x02, 0x28, 0x04, 0x22, 0x42, 0x0a, 0x0c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x12, 0x10, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x02, 0x28, 0x04, 0x22, 0x19, 0x0a, 0x09, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x47, 0x65, - 0x74, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x4a, - 0xf8, 0x03, 0x0a, 0x06, 0x12, 0x04, 0x00, 0x00, 0x0f, 0x01, 0x0a, 0x08, 0x0a, 0x01, 0x02, 0x12, - 0x03, 0x00, 0x08, 0x0d, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x00, 0x12, 0x04, 0x02, 0x00, 0x06, 0x01, - 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x00, 0x01, 0x12, 0x03, 0x02, 0x08, 0x0e, 0x0a, 0x0b, 0x0a, 0x04, - 0x04, 0x00, 0x02, 0x00, 0x12, 0x03, 0x03, 0x02, 0x19, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, - 0x00, 0x04, 0x12, 0x03, 0x03, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x05, - 0x12, 0x03, 0x03, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, - 0x03, 0x12, 0x14, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x03, 0x17, - 0x18, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x01, 0x12, 0x03, 0x04, 0x02, 0x1b, 0x0a, 0x0c, - 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x04, 0x12, 0x03, 0x04, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, - 0x04, 0x00, 0x02, 0x01, 0x05, 0x12, 0x03, 0x04, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, - 0x02, 0x01, 0x01, 0x12, 0x03, 0x04, 0x12, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, - 0x03, 0x12, 0x03, 0x04, 0x19, 0x1a, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x02, 0x12, 0x03, - 0x05, 0x02, 0x1f, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x04, 0x12, 0x03, 0x05, 0x02, - 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x05, 0x12, 0x03, 0x05, 0x0b, 0x11, 0x0a, - 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x01, 0x12, 0x03, 0x05, 0x12, 0x1a, 0x0a, 0x0c, 0x0a, - 0x05, 0x04, 0x00, 0x02, 0x02, 0x03, 0x12, 0x03, 0x05, 0x1d, 0x1e, 0x0a, 0x0a, 0x0a, 0x02, 0x04, - 0x01, 0x12, 0x04, 0x08, 0x00, 0x0b, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x01, 0x01, 0x12, 0x03, - 0x08, 0x08, 0x14, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x00, 0x12, 0x03, 0x09, 0x02, 0x1b, - 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x04, 0x12, 0x03, 0x09, 0x02, 0x0a, 0x0a, 0x0c, - 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x05, 0x12, 0x03, 0x09, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, - 0x04, 0x01, 0x02, 0x00, 0x01, 0x12, 0x03, 0x09, 0x12, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, - 0x02, 0x00, 0x03, 0x12, 0x03, 0x09, 0x19, 0x1a, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x01, - 0x12, 0x03, 0x0a, 0x02, 0x1f, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, 0x04, 0x12, 0x03, - 0x0a, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, 0x05, 0x12, 0x03, 0x0a, 0x0b, - 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, 0x01, 0x12, 0x03, 0x0a, 0x12, 0x1a, 0x0a, - 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, 0x03, 0x12, 0x03, 0x0a, 0x1d, 0x1e, 0x0a, 0x0a, 0x0a, - 0x02, 0x04, 0x02, 0x12, 0x04, 0x0d, 0x00, 0x0f, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x02, 0x01, - 0x12, 0x03, 0x0d, 0x08, 0x11, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x00, 0x12, 0x03, 0x0e, - 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x04, 0x12, 0x03, 0x0e, 0x02, 0x0a, - 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x05, 0x12, 0x03, 0x0e, 0x0b, 0x11, 0x0a, 0x0c, - 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x01, 0x12, 0x03, 0x0e, 0x12, 0x16, 0x0a, 0x0c, 0x0a, 0x05, - 0x04, 0x02, 0x02, 0x00, 0x03, 0x12, 0x03, 0x0e, 0x19, 0x1a, + 0x20, 0x02, 0x28, 0x04, 0x12, 0x12, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x22, 0x1c, 0x0a, 0x0c, 0x4f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x22, 0x19, 0x0a, 0x09, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x47, 0x65, 0x74, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x09, 0x22, 0x38, 0x0a, 0x12, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x11, 0x0a, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x12, 0x0f, 0x0a, 0x07, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x22, 0x2c, 0x0a, 0x17, 0x4f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x11, 0x0a, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x22, 0x3e, 0x0a, 0x18, 0x4f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x11, 0x0a, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x12, 0x0f, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x22, 0x2e, 0x0a, 0x18, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x22, 0x40, 0x0a, 0x19, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x12, 0x0f, 0x0a, 0x07, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x22, 0x93, 0x01, 0x0a, 0x18, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x12, 0x16, + 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x12, 0x13, 0x0a, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x12, 0x15, 0x0a, 0x0b, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x42, 0x0d, 0x0a, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x22, 0x2f, 0x0a, 0x19, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, + 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x02, + 0x28, 0x08, 0x22, 0x32, 0x0a, 0x1c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x22, 0x61, 0x0a, 0x1d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x12, 0x2c, 0x0a, 0x0b, 0x69, + 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, + 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x30, 0x0a, 0x1b, 0x4f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x11, 0x0a, 0x09, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x22, 0x5f, 0x0a, 0x1c, 0x4f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x11, 0x0a, 0x09, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x12, 0x2c, + 0x0a, 0x0b, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x4f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x01, 0x0a, + 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x12, 0x12, 0x0a, + 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, + 0x04, 0x12, 0x14, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x12, 0x11, 0x0a, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x12, 0x13, 0x0a, 0x0b, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x02, 0x28, 0x09, 0x12, + 0x10, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x02, 0x28, + 0x04, 0x22, 0x7c, 0x0a, 0x16, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x76, 0x69, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x0a, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x12, + 0x14, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x02, 0x28, 0x09, 0x12, 0x11, 0x0a, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x12, 0x13, 0x0a, 0x0b, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x09, 0x12, 0x10, 0x0a, + 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x22, + 0x65, 0x0a, 0x1d, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x21, 0x0a, 0x19, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, + 0x70, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x04, 0x12, 0x11, 0x0a, 0x09, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x12, 0x0e, 0x0a, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, + 0x18, 0x03, 0x20, 0x02, 0x28, 0x08, 0x22, 0x20, 0x0a, 0x1e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x70, 0x0a, 0x0f, 0x4f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x0a, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x12, 0x11, 0x0a, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x12, 0x10, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x02, 0x28, 0x09, 0x12, 0x0c, 0x0a, 0x04, 0x62, 0x6f, + 0x64, 0x79, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0c, 0x12, 0x10, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x02, 0x28, 0x04, 0x22, 0x6a, 0x0a, 0x15, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x02, 0x28, 0x09, 0x12, 0x10, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x12, 0x0c, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, + 0x20, 0x02, 0x28, 0x0c, 0x12, 0x10, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x4a, 0xf6, 0x25, 0x0a, 0x07, 0x12, 0x05, 0x00, 0x00, 0x93, + 0x01, 0x01, 0x0a, 0x08, 0x0a, 0x01, 0x02, 0x12, 0x03, 0x00, 0x08, 0x0d, 0x0a, 0x1b, 0x0a, 0x02, + 0x04, 0x00, 0x12, 0x04, 0x03, 0x00, 0x07, 0x01, 0x1a, 0x0f, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x64, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x0a, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x00, 0x01, + 0x12, 0x03, 0x03, 0x08, 0x0e, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x00, 0x12, 0x03, 0x04, + 0x02, 0x19, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x04, 0x12, 0x03, 0x04, 0x02, 0x0a, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x05, 0x12, 0x03, 0x04, 0x0b, 0x11, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x04, 0x12, 0x14, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x04, 0x17, 0x18, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, + 0x02, 0x01, 0x12, 0x03, 0x05, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x04, + 0x12, 0x03, 0x05, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x05, 0x12, 0x03, + 0x05, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03, 0x05, 0x12, + 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x05, 0x19, 0x1a, 0x0a, + 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x02, 0x12, 0x03, 0x06, 0x02, 0x1f, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x00, 0x02, 0x02, 0x04, 0x12, 0x03, 0x06, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, + 0x02, 0x02, 0x05, 0x12, 0x03, 0x06, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, + 0x01, 0x12, 0x03, 0x06, 0x12, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x03, 0x12, + 0x03, 0x06, 0x1d, 0x1e, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x01, 0x12, 0x04, 0x09, 0x00, 0x0d, 0x01, + 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x01, 0x01, 0x12, 0x03, 0x09, 0x08, 0x14, 0x0a, 0x0b, 0x0a, 0x04, + 0x04, 0x01, 0x02, 0x00, 0x12, 0x03, 0x0a, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, + 0x00, 0x04, 0x12, 0x03, 0x0a, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x05, + 0x12, 0x03, 0x0a, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x01, 0x12, 0x03, + 0x0a, 0x12, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x03, 0x12, 0x03, 0x0a, 0x19, + 0x1a, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x01, 0x12, 0x03, 0x0b, 0x02, 0x1f, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, 0x04, 0x12, 0x03, 0x0b, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x01, 0x02, 0x01, 0x05, 0x12, 0x03, 0x0b, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, + 0x02, 0x01, 0x01, 0x12, 0x03, 0x0b, 0x12, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, + 0x03, 0x12, 0x03, 0x0b, 0x1d, 0x1e, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x02, 0x12, 0x03, + 0x0c, 0x02, 0x21, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x02, 0x04, 0x12, 0x03, 0x0c, 0x02, + 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x02, 0x05, 0x12, 0x03, 0x0c, 0x0b, 0x11, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x02, 0x01, 0x12, 0x03, 0x0c, 0x12, 0x1c, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x01, 0x02, 0x02, 0x03, 0x12, 0x03, 0x0c, 0x1f, 0x20, 0x0a, 0x0a, 0x0a, 0x02, 0x04, + 0x02, 0x12, 0x04, 0x0f, 0x00, 0x11, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x02, 0x01, 0x12, 0x03, + 0x0f, 0x08, 0x14, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x00, 0x12, 0x03, 0x10, 0x02, 0x1b, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x04, 0x12, 0x03, 0x10, 0x02, 0x0a, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x05, 0x12, 0x03, 0x10, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x02, 0x02, 0x00, 0x01, 0x12, 0x03, 0x10, 0x12, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, + 0x02, 0x00, 0x03, 0x12, 0x03, 0x10, 0x19, 0x1a, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x03, 0x12, 0x04, + 0x13, 0x00, 0x15, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x03, 0x01, 0x12, 0x03, 0x13, 0x08, 0x11, + 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x03, 0x02, 0x00, 0x12, 0x03, 0x14, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x03, 0x02, 0x00, 0x04, 0x12, 0x03, 0x14, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x03, 0x02, 0x00, 0x05, 0x12, 0x03, 0x14, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, + 0x00, 0x01, 0x12, 0x03, 0x14, 0x12, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00, 0x03, + 0x12, 0x03, 0x14, 0x19, 0x1a, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x04, 0x12, 0x04, 0x17, 0x00, 0x1a, + 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x04, 0x01, 0x12, 0x03, 0x17, 0x08, 0x1a, 0x0a, 0x0b, 0x0a, + 0x04, 0x04, 0x04, 0x02, 0x00, 0x12, 0x03, 0x18, 0x04, 0x22, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, + 0x02, 0x00, 0x04, 0x12, 0x03, 0x18, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, + 0x05, 0x12, 0x03, 0x18, 0x0d, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x01, 0x12, + 0x03, 0x18, 0x14, 0x1d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x03, 0x12, 0x03, 0x18, + 0x20, 0x21, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x04, 0x02, 0x01, 0x12, 0x03, 0x19, 0x04, 0x20, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x01, 0x04, 0x12, 0x03, 0x19, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x04, 0x02, 0x01, 0x05, 0x12, 0x03, 0x19, 0x0d, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x04, 0x02, 0x01, 0x01, 0x12, 0x03, 0x19, 0x14, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, + 0x01, 0x03, 0x12, 0x03, 0x19, 0x1e, 0x1f, 0x0a, 0x2b, 0x0a, 0x02, 0x04, 0x05, 0x12, 0x04, 0x1d, + 0x00, 0x1f, 0x01, 0x1a, 0x1f, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x0a, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x05, 0x01, 0x12, 0x03, 0x1d, 0x08, 0x1f, + 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x05, 0x02, 0x00, 0x12, 0x03, 0x1e, 0x04, 0x22, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x05, 0x02, 0x00, 0x04, 0x12, 0x03, 0x1e, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x05, 0x02, 0x00, 0x05, 0x12, 0x03, 0x1e, 0x0d, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, + 0x00, 0x01, 0x12, 0x03, 0x1e, 0x14, 0x1d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x03, + 0x12, 0x03, 0x1e, 0x20, 0x21, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x06, 0x12, 0x04, 0x21, 0x00, 0x24, + 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x06, 0x01, 0x12, 0x03, 0x21, 0x08, 0x20, 0x0a, 0x0b, 0x0a, + 0x04, 0x04, 0x06, 0x02, 0x00, 0x12, 0x03, 0x22, 0x04, 0x22, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x06, + 0x02, 0x00, 0x04, 0x12, 0x03, 0x22, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x06, 0x02, 0x00, + 0x05, 0x12, 0x03, 0x22, 0x0d, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x06, 0x02, 0x00, 0x01, 0x12, + 0x03, 0x22, 0x14, 0x1d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x06, 0x02, 0x00, 0x03, 0x12, 0x03, 0x22, + 0x20, 0x21, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x06, 0x02, 0x01, 0x12, 0x03, 0x23, 0x04, 0x20, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x06, 0x02, 0x01, 0x04, 0x12, 0x03, 0x23, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x06, 0x02, 0x01, 0x05, 0x12, 0x03, 0x23, 0x0d, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x06, 0x02, 0x01, 0x01, 0x12, 0x03, 0x23, 0x14, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x06, 0x02, + 0x01, 0x03, 0x12, 0x03, 0x23, 0x1e, 0x1f, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x07, 0x12, 0x04, 0x27, + 0x00, 0x29, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x07, 0x01, 0x12, 0x03, 0x27, 0x08, 0x20, 0x0a, + 0x0b, 0x0a, 0x04, 0x04, 0x07, 0x02, 0x00, 0x12, 0x03, 0x28, 0x04, 0x23, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x07, 0x02, 0x00, 0x04, 0x12, 0x03, 0x28, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x07, + 0x02, 0x00, 0x05, 0x12, 0x03, 0x28, 0x0d, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x07, 0x02, 0x00, + 0x01, 0x12, 0x03, 0x28, 0x14, 0x1e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x07, 0x02, 0x00, 0x03, 0x12, + 0x03, 0x28, 0x21, 0x22, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x08, 0x12, 0x04, 0x2b, 0x00, 0x2e, 0x01, + 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x08, 0x01, 0x12, 0x03, 0x2b, 0x08, 0x21, 0x0a, 0x0b, 0x0a, 0x04, + 0x04, 0x08, 0x02, 0x00, 0x12, 0x03, 0x2c, 0x04, 0x23, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x08, 0x02, + 0x00, 0x04, 0x12, 0x03, 0x2c, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x08, 0x02, 0x00, 0x05, + 0x12, 0x03, 0x2c, 0x0d, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x08, 0x02, 0x00, 0x01, 0x12, 0x03, + 0x2c, 0x14, 0x1e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x08, 0x02, 0x00, 0x03, 0x12, 0x03, 0x2c, 0x21, + 0x22, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x08, 0x02, 0x01, 0x12, 0x03, 0x2d, 0x04, 0x20, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x08, 0x02, 0x01, 0x04, 0x12, 0x03, 0x2d, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x08, 0x02, 0x01, 0x05, 0x12, 0x03, 0x2d, 0x0d, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x08, + 0x02, 0x01, 0x01, 0x12, 0x03, 0x2d, 0x14, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x08, 0x02, 0x01, + 0x03, 0x12, 0x03, 0x2d, 0x1e, 0x1f, 0x0a, 0x6d, 0x0a, 0x02, 0x04, 0x09, 0x12, 0x04, 0x35, 0x00, + 0x3e, 0x01, 0x1a, 0x61, 0x20, 0x21, 0x21, 0x21, 0x4e, 0x4f, 0x54, 0x45, 0x21, 0x21, 0x21, 0x0a, + 0x20, 0x21, 0x21, 0x21, 0x4e, 0x4f, 0x54, 0x45, 0x21, 0x21, 0x21, 0x0a, 0x20, 0x6f, 0x6e, 0x6c, + 0x79, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x20, 0x61, 0x6e, 0x64, + 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x72, 0x65, + 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x0a, 0x20, 0x21, 0x21, + 0x21, 0x4e, 0x4f, 0x54, 0x45, 0x21, 0x21, 0x21, 0x0a, 0x20, 0x21, 0x21, 0x21, 0x4e, 0x4f, 0x54, + 0x45, 0x21, 0x21, 0x21, 0x0a, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x09, 0x01, 0x12, 0x03, 0x35, 0x08, + 0x20, 0x0a, 0x0c, 0x0a, 0x04, 0x04, 0x09, 0x08, 0x00, 0x12, 0x04, 0x36, 0x04, 0x39, 0x05, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x08, 0x00, 0x01, 0x12, 0x03, 0x36, 0x0a, 0x16, 0x0a, 0x0b, 0x0a, + 0x04, 0x04, 0x09, 0x02, 0x00, 0x12, 0x03, 0x37, 0x08, 0x1e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, + 0x02, 0x00, 0x05, 0x12, 0x03, 0x37, 0x08, 0x0e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x00, + 0x01, 0x12, 0x03, 0x37, 0x0f, 0x19, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x00, 0x03, 0x12, + 0x03, 0x37, 0x1c, 0x1d, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x09, 0x02, 0x01, 0x12, 0x03, 0x38, 0x08, + 0x20, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x01, 0x05, 0x12, 0x03, 0x38, 0x08, 0x0e, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x01, 0x01, 0x12, 0x03, 0x38, 0x0f, 0x1b, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x09, 0x02, 0x01, 0x03, 0x12, 0x03, 0x38, 0x1e, 0x1f, 0x0a, 0x0c, 0x0a, 0x04, 0x04, + 0x09, 0x08, 0x01, 0x12, 0x04, 0x3a, 0x04, 0x3d, 0x05, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x08, + 0x01, 0x01, 0x12, 0x03, 0x3a, 0x0a, 0x15, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x09, 0x02, 0x02, 0x12, + 0x03, 0x3b, 0x08, 0x1d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x02, 0x05, 0x12, 0x03, 0x3b, + 0x08, 0x0e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x02, 0x01, 0x12, 0x03, 0x3b, 0x0f, 0x18, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x02, 0x03, 0x12, 0x03, 0x3b, 0x1b, 0x1c, 0x0a, 0x0b, + 0x0a, 0x04, 0x04, 0x09, 0x02, 0x03, 0x12, 0x03, 0x3c, 0x08, 0x1f, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x09, 0x02, 0x03, 0x05, 0x12, 0x03, 0x3c, 0x08, 0x0e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, + 0x03, 0x01, 0x12, 0x03, 0x3c, 0x0f, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x03, 0x03, + 0x12, 0x03, 0x3c, 0x1d, 0x1e, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x0a, 0x12, 0x04, 0x40, 0x00, 0x42, + 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x0a, 0x01, 0x12, 0x03, 0x40, 0x08, 0x21, 0x0a, 0x0b, 0x0a, + 0x04, 0x04, 0x0a, 0x02, 0x00, 0x12, 0x03, 0x41, 0x04, 0x21, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0a, + 0x02, 0x00, 0x04, 0x12, 0x03, 0x41, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0a, 0x02, 0x00, + 0x05, 0x12, 0x03, 0x41, 0x0d, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0a, 0x02, 0x00, 0x01, 0x12, + 0x03, 0x41, 0x12, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0a, 0x02, 0x00, 0x03, 0x12, 0x03, 0x41, + 0x1f, 0x20, 0x0a, 0x3e, 0x0a, 0x02, 0x04, 0x0b, 0x12, 0x04, 0x45, 0x00, 0x47, 0x01, 0x1a, 0x32, + 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x20, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, + 0x72, 0x20, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x0a, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x0b, 0x01, 0x12, 0x03, 0x45, 0x08, 0x24, 0x0a, 0x0b, + 0x0a, 0x04, 0x04, 0x0b, 0x02, 0x00, 0x12, 0x03, 0x46, 0x04, 0x23, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x0b, 0x02, 0x00, 0x04, 0x12, 0x03, 0x46, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0b, 0x02, + 0x00, 0x05, 0x12, 0x03, 0x46, 0x0d, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0b, 0x02, 0x00, 0x01, + 0x12, 0x03, 0x46, 0x14, 0x1e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0b, 0x02, 0x00, 0x03, 0x12, 0x03, + 0x46, 0x21, 0x22, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x0c, 0x12, 0x04, 0x49, 0x00, 0x4c, 0x01, 0x0a, + 0x0a, 0x0a, 0x03, 0x04, 0x0c, 0x01, 0x12, 0x03, 0x49, 0x08, 0x25, 0x0a, 0x0b, 0x0a, 0x04, 0x04, + 0x0c, 0x02, 0x00, 0x12, 0x03, 0x4a, 0x04, 0x23, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0c, 0x02, 0x00, + 0x04, 0x12, 0x03, 0x4a, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0c, 0x02, 0x00, 0x05, 0x12, + 0x03, 0x4a, 0x0d, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0c, 0x02, 0x00, 0x01, 0x12, 0x03, 0x4a, + 0x14, 0x1e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0c, 0x02, 0x00, 0x03, 0x12, 0x03, 0x4a, 0x21, 0x22, + 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x0c, 0x02, 0x01, 0x12, 0x03, 0x4b, 0x04, 0x2e, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x0c, 0x02, 0x01, 0x04, 0x12, 0x03, 0x4b, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x0c, 0x02, 0x01, 0x06, 0x12, 0x03, 0x4b, 0x0d, 0x1d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0c, 0x02, + 0x01, 0x01, 0x12, 0x03, 0x4b, 0x1e, 0x29, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0c, 0x02, 0x01, 0x03, + 0x12, 0x03, 0x4b, 0x2c, 0x2d, 0x0a, 0x3d, 0x0a, 0x02, 0x04, 0x0d, 0x12, 0x04, 0x4f, 0x00, 0x51, + 0x01, 0x1a, 0x31, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x70, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x0a, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x0d, 0x01, 0x12, 0x03, 0x4f, 0x08, 0x23, + 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x0d, 0x02, 0x00, 0x12, 0x03, 0x50, 0x04, 0x22, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x0d, 0x02, 0x00, 0x04, 0x12, 0x03, 0x50, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x0d, 0x02, 0x00, 0x05, 0x12, 0x03, 0x50, 0x0d, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0d, 0x02, + 0x00, 0x01, 0x12, 0x03, 0x50, 0x14, 0x1d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0d, 0x02, 0x00, 0x03, + 0x12, 0x03, 0x50, 0x20, 0x21, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x0e, 0x12, 0x04, 0x53, 0x00, 0x56, + 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x0e, 0x01, 0x12, 0x03, 0x53, 0x08, 0x24, 0x0a, 0x0b, 0x0a, + 0x04, 0x04, 0x0e, 0x02, 0x00, 0x12, 0x03, 0x54, 0x04, 0x22, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0e, + 0x02, 0x00, 0x04, 0x12, 0x03, 0x54, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0e, 0x02, 0x00, + 0x05, 0x12, 0x03, 0x54, 0x0d, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0e, 0x02, 0x00, 0x01, 0x12, + 0x03, 0x54, 0x14, 0x1d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0e, 0x02, 0x00, 0x03, 0x12, 0x03, 0x54, + 0x20, 0x21, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x0e, 0x02, 0x01, 0x12, 0x03, 0x55, 0x04, 0x2e, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x0e, 0x02, 0x01, 0x04, 0x12, 0x03, 0x55, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x0e, 0x02, 0x01, 0x06, 0x12, 0x03, 0x55, 0x0d, 0x1d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x0e, 0x02, 0x01, 0x01, 0x12, 0x03, 0x55, 0x1e, 0x29, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0e, 0x02, + 0x01, 0x03, 0x12, 0x03, 0x55, 0x2c, 0x2d, 0x0a, 0x1b, 0x0a, 0x02, 0x04, 0x0f, 0x12, 0x04, 0x59, + 0x00, 0x66, 0x01, 0x1a, 0x0f, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x20, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x0a, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x0f, 0x01, 0x12, 0x03, 0x59, 0x08, 0x18, + 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x0f, 0x02, 0x00, 0x12, 0x03, 0x5a, 0x02, 0x19, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x0f, 0x02, 0x00, 0x04, 0x12, 0x03, 0x5a, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x0f, 0x02, 0x00, 0x05, 0x12, 0x03, 0x5a, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, + 0x00, 0x01, 0x12, 0x03, 0x5a, 0x12, 0x14, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x00, 0x03, + 0x12, 0x03, 0x5a, 0x17, 0x18, 0x0a, 0x2d, 0x0a, 0x04, 0x04, 0x0f, 0x02, 0x01, 0x12, 0x03, 0x5d, + 0x02, 0x21, 0x1a, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x76, 0x69, + 0x74, 0x65, 0x64, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x01, 0x04, 0x12, 0x03, 0x5d, + 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x01, 0x05, 0x12, 0x03, 0x5d, 0x0b, 0x11, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x01, 0x01, 0x12, 0x03, 0x5d, 0x12, 0x1c, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x01, 0x03, 0x12, 0x03, 0x5d, 0x1f, 0x20, 0x0a, 0x0b, 0x0a, 0x04, + 0x04, 0x0f, 0x02, 0x02, 0x12, 0x03, 0x5e, 0x02, 0x23, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, + 0x02, 0x04, 0x12, 0x03, 0x5e, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x02, 0x05, + 0x12, 0x03, 0x5e, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x02, 0x01, 0x12, 0x03, + 0x5e, 0x12, 0x1e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x02, 0x03, 0x12, 0x03, 0x5e, 0x21, + 0x22, 0x0a, 0x40, 0x0a, 0x04, 0x04, 0x0f, 0x02, 0x03, 0x12, 0x03, 0x61, 0x02, 0x20, 0x1a, 0x33, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x20, 0x69, 0x64, 0x20, 0x74, + 0x68, 0x61, 0x74, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x20, 0x69, + 0x73, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, 0x20, + 0x74, 0x6f, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x03, 0x04, 0x12, 0x03, 0x61, 0x02, + 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x03, 0x05, 0x12, 0x03, 0x61, 0x0b, 0x11, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x03, 0x01, 0x12, 0x03, 0x61, 0x12, 0x1b, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x0f, 0x02, 0x03, 0x03, 0x12, 0x03, 0x61, 0x1e, 0x1f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, + 0x0f, 0x02, 0x04, 0x12, 0x03, 0x62, 0x02, 0x22, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x04, + 0x04, 0x12, 0x03, 0x62, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x04, 0x05, 0x12, + 0x03, 0x62, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x04, 0x01, 0x12, 0x03, 0x62, + 0x12, 0x1d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x04, 0x03, 0x12, 0x03, 0x62, 0x20, 0x21, + 0x0a, 0x33, 0x0a, 0x04, 0x04, 0x0f, 0x02, 0x05, 0x12, 0x03, 0x65, 0x02, 0x1f, 0x1a, 0x26, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x05, 0x04, 0x12, 0x03, + 0x65, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x05, 0x05, 0x12, 0x03, 0x65, 0x0b, + 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x05, 0x01, 0x12, 0x03, 0x65, 0x12, 0x1a, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x0f, 0x02, 0x05, 0x03, 0x12, 0x03, 0x65, 0x1d, 0x1e, 0x0a, 0x0a, 0x0a, + 0x02, 0x04, 0x10, 0x12, 0x04, 0x68, 0x00, 0x73, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x10, 0x01, + 0x12, 0x03, 0x68, 0x08, 0x1e, 0x0a, 0x25, 0x0a, 0x04, 0x04, 0x10, 0x02, 0x00, 0x12, 0x03, 0x6a, + 0x02, 0x21, 0x1a, 0x18, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x62, 0x65, + 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x10, 0x02, 0x00, 0x04, 0x12, 0x03, 0x6a, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x10, + 0x02, 0x00, 0x05, 0x12, 0x03, 0x6a, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x10, 0x02, 0x00, + 0x01, 0x12, 0x03, 0x6a, 0x12, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x10, 0x02, 0x00, 0x03, 0x12, + 0x03, 0x6a, 0x1f, 0x20, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x10, 0x02, 0x01, 0x12, 0x03, 0x6b, 0x02, + 0x23, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x10, 0x02, 0x01, 0x04, 0x12, 0x03, 0x6b, 0x02, 0x0a, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x10, 0x02, 0x01, 0x05, 0x12, 0x03, 0x6b, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x10, 0x02, 0x01, 0x01, 0x12, 0x03, 0x6b, 0x12, 0x1e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x10, 0x02, 0x01, 0x03, 0x12, 0x03, 0x6b, 0x21, 0x22, 0x0a, 0x40, 0x0a, 0x04, 0x04, 0x10, 0x02, + 0x02, 0x12, 0x03, 0x6e, 0x02, 0x20, 0x1a, 0x33, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x20, 0x69, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x20, 0x69, 0x73, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, + 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x10, 0x02, 0x02, 0x04, 0x12, 0x03, 0x6e, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x10, 0x02, + 0x02, 0x05, 0x12, 0x03, 0x6e, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x10, 0x02, 0x02, 0x01, + 0x12, 0x03, 0x6e, 0x12, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x10, 0x02, 0x02, 0x03, 0x12, 0x03, + 0x6e, 0x1e, 0x1f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x10, 0x02, 0x03, 0x12, 0x03, 0x6f, 0x02, 0x22, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x10, 0x02, 0x03, 0x04, 0x12, 0x03, 0x6f, 0x02, 0x0a, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x10, 0x02, 0x03, 0x05, 0x12, 0x03, 0x6f, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x10, 0x02, 0x03, 0x01, 0x12, 0x03, 0x6f, 0x12, 0x1d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x10, + 0x02, 0x03, 0x03, 0x12, 0x03, 0x6f, 0x20, 0x21, 0x0a, 0x33, 0x0a, 0x04, 0x04, 0x10, 0x02, 0x04, + 0x12, 0x03, 0x72, 0x02, 0x1f, 0x1a, 0x26, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x10, 0x02, 0x04, 0x04, 0x12, 0x03, 0x72, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x10, 0x02, 0x04, 0x05, 0x12, 0x03, 0x72, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x10, 0x02, + 0x04, 0x01, 0x12, 0x03, 0x72, 0x12, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x10, 0x02, 0x04, 0x03, + 0x12, 0x03, 0x72, 0x1d, 0x1e, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x11, 0x12, 0x04, 0x75, 0x00, 0x7a, + 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x11, 0x01, 0x12, 0x03, 0x75, 0x08, 0x25, 0x0a, 0x0b, 0x0a, + 0x04, 0x04, 0x11, 0x02, 0x00, 0x12, 0x03, 0x76, 0x02, 0x30, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x11, + 0x02, 0x00, 0x04, 0x12, 0x03, 0x76, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x11, 0x02, 0x00, + 0x05, 0x12, 0x03, 0x76, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x11, 0x02, 0x00, 0x01, 0x12, + 0x03, 0x76, 0x12, 0x2b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x11, 0x02, 0x00, 0x03, 0x12, 0x03, 0x76, + 0x2e, 0x2f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x11, 0x02, 0x01, 0x12, 0x03, 0x77, 0x02, 0x20, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x11, 0x02, 0x01, 0x04, 0x12, 0x03, 0x77, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x11, 0x02, 0x01, 0x05, 0x12, 0x03, 0x77, 0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x11, 0x02, 0x01, 0x01, 0x12, 0x03, 0x77, 0x12, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x11, 0x02, + 0x01, 0x03, 0x12, 0x03, 0x77, 0x1e, 0x1f, 0x0a, 0x45, 0x0a, 0x04, 0x04, 0x11, 0x02, 0x02, 0x12, + 0x03, 0x79, 0x02, 0x1b, 0x1a, 0x38, 0x20, 0x69, 0x66, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, + 0x20, 0x3d, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x79, 0x27, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6a, 0x6f, 0x69, 0x6e, 0x69, + 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x0a, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x11, 0x02, 0x02, 0x04, 0x12, 0x03, 0x79, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x11, 0x02, 0x02, 0x05, 0x12, 0x03, 0x79, 0x0b, 0x0f, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x11, + 0x02, 0x02, 0x01, 0x12, 0x03, 0x79, 0x10, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x11, 0x02, 0x02, + 0x03, 0x12, 0x03, 0x79, 0x19, 0x1a, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x12, 0x12, 0x04, 0x7c, 0x00, + 0x7d, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x12, 0x01, 0x12, 0x03, 0x7c, 0x08, 0x26, 0x0a, 0x1d, + 0x0a, 0x02, 0x04, 0x13, 0x12, 0x06, 0x80, 0x01, 0x00, 0x8b, 0x01, 0x01, 0x1a, 0x0f, 0x20, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x64, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x0a, 0x0a, 0x0b, 0x0a, + 0x03, 0x04, 0x13, 0x01, 0x12, 0x04, 0x80, 0x01, 0x08, 0x17, 0x0a, 0x25, 0x0a, 0x04, 0x04, 0x13, + 0x02, 0x00, 0x12, 0x04, 0x82, 0x01, 0x04, 0x1b, 0x1a, 0x17, 0x20, 0x70, 0x6b, 0x20, 0x66, 0x6f, + 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x6b, 0x65, 0x79, + 0x0a, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x00, 0x04, 0x12, 0x04, 0x82, 0x01, 0x04, 0x0c, + 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x00, 0x05, 0x12, 0x04, 0x82, 0x01, 0x0d, 0x13, 0x0a, + 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x00, 0x01, 0x12, 0x04, 0x82, 0x01, 0x14, 0x16, 0x0a, 0x0d, + 0x0a, 0x05, 0x04, 0x13, 0x02, 0x00, 0x03, 0x12, 0x04, 0x82, 0x01, 0x19, 0x1a, 0x0a, 0x21, 0x0a, + 0x04, 0x04, 0x13, 0x02, 0x01, 0x12, 0x04, 0x84, 0x01, 0x04, 0x22, 0x1a, 0x13, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x0a, + 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x01, 0x04, 0x12, 0x04, 0x84, 0x01, 0x04, 0x0c, 0x0a, + 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x01, 0x05, 0x12, 0x04, 0x84, 0x01, 0x0d, 0x13, 0x0a, 0x0d, + 0x0a, 0x05, 0x04, 0x13, 0x02, 0x01, 0x01, 0x12, 0x04, 0x84, 0x01, 0x14, 0x1d, 0x0a, 0x0d, 0x0a, + 0x05, 0x04, 0x13, 0x02, 0x01, 0x03, 0x12, 0x04, 0x84, 0x01, 0x20, 0x21, 0x0a, 0x18, 0x0a, 0x04, + 0x04, 0x13, 0x02, 0x02, 0x12, 0x04, 0x86, 0x01, 0x04, 0x1d, 0x1a, 0x0a, 0x20, 0x6b, 0x65, 0x79, + 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x0a, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x02, 0x04, 0x12, + 0x04, 0x86, 0x01, 0x04, 0x0c, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x02, 0x05, 0x12, 0x04, + 0x86, 0x01, 0x0d, 0x13, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x02, 0x01, 0x12, 0x04, 0x86, + 0x01, 0x14, 0x18, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x02, 0x03, 0x12, 0x04, 0x86, 0x01, + 0x1b, 0x1c, 0x0a, 0x0c, 0x0a, 0x04, 0x04, 0x13, 0x02, 0x03, 0x12, 0x04, 0x87, 0x01, 0x04, 0x21, + 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x03, 0x04, 0x12, 0x04, 0x87, 0x01, 0x04, 0x0c, 0x0a, + 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x03, 0x05, 0x12, 0x04, 0x87, 0x01, 0x0d, 0x13, 0x0a, 0x0d, + 0x0a, 0x05, 0x04, 0x13, 0x02, 0x03, 0x01, 0x12, 0x04, 0x87, 0x01, 0x14, 0x1c, 0x0a, 0x0d, 0x0a, + 0x05, 0x04, 0x13, 0x02, 0x03, 0x03, 0x12, 0x04, 0x87, 0x01, 0x1f, 0x20, 0x0a, 0x0c, 0x0a, 0x04, + 0x04, 0x13, 0x02, 0x04, 0x12, 0x04, 0x88, 0x01, 0x04, 0x1c, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, + 0x02, 0x04, 0x04, 0x12, 0x04, 0x88, 0x01, 0x04, 0x0c, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, + 0x04, 0x05, 0x12, 0x04, 0x88, 0x01, 0x0d, 0x12, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x04, + 0x01, 0x12, 0x04, 0x88, 0x01, 0x13, 0x17, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x04, 0x03, + 0x12, 0x04, 0x88, 0x01, 0x1a, 0x1b, 0x0a, 0x2e, 0x0a, 0x04, 0x04, 0x13, 0x02, 0x05, 0x12, 0x04, + 0x8a, 0x01, 0x04, 0x21, 0x1a, 0x20, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x69, + 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x6b, 0x65, 0x79, 0x0a, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x05, 0x04, 0x12, + 0x04, 0x8a, 0x01, 0x04, 0x0c, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x05, 0x05, 0x12, 0x04, + 0x8a, 0x01, 0x0d, 0x13, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x05, 0x01, 0x12, 0x04, 0x8a, + 0x01, 0x14, 0x1c, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x13, 0x02, 0x05, 0x03, 0x12, 0x04, 0x8a, 0x01, + 0x1f, 0x20, 0x0a, 0x0c, 0x0a, 0x02, 0x04, 0x14, 0x12, 0x06, 0x8d, 0x01, 0x00, 0x93, 0x01, 0x01, + 0x0a, 0x0b, 0x0a, 0x03, 0x04, 0x14, 0x01, 0x12, 0x04, 0x8d, 0x01, 0x08, 0x1d, 0x0a, 0x0c, 0x0a, + 0x04, 0x04, 0x14, 0x02, 0x00, 0x12, 0x04, 0x8e, 0x01, 0x04, 0x22, 0x0a, 0x0d, 0x0a, 0x05, 0x04, + 0x14, 0x02, 0x00, 0x04, 0x12, 0x04, 0x8e, 0x01, 0x04, 0x0c, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, + 0x02, 0x00, 0x05, 0x12, 0x04, 0x8e, 0x01, 0x0d, 0x13, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, + 0x00, 0x01, 0x12, 0x04, 0x8e, 0x01, 0x14, 0x1d, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, 0x00, + 0x03, 0x12, 0x04, 0x8e, 0x01, 0x20, 0x21, 0x0a, 0x0c, 0x0a, 0x04, 0x04, 0x14, 0x02, 0x01, 0x12, + 0x04, 0x8f, 0x01, 0x04, 0x1d, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, 0x01, 0x04, 0x12, 0x04, + 0x8f, 0x01, 0x04, 0x0c, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, 0x01, 0x05, 0x12, 0x04, 0x8f, + 0x01, 0x0d, 0x13, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, 0x01, 0x01, 0x12, 0x04, 0x8f, 0x01, + 0x14, 0x18, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, 0x01, 0x03, 0x12, 0x04, 0x8f, 0x01, 0x1b, + 0x1c, 0x0a, 0x0c, 0x0a, 0x04, 0x04, 0x14, 0x02, 0x02, 0x12, 0x04, 0x90, 0x01, 0x04, 0x21, 0x0a, + 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, 0x02, 0x04, 0x12, 0x04, 0x90, 0x01, 0x04, 0x0c, 0x0a, 0x0d, + 0x0a, 0x05, 0x04, 0x14, 0x02, 0x02, 0x05, 0x12, 0x04, 0x90, 0x01, 0x0d, 0x13, 0x0a, 0x0d, 0x0a, + 0x05, 0x04, 0x14, 0x02, 0x02, 0x01, 0x12, 0x04, 0x90, 0x01, 0x14, 0x1c, 0x0a, 0x0d, 0x0a, 0x05, + 0x04, 0x14, 0x02, 0x02, 0x03, 0x12, 0x04, 0x90, 0x01, 0x1f, 0x20, 0x0a, 0x0c, 0x0a, 0x04, 0x04, + 0x14, 0x02, 0x03, 0x12, 0x04, 0x91, 0x01, 0x04, 0x1c, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, + 0x03, 0x04, 0x12, 0x04, 0x91, 0x01, 0x04, 0x0c, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, 0x03, + 0x05, 0x12, 0x04, 0x91, 0x01, 0x0d, 0x12, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, 0x03, 0x01, + 0x12, 0x04, 0x91, 0x01, 0x13, 0x17, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, 0x03, 0x03, 0x12, + 0x04, 0x91, 0x01, 0x1a, 0x1b, 0x0a, 0x0c, 0x0a, 0x04, 0x04, 0x14, 0x02, 0x04, 0x12, 0x04, 0x92, + 0x01, 0x04, 0x21, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, 0x04, 0x04, 0x12, 0x04, 0x92, 0x01, + 0x04, 0x0c, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, 0x04, 0x05, 0x12, 0x04, 0x92, 0x01, 0x0d, + 0x13, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, 0x04, 0x01, 0x12, 0x04, 0x92, 0x01, 0x14, 0x1c, + 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x14, 0x02, 0x04, 0x03, 0x12, 0x04, 0x92, 0x01, 0x1f, 0x20, ]; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/components/builder-protocol/src/sessionsrv.rs b/components/builder-protocol/src/sessionsrv.rs index 03f3311b1f..6b13991180 100644 --- a/components/builder-protocol/src/sessionsrv.rs +++ b/components/builder-protocol/src/sessionsrv.rs @@ -53,6 +53,24 @@ impl Into for Account { } } +impl ToJson for Account { + fn to_json(&self) -> Json { + let mut m = BTreeMap::new(); + m.insert("id".to_string(), self.get_id().to_string().to_json()); + m.insert("name".to_string(), self.get_name().to_json()); + m.insert("email".to_string(), self.get_email().to_json()); + Json::Object(m) + } +} + +impl Routable for AccountGet { + type H = String; + + fn route_key(&self) -> Option { + Some(self.get_name().to_string()) + } +} + impl Persistable for SessionToken { type Key = String; @@ -75,3 +93,4 @@ impl ToJson for Session { Json::Object(m) } } + diff --git a/components/builder-protocol/src/vault.rs b/components/builder-protocol/src/vault.rs index 8b9188bf26..8bb7609c65 100644 --- a/components/builder-protocol/src/vault.rs +++ b/components/builder-protocol/src/vault.rs @@ -1,9 +1,8 @@ -// Copyright:: Copyright (c) 2015-2016 The Habitat Maintainers +// Copyright:: Copyright (c) 2015-2016 Chef Software, Inc. // -// The terms of the Evaluation Agreement (Habitat) between Chef Software Inc. -// and the party accessing this file ("Licensee") apply to Licensee's use of -// the Software until such time that the Software is made available under an -// open source license such as the Apache 2.0 License. +// The terms of the Evaluation Agreement (Bldr) between Chef Software Inc. and the party accessing +// this file ("Licensee") apply to Licensee's use of the Software until such time that the Software +// is made available under an open source license such as the Apache 2.0 License. use std::collections::BTreeMap; @@ -50,7 +49,194 @@ impl ToJson for Origin { let mut m = BTreeMap::new(); m.insert("id".to_string(), self.get_id().to_json()); m.insert("name".to_string(), self.get_name().to_json()); - m.insert("owner_id".to_string(), self.get_owner_id().to_json()); + m.insert("owner_id".to_string(), + self.get_owner_id().to_string().to_json()); Json::Object(m) } } + +impl Routable for OriginMemberRemove { + type H = InstaId; + + fn route_key(&self) -> Option { + Some(InstaId(self.get_origin_id())) + } +} + +impl Routable for OriginMemberListRequest { + type H = InstaId; + + fn route_key(&self) -> Option { + Some(InstaId(self.get_origin_id())) + } +} + + +impl Persistable for OriginSecretKey { + type Key = u64; + + fn primary_key(&self) -> Self::Key { + self.get_id() + } + + fn set_primary_key(&mut self, value: Self::Key) { + self.set_id(value); + } +} + + +impl Routable for OriginSecretKeyCreate { + type H = InstaId; + + fn route_key(&self) -> Option { + Some(InstaId(self.get_owner_id())) + } +} + +impl Routable for OriginInvitationCreate { + type H = u64; + + fn route_key(&self) -> Option { + // TODO! + Some(self.get_owner_id()) + } +} + +impl Persistable for OriginInvitation { + type Key = u64; + + fn primary_key(&self) -> Self::Key { + self.get_id() + } + + fn set_primary_key(&mut self, value: Self::Key) { + self.set_id(value); + } +} + +impl ToJson for OriginInvitation { + fn to_json(&self) -> Json { + let mut m = BTreeMap::new(); + // NOTE: all numbers are represented as strings, because they + // overflow JSON number representation in some tools + m.insert("id".to_string(), self.get_id().to_string().to_json()); + m.insert("account_id".to_string(), + self.get_account_id().to_string().to_json()); + m.insert("account_name".to_string(), + self.get_account_name().to_json()); + m.insert("origin_id".to_string(), + self.get_origin_id().to_string().to_json()); + m.insert("origin_name".to_string(), self.get_origin_name().to_json()); + m.insert("owner_id".to_string(), + self.get_owner_id().to_string().to_json()); + Json::Object(m) + } +} + + +impl Routable for AccountInvitationListRequest { + type H = u64; + + fn route_key(&self) -> Option { + // TODO! + Some(self.get_account_id()) + } +} + +impl Routable for AccountInvitationListResponse { + type H = u64; + + fn route_key(&self) -> Option { + // TODO! + Some(self.get_account_id()) + } +} + + +impl ToJson for AccountInvitationListResponse { + fn to_json(&self) -> Json { + let mut m = BTreeMap::new(); + m.insert("account_id".to_string(), + self.get_account_id().to_string().to_json()); + m.insert("invitations".to_string(), self.get_invitations().to_json()); + Json::Object(m) + } +} + +impl Routable for OriginInvitationListRequest { + type H = u64; + + fn route_key(&self) -> Option { + // TODO! + Some(self.get_origin_id()) + } +} + +impl Routable for OriginInvitationListResponse { + type H = u64; + + fn route_key(&self) -> Option { + // TODO! + Some(self.get_origin_id()) + } +} + + +impl ToJson for OriginInvitationListResponse { + fn to_json(&self) -> Json { + let mut m = BTreeMap::new(); + m.insert("origin_id".to_string(), + self.get_origin_id().to_string().to_json()); + m.insert("invitations".to_string(), self.get_invitations().to_json()); + Json::Object(m) + } +} + + +impl Routable for OriginInvitationAcceptRequest { + type H = u64; + + fn route_key(&self) -> Option { + // TODO! + // we don't have an origin id here... + Some(self.get_invite_id()) + } +} + +impl ToJson for OriginMemberListResponse { + fn to_json(&self) -> Json { + let mut m = BTreeMap::new(); + m.insert("origin_id".to_string(), + self.get_origin_id().to_string().to_json()); + m.insert("members".to_string(), self.get_members().to_json()); + Json::Object(m) + } +} + +impl Routable for AccountOriginListRequest { + type H = u64; + + fn route_key(&self) -> Option { + // TODO! + Some(self.get_account_id()) + } +} + +impl ToJson for AccountOriginListResponse { + fn to_json(&self) -> Json { + let mut m = BTreeMap::new(); + m.insert("account_id".to_string(), + self.get_account_id().to_string().to_json()); + m.insert("origins".to_string(), self.get_origins().to_json()); + Json::Object(m) + } +} + +impl Routable for CheckOriginAccessRequest { + type H = u64; + + fn route_key(&self) -> Option { + // TODO! + Some(self.get_account_id()) + } +} diff --git a/components/builder-sessionsrv/src/data_store.rs b/components/builder-sessionsrv/src/data_store.rs index d436ea7226..e4d6e4330a 100644 --- a/components/builder-sessionsrv/src/data_store.rs +++ b/components/builder-sessionsrv/src/data_store.rs @@ -7,7 +7,7 @@ use std::sync::Arc; -use dbcache::{Bucket, ConnectionPool, ExpiringSet, IndexSet, InstaSet}; +use dbcache::{self, Bucket, ConnectionPool, ExpiringSet, IndexSet, InstaSet}; use protocol::sessionsrv; use r2d2_redis::RedisConnectionManager; use redis; @@ -28,8 +28,10 @@ impl DataStore { let pool = Arc::new(ConnectionPool::new(pool_cfg, manager).unwrap()); let pool1 = pool.clone(); let pool2 = pool.clone(); + let accounts = AccountTable::new(pool1); let sessions = SessionTable::new(pool2); + Ok(DataStore { pool: pool, accounts: accounts, @@ -41,15 +43,19 @@ impl DataStore { pub struct AccountTable { pool: Arc, github: GitHub2AccountIdx, + user_to_account: GitHubUser2AccountIdx, } impl AccountTable { pub fn new(pool: Arc) -> Self { let pool1 = pool.clone(); + let pool2 = pool.clone(); let directory = GitHub2AccountIdx::new(pool1); + let user_to_account = GitHubUser2AccountIdx::new(pool2); AccountTable { pool: pool, github: directory, + user_to_account: user_to_account, } } @@ -67,9 +73,17 @@ impl AccountTable { // JW TODO: make these two database calls transactional try!(self.write(&mut account)); try!(self.github.write(&req.get_extern_id(), account.get_id())); + // TODO: route a message to the appropriate sessionsrv, and + // that sessionsrv will write to the db + try!(self.user_to_account.write(&req.get_name().to_string(), account.get_id())); Ok(account) } } + + pub fn find_by_username(&self, username: &str) -> dbcache::Result { + let account_id = try!(self.user_to_account.find(&username.to_string())); + self.find(&account_id) + } } impl Bucket for AccountTable { @@ -142,3 +156,32 @@ impl IndexSet for GitHub2AccountIdx { type Key = u64; type Value = u64; } + + +/// maps github usernames -> Account.id's +struct GitHubUser2AccountIdx { + pool: Arc, +} + +impl GitHubUser2AccountIdx { + pub fn new(pool: Arc) -> Self { + GitHubUser2AccountIdx { pool: pool } + } +} + +impl Bucket for GitHubUser2AccountIdx { + fn prefix() -> &'static str { + "githubuser2account" + } + + fn pool(&self) -> &ConnectionPool { + &self.pool + } +} + +impl IndexSet for GitHubUser2AccountIdx { + type Key = String; + type Value = u64; +} + + diff --git a/components/builder-sessionsrv/src/server.rs b/components/builder-sessionsrv/src/server.rs index 491dd26580..d53a01fa84 100644 --- a/components/builder-sessionsrv/src/server.rs +++ b/components/builder-sessionsrv/src/server.rs @@ -14,7 +14,7 @@ use dbcache::{self, ExpiringSet, InstaSet, IndexSet}; use hab_net::server::{Application, Envelope, NetIdent, RouteConn, Service, Supervisor, Supervisable}; use protocol::net::{self, ErrCode}; -use protocol::sessionsrv::{Account, Session, SessionGet, SessionCreate, SessionToken}; +use protocol::sessionsrv::{Account, AccountGet, Session, SessionGet, SessionCreate, SessionToken}; use zmq; use config::Config; @@ -36,6 +36,23 @@ impl Worker { fn dispatch(&mut self, req: &mut Envelope) -> Result<()> { match req.message_id() { + "AccountGet" => { + let msg: AccountGet = try!(req.parse_msg()); + match self.datastore().accounts.find_by_username(&msg.get_name().to_string()) { + Ok(account) => { + try!(req.reply_complete(&mut self.sock, &account)); + } + Err(dbcache::Error::EntityNotFound) => { + let err = net::err(ErrCode::ENTITY_NOT_FOUND, "ss:account_get:0"); + try!(req.reply_complete(&mut self.sock, &err)); + } + Err(e) => { + error!("datastore error, err={:?}", e); + let err = net::err(ErrCode::INTERNAL, "ss:account_get:1"); + try!(req.reply_complete(&mut self.sock, &err)); + } + } + } "SessionCreate" => { let mut msg: SessionCreate = try!(req.parse_msg()); let mut account: Account = match self.datastore() diff --git a/components/builder-vault/src/data_store.rs b/components/builder-vault/src/data_store.rs index e5b331e44a..263568d9d5 100644 --- a/components/builder-vault/src/data_store.rs +++ b/components/builder-vault/src/data_store.rs @@ -15,6 +15,7 @@ use r2d2_redis::RedisConnectionManager; use redis::{self, Commands, PipelineCommands}; use error::Result; +use protocol::vault as proto; pub struct DataStore { pub pool: Arc, @@ -29,6 +30,7 @@ impl DataStore { let pool = Arc::new(ConnectionPool::new(pool_cfg, manager).unwrap()); let pool1 = pool.clone(); let origins = OriginTable::new(pool1); + Ok(DataStore { pool: pool, origins: origins, @@ -38,18 +40,121 @@ impl DataStore { pub struct OriginTable { pool: Arc, + + pub origin_secret_keys: OriginSecretKeysTable, + pub invites: OriginInvitesTable, pub name_idx: OriginNameIdx, } impl OriginTable { pub fn new(pool: Arc) -> Self { let pool1 = pool.clone(); - let name_idx = OriginNameIdx::new(pool1); + let pool2 = pool.clone(); + let pool3 = pool.clone(); + + let origin_secret_keys = OriginSecretKeysTable::new(pool1); + let invites = OriginInvitesTable::new(pool2); + let name_idx = OriginNameIdx::new(pool3); + OriginTable { pool: pool, + origin_secret_keys: origin_secret_keys, + invites: invites, name_idx: name_idx, } } + + /// modify_invite is located in the OriginTable so it can interact with + /// origin members AND origin invites + pub fn modify_invite(&self, + invite: &proto::OriginInvitation, + ignore: bool) + -> dbcache::Result<()> { + debug!("Accepting invitation ({})", ignore); + + // account_origins stores account_id -> origin *name* + // origin_members stores origin_id -> account *name* + // This is cheating a bit, but the names are stored + // on the SessionSrv in the Account obj so this + // will do for now. + let account_origins_key = format!("account_origins:{}", &invite.get_account_id()); + let origin_members_key = format!("origin_members:{}", &invite.get_origin_id()); + debug!("account_origins_key = {}", &account_origins_key); + debug!("origin_members_key = {}", &origin_members_key); + + let conn = try!(self.pool().get()); + + if !ignore { + // accept the invite: add the account to the origin and delete the + // invite + try!(redis::transaction(conn.deref(), + &[account_origins_key.clone(), origin_members_key.clone()], + |txn| { + txn.sadd(account_origins_key.clone(), invite.get_origin_name()) + .sadd(origin_members_key.clone(), invite.get_account_name()) + .del(OriginInvitesTable::key(invite.get_id())) + .query(conn.deref()) + })); + } else { + // "ignore" the invite, meaning: just delete it + try!(conn.del(invite.get_id())); + } + + Ok(()) + } + + pub fn account_origins_key(&self, account_id: &u64) -> String { + format!("account_origins:{}", account_id) + } + + pub fn origin_members_key(&self, origin_id: &u64) -> String { + format!("origin_members:{}", origin_id) + } + + /// this is used to add the owner of the account to the full list of members + /// right after an origin is created + pub fn add_origin_member(&self, + account_id: u64, + account_name: &str, + origin_name: &str) + -> dbcache::Result<()> { + + let conn = try!(self.pool().get()); + + let origin_id = try!(self.name_idx.find(&origin_name.to_string())); + let account_origins_key = self.account_origins_key(&account_id); + let origin_members_key = self.origin_members_key(&origin_id); + try!(redis::transaction(conn.deref(), + &[account_origins_key.clone(), origin_members_key.clone()], + |txn| { + txn.sadd(account_origins_key.clone(), origin_name) + .sadd(origin_members_key.clone(), account_name) + .query(conn.deref()) + })); + Ok(()) + } + + pub fn list_origin_members(&self, origin_id: u64) -> dbcache::Result> { + let origin_members_key = self.origin_members_key(&origin_id); + let conn = try!(self.pool().get()); + let members = try!(conn.smembers::>(origin_members_key)); + + Ok(members) + } + + pub fn list_account_origins(&self, account_id: u64) -> dbcache::Result> { + let account_origins_key = self.account_origins_key(&account_id); + let conn = try!(self.pool().get()); + let origins = try!(conn.smembers::>(account_origins_key)); + Ok(origins) + } + + pub fn is_origin_member(&self, account_id: u64, origin_name: &str) -> dbcache::Result { + let account_origins_key = self.account_origins_key(&account_id); + let conn = try!(self.pool().get()); + let result = try!(conn.sismember::(account_origins_key, origin_name.to_string())); + Ok(result) + } } impl Bucket for OriginTable { @@ -116,3 +221,161 @@ impl IndexSet for OriginNameIdx { type Key = String; type Value = u64; } + + + + +pub struct OriginSecretKeysTable { + pool: Arc, +} + +impl OriginSecretKeysTable { + pub fn new(pool: Arc) -> Self { + OriginSecretKeysTable { pool: pool } + } +} + +impl Bucket for OriginSecretKeysTable { + fn pool(&self) -> &ConnectionPool { + &self.pool + } + + fn prefix() -> &'static str { + "origin_secret_key" + } +} + +impl InstaSet for OriginSecretKeysTable { + type Record = vault::OriginSecretKey; + + fn seq_id() -> &'static str { + "origin_secret_key_seq" + } + + fn write(&self, record: &mut Self::Record) -> dbcache::Result<()> { + let conn = try!(self.pool().get()); + try!(redis::transaction(conn.deref(), &[Self::seq_id()], |txn| { + let sequence_id: u64 = match conn.get::<&'static str, u64>(Self::seq_id()) { + Ok(value) => value + 1, + _ => 0, + }; + let insta_id = InstaId::generate(sequence_id); + record.set_primary_key(*insta_id); + + txn.set(Self::seq_id(), record.primary_key()) + .ignore() + .set(Self::key(&record.primary_key()), + record.write_to_bytes().unwrap()) + .query(conn.deref()) + + })); + Ok(()) + } +} + +pub struct OriginInvitesTable { + pool: Arc, +} + +impl OriginInvitesTable { + pub fn new(pool: Arc) -> Self { + OriginInvitesTable { pool: pool } + } + + /// return a Vec of invite_id's for a given account + pub fn get_by_account_id(&self, + account_id: u64) + -> dbcache::Result> { + let conn = self.pool().get().unwrap(); + let account_to_invites_key = format!("account_to_invites:{}", &account_id); + match conn.smembers::>(account_to_invites_key) { + Ok(invite_ids) => { + let account_invites = invite_ids.iter().fold(Vec::new(), + |mut acc, ref invite_id| { + match self.find(invite_id) { + Ok(invite) => acc.push(invite), + Err(e) => { + debug!("Can't find origin invite for invite_id {}:{}", + &invite_id, + e); + } + }; + acc + }); + Ok(account_invites) + } + Err(e) => Err(dbcache::Error::from(e)), + } + } + + /// return a Vec of invite_id's for a given origin + pub fn get_by_origin_id(&self, + origin_id: u64) + -> dbcache::Result> { + let conn = self.pool().get().unwrap(); + let origin_to_invites_key = format!("origin_to_invites:{}", &origin_id); + match conn.smembers::>(origin_to_invites_key) { + Ok(invite_ids) => { + let origin_invites = invite_ids.iter().fold(Vec::new(), |mut acc, ref invite_id| { + match self.find(invite_id) { + Ok(invite) => acc.push(invite), + Err(e) => { + debug!("Can't find origin invite for invite_id {}:{}", + &invite_id, + e); + } + }; + acc + }); + Ok(origin_invites) + } + Err(e) => Err(dbcache::Error::from(e)), + } + } +} + +impl Bucket for OriginInvitesTable { + fn prefix() -> &'static str { + "origin_invite" + } + + fn pool(&self) -> &ConnectionPool { + &self.pool + } +} + +impl InstaSet for OriginInvitesTable { + type Record = vault::OriginInvitation; + + fn seq_id() -> &'static str { + "origin_invites_key_seq" + } + + + fn write(&self, record: &mut Self::Record) -> dbcache::Result<()> { + let conn = try!(self.pool().get()); + try!(redis::transaction(conn.deref(), &[Self::seq_id()], |txn| { + let sequence_id: u64 = match conn.get::<&'static str, u64>(Self::seq_id()) { + Ok(value) => value + 1, + _ => 0, + }; + let insta_id = InstaId::generate(sequence_id); + record.set_primary_key(*insta_id); + let account_to_invites_key = format!("account_to_invites:{}", record.get_account_id()); + let origin_to_invites_key = format!("origin_to_invites:{}", record.get_origin_id()); + debug!("origin invite = {:?}", &record); + txn.set(Self::seq_id(), record.primary_key()) + .ignore() + .set(Self::key(&record.primary_key()), + record.write_to_bytes().unwrap()) + .ignore() + .sadd(account_to_invites_key, record.primary_key()) + .ignore() + .sadd(origin_to_invites_key, record.primary_key()) + .ignore() + .query(conn.deref()) + })); + + Ok(()) + } +} diff --git a/components/builder-vault/src/main.rs b/components/builder-vault/src/main.rs index c02e3081f3..baa7976366 100644 --- a/components/builder-vault/src/main.rs +++ b/components/builder-vault/src/main.rs @@ -8,8 +8,9 @@ #[macro_use] extern crate clap; extern crate env_logger; -extern crate habitat_builder_vault as vault; extern crate habitat_core as hab_core; +extern crate habitat_builder_protocol as protocol; +extern crate habitat_builder_vault as vault; #[macro_use] extern crate log; diff --git a/components/builder-vault/src/server.rs b/components/builder-vault/src/server.rs index d330a6808c..b5ada8933e 100644 --- a/components/builder-vault/src/server.rs +++ b/components/builder-vault/src/server.rs @@ -10,12 +10,14 @@ use std::sync::{Arc, RwLock}; use std::time::Duration; use std::thread; -use dbcache::{self, IndexSet, InstaSet}; +use protobuf::RepeatedField; +use zmq; + +use dbcache::{self, ExpiringSet, IndexSet, InstaSet}; use hab_net::server::{Application, Envelope, NetIdent, RouteConn, Service, Supervisor, Supervisable}; use protocol::net::{self, ErrCode}; use protocol::vault as proto; -use zmq; use config::Config; use data_store::DataStore; @@ -36,13 +38,60 @@ impl Worker { fn dispatch(&mut self, req: &mut Envelope) -> Result<()> { match req.message_id() { + "AccountInvitationListRequest" => { + let msg: proto::AccountInvitationListRequest = try!(req.parse_msg()); + let invites = try!(self.datastore() + .origins + .invites + .get_by_account_id(msg.get_account_id())); + debug!("Got invites for account {} ", &msg.get_account_id()); + let mut resp = proto::AccountInvitationListResponse::new(); + resp.set_account_id(msg.get_account_id()); + + let mut r_invites = RepeatedField::new(); + for invite in invites { + r_invites.push(invite); + } + resp.set_invitations(r_invites); + try!(req.reply_complete(&mut self.sock, &resp)); + } + "CheckOriginAccessRequest" => { + // !!!NOTE!!! + // !!!NOTE!!! + // only account_id and origin_name are implemented + // !!!NOTE!!! + // !!!NOTE!!! + let msg: proto::CheckOriginAccessRequest = try!(req.parse_msg()); + let is_member = try!(self.datastore() + .origins + .is_origin_member(msg.get_account_id(), msg.get_origin_name())); + let mut resp = proto::CheckOriginAccessResponse::new(); + resp.set_has_access(is_member); + try!(req.reply_complete(&mut self.sock, &resp)); + } "OriginCreate" => { let msg: proto::OriginCreate = try!(req.parse_msg()); let mut origin = proto::Origin::new(); origin.set_name(msg.get_name().to_string()); origin.set_owner_id(msg.get_owner_id()); - // JW TODO: handle db errors + // if the origin already exists, then return + if let Ok(_origin) = self.datastore() + .origins + .name_idx + .find(&msg.get_name().to_string()) { + let err = net::err(ErrCode::ACCESS_DENIED, "vt:origin-create:0"); + try!(req.reply_complete(&mut self.sock, &err)); + } + try!(self.datastore().origins.write(&mut origin)); + + // after the origin is written and has an id, add the owner + // to the list of members + debug!("Adding owner as origin member: {}", &msg.get_owner_name()); + try!(self.datastore() + .origins + .add_origin_member(msg.get_owner_id(), msg.get_owner_name(), msg.get_name())); + try!(req.reply_complete(&mut self.sock, &origin)); } "OriginGet" => { @@ -63,6 +112,70 @@ impl Worker { } } } + "OriginInvitationAcceptRequest" => { + let msg: proto::OriginInvitationAcceptRequest = try!(req.parse_msg()); + + // we might not have an invite here if it's already been accepted + match self.datastore().origins.invites.find(&msg.get_invite_id()) { + Ok(invite) => { + debug!("REQ {:?}", &msg); + debug!("INVITE {:?}", &invite); + if msg.get_account_accepting_request() != invite.get_account_id() { + let err = net::err(ErrCode::ACCESS_DENIED, "vt:origin-invite-accept:0"); + try!(req.reply_complete(&mut self.sock, &err)); + } + + match self.datastore().origins.modify_invite(&invite, msg.get_ignore()) { + Ok(()) => (), + Err(e) => { + debug!("Error accepting invite: {}", e); + } + }; + } + Err(e) => { + debug!("Error accepting invite, maybe it's already been accepted? {}", + e); + } + }; + + let resp = proto::OriginInvitationAcceptResponse::new(); + try!(req.reply_complete(&mut self.sock, &resp)); + } + "OriginInvitationCreate" => { + let msg: proto::OriginInvitationCreate = try!(req.parse_msg()); + let mut invitation = proto::OriginInvitation::new(); + if !try!(self.datastore() + .origins + .is_origin_member(msg.get_account_id(), msg.get_origin_name())) { + debug!("Can't invite to this org unless your already a member"); + let err = net::err(ErrCode::ACCESS_DENIED, "vt:origin-create:0"); + try!(req.reply_complete(&mut self.sock, &err)); + } + invitation.set_account_id(msg.get_account_id()); + invitation.set_account_name(msg.get_account_name().to_string()); + invitation.set_origin_id(msg.get_origin_id()); + invitation.set_origin_name(msg.get_origin_name().to_string()); + + invitation.set_owner_id(msg.get_owner_id()); + try!(self.datastore().origins.invites.write(&mut invitation)); + try!(req.reply_complete(&mut self.sock, &invitation)); + } + "OriginInvitationListRequest" => { + let msg: proto::OriginInvitationListRequest = try!(req.parse_msg()); + let invites = try!(self.datastore() + .origins + .invites + .get_by_origin_id(msg.get_origin_id())); + let mut resp = proto::OriginInvitationListResponse::new(); + resp.set_origin_id(msg.get_origin_id()); + + let mut r_invites = RepeatedField::new(); + for invite in invites { + r_invites.push(invite); + } + resp.set_invitations(r_invites); + try!(req.reply_complete(&mut self.sock, &resp)); + } "OriginList" => { let origin1 = proto::Origin::new(); let origin2 = proto::Origin::new(); @@ -75,6 +188,46 @@ impl Worker { } } } + "OriginMemberListRequest" => { + let msg: proto::OriginMemberListRequest = try!(req.parse_msg()); + let members = + try!(self.datastore().origins.list_origin_members(msg.get_origin_id())); + let mut r_members = RepeatedField::new(); + for member in members { + r_members.push(member); + } + let mut resp = proto::OriginMemberListResponse::new(); + resp.set_origin_id(msg.get_origin_id()); + resp.set_members(r_members); + try!(req.reply_complete(&mut self.sock, &resp)); + } + "AccountOriginListRequest" => { + let msg: proto::AccountOriginListRequest = try!(req.parse_msg()); + let origins = + try!(self.datastore().origins.list_account_origins(msg.get_account_id())); + let mut r_origins = RepeatedField::new(); + for origin in origins { + r_origins.push(origin); + } + let mut resp = proto::AccountOriginListResponse::new(); + resp.set_account_id(msg.get_account_id()); + resp.set_origins(r_origins); + try!(req.reply_complete(&mut self.sock, &resp)); + } + + "OriginSecretKeyCreate" => { + let msg: proto::OriginSecretKeyCreate = try!(req.parse_msg()); + let mut pk = proto::OriginSecretKey::new(); + pk.set_name(msg.get_name().to_string()); + pk.set_revision(msg.get_revision().to_string()); + pk.set_origin_id(msg.get_origin_id()); + pk.set_owner_id(msg.get_owner_id()); + pk.set_body(msg.get_body().to_vec()); + // DP TODO: handle db errors + try!(self.datastore().origins.origin_secret_keys.write(&mut pk)); + try!(req.reply_complete(&mut self.sock, &pk)); + } + _ => panic!("unexpected message: {}", req.message_id()), } Ok(()) diff --git a/components/core/src/crypto/keys/mod.rs b/components/core/src/crypto/keys/mod.rs index 31ef9edda2..8a8c6f2644 100644 --- a/components/core/src/crypto/keys/mod.rs +++ b/components/core/src/crypto/keys/mod.rs @@ -30,6 +30,7 @@ use super::{PUBLIC_BOX_KEY_VERSION, PUBLIC_KEY_PERMISSIONS, PUBLIC_KEY_SUFFIX, lazy_static! { static ref NAME_WITH_REV_RE: Regex = Regex::new(r"\A(?P.+)-(?P\d{14})\z").unwrap(); static ref KEYFILE_RE: Regex = Regex::new(r"\A(?P.+)-(?P\d{14})\.(?P[a-z]+(\.[a-z]+)?)\z").unwrap(); + static ref ORIGIN_NAME_RE: Regex = Regex::new(r"\A[a-z0-9][a-z0-9_-]*\z").unwrap(); } pub mod box_key_pair; @@ -294,6 +295,12 @@ pub fn parse_name_with_rev(name_with_rev: &str) -> Result<(String, String)> { Ok((name.to_string(), rev.to_string())) } +/// Is the string a valid origin name? +pub fn is_valid_origin_name(name: &str) -> bool { + name.chars().count() <= 255 && ORIGIN_NAME_RE.is_match(name) +} + + /// Read a file into a Vec fn read_key_bytes(keyfile: &Path) -> Result> { let mut f = try!(File::open(keyfile)); diff --git a/components/depot/Cargo.lock b/components/depot/Cargo.lock index 09ec3f5633..58b436f4d0 100644 --- a/components/depot/Cargo.lock +++ b/components/depot/Cargo.lock @@ -3,11 +3,13 @@ name = "habitat_depot" version = "0.6.0" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bodyparser 0.3.0 (git+https://github.com/iron/body-parser.git)", "clap 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "habitat_builder_dbcache 0.6.0", "habitat_builder_protocol 0.6.0", "habitat_core 0.6.0", + "habitat_net 0.6.0", "hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", "iron 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -31,6 +33,7 @@ dependencies = [ "urlencoded 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "zmq 0.7.0 (git+https://github.com/reset/rust-zmq.git?branch=habitat)", ] [[package]] @@ -56,6 +59,18 @@ name = "bitflags" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bodyparser" +version = "0.3.0" +source = "git+https://github.com/iron/body-parser.git#6d214973beeb9f886d3c9926dc592d12b18a8749" +dependencies = [ + "iron 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "persistent 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bodyparser" version = "0.3.0" @@ -133,6 +148,11 @@ dependencies = [ "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "fnv" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "gcc" version = "0.3.28" @@ -194,6 +214,19 @@ dependencies = [ "users 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "habitat_net" +version = "0.6.0" +dependencies = [ + "fnv 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "habitat_builder_protocol 0.6.0", + "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "zmq 0.7.0 (git+https://github.com/reset/rust-zmq.git?branch=habitat)", +] + [[package]] name = "hpack" version = "0.2.0" @@ -823,3 +856,22 @@ name = "winapi-build" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "zmq" +version = "0.7.0" +source = "git+https://github.com/reset/rust-zmq.git?branch=habitat#8023e3503a03cd4a04ea6b93de34bb4a09953d27" +dependencies = [ + "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "zmq-sys 0.7.0 (git+https://github.com/reset/rust-zmq.git?branch=habitat)", +] + +[[package]] +name = "zmq-sys" +version = "0.7.0" +source = "git+https://github.com/reset/rust-zmq.git?branch=habitat#8023e3503a03cd4a04ea6b93de34bb4a09953d27" +dependencies = [ + "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + diff --git a/components/depot/Cargo.toml b/components/depot/Cargo.toml index 2f35f5e3f0..5919101d0e 100644 --- a/components/depot/Cargo.toml +++ b/components/depot/Cargo.toml @@ -33,6 +33,9 @@ unicase = "*" urlencoded = "*" walkdir = "*" +[dependencies.bodyparser] +git = "https://github.com/iron/body-parser.git" + [dependencies.clap] version = "*" features = [ "suggestions", "color", "unstable" ] @@ -46,6 +49,14 @@ path = "../builder-protocol" [dependencies.habitat_core] path = "../core" +[dependencies.habitat_net] +path = "../net" + +[dependencies.zmq] +# git = "https://github.com/erickt/rust-zmq.git" +git = "https://github.com/reset/rust-zmq.git" +branch = "habitat" + [dev-dependencies] url = "*" uuid = "*" diff --git a/components/depot/src/config.rs b/components/depot/src/config.rs index 0c96e4c4d8..bf991c2f61 100644 --- a/components/depot/src/config.rs +++ b/components/depot/src/config.rs @@ -8,6 +8,7 @@ use std::net; use hab_core::config::{ConfigFile, ParseInto}; +use hab_net::config::RouteAddrs; use redis; use toml; @@ -18,6 +19,8 @@ pub struct Config { pub path: String, pub listen_addr: net::SocketAddrV4, pub datastore_addr: net::SocketAddrV4, + /// List of net addresses for routing servers to connect to + pub routers: Vec, } impl ConfigFile for Config { @@ -28,6 +31,7 @@ impl ConfigFile for Config { try!(toml.parse_into("cfg.path", &mut cfg.path)); try!(toml.parse_into("cfg.bind_addr", &mut cfg.listen_addr)); try!(toml.parse_into("cfg.datastore_addr", &mut cfg.datastore_addr)); + try!(toml.parse_into("cfg.router_addrs", &mut cfg.routers)); Ok(cfg) } } @@ -38,6 +42,7 @@ impl Default for Config { path: "/hab/svc/hab-depot/data".to_string(), listen_addr: net::SocketAddrV4::new(net::Ipv4Addr::new(0, 0, 0, 0), 9632), datastore_addr: net::SocketAddrV4::new(net::Ipv4Addr::new(127, 0, 0, 1), 6379), + routers: vec![net::SocketAddrV4::new(net::Ipv4Addr::new(127, 0, 0, 1), 5562)], } } } @@ -50,3 +55,9 @@ impl<'a> redis::IntoConnectionInfo for &'a Config { .into_connection_info() } } + +impl RouteAddrs for Config { + fn route_addrs(&self) -> &Vec { + &self.routers + } +} diff --git a/components/depot/src/error.rs b/components/depot/src/error.rs index 5852b86528..e364b7c3f5 100644 --- a/components/depot/src/error.rs +++ b/components/depot/src/error.rs @@ -14,6 +14,7 @@ use std::result; use dbcache; use hab_core; use hab_core::package::{self, Identifiable}; +use hab_net; use hyper; use redis; @@ -22,6 +23,7 @@ pub enum Error { BadPort(String), DataStore(dbcache::Error), HabitatCore(hab_core::Error), + HabitatNet(hab_net::Error), HTTP(hyper::status::StatusCode), InvalidPackageIdent(String), IO(io::Error), @@ -40,6 +42,7 @@ impl fmt::Display for Error { Error::BadPort(ref e) => format!("{} is an invalid port. Valid range 1-65535.", e), Error::DataStore(ref e) => format!("DataStore error, {}", e), Error::HabitatCore(ref e) => format!("{}", e), + Error::HabitatNet(ref e) => format!("{}", e), Error::HTTP(ref e) => format!("{}", e), Error::InvalidPackageIdent(ref e) => { format!("Invalid package identifier: {:?}. A valid identifier is in the form \ @@ -76,6 +79,7 @@ impl error::Error for Error { Error::BadPort(_) => "Received an invalid port or a number outside of the valid range.", Error::DataStore(ref err) => err.description(), Error::HabitatCore(ref err) => err.description(), + Error::HabitatNet(ref err) => err.description(), Error::HTTP(_) => "Received an HTTP error", Error::InvalidPackageIdent(_) => { "Package identifiers must be in origin/name format (example: acme/redis)" @@ -126,3 +130,9 @@ impl From for Error { Error::IO(err) } } + +impl From for Error { + fn from(err: hab_net::Error) -> Error { + Error::HabitatNet(err) + } +} diff --git a/components/depot/src/lib.rs b/components/depot/src/lib.rs index f3dabaf4a2..947f0a96a1 100644 --- a/components/depot/src/lib.rs +++ b/components/depot/src/lib.rs @@ -8,8 +8,10 @@ extern crate habitat_builder_dbcache as dbcache; extern crate habitat_builder_protocol as protocol; extern crate habitat_core as hab_core; +extern crate habitat_net as hab_net; #[macro_use] extern crate bitflags; +extern crate bodyparser; extern crate crypto; #[macro_use] extern crate hyper; @@ -32,6 +34,7 @@ extern crate toml; extern crate unicase; extern crate urlencoded; extern crate walkdir; +extern crate zmq; pub mod config; pub mod error; @@ -42,27 +45,30 @@ pub mod server; pub use self::config::Config; pub use self::error::{Error, Result}; -use std::sync::Arc; +use std::sync::{Arc, Mutex}; use std::fs; use std::path::{Path, PathBuf}; use crypto::sha2::Sha256; use crypto::digest::Digest; use hab_core::package::{Identifiable, PackageArchive}; - use data_store::DataStore; +use hab_net::server::NetIdent; + pub struct Depot { pub config: Config, pub datastore: DataStore, + context: Arc>, } impl Depot { - pub fn new(config: Config) -> Result> { + pub fn new(config: Config, ctx: Arc>) -> Result> { let datastore = try!(DataStore::open(&config)); Ok(Arc::new(Depot { config: config, datastore: datastore, + context: ctx, })) } @@ -113,3 +119,5 @@ impl Depot { Path::new(&self.config.path).join("pkgs") } } + +impl NetIdent for Depot {} diff --git a/components/depot/src/main.rs b/components/depot/src/main.rs index ca575d2c97..fc025cb8c7 100644 --- a/components/depot/src/main.rs +++ b/components/depot/src/main.rs @@ -7,15 +7,19 @@ extern crate habitat_core as hab_core; extern crate habitat_depot as depot; +extern crate habitat_net as hab_net; + #[macro_use] extern crate clap; extern crate env_logger; #[macro_use] extern crate log; +extern crate zmq; use std::net; use std::process; use std::str::FromStr; +use std::sync::{Arc, Mutex}; use depot::{server, Config, Error, Result}; use hab_core::config::ConfigFile; @@ -137,7 +141,8 @@ fn start(config: Config) -> Result<()> { /// * The database cannot be read /// * A write transaction cannot be acquired pub fn repair(config: Config) -> Result<()> { - let depot = try!(depot::Depot::new(config)); + let ctx = Arc::new(Mutex::new(zmq::Context::new())); + let depot = try!(depot::Depot::new(config, ctx)); let report = try!(depot::doctor::repair(&depot)); println!("Report: {:?}", &report); Ok(()) @@ -150,7 +155,8 @@ pub fn repair(config: Config) -> Result<()> { /// * The database cannot be read /// * A write transaction cannot be acquired. fn view_create(view: &str, config: Config) -> Result<()> { - let depot = try!(depot::Depot::new(config)); + let ctx = Arc::new(Mutex::new(zmq::Context::new())); + let depot = try!(depot::Depot::new(config, ctx)); try!(depot.datastore.views.write(&view)); Ok(()) } @@ -162,7 +168,8 @@ fn view_create(view: &str, config: Config) -> Result<()> { /// * The database cannot be read /// * A read transaction cannot be acquired. fn view_list(config: Config) -> Result<()> { - let depot = try!(depot::Depot::new(config)); + let ctx = Arc::new(Mutex::new(zmq::Context::new())); + let depot = try!(depot::Depot::new(config, ctx)); let views = try!(depot.datastore.views.all()); if views.is_empty() { println!("No views. Create one with `hab-depot view create`."); diff --git a/components/depot/src/server.rs b/components/depot/src/server.rs index 2ced60e64d..8e187f1b0a 100644 --- a/components/depot/src/server.rs +++ b/components/depot/src/server.rs @@ -10,24 +10,443 @@ use std::fs::{self, File}; use std::io::{Read, Write, BufWriter}; use std::path::PathBuf; use std::result; +use std::sync::{Arc, Mutex}; +use bodyparser; use dbcache::{self, BasicSet, IndexSet}; use hab_core::package::{Identifiable, FromArchive, PackageArchive}; +use hab_core::crypto::keys; use hyper::mime::{Mime, TopLevel, SubLevel, Attr, Value}; use iron::headers::ContentType; use iron::prelude::*; use iron::{status, headers, AfterMiddleware}; +use iron::headers::{Authorization, Bearer}; use iron::request::Body; use mount::Mount; +use protobuf; use protocol::depotsrv; +use protocol::net::{NetError, ErrCode}; +use protocol::sessionsrv::{Account, AccountGet, Session, SessionGet}; +use protocol::vault::*; use router::{Params, Router}; use rustc_serialize::json::{self, ToJson}; use unicase::UniCase; use urlencoded::UrlEncodedQuery; +use zmq; use super::Depot; use config::Config; use error::{Error, Result}; +use hab_net::routing::Broker; +use hab_net::server::NetIdent; + +pub fn authenticate(req: &mut Request, + ctx: &Arc>) + -> result::Result { + match req.headers.get::>() { + Some(&Authorization(Bearer { ref token })) => { + let mut conn = Broker::connect(&ctx).unwrap(); + let mut request = SessionGet::new(); + request.set_token(token.to_string()); + conn.route(&request).unwrap(); + match conn.recv() { + Ok(rep) => { + match rep.get_message_id() { + "Session" => { + let session = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + Ok(session) + } + "NetError" => { + let err: NetError = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + Err(render_net_error(&err)) + } + _ => unreachable!("unexpected msg: {:?}", rep), + } + } + Err(e) => { + error!("session get, err={:?}", e); + Err(Response::with(status::InternalServerError)) + } + } + } + _ => Err(Response::with(status::Unauthorized)), + } +} + +/// Return an IronResult containing the body of a NetError and the appropriate HTTP response status +/// for the corresponding NetError. +/// +/// For example, a NetError::ENTITY_NOT_FOUND will result in an HTTP response containing the body +/// of the NetError with an HTTP status of 404. +/// +/// # Panics +/// +/// * The given encoded message was not a NetError +/// * The given messsage could not be decoded +/// * The NetError could not be encoded to JSON +fn render_net_error(err: &NetError) -> Response { + let encoded = json::encode(&err.to_json()).unwrap(); + let status = match err.get_code() { + ErrCode::ENTITY_NOT_FOUND => status::NotFound, + ErrCode::NO_SHARD => status::ServiceUnavailable, + ErrCode::TIMEOUT => status::RequestTimeout, + ErrCode::BAD_REMOTE_REPLY => status::BadGateway, + _ => status::InternalServerError, + }; + Response::with((status, encoded)) +} + +pub fn origin_create(depot: &Depot, req: &mut Request) -> IronResult { + let ctx = &depot.context; + let session = match authenticate(req, ctx) { + Ok(session) => session, + Err(response) => return Ok(response), + }; + let mut request = OriginCreate::new(); + request.set_owner_id(session.get_id()); + request.set_owner_name(session.get_name().to_string()); + match req.get::() { + Ok(Some(body)) => { + match body.find("name") { + Some(origin) => request.set_name(origin.as_string().unwrap().to_owned()), + _ => return Ok(Response::with(status::BadRequest)), + } + } + _ => return Ok(Response::with(status::BadRequest)), + }; + + if !keys::is_valid_origin_name(request.get_name()) { + return Ok(Response::with(status::UnprocessableEntity)); + } + + let mut conn = Broker::connect(&ctx).unwrap(); + conn.route(&request).unwrap(); + match conn.recv() { + Ok(rep) => { + match rep.get_message_id() { + "Origin" => { + let origin: Origin = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + let encoded = json::encode(&origin.to_json()).unwrap(); + Ok(Response::with((status::Created, encoded))) + } + "NetError" => { + let err: NetError = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + debug!("origin_create error: {:?}", err); + Ok(Response::with(status::Conflict)) + } + _ => unreachable!("unexpected msg: {:?}", rep), + } + } + Err(e) => { + error!("{:?}", e); + Ok(Response::with(status::ServiceUnavailable)) + } + } +} + +pub fn origin_show(depot: &Depot, req: &mut Request) -> IronResult { + let ctx = &depot.context; + let session = match authenticate(req, ctx) { + Ok(session) => session, + Err(response) => return Ok(response), + }; + let params = req.extensions.get::().unwrap(); + let origin = match params.find("origin") { + Some(origin) => origin.to_string(), + _ => return Ok(Response::with(status::BadRequest)), + }; + + if !check_origin_access(&depot, session.get_id(), &origin) { + return Ok(Response::with(status::Forbidden)); + } + + let mut conn = Broker::connect(&ctx).unwrap(); + let mut request = OriginGet::new(); + request.set_name(origin); + conn.route(&request).unwrap(); + match conn.recv() { + Ok(rep) => { + match rep.get_message_id() { + "Origin" => { + let origin: Origin = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + let encoded = json::encode(&origin.to_json()).unwrap(); + Ok(Response::with((status::Ok, encoded))) + } + "NetError" => { + let err: NetError = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + Ok(render_net_error(&err)) + } + _ => unreachable!("unexpected msg: {:?}", rep), + } + } + Err(e) => { + error!("{:?}", e); + Ok(Response::with(status::ServiceUnavailable)) + } + } +} + + +/// Return the origin IFF it exists +pub fn get_origin(depot: &Depot, origin: &str) -> Result> { + let ctx = &depot.context; + let mut conn = Broker::connect(&ctx).unwrap(); + let mut request = OriginGet::new(); + request.set_name(origin.to_string()); + conn.route(&request).unwrap(); + match conn.recv() { + Ok(rep) => { + match rep.get_message_id() { + "Origin" => { + let origin: Origin = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + Ok(Some(origin)) + } + "NetError" => { + let err: NetError = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + debug!("get_origin error: {:?}", err); + Ok(None) + } + _ => unreachable!("unexpected msg: {:?}", rep), + } + } + Err(e) => { + error!("{:?}", e); + Err(Error::from(e)) + } + } +} + + +pub fn check_origin_access(depot: &Depot, account_id: u64, origin_name: &str) -> bool { + let ctx = &depot.context; + let mut conn = Broker::connect(&ctx).unwrap(); + + let mut request = CheckOriginAccessRequest::new(); + // !!!NOTE!!! + // only account_id and origin_name are implemented in + // CheckOriginAccessRequest + // !!!NOTE!!! + request.set_account_id(account_id); + request.set_origin_name(origin_name.to_string()); + + conn.route(&request).unwrap(); + match conn.recv() { + Ok(rep) => { + match rep.get_message_id() { + "CheckOriginAccessResponse" => { + let response: CheckOriginAccessResponse = + protobuf::parse_from_bytes(rep.get_body()).unwrap(); + response.get_has_access() + } + "NetError" => false, + _ => unreachable!("unexpected msg: {:?}", rep), + } + } + Err(e) => { + debug!("Error checking origin access: {}", e); + false + } + } +} + +pub fn invite_to_origin(depot: &Depot, req: &mut Request) -> IronResult { + let ctx = &depot.context; + let session = match authenticate(req, ctx) { + Ok(session) => session, + Err(response) => return Ok(response), + }; + + let params = req.extensions.get::().unwrap(); + + let origin = match params.find("origin") { + Some(origin) => origin, + None => return Ok(Response::with(status::BadRequest)), + }; + + let user_to_invite = match params.find("username") { + Some(username) => username, + None => return Ok(Response::with(status::BadRequest)), + }; + debug!("Creating invitation for user {} origin {}", + &user_to_invite, + &origin); + + if !check_origin_access(&depot, session.get_id(), &origin) { + return Ok(Response::with(status::Forbidden)); + } + + // Lookup the users account_id + let mut conn = Broker::connect(&ctx).unwrap(); + let mut request = AccountGet::new(); + request.set_name(user_to_invite.to_string()); + conn.route(&request).unwrap(); + + let acct_obj = match conn.recv() { + Ok(rep) => { + match rep.get_message_id() { + "Account" => { + let account: Account = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + account + } + "NetError" => { + return Ok(Response::with(status::NotFound)); + } + _ => unreachable!("unexpected msg: {:?}", rep), + } + } + Err(e) => { + debug!("Error inviting to origin: {}", e); + return Ok(Response::with(status::NotFound)); + } + }; + + let origin_obj = match try!(get_origin(&depot, &origin)) { + Some(origin) => origin, + None => { + debug!("Origin {} not found", &origin); + return Ok(Response::with(status::NotFound)); + } + }; + + // store invitations in the vault + let mut invite_request = OriginInvitationCreate::new(); + invite_request.set_account_id(acct_obj.get_id()); + invite_request.set_account_name(acct_obj.get_name().to_string()); + invite_request.set_origin_id(origin_obj.get_id()); + invite_request.set_origin_name(origin_obj.get_name().to_string()); + invite_request.set_owner_id(session.get_id()); + + conn.route(&invite_request).unwrap(); + match conn.recv() { + Ok(rep) => { + match rep.get_message_id() { + "OriginInvitation" => { + // we don't do anything with the invitation, but we could + // if we want to! + let _invite: OriginInvitation = protobuf::parse_from_bytes(rep.get_body()) + .unwrap(); + let encoded = json::encode(&origin.to_json()).unwrap(); + Ok(Response::with((status::Created, encoded))) + } + "NetError" => { + let err: NetError = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + Ok(render_net_error(&err)) + } + _ => unreachable!("unexpected msg: {:?}", rep), + + } + } + Err(e) => { + debug!("Error: {}", &e); + return Ok(Response::with(status::InternalServerError)); + } + } +} + +pub fn list_origin_invitations(depot: &Depot, req: &mut Request) -> IronResult { + let ctx = &depot.context; + debug!("list_origin_invitations"); + + let session = match authenticate(req, ctx) { + Ok(session) => session, + Err(response) => return Ok(response), + }; + let params = req.extensions.get::().unwrap(); + + let origin_name = match params.find("origin") { + Some(origin) => origin, + None => return Ok(Response::with(status::BadRequest)), + }; + + if !check_origin_access(&depot, session.get_id(), &origin_name) { + return Ok(Response::with(status::Forbidden)); + } + + let mut conn = Broker::connect(&ctx).unwrap(); + let mut request = OriginInvitationListRequest::new(); + + let origin = match try!(get_origin(&depot, origin_name)) { + Some(o) => o, + None => return Ok(Response::with(status::NotFound)), + }; + + request.set_origin_id(origin.get_id()); + conn.route(&request).unwrap(); + match conn.recv() { + Ok(rep) => { + match rep.get_message_id() { + "OriginInvitationListResponse" => { + let invites: OriginInvitationListResponse = + protobuf::parse_from_bytes(rep.get_body()).unwrap(); + let encoded = json::encode(&invites.to_json()).unwrap(); + Ok(Response::with((status::Ok, encoded))) + } + "NetError" => { + let err: NetError = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + Ok(render_net_error(&err)) + } + _ => unreachable!("unexpected msg: {:?}", rep), + } + } + Err(e) => { + error!("{:?}", e); + Ok(Response::with(status::ServiceUnavailable)) + } + } +} + +pub fn list_origin_members(depot: &Depot, req: &mut Request) -> IronResult { + let ctx = &depot.context; + debug!("list_origin_members"); + + let session = match authenticate(req, ctx) { + Ok(session) => session, + Err(response) => return Ok(response), + }; + let params = req.extensions.get::().unwrap(); + + let origin_name = match params.find("origin") { + Some(origin) => origin, + None => return Ok(Response::with(status::BadRequest)), + }; + + if !check_origin_access(&depot, session.get_id(), &origin_name) { + return Ok(Response::with(status::Forbidden)); + } + + let mut conn = Broker::connect(&ctx).unwrap(); + let mut request = OriginMemberListRequest::new(); + + let origin = match try!(get_origin(&depot, origin_name)) { + Some(o) => o, + None => return Ok(Response::with(status::NotFound)), + }; + + request.set_origin_id(origin.get_id()); + conn.route(&request).unwrap(); + match conn.recv() { + Ok(rep) => { + match rep.get_message_id() { + "OriginMemberListResponse" => { + let members: OriginMemberListResponse = + protobuf::parse_from_bytes(rep.get_body()).unwrap(); + let encoded = json::encode(&members.to_json()).unwrap(); + Ok(Response::with((status::Ok, encoded))) + } + "NetError" => { + let err: NetError = protobuf::parse_from_bytes(rep.get_body()).unwrap(); + Ok(render_net_error(&err)) + } + _ => unreachable!("unexpected msg: {:?}", rep), + } + } + Err(e) => { + error!("{:?}", e); + Ok(Response::with(status::ServiceUnavailable)) + } + } +} + const PAGINATION_RANGE_DEFAULT: isize = 0; const PAGINATION_RANGE_MAX: isize = 50; @@ -63,6 +482,12 @@ fn write_file(filename: &PathBuf, body: &mut Body) -> Result { } fn upload_origin_key(depot: &Depot, req: &mut Request) -> IronResult { + let ctx = &depot.context; + let session = match authenticate(req, ctx) { + Ok(session) => session, + Err(response) => return Ok(response), + }; + debug!("Upload Origin Key {:?}", req); let params = req.extensions.get::().unwrap(); @@ -76,6 +501,10 @@ fn upload_origin_key(depot: &Depot, req: &mut Request) -> IronResult { None => return Ok(Response::with(status::BadRequest)), }; + if !check_origin_access(&depot, session.get_id(), &origin) { + return Ok(Response::with(status::Forbidden)); + } + let origin_keyfile = depot.key_path(&origin, &revision); debug!("Writing key file {}", origin_keyfile.to_string_lossy()); if origin_keyfile.is_file() { @@ -95,7 +524,67 @@ fn upload_origin_key(depot: &Depot, req: &mut Request) -> IronResult { Ok(response) } + +fn upload_origin_secret_key(depot: &Depot, req: &mut Request) -> IronResult { + debug!("Upload Origin Secret Key {:?}", req); + let ctx = &depot.context; + + let session = match authenticate(req, ctx) { + Ok(session) => session, + Err(response) => { + return Ok(response); + } + }; + + let params = req.extensions.get::().unwrap(); + + let name = match params.find("origin") { + Some(origin) => origin, + None => return Ok(Response::with(status::BadRequest)), + }; + + let revision = match params.find("revision") { + Some(revision) => revision, + None => return Ok(Response::with(status::BadRequest)), + }; + + if !check_origin_access(&depot, session.get_id(), &name) { + return Ok(Response::with(status::Forbidden)); + } + + + let o = match try!(get_origin(&depot, name)) { + Some(o) => o, + None => return Ok(Response::with(status::NotFound)), + }; + + let mut request = OriginSecretKeyCreate::new(); + request.set_owner_id(session.get_id()); + request.set_origin_id(o.get_id()); + request.set_name(name.to_string()); + request.set_revision(revision.to_string()); + + let mut key_content = Vec::new(); + if let Err(e) = req.body.read_to_end(&mut key_content) { + debug!("Can't read key content {}", e); + return Ok(Response::with(status::BadRequest)); + } + request.set_body(key_content); + request.set_owner_id(0); + + let mut conn = Broker::connect(&ctx).unwrap(); + conn.route(&request).unwrap(); + Ok(Response::with(status::Ok)) +} + + fn upload_package(depot: &Depot, req: &mut Request) -> IronResult { + let ctx = &depot.context; + let session = match authenticate(req, ctx) { + Ok(session) => session, + Err(response) => return Ok(response), + }; + debug!("Upload {:?}", req); let checksum_from_param = match extract_query_value("checksum", req) { Some(checksum) => checksum, @@ -104,6 +593,10 @@ fn upload_package(depot: &Depot, req: &mut Request) -> IronResult { let params = req.extensions.get::().unwrap(); let ident = ident_from_params(params); + if !check_origin_access(&depot, session.get_id(), &ident.get_origin()) { + return Ok(Response::with(status::Forbidden)); + } + if !ident.fully_qualified() { return Ok(Response::with(status::BadRequest)); } @@ -304,6 +797,7 @@ fn list_origin_keys(depot: &Depot, req: &mut Request) -> IronResult { } + fn list_packages(depot: &Depot, req: &mut Request) -> IronResult { let (offset, num) = match extract_pagination(req) { Ok(range) => range, @@ -483,12 +977,21 @@ fn render_package(pkg: &depotsrv::Package) -> IronResult { } fn promote_package(depot: &Depot, req: &mut Request) -> IronResult { + let ctx = &depot.context; + let session = match authenticate(req, ctx) { + Ok(session) => session, + Err(response) => return Ok(response), + }; + let params = req.extensions.get::().unwrap(); let view = params.find("view").unwrap(); match depot.datastore.views.is_member(view) { Ok(true) => { let ident = ident_from_params(params); + if !check_origin_access(&depot, session.get_id(), &ident.get_origin()) { + return Ok(Response::with(status::Forbidden)); + } match depot.datastore.packages.find(&ident) { Ok(package) => { depot.datastore.views.associate(view, &package).unwrap(); @@ -578,8 +1081,9 @@ impl AfterMiddleware for Cors { } } -pub fn router(config: Config) -> Result { - let depot = try!(Depot::new(config)); +pub fn router(depot: Arc) -> Result { + // we can't call depot.clone() in fn argument, + // so we bind them here instead. let depot1 = depot.clone(); let depot2 = depot.clone(); let depot3 = depot.clone(); @@ -601,6 +1105,12 @@ pub fn router(config: Config) -> Result { let depot19 = depot.clone(); let depot20 = depot.clone(); let depot21 = depot.clone(); + let depot22 = depot.clone(); + let depot23 = depot.clone(); + let depot24 = depot.clone(); + let depot25 = depot.clone(); + let depot26 = depot.clone(); + let depot27 = depot.clone(); let router = router!( get "/views" => move |r: &mut Request| list_views(&depot1, r), @@ -622,34 +1132,53 @@ pub fn router(config: Config) -> Result { move |r: &mut Request| promote_package(&depot8, r) }, - get "/pkgs/search/:query" => move |r: &mut Request| search_packages(&depot21, r), - get "/pkgs/:origin" => move |r: &mut Request| list_packages(&depot9, r), - get "/pkgs/:origin/:pkg" => move |r: &mut Request| list_packages(&depot10, r), - get "/pkgs/:origin/:pkg/latest" => move |r: &mut Request| show_package(&depot11, r), - get "/pkgs/:origin/:pkg/:version" => move |r: &mut Request| list_packages(&depot12, r), + get "/pkgs/search/:query" => move |r: &mut Request| search_packages(&depot9, r), + get "/pkgs/:origin" => move |r: &mut Request| list_packages(&depot10, r), + get "/pkgs/:origin/:pkg" => move |r: &mut Request| list_packages(&depot11, r), + get "/pkgs/:origin/:pkg/latest" => move |r: &mut Request| show_package(&depot12, r), + get "/pkgs/:origin/:pkg/:version" => move |r: &mut Request| list_packages(&depot13, r), get "/pkgs/:origin/:pkg/:version/latest" => { - move |r: &mut Request| show_package(&depot13, r) + move |r: &mut Request| show_package(&depot14, r) }, get "/pkgs/:origin/:pkg/:version/:release" => { - move |r: &mut Request| show_package(&depot14, r) + move |r: &mut Request| show_package(&depot15, r) }, get "/pkgs/:origin/:pkg/:version/:release/download" => { - move |r: &mut Request| download_package(&depot15, r) + move |r: &mut Request| download_package(&depot16, r) }, post "/pkgs/:origin/:pkg/:version/:release" => { - move |r: &mut Request| upload_package(&depot16, r) + move |r: &mut Request| upload_package(&depot17, r) }, - get "/origins/:origin/keys" => move |r: &mut Request| list_origin_keys(&depot17, r), + + post "/origins" => move |r: &mut Request| origin_create(&depot18, r), + // TODO + //delete "/origins/:origin" => move |r: &mut Request| origin_delete(&depot17, r), + + get "/origins/:origin" => move |r: &mut Request| origin_show(&depot19, r), + + get "/origins/:origin/keys" => move |r: &mut Request| list_origin_keys(&depot20, r), get "/origins/:origin/keys/latest" => { - move |r: &mut Request| download_latest_origin_key(&depot19, r) + move |r: &mut Request| download_latest_origin_key(&depot21, r) }, get "/origins/:origin/keys/:revision" => { - move |r: &mut Request| download_origin_key(&depot18, r) + move |r: &mut Request| download_origin_key(&depot22, r) }, post "/origins/:origin/keys/:revision" => { - move |r: &mut Request| upload_origin_key(&depot20, r) + move |r: &mut Request| upload_origin_key(&depot23, r) + }, + post "/origins/:origin/secret_keys/:revision" => { + move |r: &mut Request| upload_origin_secret_key(&depot24, r) + }, + post "/origins/:origin/users/:username/invitations" => { + move |r: &mut Request| invite_to_origin(&depot25, r) + }, + get "/origins/:origin/invitations" => { + move |r: &mut Request| list_origin_invitations(&depot26, r) + }, + get "/origins/:origin/users" => { + move |r: &mut Request| list_origin_members(&depot27, r) }, ); let mut chain = Chain::new(router); @@ -657,12 +1186,22 @@ pub fn router(config: Config) -> Result { Ok(chain) } +use hab_net::config::RouteAddrs; pub fn run(config: Config) -> Result<()> { let listen_addr = config.listen_addr.clone(); - let v1 = try!(router(config)); + + let ctx = Arc::new(Mutex::new(zmq::Context::new())); + let depot = try!(Depot::new(config.clone(), ctx)); + let v1 = try!(router(depot.clone())); + + let broker = Broker::run(Depot::net_ident(), + depot.context.clone(), + &config.route_addrs().clone()); + let mut mount = Mount::new(); mount.mount("/v1", v1); Iron::new(mount).http(listen_addr).unwrap(); + broker.join().unwrap(); Ok(()) }