file_name
stringlengths 3
137
| prefix
stringlengths 0
918k
| suffix
stringlengths 0
962k
| middle
stringlengths 0
812k
|
---|---|---|---|
header.rs | // Vorbis decoder written in Rust
//
// Copyright (c) 2016 est31 <[email protected]>
// and contributors. All rights reserved.
// Licensed under MIT license, or Apache 2 license,
// at your option. Please see the LICENSE file
// attached to this source distribution for details.
/*!
Header decoding
This module takes care of decoding of the three vorbis headers:
1. Identification
2. Comment
3. Setup
It builds only on the internal bitpacking layer and the internal
huffman tree handling mod. Everything else about the headers is
decoded in this mod.
*/
use std::error;
use std::fmt;
use ::bitpacking::BitpackCursor;
use ::huffman_tree::{VorbisHuffmanTree, HuffmanError};
use std::io::{Cursor, ErrorKind, Read, Error};
use byteorder::{ReadBytesExt, LittleEndian};
use std::string::FromUtf8Error;
use header_cached::{CachedBlocksizeDerived, compute_bark_map_cos_omega};
/// Errors that can occur during Header decoding
#[derive(Debug)]
#[derive(PartialEq)]
pub enum HeaderReadError {
EndOfPacket,
/// If the passed data don't start with the "vorbis"
/// capture pattern, this error is returned.
NotVorbisHeader,
UnsupportedVorbisVersion,
/// If the header violates the vorbis spec
HeaderBadFormat,
/// The given packet indeed seems to be a vorbis header,
/// but it looks like it is a different header type than
/// the function it was passed to.
///
/// It is not guaranteed that the type is a valid header type.
HeaderBadType(u8),
/// The given packet does not seem to be a header as per vorbis spec,
/// instead it seems to be an audio packet.
HeaderIsAudio,
Utf8DecodeError,
/// If the needed memory isn't addressable by us
///
/// This error is returned if a calculation yielded a higher value for
/// an internal buffer size that doesn't fit into the platform's address range.
/// Note that if we "simply" encounter an allocation failure (OOM, etc),
/// we do what libstd does in these cases: crash.
///
/// This error is not automatically an error of the passed data,
/// but rather is due to insufficient decoder hardware.
BufferNotAddressable,
}
// For the () error type returned by the bitpacking layer
// TODO that type choice was a bit unfortunate,
// perhaps one day fix this
impl From<()> for HeaderReadError {
fn from(_ :()) -> HeaderReadError {
HeaderReadError::EndOfPacket
}
}
impl From<HuffmanError> for HeaderReadError {
fn from(_ :HuffmanError) -> HeaderReadError |
}
impl From<Error> for HeaderReadError {
fn from(err :Error) -> HeaderReadError {
match err.kind() {
ErrorKind::UnexpectedEof => HeaderReadError::EndOfPacket,
_ => panic!("Non EOF Error occured when reading from Cursor<&[u8]>: {}", err),
}
}
}
impl From<FromUtf8Error> for HeaderReadError {
fn from(_ :FromUtf8Error) -> HeaderReadError {
HeaderReadError::Utf8DecodeError
}
}
impl error::Error for HeaderReadError {
fn description(&self) -> &str {
match self {
&HeaderReadError::EndOfPacket => "End of packet reached.",
&HeaderReadError::NotVorbisHeader => "The packet is not a vorbis header",
&HeaderReadError::UnsupportedVorbisVersion => "The vorbis version is not supported",
&HeaderReadError::HeaderBadFormat => "Invalid header",
&HeaderReadError::HeaderBadType(_) => "Invalid/unexpected header type",
&HeaderReadError::HeaderIsAudio => "Packet seems to be audio",
&HeaderReadError::Utf8DecodeError => "UTF-8 decoding error",
&HeaderReadError::BufferNotAddressable => "Requested to create buffer of non-addressable size",
}
}
}
impl fmt::Display for HeaderReadError {
fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {
write!(fmt, "{}", error::Error::description(self))
}
}
/// Macro to convert values of any unsigned integral non-usize type to
/// usize, and then check whether there had been any losses due to conversion.
///
/// If there were, it will return the BufferNotAddressable error.
macro_rules! convert_to_usize {
( $val:expr, $val_type:ident ) => { {
let converted :usize = $val as usize;
if $val != converted as $val_type {
try!(Err(HeaderReadError::BufferNotAddressable));
}
converted
}}
}
// Internal function, tries to find out whether the
// data returned by rdr belong to a vorbis header
// On success it returns Some(n) with n as packet type
// (you must check that n from 1,3,5)
macro_rules! read_header_begin_body {
( $rdr:expr ) => { {
let res = try!($rdr.read_u8());
if res & 1 == 0 {
// This is an audio packet per vorbis spec, if anything.
// (audio packets have their first bit set to 0,
// header packets have it set to 1)
try!(Err(HeaderReadError::HeaderIsAudio));
}
let is_vorbis =
try!($rdr.read_u8()) == 0x76 && // 'v'
try!($rdr.read_u8()) == 0x6f && // 'o'
try!($rdr.read_u8()) == 0x72 && // 'r'
try!($rdr.read_u8()) == 0x62 && // 'b'
try!($rdr.read_u8()) == 0x69 && // 'i'
try!($rdr.read_u8()) == 0x73; // 's'
if !is_vorbis {
try!(Err(HeaderReadError::NotVorbisHeader));
}
return Ok(res);
}}
}
fn read_header_begin(rdr :&mut BitpackCursor) -> Result<u8, HeaderReadError> {
read_header_begin_body!(rdr)
}
fn read_header_begin_cursor(rdr :&mut Cursor<&[u8]>) -> Result<u8, HeaderReadError> {
read_header_begin_body!(rdr)
}
#[test]
fn test_read_hdr_begin() {
// Only tests flawed header begins, correct headers
// are tested later by the test methods for the headers
// Flawed ident header (see char before the /**/)
let test_arr = &[0x01, 0x76, 0x6f, 0x72,
0x62, 0x69, 0x72, /**/ 0x00, 0x00, 0x00, 0x00, 0x02,
0x44, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xb5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0xb8, 0x01];
let mut rdr :BitpackCursor = BitpackCursor::new(test_arr);
assert_eq!(read_header_begin(&mut rdr), Err(HeaderReadError::NotVorbisHeader));
}
/// The set of the three Vorbis headers
pub type HeaderSet = (IdentHeader, CommentHeader, SetupHeader);
/**
Representation for the identification header
The identification header is the first of the three
headers inside each vorbis stream.
It covers basic information about the stream.
*/
pub struct IdentHeader {
/// The number of audio channels in the stream
pub audio_channels :u8,
/// The sample rate of the stream
pub audio_sample_rate :u32,
/// The maximum bit rate of the stream
///
/// Note that this value is only a hint
/// and may be off by a large amount.
pub bitrate_maximum :i32,
/// The nominal bit rate of the stream
///
/// Note that this value is only a hint
/// and may be off by a large amount.
pub bitrate_nominal :i32,
/// The minimum bit rate of the stream
///
/// Note that this value is only a hint
/// and may be off by a large amount.
pub bitrate_minimum :i32,
pub blocksize_0 :u8,
pub blocksize_1 :u8,
pub(crate) cached_bs_derived :[CachedBlocksizeDerived; 2],
}
/**
Reading the Identification header
If it returns Err(sth) when being called with the first packet in a stream,
the whole stream is to be considered undecodable as per the Vorbis spec.
The function returns Err(`HeaderReadError::HeaderBadType`) if the header type
doesn't match the ident header.
*/
pub fn read_header_ident(packet :&[u8]) -> Result<IdentHeader, HeaderReadError> {
let mut rdr = BitpackCursor::new(packet);
let hd_id = try!(read_header_begin(&mut rdr));
if hd_id != 1 {
try!(Err(HeaderReadError::HeaderBadType(hd_id)));
}
let vorbis_version = try!(rdr.read_u32());
if vorbis_version != 0 {
try!(Err(HeaderReadError::UnsupportedVorbisVersion));
}
let audio_channels = try!(rdr.read_u8());
let audio_sample_rate = try!(rdr.read_u32());
let bitrate_maximum = try!(rdr.read_i32());
let bitrate_nominal = try!(rdr.read_i32());
let bitrate_minimum = try!(rdr.read_i32());
let blocksize_0 = try!(rdr.read_u4());
let blocksize_1 = try!(rdr.read_u4());
let framing = try!(rdr.read_u8());
if blocksize_0 < 6 || blocksize_0 > 13 ||
blocksize_1 < 6 || blocksize_1 > 13 ||
(framing != 1) || blocksize_0 > blocksize_1 ||
audio_channels == 0 || audio_sample_rate == 0 {
try!(Err(HeaderReadError::HeaderBadFormat));
}
let hdr :IdentHeader = IdentHeader {
audio_channels,
audio_sample_rate,
bitrate_maximum,
bitrate_nominal,
bitrate_minimum,
blocksize_0,
blocksize_1,
cached_bs_derived : [
CachedBlocksizeDerived::from_blocksize(blocksize_0),
CachedBlocksizeDerived::from_blocksize(blocksize_1),
],
};
return Ok(hdr);
}
#[test]
fn test_read_header_ident() {
// Valid ident header
let test_arr = &[0x01, 0x76, 0x6f, 0x72,
0x62, 0x69, 0x73, 0x00, 0x00, 0x00, 0x00, 0x02,
0x44, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xb5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0xb8, 0x01];
let hdr = read_header_ident(test_arr).unwrap();
assert_eq!(hdr.audio_channels, 2);
assert_eq!(hdr.audio_sample_rate, 0x0000ac44);
assert_eq!(hdr.bitrate_maximum, 0);
assert_eq!(hdr.bitrate_nominal, 0x0001b580);
assert_eq!(hdr.bitrate_minimum, 0);
assert_eq!(hdr.blocksize_0, 8);
assert_eq!(hdr.blocksize_1, 11);
}
/**
Representation of the comment header
The comment header is the second of the three
headers inside each vorbis stream.
It contains text comment metadata
about the stream, encoded as key-value pairs,
and the vendor name.
*/
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct CommentHeader {
/// An identification string of the
/// software/library that encoded
/// the stream.
pub vendor :String,
/// A key-value list of the comments
/// attached to the stream.
pub comment_list :Vec<(String, String)>,
}
/**
Reading the Comment header
You should call this function with the second packet in the stream.
The function does not check whether the comment field names consist
of characters `0x20` through `0x7D` (`0x3D` excluded), as the vorbis
spec requires.
*/
pub fn read_header_comment(packet :&[u8]) -> Result<CommentHeader, HeaderReadError> {
let mut rdr = Cursor::new(packet);
let hd_id = try!(read_header_begin_cursor(&mut rdr));
if hd_id != 3 {
try!(Err(HeaderReadError::HeaderBadType(hd_id)));
}
// First read the vendor string
let vendor_length = try!(rdr.read_u32::<LittleEndian>()) as usize;
let mut vendor_buf = vec![0; vendor_length]; // TODO fix this, we initialize memory for NOTHING!!! Out of some reason, this is seen as "unsafe" by rustc.
try!(rdr.read_exact(&mut vendor_buf));
let vendor = try!(String::from_utf8(vendor_buf));
// Now read the comments
let comment_count = try!(rdr.read_u32::<LittleEndian>()) as usize;
let mut comment_list = Vec::with_capacity(comment_count);
for _ in 0 .. comment_count {
let comment_length = try!(rdr.read_u32::<LittleEndian>()) as usize;
let mut comment_buf = vec![0; comment_length]; // TODO fix this, we initialize memory for NOTHING!!! Out of some reason, this is seen as "unsafe" by rustc.
try!(rdr.read_exact(&mut comment_buf));
let comment = match String::from_utf8(comment_buf) {
Ok(comment) => comment,
// Uncomment for closer compliance with the spec.
// The spec explicitly states that the comment entries
// should be UTF-8 formatted, however it seems that other
// decoder libraries tolerate non-UTF-8 formatted strings
// in comments. This has led to some files circulating
// with such errors inside. If we deny to decode such files,
// lewton would be the odd one out. Thus we just
// gracefully ignore them.
Err(_) => continue,
};
let eq_idx = match comment.find("=") {
Some(k) => k,
// Uncomment for closer compliance with the spec.
// It appears that some ogg files have fields without a = sign in the comments.
// Well there is not much we can do but gracefully ignore their stuff.
None => continue // try!(Err(HeaderReadError::HeaderBadFormat))
};
let (key_eq, val) = comment.split_at(eq_idx + 1);
let (key, _) = key_eq.split_at(eq_idx);
comment_list.push((String::from(key), String::from(val)));
}
let framing = try!(rdr.read_u8());
if framing != 1 {
try!(Err(HeaderReadError::HeaderBadFormat));
}
let hdr :CommentHeader = CommentHeader {
vendor,
comment_list,
};
return Ok(hdr);
}
pub(crate) struct Codebook {
pub codebook_dimensions :u16,
pub codebook_entries :u32,
// None if codebook_lookup_type == 0
pub codebook_vq_lookup_vec :Option<Vec<f32>>,
pub codebook_huffman_tree :VorbisHuffmanTree,
}
pub(crate) struct Residue {
pub residue_type :u8,
pub residue_begin :u32,
pub residue_end :u32,
pub residue_partition_size :u32,
pub residue_classifications :u8,
pub residue_classbook :u8,
pub residue_books :Vec<ResidueBook>,
}
pub(crate) struct Mapping {
pub mapping_submaps :u8,
pub mapping_magnitudes :Vec<u8>,
pub mapping_angles :Vec<u8>,
pub mapping_mux :Vec<u8>,
pub mapping_submap_floors :Vec<u8>,
pub mapping_submap_residues :Vec<u8>,
}
pub(crate) struct ModeInfo {
pub mode_blockflag :bool,
pub mode_mapping :u8,
}
pub(crate) enum Floor {
TypeZero(FloorTypeZero),
TypeOne(FloorTypeOne),
}
pub(crate) struct FloorTypeZero {
pub floor0_order :u8,
pub floor0_rate :u16,
pub floor0_bark_map_size :u16,
pub floor0_amplitude_bits :u8,
pub floor0_amplitude_offset :u8,
pub floor0_number_of_books :u8,
pub floor0_book_list :Vec<u8>,
pub cached_bark_cos_omega :[Vec<f32>; 2],
}
pub(crate) struct FloorTypeOne {
pub floor1_multiplier :u8,
pub floor1_partition_class :Vec<u8>,
pub floor1_class_dimensions :Vec<u8>,
pub floor1_class_subclasses :Vec<u8>,
pub floor1_subclass_books :Vec<Vec<i16>>,
pub floor1_class_masterbooks :Vec<u8>,
pub floor1_x_list :Vec<u32>,
pub floor1_x_list_sorted :Vec<(usize, u32)>,
}
pub(crate) struct ResidueBook {
vals_used :u8,
val_i :[u8; 8],
}
impl ResidueBook {
pub fn get_val(&self, i :u8) -> Option<u8> {
if i >= 8 {
// This is a precondition...
panic!("Tried to get ResidueBook value out of bounds (index = {})",
i);
}
return if self.vals_used & (1 << i) > 0 {
Some(self.val_i[i as usize])
} else {
None
};
}
/// Reads the `ResidueBook` from a `BitpackCursor`.
fn read_book(rdr :&mut BitpackCursor,
vals_used :u8, codebooks :&[Codebook])
-> Result<Self, HeaderReadError> {
let mut val_i :[u8; 8] = [0; 8];
for i in 0 .. 7 {
if vals_used & (1 << i) == 0 {
continue;
}
let val_entry = try!(rdr.read_u8());
if match codebooks.get(val_entry as usize) {
Some(v) => v.codebook_vq_lookup_vec.is_none(),
None => true,
} {
// Both of the cases are forbidden by spec
// (the codebook being out of bounds, or
// not having a value mapping)
try!(Err(HeaderReadError::HeaderBadFormat))
}
val_i[i] = val_entry;
}
return Ok(ResidueBook { vals_used, val_i });
}
}
pub struct SetupHeader {
pub(crate) codebooks :Vec<Codebook>,
pub(crate) floors :Vec<Floor>,
pub(crate) residues :Vec<Residue>,
pub(crate) mappings :Vec<Mapping>,
pub(crate) modes :Vec<ModeInfo>,
}
struct CodebookVqLookup {
codebook_lookup_type :u8,
codebook_minimum_value :f32,
codebook_delta_value :f32,
codebook_sequence_p :bool,
codebook_multiplicands :Vec<u32>,
}
/// Vector value decode for lookup
///
/// Prepares the VQ context vectors for later lookup
/// by the codebook abstraction layer.
///
/// Returns `codebook_entries` many vectors,
/// each being `codebook_dimensions` scalars wide),
/// all stored in one Vec.
fn lookup_vec_val_decode(lup :&CodebookVqLookup, codebook_entries :u32, codebook_dimensions :u16) -> Vec<f32> {
let mut value_vectors = Vec::with_capacity(
codebook_entries as usize * codebook_dimensions as usize);
if lup.codebook_lookup_type == 1 {
let codebook_lookup_values = lup.codebook_multiplicands.len();
for lookup_offset in 0 .. codebook_entries {
let mut last = 0.;
let mut index_divisor = 1;
for _ in 0 .. codebook_dimensions {
let multiplicand_offset = (lookup_offset / index_divisor as u32) as usize %
codebook_lookup_values;
let vec_elem = lup.codebook_multiplicands[multiplicand_offset] as f32 *
lup.codebook_delta_value + lup.codebook_minimum_value + last;
if lup.codebook_sequence_p {
last = vec_elem;
}
value_vectors.push(vec_elem);
index_divisor *= codebook_lookup_values;
}
}
} else {
for lookup_offset in 0 .. codebook_entries {
let mut last = 0.;
let mut multiplicand_offset :usize = lookup_offset as usize * codebook_dimensions as usize;
for _ in 0 .. codebook_dimensions {
let vec_elem = lup.codebook_multiplicands[multiplicand_offset] as f32 *
lup.codebook_delta_value + lup.codebook_minimum_value + last;
if lup.codebook_sequence_p {
last = vec_elem;
}
value_vectors.push(vec_elem);
multiplicand_offset += 1;
}
}
}
return value_vectors;
}
/// Small Error type for `BitpackCursor::read_huffman_vq`.
///
/// This is in order to enable calling code to distinguish
/// between the two cases of the enum. Esp. in some cases
/// the decoder might have to reject packages with the
/// NoVqLookupForCodebook variant, but have to treat EndOfPacket
/// as normal occurence.
pub(crate) enum HuffmanVqReadErr {
EndOfPacket,
NoVqLookupForCodebook,
}
impl <'a> BitpackCursor <'a> {
/// Reads a huffman word using the codebook abstraction via a VQ context
pub(crate) fn read_huffman_vq<'b>(&mut self, b :&'b Codebook) -> Result<&'b[f32], HuffmanVqReadErr> {
let idx = match self.read_huffman(&b.codebook_huffman_tree) {
Ok(v) => v as usize,
Err(_) => return Err(HuffmanVqReadErr::EndOfPacket),
};
let codebook_vq_lookup_vec :&[f32] = match b.codebook_vq_lookup_vec.as_ref() {
Some(ref v) => v,
None => return Err(HuffmanVqReadErr::NoVqLookupForCodebook),
};
let dim = b.codebook_dimensions as usize;
return Ok(&codebook_vq_lookup_vec[idx * dim .. (idx + 1) * dim]);
}
}
static MAX_BASES_WITHOUT_OVERFLOW : &'static[u32] = &[
0xffffffff, 0xffffffff, 0x0000ffff, 0x00000659,
0x000000ff, 0x00000054, 0x00000028, 0x00000017,
0x0000000f, 0x0000000b, 0x00000009, 0x00000007,
0x00000006, 0x00000005, 0x00000004, 0x00000004,
0x00000003, 0x00000003, 0x00000003, 0x00000003,
0x00000003, 0x00000002, 0x00000002, 0x00000002,
0x00000002, 0x00000002, 0x00000002, 0x00000002,
0x00000002, 0x00000002, 0x00000002, 0x00000002];
static MAX_BASE_MAX_BITS_WITHOUT_OVERFLOW : &'static[u8] = &[
0x1f, 0x1f, 0x0f, 0x0a,
0x07, 0x06, 0x05, 0x04,
0x03, 0x03, 0x03, 0x02,
0x02, 0x02, 0x02, 0x02,
0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01];
// For this little function I won't include the num crate.
// precondition: base ^ exponent must not overflow.
fn exp_fast(base :u32, exponent: u8) -> u32 {
let mut res :u32 = 1;
let mut selfmul = base;
for i in 0 .. 8 {
if (1 << i) & exponent > 0 {
res *= selfmul;
}
if let Some(newselfmul) = u32::checked_mul(selfmul, selfmul) {
selfmul = newselfmul;
} else {
// Okay, now we have to find out
// whether this matters or not.
// Check whether selfmul would have been needed.
if i < 7 && (exponent >> i + 1) > 0 {
panic!("Overflow when squaring for exp_fast, \
precondition violated!");
}
return res;
}
}
return res;
}
/// Returns, as defined in the vorbis spec:
/// "the greatest integer value v for which v to the power of [codebook_dimensions] is less than or equal to [codebook_entries]"
/// Essentially an "nth-root" algorithm.
/// About the speed:
/// Probably its super-optimized as it uses no floats,
/// probably smarter algorithms using floats would be faster here. No idea.
/// Either way, stackoverflow gave the (great) motivation for the algorithm:
/// http://stackoverflow.com/questions/7407752
fn lookup1_values(codebook_entries :u32, codebook_dimensions :u16) -> u32 {
if codebook_dimensions >= 32 {
// For codebook_dimensions >= 32 we'd already overflow the u32 range if
// we computed 2 ^ codebook_dimensions.
// Therefore, the result must be less than 2.
return if codebook_entries == 0 { 0 } else { 1 };
}
// Now do a binary search.
// We use two static helper arrays here. Both take the
// exponent (codebook_dimensions here) as index.
// The first array, MAX_BASES_WITHOUT_OVERFLOW contains
// the base that doesn't generate an overflow for the
// given exponent.
// The second array MAX_BASE_MAX_BITS_WITHOUT_OVERFLOW
// contains the number of the highest set bit in
// the corresponding entry in MAX_BASES_WITHOUT_OVERFLOW.
// This is the first bit that is "disputed" in the binary
// search to follow: we check the bases to support the
// claim by manual exponentiation.
let max_base_bits = MAX_BASE_MAX_BITS_WITHOUT_OVERFLOW[
codebook_dimensions as usize];
let max_base = MAX_BASES_WITHOUT_OVERFLOW[codebook_dimensions as usize];
let mut base_bits :u32 = 0;
for i in 0 .. max_base_bits + 1 {
let cur_disputed_bit :u32 = 1 << (max_base_bits - i);
base_bits |= cur_disputed_bit;
if max_base < base_bits ||
exp_fast(base_bits, codebook_dimensions as u8) > codebook_entries {
base_bits &= !cur_disputed_bit;
}
}
return base_bits;
}
#[test]
fn test_lookup1_values() {
// First, with base two:
// 2 ^ 10 = 1024
assert_eq!(lookup1_values(1025, 10), 2);
assert_eq!(lookup1_values(1024, 10), 2);
assert_eq!(lookup1_values(1023, 10), 1);
// Now, the searched base is five:
// 5 ^ 5 = 3125
assert_eq!(lookup1_values(3126, 5), 5);
assert_eq!(lookup1_values(3125, 5), 5);
assert_eq!(lookup1_values(3124, 5), 4);
// Now some exotic tests (edge cases :p):
assert_eq!(lookup1_values(1, 1), 1);
assert_eq!(lookup1_values(0, 15), 0);
assert_eq!(lookup1_values(0, 0), 0);
assert_eq!(lookup1_values(1, 0), ::std::u32::MAX);
assert_eq!(lookup1_values(400, 0), ::std::u32::MAX);
}
/// Reads a codebook which is part of the setup header packet.
fn read_codebook(rdr :&mut BitpackCursor) -> Result<Codebook, HeaderReadError> {
// 1. Read the sync pattern
let sync_pattern = try!(rdr.read_u24());
if sync_pattern != 0x564342 {
try!(Err(HeaderReadError::HeaderBadFormat));
}
// 2. Read the _dimension, _entries fields and the ordered bitflag
let codebook_dimensions = try!(rdr.read_u16());
let codebook_entries = try!(rdr.read_u24());
let ordered = try!(rdr.read_bit_flag());
// 3. Read the codeword lengths
let mut codebook_codeword_lengths = Vec::with_capacity(
convert_to_usize!(codebook_entries, u32));
if !ordered {
let sparse = try!(rdr.read_bit_flag());
for _ in 0 .. codebook_entries {
let length = if sparse {
let flag = try!(rdr.read_bit_flag());
if flag {
try!(rdr.read_u5()) + 1
} else {
/* The spec here asks that we should mark that the
entry is unused. But 0 already fulfills this purpose,
as everywhere else its guaranteed that the length is > 0.
No messing with Option<T> needed here :) */
0
}
} else {
try!(rdr.read_u5()) + 1
};
codebook_codeword_lengths.push(length);
}
} else {
let mut current_entry :u32 = 0;
let mut current_length = try!(rdr.read_u5()) + 1;
while current_entry < codebook_entries {
let number = try!(rdr.read_dyn_u32(
::ilog((codebook_entries - current_entry) as u64)));
for _ in current_entry .. current_entry + number {
codebook_codeword_lengths.push(current_length);
}
current_entry += number;
current_length += 1;
if current_entry as u32 > codebook_entries {
try!(Err(HeaderReadError::HeaderBadFormat));
}
}
}
// 4. Read the vector lookup table
let codebook_lookup_type = try!(rdr.read_u4());
if codebook_lookup_type > 2 {
// Not decodable per vorbis spec
try!(Err(HeaderReadError::HeaderBadFormat));
}
let codebook_lookup :Option<CodebookVqLookup> =
if codebook_lookup_type == 0 {
None
} else {
let codebook_minimum_value = try!(rdr.read_f32());
let codebook_delta_value = try!(rdr.read_f32());
let codebook_value_bits = try!(rdr.read_u4()) + 1;
let codebook_sequence_p = try!(rdr.read_bit_flag());
let codebook_lookup_values :u64 = if codebook_lookup_type == 1 {
lookup1_values(codebook_entries, codebook_dimensions) as u64
} else {
codebook_entries as u64 * codebook_dimensions as u64
};
let mut codebook_multiplicands = Vec::with_capacity(
convert_to_usize!(codebook_lookup_values, u64));
for _ in 0 .. codebook_lookup_values {
codebook_multiplicands.push(try!(rdr.read_dyn_u32(codebook_value_bits)));
}
Some(CodebookVqLookup {
codebook_lookup_type : codebook_lookup_type,
codebook_minimum_value : codebook_minimum_value,
codebook_delta_value : codebook_delta_value,
codebook_sequence_p : codebook_sequence_p,
codebook_multiplicands : codebook_multiplicands,
})
};
let codebook_vq_lookup_vec = codebook_lookup.as_ref().map(|lup| {
lookup_vec_val_decode(lup,
codebook_entries, codebook_dimensions)
});
return Ok(Codebook {
codebook_dimensions,
codebook_entries,
codebook_vq_lookup_vec,
codebook_huffman_tree : try!(VorbisHuffmanTree::load_from_array(&codebook_codeword_lengths)),
});
}
/// Reads a Floor which is part of the setup header packet.
/// The `codebook_cnt` param is required to check for compliant streams
fn read_floor(rdr :&mut BitpackCursor, codebook_cnt :u16, blocksizes :(u8, u8)) ->
Result<Floor, HeaderReadError> {
let floor_type = try!(rdr.read_u16());
match floor_type {
0 => {
let floor0_order = try!(rdr.read_u8());
let floor0_rate = try!(rdr.read_u16());
let floor0_bark_map_size = try!(rdr.read_u16());
let floor0_amplitude_bits = try!(rdr.read_u6());
if floor0_amplitude_bits > 64 {
// Unfortunately the audio decoder part
// doesn't support values > 64 because rust has no
// 128 bit integers yet.
// TODO when support is added, remove this
// check.
try!(Err(HeaderReadError::HeaderBadFormat));
}
let floor0_amplitude_offset = try!(rdr.read_u8());
let floor0_number_of_books = try!(rdr.read_u4()) + 1;
let mut floor0_book_list = Vec::with_capacity(
convert_to_usize!(floor0_number_of_books, u8));
for _ in 0 .. floor0_number_of_books {
let value = try!(rdr.read_u8());
if value as u16 > codebook_cnt {
try!(Err(HeaderReadError::HeaderBadFormat));
}
floor0_book_list.push(value);
}
Ok(Floor::TypeZero(FloorTypeZero {
floor0_order,
floor0_rate,
floor0_bark_map_size,
floor0_amplitude_bits,
floor0_amplitude_offset,
floor0_number_of_books,
floor0_book_list,
cached_bark_cos_omega : [
compute_bark_map_cos_omega(1 << (blocksizes.0 - 1),
floor0_rate, floor0_bark_map_size),
compute_bark_map_cos_omega(1 << (blocksizes.1 - 1),
floor0_rate, floor0_bark_map_size),
]
}))
},
1 => {
let floor1_partitions = try!(rdr.read_u5());
let mut maximum_class :i8 = -1;
let mut floor1_partition_class_list = Vec::with_capacity(
floor1_partitions as usize);
for _ in 0 .. floor1_partitions {
let cur_class = try!(rdr.read_u4());
maximum_class = if cur_class as i8 > maximum_class
{ cur_class as i8 } else { maximum_class };
floor1_partition_class_list.push(cur_class);
}
// TODO one day try out whether its more performant
// to have these two arrays in one, its wasteful to allocate
// 16 bit so that one can store 5 bits.
let mut floor1_class_dimensions = Vec::with_capacity((maximum_class + 1) as usize);
let mut floor1_class_subclasses = Vec::with_capacity((maximum_class + 1) as usize);
let mut floor1_subclass_books = Vec::with_capacity((maximum_class + 1) as usize);
let mut floor1_class_masterbooks = Vec::with_capacity((maximum_class + 1) as usize);
for _ in 0 .. maximum_class + 1 {
floor1_class_dimensions.push(try!(rdr.read_u3()) + 1);
let cur_subclass = try!(rdr.read_u2());
floor1_class_subclasses.push(cur_subclass);
if cur_subclass != 0 {
let cur_masterbook = try!(rdr.read_u8());
if cur_masterbook as u16 >= codebook_cnt {
// undecodable as per spec
try!(Err(HeaderReadError::HeaderBadFormat));
}
floor1_class_masterbooks.push(cur_masterbook);
} else {
// Some value... This never gets read,
// but Rust requires everything to be initialized,
// we can't increase the counter without initialisation.
floor1_class_masterbooks.push(0);
}
let cur_books_cnt :u8 = 1 << cur_subclass;
let mut cur_books = Vec::with_capacity(cur_books_cnt as usize);
for _ in 0 .. cur_books_cnt {
// The fact that we need i16 here (and shouldn't do
// wrapping sub) is only revealed if you read the
// "packet decode" part of the floor 1 spec...
let cur_book = (try!(rdr.read_u8()) as i16) - 1;
if cur_book >= codebook_cnt as i16 {
// undecodable as per spec
try!(Err(HeaderReadError::HeaderBadFormat));
}
cur_books.push(cur_book);
}
floor1_subclass_books.push(cur_books);
}
let floor1_multiplier = try!(rdr.read_u2()) + 1;
let rangebits = try!(rdr.read_u4());
let mut floor1_values :u16 = 2;
// Calculate the count before doing anything else
for cur_class_num in &floor1_partition_class_list {
floor1_values += floor1_class_dimensions[*cur_class_num as usize] as u16;
}
if floor1_values > 65 {
// undecodable as per spec
try!(Err(HeaderReadError::HeaderBadFormat));
}
let mut floor1_x_list = Vec::with_capacity(floor1_values as usize);
floor1_x_list.push(0);
floor1_x_list.push(1u32 << rangebits);
for cur_class_num in &floor1_partition_class_list {
for _ in 0 .. floor1_class_dimensions[*cur_class_num as usize] {
floor1_x_list.push(try!(rdr.read_dyn_u32(rangebits)));
}
}
// Now do an uniqueness check on floor1_x_list
// to check decodability.
let mut floor1_x_list_sorted = floor1_x_list.iter().cloned()
.enumerate().collect::<Vec<_>>();
floor1_x_list_sorted.sort_by(|a, b| a.1.cmp(&b.1));
// 0 is guaranteed to be in the list,
// and due to sorting it will be first.
let mut last = 1;
for el in &floor1_x_list_sorted {
if el.1 == last {
// duplicate entry found
// undecodable as per spec
try!(Err(HeaderReadError::HeaderBadFormat));
}
last = el.1;
}
// Only now return the result
Ok(Floor::TypeOne(FloorTypeOne {
floor1_multiplier,
floor1_partition_class : floor1_partition_class_list,
floor1_class_dimensions,
floor1_class_subclasses,
floor1_subclass_books,
floor1_class_masterbooks,
floor1_x_list,
floor1_x_list_sorted,
}))
},
// Type greater than 1 is error condition per spec
_ => Err(HeaderReadError::HeaderBadFormat),
}
}
/// Reads a Residue which is part of the setup header packet.
/// The `codebook_cnt` param is required to check for compliant streams
fn read_residue(rdr :&mut BitpackCursor, codebooks :&[Codebook])
-> Result<Residue, HeaderReadError> {
let residue_type = try!(rdr.read_u16());
if residue_type > 2 {
// Undecodable by spec
try!(Err(HeaderReadError::HeaderBadFormat));
}
let residue_begin = try!(rdr.read_u24());
let residue_end = try!(rdr.read_u24());
if residue_begin > residue_end {
// If residue_begin < residue_end, we'll get
// errors in audio parsing code.
// As the idea of residue end being before begin
// sounds quite wrong anyway, we already error
// earlier, in header parsing code.
try!(Err(HeaderReadError::HeaderBadFormat));
}
let residue_partition_size = try!(rdr.read_u24()) + 1;
let residue_classifications = try!(rdr.read_u6()) + 1;
let residue_classbook = try!(rdr.read_u8());
// Read the bitmap pattern:
let mut residue_cascade = Vec::with_capacity(residue_classifications as usize);
for _ in 0 .. residue_classifications {
let mut high_bits = 0;
let low_bits = try!(rdr.read_u3());
let bitflag = try!(rdr.read_bit_flag());
if bitflag {
high_bits = try!(rdr.read_u5());
}
residue_cascade.push((high_bits << 3) | low_bits);
}
let mut residue_books = Vec::with_capacity(residue_classifications as usize);
// Read the list of book numbers:
for cascade_entry in &residue_cascade {
residue_books.push(try!(
ResidueBook::read_book(rdr, *cascade_entry, codebooks)));
}
if residue_classbook as usize >= codebooks.len() {
// Undecodable because residue_classbook must be valid index
try!(Err(HeaderReadError::HeaderBadFormat));
}
/*
// Currently we check below condition in audio decode, following the spec,
// section 3.3., saying that it only renders the packet that wants to use the
// invalid codebook invalid, but not the whole stream only because there is a
// residue in the header (which may never be used).
if codebooks[residue_classbook as usize].codebook_vq_lookup_vec.is_none() {
// Undecodable because residue_classbook must be valid index
try!(Err(HeaderReadError::HeaderBadFormat));
}*/
return Ok(Residue {
residue_type : residue_type as u8,
residue_begin,
residue_end,
residue_partition_size,
residue_classifications,
residue_classbook,
residue_books,
});
}
/// Reads a "Mapping" which is part of the setup header packet.
fn read_mapping(rdr :&mut BitpackCursor,
audio_chan_ilog :u8, audio_channels :u8,
floor_count :u8, residue_count :u8)
-> Result<Mapping, HeaderReadError> {
let mapping_type = try!(rdr.read_u16());
if mapping_type > 0 {
// Undecodable per spec
try!(Err(HeaderReadError::HeaderBadFormat));
}
let mapping_submaps = match try!(rdr.read_bit_flag()) {
true => try!(rdr.read_u4()) + 1,
false => 1,
};
let mapping_coupling_steps = match try!(rdr.read_bit_flag()) {
true => try!(rdr.read_u8()) as u16 + 1,
false => 0,
};
let mut mapping_magnitudes = Vec::with_capacity(mapping_coupling_steps as usize);
let mut mapping_angles = Vec::with_capacity(mapping_coupling_steps as usize);
for _ in 0 .. mapping_coupling_steps {
let cur_mag = try!(rdr.read_dyn_u8(audio_chan_ilog));
let cur_angle = try!(rdr.read_dyn_u8(audio_chan_ilog));
if (cur_angle == cur_mag) || (cur_mag >= audio_channels)
|| (cur_angle >= audio_channels) {
// Undecodable per spec
try!(Err(HeaderReadError::HeaderBadFormat));
}
mapping_magnitudes.push(cur_mag);
mapping_angles.push(cur_angle);
}
let reserved = try!(rdr.read_u2());
if reserved != 0 {
// Undecodable per spec
try!(Err(HeaderReadError::HeaderBadFormat));
}
let mapping_mux = if mapping_submaps > 1 {
let mut m = Vec::with_capacity(audio_channels as usize);
for _ in 0 .. audio_channels {
let val = try!(rdr.read_u4());
if val >= mapping_submaps {
// Undecodable per spec
try!(Err(HeaderReadError::HeaderBadFormat));
}
m.push(val);
};
m
} else {
vec![0; audio_channels as usize]
};
let mut mapping_submap_floors = Vec::with_capacity(mapping_submaps as usize);
let mut mapping_submap_residues = Vec::with_capacity(mapping_submaps as usize);
for _ in 0 .. mapping_submaps {
// To whom those reserved bits may concern.
// I have discarded them!
try!(rdr.read_u8());
let cur_floor = try!(rdr.read_u8());
let cur_residue = try!(rdr.read_u8());
if cur_floor >= floor_count ||
cur_residue >= residue_count {
// Undecodable per spec
try!(Err(HeaderReadError::HeaderBadFormat));
}
mapping_submap_floors.push(cur_floor);
mapping_submap_residues.push(cur_residue);
}
return Ok(Mapping {
mapping_submaps,
mapping_magnitudes,
mapping_angles,
mapping_mux,
mapping_submap_floors,
mapping_submap_residues,
});
}
/// Reads a ModeInfo which is part of the setup header packet.
fn read_mode_info(rdr :&mut BitpackCursor, mapping_count :u8) -> Result<ModeInfo, HeaderReadError> {
let mode_blockflag = try!(rdr.read_bit_flag());
let mode_windowtype = try!(rdr.read_u16());
let mode_transformtype = try!(rdr.read_u16());
let mode_mapping = try!(rdr.read_u8());
// Verifying ranges
if mode_windowtype != 0 ||
mode_transformtype != 0 ||
mode_mapping >= mapping_count {
// Undecodable per spec
try!(Err(HeaderReadError::HeaderBadFormat));
}
return Ok(ModeInfo {
mode_blockflag,
mode_mapping,
});
}
/// Reading the setup header.
///
/// The audio channel and blocksize info needed by the function
/// can be obtained from the ident header.
pub fn read_header_setup(packet :&[u8], audio_channels :u8, blocksizes :(u8, u8)) ->
Result<SetupHeader, HeaderReadError> {
let mut rdr = BitpackCursor::new(packet);
let hd_id = try!(read_header_begin(&mut rdr));
if hd_id != 5 {
try!(Err(HeaderReadError::HeaderBadType(hd_id)));
}
// Little preparation -- needed later
let audio_chan_ilog = ::ilog((audio_channels - 1) as u64);
//::print_u8_slice(packet);
// 1. Read the codebooks
let vorbis_codebook_count :u16 = try!(rdr.read_u8()) as u16 + 1;
let mut codebooks = Vec::with_capacity(vorbis_codebook_count as usize);
for _ in 0 .. vorbis_codebook_count {
codebooks.push(try!(read_codebook(&mut rdr)));
}
// 2. Read the time domain transforms
let vorbis_time_count :u8 = try!(rdr.read_u6()) + 1;
for _ in 0 .. vorbis_time_count {
if try!(rdr.read_u16()) != 0 {
try!(Err(HeaderReadError::HeaderBadFormat));
}
}
// 3. Read the floor values
let vorbis_floor_count :u8 = try!(rdr.read_u6()) + 1;
let mut floors = Vec::with_capacity(vorbis_floor_count as usize);
for _ in 0 .. vorbis_floor_count {
floors.push(try!(read_floor(&mut rdr, vorbis_codebook_count, blocksizes)));
}
// 4. Read the residue values
let vorbis_residue_count :u8 = try!(rdr.read_u6()) + 1;
let mut residues = Vec::with_capacity(vorbis_residue_count as usize);
for _ in 0 .. vorbis_residue_count {
residues.push(try!(read_residue(&mut rdr, &codebooks)));
}
// 5. Read the mappings
let vorbis_mapping_count :u8 = try!(rdr.read_u6()) + 1;
let mut mappings = Vec::with_capacity(vorbis_mapping_count as usize);
for _ in 0 .. vorbis_mapping_count {
mappings.push(try!(read_mapping(& mut rdr,
audio_chan_ilog, audio_channels,
vorbis_floor_count, vorbis_residue_count)));
}
// 6. Read the modes
let vorbis_mode_count :u8 = try!(rdr.read_u6()) + 1;
let mut modes = Vec::with_capacity(vorbis_mode_count as usize);
for _ in 0 .. vorbis_mode_count {
modes.push(try!(read_mode_info(& mut rdr, vorbis_mapping_count)));
}
// Now we only have to make sure the framing bit is set,
// and we can successfully return the setup header!
let framing :bool = try!(rdr.read_bit_flag());
if !framing {
try!(Err(HeaderReadError::HeaderBadFormat));
}
return Ok(SetupHeader {
codebooks,
floors,
residues,
mappings,
modes,
});
}
| {
HeaderReadError::HeaderBadFormat
} |
euler4_test.go | package palindromeint
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestLargestPalindromeFromProductOfNumbers(t *testing.T) {
// Instead of testing the "two digit" or "three digit" products explicitly, we
// test ranges
// Euler provided example: 2-digit
ans, err := LargestPalindromeFromProductOfNumbers(10, 99)
assert.NoError(t, err)
assert.Equal(t, ans, 9009,
"the largest palindrome in the range of two-digit numbers product should be 9009")
// Euler problem: 3-digit
ans, err = LargestPalindromeFromProductOfNumbers(100, 999)
assert.NoError(t, err)
assert.Equal(t, ans, 906609,
"the largest palindrome in the range of two-digit numbers product should be 9009")
}
func TestInvalidRanges(t *testing.T) |
func TestIntegralPalindromesArePalindromes(t *testing.T) {
palindromes := [...]int{11, 101, 111, 1221, 12321, 1234321}
for _, n := range palindromes {
assert.True(t, IsPalindrome(n),
"%d should be a palindrome", n)
}
notPalindromes := [...]int{10, 12, 13, 113, 201, 311, 301, 1011, 17221, 3141, 12345678}
for _, n := range notPalindromes {
assert.False(t, IsPalindrome(n), "%d should not be a palindrome", n)
}
}
| {
var invalidRangeTests = []struct {
floor int
ceil int
}{
{10, 10},
{100, 100},
{990, 998},
}
for _, tt := range invalidRangeTests {
_, err := LargestPalindromeFromProductOfNumbers(tt.floor, tt.ceil)
assert.Equal(t, err, ErrNoPalindromesInRange,
"the range %d to %d should have no palindromes", tt.floor, tt.ceil)
}
} |
mod.rs | #![allow(dead_code)]
use anyhow::{self, Result};
use chrono::{DateTime, Local};
use log::{error, info};
use reqwest::header::{
HeaderMap, ACCEPT, ACCEPT_ENCODING, CONTENT_TYPE, COOKIE, HOST, REFERER, USER_AGENT,
};
use reqwest::{self, blocking::Response};
use serde::Deserialize;
use serde_json;
use std::fs;
use crate::encrypt::Encrypt;
use crate::model;
use crate::uri;
use crate::util;
struct User {
id: u64,
nickname: String,
}
struct NcmClient {
cookie_path: String,
http_client: reqwest::blocking::Client,
user: Option<User>,
}
enum SingleOrMultiple<T> {
Single(T),
Multiple(Vec<T>),
}
enum Method {
POST,
GET,
}
impl NcmClient {
fn new() -> NcmClient {
NcmClient {
cookie_path: "/tmp/ncmt_cookie".to_owned(),
http_client: reqwest::blocking::Client::new(),
user: None,
}
}
fn request(
&self,
url: &str,
method: Method,
data: Option<[(&str, String); 2]>,
) -> Result<Response, reqwest::Error> {
info!("request params is {:#?}", &data);
let response = match method {
Method::GET => {
let headers = self.get_get_headers();
self.http_client.get(url).headers(headers).send()
}
Method::POST => {
let headers = self.get_post_headers();
self
.http_client
.post(url)
.headers(headers)
.form(&data.unwrap())
.send()
}
};
// log the response
match &response {
Ok(res) => {
info!("response is {:?}", res);
}
Err(err) => {
error!("get response error, error is {:?}", err);
}
};
response
}
fn json_parse<'a, T: Deserialize<'a>>(data: &'a str) -> Result<T, serde_json::Error> {
serde_json::from_str::<T>(data).map_err(|e| {
format!(
"convert result failed, reason: {:?}; content: [{:?}]",
e, data
);
e
})
}
fn get_common_headers() -> HeaderMap {
let mut headers = HeaderMap::new();
headers.insert(
CONTENT_TYPE,
"application/x-www-form-urlencoded".parse().unwrap(),
);
headers.insert(ACCEPT, "*/*".parse().unwrap());
headers.insert(REFERER, "https://music.163.com".parse().unwrap());
headers.insert(
USER_AGENT,
"User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
.parse()
.unwrap(),
);
headers.insert(HOST, "music.163.com".parse().unwrap());
headers.insert(ACCEPT_ENCODING, "gzip,deflate".parse().unwrap());
headers
}
fn set_cookies(mut headers: HeaderMap, cookies: String) -> HeaderMap {
headers.insert(COOKIE, cookies.parse().unwrap());
headers
}
fn get_post_headers(&self) -> HeaderMap {
let headers = NcmClient::get_common_headers();
let cookies = self.build_cookies();
let headers = NcmClient::set_cookies(headers, cookies);
headers
}
fn get_get_headers(&self) -> HeaderMap {
let headers = NcmClient::get_common_headers();
let cookies = self.get_cookies();
let headers = NcmClient::set_cookies(headers, cookies);
headers
}
fn get_cookies(&self) -> String {
fs::read_to_string(&self.cookie_path).unwrap_or(String::new())
}
fn build_cookies(&self) -> String {
let name = "os";
let value = "pc";
let local: DateTime<Local> = Local::now();
let times = local.timestamp();
let hex_token = Encrypt::encrypt_hex(times.to_string());
let data = self.get_cookies();
let make_cookie = format!("version=0;{}={};JSESSIONID-WYYY=%2FKSy%2B4xG6fYVld42G9E%2BxAj9OyjC0BYXENKxOIRH%5CR72cpy9aBjkohZ24BNkpjnBxlB6lzAG4D%5C%2FMNUZ7VUeRUeVPJKYu%2BKBnZJjEmqgpOx%2BU6VYmypKB%5CXb%2F3W7%2BDjOElCb8KlhDS2cRkxkTb9PBDXro41Oq7aBB6M6OStEK8E%2Flyc8%3A{}; _iuqxldmzr_=32; _ntes_nnid={},{}; _ntes_nuid={}; {}", name, value, times, hex_token, hex_token, times + 50, data);
make_cookie.parse().unwrap()
}
fn save_cookies(&self, res: &Response) {
let cookies: Vec<String> = res
.cookies()
.into_iter()
.map(|s| format!("{}={}", s.name().to_string(), s.value().to_string()))
.collect();
let mut c: String = cookies.into_iter().map(|s| format!("{}; ", s)).collect();
c.pop();
if c.len() > 0 {
fs::write(&self.cookie_path, &c).expect("Unable to write file");
}
}
fn login_email(&mut self, email: String, password: String) -> Result<(), anyhow::Error> {
let password = Encrypt::encrypt_hex(password);
let client_token = "1_jVUMqWEPke0/1/Vu56xCmJpo5vP1grjn_SOVVDzOc78w8OKLVZ2JH7IfkjSXqgfmh";
let params = util::build_post_data(vec![
("clientToken", client_token),
("password", &password[..]),
("username", &email[..]),
("rememberLogin", "true"),
("csrf_token", ""),
]);
let response = self.request(uri::LOGIN, Method::POST, params)?;
self.save_cookies(&response);
let text = response.text()?;
let login = NcmClient::json_parse::<model::response::Login>(&text)?;
self.save_login_status(login);
Ok(())
}
fn save_login_status(&mut self, login: model::response::Login) -> () {
self.user = Some(User {
id: login.account.id,
nickname: login.profile.nickname,
});
}
fn get_user_playlist(&self) -> Result<model::response::PlaylistList, anyhow::Error> {
let uid = self.user.as_ref().unwrap().id;
let params = util::build_post_data(vec![
("uid", &uid.to_string()[..]),
("limit", "1000"),
("offset", "0"),
("csrf_token", ""),
]);
let response = self.request(uri::USER_PLAYLIST, Method::POST, params)?;
let text = response.text()?;
let playlist = NcmClient::json_parse::<model::response::PlaylistList>(&text)?;
Ok(playlist)
}
fn get_favorite_playlist(&self) -> Result<model::playlist::Playlist, anyhow::Error> {
let playlist = self.get_user_playlist()?;
match playlist.playlist.get(0) {
Some(data) => Ok(data.clone()),
None => Err(anyhow::anyhow!("get favorite playlist error")),
} | &self,
playlist_id: u64,
) -> Result<model::playlist::Playlist, anyhow::Error> {
let params = util::build_post_data(vec![
("id", &playlist_id.to_string()[..]),
("total", "true"),
("limit", "10000"),
("offset", "0"),
("n", "1000"),
]);
let response = self.request(uri::PLAYLIST_DETAIL, Method::POST, params)?;
let text = response.text()?;
let playlist = NcmClient::json_parse::<model::response::Playlist>(&text)?;
Ok(playlist.playlist)
}
fn get_song_url(
&self,
id: SingleOrMultiple<u64>,
) -> Result<Vec<model::song::Song>, anyhow::Error> {
let ids = match id {
SingleOrMultiple::Single(id) => vec![id],
SingleOrMultiple::Multiple(ids) => ids,
};
let ids = serde_json::to_string(&ids)?;
// 设置码率
// set br to 320000
// if set br 990000 will get the flac music link
// but now I haven't finish the flac decode
let params = util::build_post_data(vec![("ids", &ids[..]), ("br", "320000")]);
let response = self.request(uri::SONG_URL, Method::POST, params)?;
let text = response.text()?;
let song = NcmClient::json_parse::<model::response::Song>(&text)?;
Ok(song.data)
}
}
mod tests {
use super::*;
use crate::util;
#[test]
fn login_email_test() {
let mut ncm_client = NcmClient::new();
let setting = util::get_setting().unwrap();
ncm_client.login_email(setting.email, setting.password);
}
#[test]
fn get_favorite_test() {
let mut ncm_client = NcmClient::new();
let setting = util::get_setting().unwrap();
// ncm_client.login_email(setting.email, setting.password);
let favorite = ncm_client.get_favorite_playlist();
match favorite {
Ok(data) => println!("the favorite playlist is {:?}", data),
Err(_) => {}
};
}
#[test]
fn get_playlist_detail_test() {
let ncm_client = NcmClient::new();
let playlist_detail = ncm_client.get_playlist_detail(95815468);
match playlist_detail {
Ok(data) => println!("the playlist detail is {:?}", data),
Err(_) => {}
};
}
#[test]
fn get_song_url_test() {
let ncm_client = NcmClient::new();
let song = ncm_client.get_song_url(SingleOrMultiple::Single(1825208330));
match song {
Ok(data) => println!("the song detail is {:?}", data),
Err(_) => {}
};
}
} | }
fn get_playlist_detail( |
state.rs | use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use cosmwasm_std::{Addr, Decimal};
use cw_storage_plus::Item;
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct SwapFeeConfig {
pub fee_admin: Addr,
/// The percent fee amount from every token swap to any other | pub enable_swap_fee: bool,
/// The percent fee amount from every token swap to any other
pub swap_percent_fee: Decimal,
/// The fee receiver address
pub fee_receiver: Addr,
}
pub const SWAP_FEE_CONFIG: Item<SwapFeeConfig> = Item::new("swap_fee_config"); | |
pod.py | # Copyright 2018 Iguazio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import typing
import uuid
from enum import Enum
from kfp.dsl import ContainerOp, _container_op
from kubernetes import client
import mlrun.errors
import mlrun.utils.regex
from ..config import config as mlconf
from ..utils import logger, normalize_name, update_in, verify_field_regex
from .base import BaseRuntime, FunctionSpec
from .utils import (
apply_kfp,
generate_resources,
get_item_name,
get_resource_labels,
set_named_item,
)
class KubeResourceSpec(FunctionSpec):
def __init__(
self,
command=None,
args=None,
image=None,
mode=None,
volumes=None,
volume_mounts=None,
env=None,
resources=None,
default_handler=None,
pythonpath=None,
entry_points=None,
description=None,
workdir=None,
replicas=None,
image_pull_policy=None,
service_account=None,
build=None,
image_pull_secret=None,
node_name=None,
node_selector=None,
affinity=None,
mount_applied=False,
priority_class_name=None,
):
super().__init__(
command=command,
args=args,
image=image,
mode=mode,
build=build,
entry_points=entry_points,
description=description,
workdir=workdir,
default_handler=default_handler,
pythonpath=pythonpath,
mount_applied=mount_applied,
)
self._volumes = {}
self._volume_mounts = {}
self.volumes = volumes or []
self.volume_mounts = volume_mounts or []
self.env = env or []
self.resources = resources or {}
self.replicas = replicas
self.image_pull_policy = image_pull_policy
self.service_account = service_account
self.image_pull_secret = image_pull_secret
self.node_name = node_name
self.node_selector = (
node_selector or mlrun.mlconf.get_default_function_node_selector()
)
self._affinity = affinity
self.priority_class_name = (
priority_class_name or mlrun.mlconf.default_function_priority_class_name
)
@property
def volumes(self) -> list:
return list(self._volumes.values())
@volumes.setter
def volumes(self, volumes):
self._volumes = {}
if volumes:
for vol in volumes:
set_named_item(self._volumes, vol)
@property
def volume_mounts(self) -> list:
return list(self._volume_mounts.values())
@volume_mounts.setter
def volume_mounts(self, volume_mounts):
self._volume_mounts = {}
if volume_mounts:
for volume_mount in volume_mounts:
self._set_volume_mount(volume_mount)
@property
def affinity(self) -> client.V1Affinity:
return self._affinity
@affinity.setter
def affinity(self, affinity):
self._affinity = self._transform_affinity_to_k8s_class_instance(affinity)
def to_dict(self, fields=None, exclude=None):
struct = super().to_dict(fields, exclude=["affinity"])
api = client.ApiClient()
struct["affinity"] = api.sanitize_for_serialization(self.affinity)
return struct
def update_vols_and_mounts(self, volumes, volume_mounts):
if volumes:
for vol in volumes:
set_named_item(self._volumes, vol)
if volume_mounts:
for volume_mount in volume_mounts:
self._set_volume_mount(volume_mount)
def _get_affinity_as_k8s_class_instance(self):
pass
def _transform_affinity_to_k8s_class_instance(self, affinity):
if not affinity:
return None
if isinstance(affinity, dict):
api = client.ApiClient()
# not ideal to use their private method, but looks like that's the only option
# Taken from https://github.com/kubernetes-client/python/issues/977
affinity = api._ApiClient__deserialize(affinity, "V1Affinity")
return affinity
def _get_sanitized_affinity(self):
"""
When using methods like to_dict() on kubernetes class instances we're getting the attributes in snake_case
Which is ok if we're using the kubernetes python package but not if for example we're creating CRDs that we
apply directly. For that we need the sanitized (CamelCase) version.
"""
if not self.affinity:
return {}
if isinstance(self.affinity, dict):
# heuristic - if node_affinity is part of the dict it means to_dict on the kubernetes object performed,
# there's nothing we can do at that point to transform it to the sanitized version
if "node_affinity" in self.affinity:
raise mlrun.errors.MLRunInvalidArgumentError(
"Affinity must be instance of kubernetes' V1Affinity class"
)
elif "nodeAffinity" in self.affinity:
# then it's already the sanitized version
return self.affinity
api = client.ApiClient()
return api.sanitize_for_serialization(self.affinity)
def _set_volume_mount(self, volume_mount):
# calculate volume mount hash
volume_name = get_item_name(volume_mount, "name")
volume_sub_path = get_item_name(volume_mount, "subPath")
volume_mount_path = get_item_name(volume_mount, "mountPath")
volume_mount_key = hash(f"{volume_name}-{volume_sub_path}-{volume_mount_path}")
self._volume_mounts[volume_mount_key] = volume_mount
class AutoMountType(str, Enum):
none = "none"
auto = "auto"
v3io_credentials = "v3io_credentials"
v3io_fuse = "v3io_fuse"
pvc = "pvc"
@classmethod
def _missing_(cls, value):
|
@staticmethod
def default():
return AutoMountType.auto
# Any modifier that configures a mount on a runtime should be included here. These modifiers, if applied to the
# runtime, will suppress the auto-mount functionality.
@classmethod
def all_mount_modifiers(cls):
return [
mlrun.v3io_cred.__name__,
mlrun.mount_v3io.__name__,
mlrun.platforms.other.mount_pvc.__name__,
mlrun.auto_mount.__name__,
]
@staticmethod
def _get_auto_modifier():
# If we're running on Iguazio - use v3io_cred
if mlconf.igz_version != "":
return mlrun.v3io_cred
# Else, either pvc mount if it's configured or do nothing otherwise
pvc_configured = (
"MLRUN_PVC_MOUNT" in os.environ
or "pvc_name" in mlconf.get_storage_auto_mount_params()
)
return mlrun.platforms.other.mount_pvc if pvc_configured else None
def get_modifier(self):
return {
AutoMountType.none: None,
AutoMountType.v3io_credentials: mlrun.v3io_cred,
AutoMountType.v3io_fuse: mlrun.mount_v3io,
AutoMountType.pvc: mlrun.platforms.other.mount_pvc,
AutoMountType.auto: self._get_auto_modifier(),
}[self]
class KubeResource(BaseRuntime):
kind = "job"
_is_nested = True
def __init__(self, spec=None, metadata=None):
super().__init__(metadata, spec)
self.verbose = False
@property
def spec(self) -> KubeResourceSpec:
return self._spec
@spec.setter
def spec(self, spec):
self._spec = self._verify_dict(spec, "spec", KubeResourceSpec)
def to_dict(self, fields=None, exclude=None, strip=False):
struct = super().to_dict(fields, exclude, strip=strip)
api = client.ApiClient()
struct = api.sanitize_for_serialization(struct)
if strip:
spec = struct["spec"]
for attr in ["volumes", "volume_mounts"]:
if attr in spec:
del spec[attr]
if "env" in spec and spec["env"]:
for ev in spec["env"]:
if ev["name"].startswith("V3IO_"):
ev["value"] = ""
return struct
def apply(self, modify):
# Kubeflow pipeline have a hook to add the component to the DAG on ContainerOp init
# we remove the hook to suppress kubeflow op registration and return it after the apply()
old_op_handler = _container_op._register_op_handler
_container_op._register_op_handler = lambda x: self.metadata.name
cop = ContainerOp("name", "image")
_container_op._register_op_handler = old_op_handler
return apply_kfp(modify, cop, self)
def set_env_from_secret(self, name, secret=None, secret_key=None):
"""set pod environment var from secret"""
secret_key = secret_key or name
value_from = client.V1EnvVarSource(
secret_key_ref=client.V1SecretKeySelector(name=secret, key=secret_key)
)
return self._set_env(name, value_from=value_from)
def set_env(self, name, value):
"""set pod environment var from value"""
return self._set_env(name, value=str(value))
def is_env_exists(self, name):
"""Check whether there is an environment variable define for the given key"""
for env_var in self.spec.env:
if get_item_name(env_var) == name:
return True
return False
def _set_env(self, name, value=None, value_from=None):
new_var = client.V1EnvVar(name=name, value=value, value_from=value_from)
i = 0
for v in self.spec.env:
if get_item_name(v) == name:
self.spec.env[i] = new_var
return self
i += 1
self.spec.env.append(new_var)
return self
def set_envs(self, env_vars):
"""set pod environment var key/value dict"""
for name, value in env_vars.items():
self.set_env(name, value)
return self
def gpus(self, gpus, gpu_type="nvidia.com/gpu"):
update_in(self.spec.resources, ["limits", gpu_type], gpus)
def with_limits(self, mem=None, cpu=None, gpus=None, gpu_type="nvidia.com/gpu"):
"""set pod cpu/memory/gpu limits"""
self._verify_and_set_limits("resources", mem, cpu, gpus, gpu_type)
def with_requests(self, mem=None, cpu=None):
"""set requested (desired) pod cpu/memory resources"""
self._verify_and_set_requests("resources", mem, cpu)
def with_node_selection(
self,
node_name: typing.Optional[str] = None,
node_selector: typing.Optional[typing.Dict[str, str]] = None,
affinity: typing.Optional[client.V1Affinity] = None,
):
"""
Enables to control on which k8s node the job will run
:param node_name: The name of the k8s node
:param node_selector: Label selector, only nodes with matching labels will be eligible to be picked
:param affinity: Expands the types of constraints you can express - see
https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity
for details
"""
if node_name:
self.spec.node_name = node_name
if node_selector:
self.spec.node_selector = node_selector
if affinity:
self.spec.affinity = affinity
def with_priority_class(self, name: typing.Optional[str] = None):
"""
Enables to control the priority of the pod
If not passed - will default to mlrun.mlconf.default_function_priority_class_name
:param name: The name of the priority class
"""
if name is None:
name = mlconf.default_function_priority_class_name
valid_priority_class_names = self.list_valid_and_default_priority_class_names()[
"valid_function_priority_class_names"
]
if name not in valid_priority_class_names:
message = "Priority class name not in available priority class names"
logger.warning(
message,
priority_class_name=name,
valid_priority_class_names=valid_priority_class_names,
)
raise mlrun.errors.MLRunInvalidArgumentError(message)
self.spec.priority_class_name = name
def list_valid_and_default_priority_class_names(self):
return {
"default_function_priority_class_name": mlconf.default_function_priority_class_name,
"valid_function_priority_class_names": mlconf.get_valid_function_priority_class_names(),
}
def _verify_and_set_limits(
self,
resources_field_name,
mem=None,
cpu=None,
gpus=None,
gpu_type="nvidia.com/gpu",
):
if mem:
verify_field_regex(
f"function.spec.{resources_field_name}.limits.memory",
mem,
mlrun.utils.regex.k8s_resource_quantity_regex,
)
if cpu:
verify_field_regex(
f"function.spec.{resources_field_name}.limits.cpu",
cpu,
mlrun.utils.regex.k8s_resource_quantity_regex,
)
if gpus:
verify_field_regex(
f"function.spec.{resources_field_name}.limits.gpus",
gpus,
mlrun.utils.regex.k8s_resource_quantity_regex,
)
update_in(
getattr(self.spec, resources_field_name),
"limits",
generate_resources(mem=mem, cpu=cpu, gpus=gpus, gpu_type=gpu_type),
)
def _verify_and_set_requests(self, resources_field_name, mem=None, cpu=None):
if mem:
verify_field_regex(
f"function.spec.{resources_field_name}.requests.memory",
mem,
mlrun.utils.regex.k8s_resource_quantity_regex,
)
if cpu:
verify_field_regex(
f"function.spec.{resources_field_name}.requests.cpu",
cpu,
mlrun.utils.regex.k8s_resource_quantity_regex,
)
update_in(
getattr(self.spec, resources_field_name),
"requests",
generate_resources(mem=mem, cpu=cpu),
)
def _get_meta(self, runobj, unique=False):
namespace = self._get_k8s().resolve_namespace()
labels = get_resource_labels(self, runobj, runobj.spec.scrape_metrics)
new_meta = client.V1ObjectMeta(namespace=namespace, labels=labels)
name = runobj.metadata.name or "mlrun"
norm_name = f"{normalize_name(name)}-"
if unique:
norm_name += uuid.uuid4().hex[:8]
new_meta.name = norm_name
runobj.set_label("mlrun/job", norm_name)
else:
new_meta.generate_name = norm_name
return new_meta
def _add_azure_vault_params_to_spec(self, k8s_secret_name=None):
secret_name = (
k8s_secret_name or mlconf.secret_stores.azure_vault.default_secret_name
)
if not secret_name:
logger.warning(
"No k8s secret provided. Azure key vault will not be available"
)
return
# We cannot use expanduser() here, since the user in question is the user running in the pod
# itself (which is root) and not where this code is running. That's why this hacky replacement is needed.
secret_path = mlconf.secret_stores.azure_vault.secret_path.replace("~", "/root")
volumes = [
{
"name": "azure-vault-secret",
"secret": {"defaultMode": 420, "secretName": secret_name},
}
]
volume_mounts = [{"name": "azure-vault-secret", "mountPath": secret_path}]
self.spec.update_vols_and_mounts(volumes, volume_mounts)
def _add_project_k8s_secrets_to_spec(self, secrets, runobj=None, project=None):
project_name = project or runobj.metadata.project
if project_name is None:
logger.warning("No project provided. Cannot add k8s secrets")
return
secret_name = self._get_k8s().get_project_secret_name(project_name)
existing_secret_keys = (
self._get_k8s().get_project_secret_keys(project_name) or {}
)
# If no secrets were passed, we need all existing keys
if not secrets:
secrets = {
key: self._secrets.k8s_env_variable_name_for_secret(key)
for key in existing_secret_keys
}
for key, env_var_name in secrets.items():
if key in existing_secret_keys:
self.set_env_from_secret(env_var_name, secret_name, key)
def _add_vault_params_to_spec(self, runobj=None, project=None):
project_name = project or runobj.metadata.project
if project_name is None:
logger.warning("No project provided. Cannot add vault parameters")
return
service_account_name = mlconf.secret_stores.vault.project_service_account_name.format(
project=project_name
)
project_vault_secret_name = self._get_k8s().get_project_vault_secret_name(
project_name, service_account_name
)
if project_vault_secret_name is None:
logger.info(f"No vault secret associated with project {project_name}")
return
volumes = [
{
"name": "vault-secret",
"secret": {"defaultMode": 420, "secretName": project_vault_secret_name},
}
]
# We cannot use expanduser() here, since the user in question is the user running in the pod
# itself (which is root) and not where this code is running. That's why this hacky replacement is needed.
token_path = mlconf.secret_stores.vault.token_path.replace("~", "/root")
volume_mounts = [{"name": "vault-secret", "mountPath": token_path}]
self.spec.update_vols_and_mounts(volumes, volume_mounts)
self.spec.env.append(
{
"name": "MLRUN_SECRET_STORES__VAULT__ROLE",
"value": f"project:{project_name}",
}
)
# In case remote URL is different than local URL, use it. Else, use the local URL
vault_url = mlconf.secret_stores.vault.remote_url
if vault_url == "":
vault_url = mlconf.secret_stores.vault.url
self.spec.env.append(
{"name": "MLRUN_SECRET_STORES__VAULT__URL", "value": vault_url}
)
def try_auto_mount_based_on_config(self):
if self.spec.mount_applied:
logger.debug("Mount already applied - not performing auto-mount")
return
auto_mount_type = AutoMountType(mlconf.storage.auto_mount_type)
modifier = auto_mount_type.get_modifier()
if not modifier:
logger.debug("Auto mount disabled due to user selection")
return
mount_params_dict = mlconf.get_storage_auto_mount_params()
self.apply(modifier(**mount_params_dict))
def kube_resource_spec_to_pod_spec(
kube_resource_spec: KubeResourceSpec, container: client.V1Container
):
return client.V1PodSpec(
containers=[container],
restart_policy="Never",
volumes=kube_resource_spec.volumes,
service_account=kube_resource_spec.service_account,
node_name=kube_resource_spec.node_name,
node_selector=kube_resource_spec.node_selector,
affinity=kube_resource_spec.affinity,
priority_class_name=kube_resource_spec.priority_class_name
if len(mlconf.get_valid_function_priority_class_names())
else None,
)
| return AutoMountType.default() |
roche-lobe-radius.py | #%%
import numpy as np
import matplotlib.pyplot as plt
from astropy.visualization import astropy_mpl_style
plt.style.use(astropy_mpl_style)
from matplotlib import rc
rc('font',**{'family':'serif','serif':['Palatino']})
rc('text', usetex=True)
rc('text.latex', preamble=r'''\usepackage{amsmath}
\usepackage{physics}
\usepackage{siunitx}
''')
THR = .5
WIDTH = 0
# def weight(q):
# if WIDTH>0:
# offset = 1/2 - THR / WIDTH
# return (np.piecewise(q,
# condlist=[
# q < THR - WIDTH / 2,
# q > THR - WIDTH / 2 and q < THR + WIDTH / 2 ,
# q > THR + WIDTH / 2,
# ],
# funclist=[
# 0,
# lambda x: x / WIDTH + offset,
# 1
# ]
# ))
# else:
# return (np.piecewise(q,
# condlist=[q < THR, q >= THR],
# funclist=[0, 1]
# ))
def f1(q):
return (.46224 * (q / (1 + q))**(1 / 3))
def f2(q):
return (.38 + .2 * np.log10(q))
def f(q):
if q < 0.5:
return (f1(q))
else:
return(f2(q))
f = np.vectorize(f, signature='()->()')
#%%
qs = np.linspace(0, 8, num=1000)
f_q = f(qs)
# plt.plot(qs, f(qs))
# plt.xlabel('$q = M_2 / M_1$')
# plt.ylabel('$R_{\\text{{lobe}}} / a$')
# plt.savefig('roche-lobe-radius.pdf', format = 'pdf')
| return((1+q)**4 / q**2)
a_q = a(qs)
plt.plot(qs, np.abs(np.gradient(f_q, qs) / f_q), label='$\\abs{\\Delta \\log f}$')
plt.plot(qs, np.abs(np.gradient(a_q, qs) / a_q), label='$\\abs{\\Delta \\log a}$')
plt.plot(qs, np.gradient(a_q, qs) / a_q + np.gradient(f_q, qs) / f_q, label='$\\Delta \\log a + \\Delta \\log f$', ls='--')
plt.axvline(1, label='$q = 1$', ls=':', c='black')
plt.xlabel('$q = M_2 / M_1$')
plt.ylabel('relative variation')
plt.legend()
plt.yscale('log')
plt.savefig('roche-lobe-relative-corrections.pdf')
plt.show()
#%%
qs = np.linspace(0, 5/4, num=200)
def circ(q):
return((.5 - .227 * np.log10(q))**4 * (1+q))
plt.plot(qs, f(1 / qs), label='Roche Lobe radius')
plt.plot(qs, circ(qs), label='Circularization radius')
plt.xlabel('$q$')
plt.ylim(0,1)
plt.legend()
plt.savefig('roche-vs-circularization.pdf')
# %% | #%%
def a(q): |
get_source_git.go | /*
Copyright 2020 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"strconv"
"strings"
sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
"github.com/spf13/cobra"
)
var getSourceGitCmd = &cobra.Command{
Use: "git",
Short: "Get GitRepository source statuses",
Long: "The get sources git command prints the status of the GitRepository sources.",
Example: ` # List all Git repositories and their status
flux get sources git
# List Git repositories from all namespaces
flux get sources git --all-namespaces`,
RunE: getCommand{
apiType: gitRepositoryType,
list: &gitRepositoryListAdapter{&sourcev1.GitRepositoryList{}},
}.run,
}
func init() |
func (a *gitRepositoryListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string {
item := a.Items[i]
var revision string
if item.GetArtifact() != nil {
revision = item.GetArtifact().Revision
}
status, msg := statusAndMessage(item.Status.Conditions)
return append(nameColumns(&item, includeNamespace, includeKind),
status, msg, revision, strings.Title(strconv.FormatBool(item.Spec.Suspend)))
}
func (a gitRepositoryListAdapter) headers(includeNamespace bool) []string {
headers := []string{"Name", "Ready", "Message", "Revision", "Suspended"}
if includeNamespace {
headers = append([]string{"Namespace"}, headers...)
}
return headers
}
| {
getSourceCmd.AddCommand(getSourceGitCmd)
} |
admin-dashboard.component.ts | import { Component } from '@angular/core';
@Component({
template: `
<p>Dashboard</p>
`
})
export class Ad | }
| minDashboardComponent { |
monitors.py | import os
import socket
import StringIO
import traceback
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
import redis as redislib
import requests
from kombu import Connection
from PIL import Image
import olympia.core.logger
from olympia.amo import search
from olympia.amo.templatetags.jinja_helpers import user_media_path
from olympia.applications.management.commands import dump_apps
monitor_log = olympia.core.logger.getLogger('z.monitor')
def memcache():
memcache = getattr(settings, 'CACHES', {}).get('default')
memcache_results = []
status = ''
if memcache and 'memcache' in memcache['BACKEND']:
hosts = memcache['LOCATION']
using_twemproxy = False
if not isinstance(hosts, (tuple, list)):
hosts = [hosts]
for host in hosts:
ip, port = host.split(':')
if ip == '127.0.0.1':
using_twemproxy = True
try:
s = socket.socket()
s.connect((ip, int(port)))
except Exception, e:
result = False
status = 'Failed to connect to memcached (%s): %s' % (host, e)
monitor_log.critical(status)
else:
result = True
finally:
s.close()
memcache_results.append((ip, port, result))
if not using_twemproxy and len(memcache_results) < 2:
status = ('2+ memcache servers are required.'
'%s available') % len(memcache_results)
monitor_log.warning(status)
if not memcache_results:
status = 'Memcache is not configured'
monitor_log.info(status)
return status, memcache_results
def libraries():
# Check Libraries and versions
libraries_results = []
status = ''
try:
Image.new('RGB', (16, 16)).save(StringIO.StringIO(), 'JPEG')
libraries_results.append(('PIL+JPEG', True, 'Got it!'))
except Exception, e:
msg = "Failed to create a jpeg image: %s" % e
libraries_results.append(('PIL+JPEG', False, msg))
missing_libs = [l for l, s, m in libraries_results if not s]
if missing_libs:
status = 'missing libs: %s' % ",".join(missing_libs)
return status, libraries_results
def elastic():
elastic_results = None
status = ''
try:
es = search.get_es()
health = es.cluster.health()
if health['status'] == 'red':
status = 'ES is red'
elastic_results = health
except Exception:
elastic_results = {'exception': traceback.format_exc()}
return status, elastic_results
def path():
# Check file paths / permissions
rw = (settings.TMP_PATH,
settings.MEDIA_ROOT,
user_media_path('addons'),
user_media_path('guarded_addons'),
user_media_path('addon_icons'),
user_media_path('collection_icons'),
user_media_path('previews'),
user_media_path('userpics'),
user_media_path('reviewer_attachments'),
dump_apps.Command.get_json_path(),)
r = [os.path.join(settings.ROOT, 'locale'),
# The deploy process will want write access to this.
# We do not want Django to have write access though.
settings.PROD_DETAILS_DIR]
filepaths = [(path, os.R_OK | os.W_OK, 'We want read + write')
for path in rw]
filepaths += [(path, os.R_OK, 'We want read') for path in r]
filepath_results = []
filepath_status = True
for path, perms, notes in filepaths:
path_exists = os.path.exists(path)
path_perms = os.access(path, perms)
filepath_status = filepath_status and path_exists and path_perms
if not isinstance(path, str):
notes += ' / should be a bytestring!'
filepath_results.append((path, path_exists, path_perms, notes))
status = filepath_status
status = ''
if not filepath_status:
status = 'check main status page for broken perms / values'
return status, filepath_results
def rabbitmq():
# Check rabbitmq
rabbitmq_results = []
status = ''
with Connection(settings.CELERY_BROKER_URL, connect_timeout=2) as broker:
hostname = broker.hostname
try:
broker.connect()
rabbitmq_results.append((hostname, True))
except Exception, e:
rabbitmq_results.append((hostname, False))
status = 'Failed to chat with rabbitmq %s: %s' % (hostname, e)
monitor_log.critical(status)
return status, rabbitmq_results
def redis():
# Check Redis
redis_results = [None, 'REDIS_BACKENDS is not set']
status = 'REDIS_BACKENDS is not set'
if getattr(settings, 'REDIS_BACKENDS', False):
status = []
redis_results = {}
for alias, backend in settings.REDIS_BACKENDS.items():
if not isinstance(backend, dict):
raise ImproperlyConfigured(
'REDIS_BACKENDS is now required to be a dictionary.')
host = backend.get('HOST')
port = backend.get('PORT')
db = backend.get('DB', 0)
password = backend.get('PASSWORD', None)
socket_timeout = backend.get('OPTIONS', {}).get('socket_timeout')
try:
redis_connection = redislib.Redis(
host=host, port=port, db=db, password=password,
socket_timeout=socket_timeout)
redis_results[alias] = redis_connection.info()
except Exception, e:
redis_results[alias] = None
status.append('Failed to chat with redis:%s' % alias)
monitor_log.critical('Failed to chat with redis: (%s)' % e)
status = ','.join(status)
return status, redis_results
def signer():
# Check Signing Server Endpoint
| signer_results = None
status = ''
autograph_url = settings.AUTOGRAPH_CONFIG['server_url']
if autograph_url:
try:
response = requests.get(
'{host}/__heartbeat__'.format(host=autograph_url),
timeout=settings.SIGNING_SERVER_MONITORING_TIMEOUT)
if response.status_code != 200:
status = (
'Failed to chat with signing service. '
'Invalid HTTP response code.')
monitor_log.critical(status)
signer_results = False
else:
signer_results = True
except Exception as exc:
status = 'Failed to chat with signing service: %s' % exc
monitor_log.critical(status)
signer_results = False
else:
status = 'server_url in AUTOGRAPH_CONFIG is not set'
monitor_log.critical(status)
signer_results = False
return status, signer_results |
|
channel.pb.go | // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.15.8
// source: proto/channel.proto
package config
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Request struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
ClusterName string `protobuf:"bytes,2,opt,name=clusterName,proto3" json:"clusterName,omitempty"`
Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
}
func (x *Request) Reset() {
*x = Request{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_channel_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Request) ProtoMessage() {}
func (x *Request) ProtoReflect() protoreflect.Message {
mi := &file_proto_channel_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Request.ProtoReflect.Descriptor instead.
func (*Request) Descriptor() ([]byte, []int) {
return file_proto_channel_proto_rawDescGZIP(), []int{0}
}
func (x *Request) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Request) GetClusterName() string {
if x != nil {
return x.ClusterName
}
return ""
}
func (x *Request) GetBody() string {
if x != nil {
return x.Body
}
return ""
}
type Response struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
ClusterName string `protobuf:"bytes,2,opt,name=clusterName,proto3" json:"clusterName,omitempty"`
Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
}
func (x *Response) Reset() {
*x = Response{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_channel_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Response) ProtoMessage() {}
func (x *Response) ProtoReflect() protoreflect.Message {
mi := &file_proto_channel_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Response.ProtoReflect.Descriptor instead.
func (*Response) Descriptor() ([]byte, []int) {
return file_proto_channel_proto_rawDescGZIP(), []int{1}
}
func (x *Response) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Response) GetClusterName() string {
if x != nil {
return x.ClusterName
}
return ""
}
func (x *Response) GetBody() string {
if x != nil |
return ""
}
var File_proto_channel_proto protoreflect.FileDescriptor
var file_proto_channel_proto_rawDesc = []byte{
0x0a, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e,
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74,
0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x54, 0x0a, 0x08, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c,
0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79,
0x32, 0x2f, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x24, 0x0a, 0x09, 0x45,
0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x08, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x09, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30,
0x01, 0x42, 0x09, 0x5a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_proto_channel_proto_rawDescOnce sync.Once
file_proto_channel_proto_rawDescData = file_proto_channel_proto_rawDesc
)
func file_proto_channel_proto_rawDescGZIP() []byte {
file_proto_channel_proto_rawDescOnce.Do(func() {
file_proto_channel_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_channel_proto_rawDescData)
})
return file_proto_channel_proto_rawDescData
}
var file_proto_channel_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_proto_channel_proto_goTypes = []interface{}{
(*Request)(nil), // 0: Request
(*Response)(nil), // 1: Response
}
var file_proto_channel_proto_depIdxs = []int32{
0, // 0: Channel.Establish:input_type -> Request
1, // 1: Channel.Establish:output_type -> Response
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_proto_channel_proto_init() }
func file_proto_channel_proto_init() {
if File_proto_channel_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_proto_channel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Request); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_channel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Response); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proto_channel_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_proto_channel_proto_goTypes,
DependencyIndexes: file_proto_channel_proto_depIdxs,
MessageInfos: file_proto_channel_proto_msgTypes,
}.Build()
File_proto_channel_proto = out.File
file_proto_channel_proto_rawDesc = nil
file_proto_channel_proto_goTypes = nil
file_proto_channel_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// ChannelClient is the client API for Channel service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ChannelClient interface {
Establish(ctx context.Context, opts ...grpc.CallOption) (Channel_EstablishClient, error)
}
type channelClient struct {
cc grpc.ClientConnInterface
}
func NewChannelClient(cc grpc.ClientConnInterface) ChannelClient {
return &channelClient{cc}
}
func (c *channelClient) Establish(ctx context.Context, opts ...grpc.CallOption) (Channel_EstablishClient, error) {
stream, err := c.cc.NewStream(ctx, &_Channel_serviceDesc.Streams[0], "/Channel/Establish", opts...)
if err != nil {
return nil, err
}
x := &channelEstablishClient{stream}
return x, nil
}
type Channel_EstablishClient interface {
Send(*Request) error
Recv() (*Response, error)
grpc.ClientStream
}
type channelEstablishClient struct {
grpc.ClientStream
}
func (x *channelEstablishClient) Send(m *Request) error {
return x.ClientStream.SendMsg(m)
}
func (x *channelEstablishClient) Recv() (*Response, error) {
m := new(Response)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// ChannelServer is the server API for Channel service.
type ChannelServer interface {
Establish(Channel_EstablishServer) error
}
// UnimplementedChannelServer can be embedded to have forward compatible implementations.
type UnimplementedChannelServer struct {
}
func (*UnimplementedChannelServer) Establish(Channel_EstablishServer) error {
return status.Errorf(codes.Unimplemented, "method Establish not implemented")
}
func RegisterChannelServer(s *grpc.Server, srv ChannelServer) {
s.RegisterService(&_Channel_serviceDesc, srv)
}
func _Channel_Establish_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(ChannelServer).Establish(&channelEstablishServer{stream})
}
type Channel_EstablishServer interface {
Send(*Response) error
Recv() (*Request, error)
grpc.ServerStream
}
type channelEstablishServer struct {
grpc.ServerStream
}
func (x *channelEstablishServer) Send(m *Response) error {
return x.ServerStream.SendMsg(m)
}
func (x *channelEstablishServer) Recv() (*Request, error) {
m := new(Request)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
var _Channel_serviceDesc = grpc.ServiceDesc{
ServiceName: "Channel",
HandlerType: (*ChannelServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "Establish",
Handler: _Channel_Establish_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "proto/channel.proto",
}
| {
return x.Body
} |
f_types.go | // Autogenerated by Frugal Compiler (3.8.2)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
package variety
import (
"bytes"
"fmt"
"github.com/Workiva/frugal/lib/gopherjs/frugal"
"github.com/Workiva/frugal/lib/gopherjs/thrift"
"github.com/Workiva/frugal/test/expected/gopherjs/actual_base/golang"
)
const RedefConst = golang.ConstI32FromBase
var ConstThing *golang.Thing
var DEFAULT_ID ID
var OtherDefault ID
const Thirtyfour = 34
var MAPCONSTANT map[string]string
var SETCONSTANT map[string]bool
var ConstEvent1 *Event
var ConstEvent2 *Event
var NumsList []int32
var NumsSet map[Int]bool
var MAPCONSTANT2 map[string]*Event
var BinConst []byte
const TrueConstant = true
const FalseConstant = false
const ConstHc = 2
const EvilString = "thin'g\" \""
const EvilString2 = "th'ing\"ad\"f"
var ConstLower *TestLowercase
func init() {
ConstThing = &golang.Thing{
AnID: 1,
AString: "some string",
}
DEFAULT_ID = -1
OtherDefault = DEFAULT_ID
MAPCONSTANT = map[string]string{
"hello": "world",
"goodnight": "moon",
}
SETCONSTANT = map[string]bool{
"hello": true,
"world": true,
}
ConstEvent1 = &Event{
ID: -2,
Message: "first one",
}
ConstEvent2 = &Event{
ID: -7,
Message: "second one",
}
NumsList = []int32{
2,
4,
7,
1,
}
NumsSet = map[Int]bool{
1: true,
3: true,
8: true,
0: true,
}
MAPCONSTANT2 = map[string]*Event{
"hello": &Event{
ID: -2,
Message: "first here",
},
}
BinConst = []byte("hello")
ConstLower = &TestLowercase{
LowercaseInt: 2,
}
}
type ID int64
type Int int32
type Request map[Int]string
type T1String string
type T2String T1String
type HealthCondition int64
const (
// This docstring gets added to the generated code because it
// has the @ sign.
HealthCondition_PASS HealthCondition = 1
// This docstring also gets added to the generated code
// because it has the @ sign.
HealthCondition_WARN HealthCondition = 2
// Deprecated: use something else
HealthCondition_FAIL HealthCondition = 3
// This is a docstring comment for a deprecated enum value that has been
// spread across two lines.
// Deprecated: don't use this; use "something else"
HealthCondition_UNKNOWN HealthCondition = 4
)
func (p HealthCondition) String() string {
switch p {
case HealthCondition_PASS:
return "PASS"
case HealthCondition_WARN:
return "WARN"
case HealthCondition_FAIL:
return "FAIL"
case HealthCondition_UNKNOWN:
return "UNKNOWN"
}
return "<UNSET>"
}
func HealthConditionFromString(s string) (HealthCondition, error) {
switch s {
case "PASS":
return HealthCondition_PASS, nil
case "WARN":
return HealthCondition_WARN, nil
case "FAIL":
return HealthCondition_FAIL, nil
case "UNKNOWN":
return HealthCondition_UNKNOWN, nil
}
return HealthCondition(0), fmt.Errorf("not a valid HealthCondition string")
}
type ItsAnEnum int64
const (
ItsAnEnum_FIRST ItsAnEnum = 2
ItsAnEnum_SECOND ItsAnEnum = 3
ItsAnEnum_THIRD ItsAnEnum = 4
ItsAnEnum_fourth ItsAnEnum = 5
ItsAnEnum_Fifth ItsAnEnum = 6
ItsAnEnum_sIxItH ItsAnEnum = 7
)
func (p ItsAnEnum) String() string {
switch p {
case ItsAnEnum_FIRST:
return "FIRST"
case ItsAnEnum_SECOND:
return "SECOND"
case ItsAnEnum_THIRD:
return "THIRD"
case ItsAnEnum_fourth:
return "fourth"
case ItsAnEnum_Fifth:
return "Fifth"
case ItsAnEnum_sIxItH:
return "sIxItH"
}
return "<UNSET>"
}
func ItsAnEnumFromString(s string) (ItsAnEnum, error) {
switch s {
case "FIRST":
return ItsAnEnum_FIRST, nil
case "SECOND":
return ItsAnEnum_SECOND, nil
case "THIRD":
return ItsAnEnum_THIRD, nil
case "fourth":
return ItsAnEnum_fourth, nil
case "Fifth":
return ItsAnEnum_Fifth, nil
case "sIxItH":
return ItsAnEnum_sIxItH, nil
}
return ItsAnEnum(0), fmt.Errorf("not a valid ItsAnEnum string")
}
type TestBase struct {
BaseStruct *golang.Thing
}
func NewTestBase() *TestBase {
return &TestBase{}
}
var TestBase_BaseStruct_DEFAULT *golang.Thing
func (p *TestBase) IsSetBaseStruct() bool {
return p.BaseStruct != nil
}
func (p *TestBase) GetBaseStruct() *golang.Thing {
if !p.IsSetBaseStruct() {
return TestBase_BaseStruct_DEFAULT
}
return p.BaseStruct
}
func (p *TestBase) Read(iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
if err != nil {
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
}
if fieldTypeId == thrift.STOP {
break
}
switch fieldId {
case 1:
p.BaseStruct = golang.NewThing()
if err := p.BaseStruct.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.BaseStruct), err)
}
default:
if err := iprot.Skip(fieldTypeId); err != nil {
return err
}
}
if err := iprot.ReadFieldEnd(); err != nil {
return err
}
}
if err := iprot.ReadStructEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
}
return nil
}
func (p *TestBase) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("TestBase"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := frugal.WriteStruct(oprot, p.BaseStruct, "base_struct", 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::base_struct:1 ", p), err)
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
func (p *TestBase) String() string {
if p == nil {
return "<nil>"
}
return fmt.Sprintf("TestBase(%+v)", *p)
}
type TestLowercase struct {
LowercaseInt int32
}
func NewTestLowercase() *TestLowercase {
return &TestLowercase{}
}
func (p *TestLowercase) GetLowercaseInt() int32 {
return p.LowercaseInt
}
func (p *TestLowercase) Read(iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
if err != nil {
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
}
if fieldTypeId == thrift.STOP {
break
}
switch fieldId {
case 1:
if v, err := iprot.ReadI32(); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
p.LowercaseInt = v
}
default:
if err := iprot.Skip(fieldTypeId); err != nil {
return err
}
}
if err := iprot.ReadFieldEnd(); err != nil {
return err
}
}
if err := iprot.ReadStructEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
}
return nil
}
func (p *TestLowercase) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("TestLowercase"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := frugal.WriteI32(oprot, p.LowercaseInt, "lowercaseInt", 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::lowercaseInt:1 ", p), err)
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
func (p *TestLowercase) String() string {
if p == nil {
return "<nil>"
}
return fmt.Sprintf("TestLowercase(%+v)", *p)
}
// This docstring gets added to the generated code because it has
// the @ sign.
type Event struct {
// ID is a unique identifier for an event.
ID ID
// Message contains the event payload.
Message string
}
func NewEvent() *Event {
return &Event{
ID: DEFAULT_ID,
}
}
func (p *Event) GetID() ID {
return p.ID
}
func (p *Event) GetMessage() string {
return p.Message
}
func (p *Event) Read(iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
if err != nil {
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
}
if fieldTypeId == thrift.STOP {
break
}
switch fieldId {
case 1:
if v, err := iprot.ReadI64(); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
temp := ID(v)
p.ID = temp
}
case 2:
if v, err := iprot.ReadString(); err != nil {
return thrift.PrependError("error reading field 2: ", err)
} else {
p.Message = v
}
default:
if err := iprot.Skip(fieldTypeId); err != nil {
return err
}
}
if err := iprot.ReadFieldEnd(); err != nil {
return err
}
}
if err := iprot.ReadStructEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
}
return nil
}
func (p *Event) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("Event"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := frugal.WriteI64(oprot, int64(p.ID), "ID", 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::ID:1 ", p), err)
}
if err := frugal.WriteString(oprot, p.Message, "Message", 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::Message:2 ", p), err)
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
func (p *Event) String() string {
if p == nil {
return "<nil>"
}
return fmt.Sprintf("Event(%+v)", *p)
}
type TestingDefaults struct {
ID2 ID
Ev1 *Event
Ev2 *Event
ID ID
Thing string
Thing2 string
Listfield []Int
ID3 ID
BinField []byte
BinField2 []byte
BinField3 []byte
BinField4 []byte
List2 *[]Int
List3 []Int
List4 []Int
AMap *map[string]string
// Comment for enum field.
Status HealthCondition
BaseStatus golang.BaseHealthCondition
}
func NewTestingDefaults() *TestingDefaults {
return &TestingDefaults{
ID2: DEFAULT_ID,
ID: -2,
Thing: "a constant",
Thing2: "another constant",
Listfield: []Int{
1,
2,
3,
4,
5,
},
ID3: OtherDefault,
BinField4: BinConst,
List4: []Int{
1,
2,
3,
6,
},
Status: HealthCondition_PASS,
BaseStatus: golang.BaseHealthCondition_FAIL,
}
}
var TestingDefaults_ID2_DEFAULT ID = DEFAULT_ID
func (p *TestingDefaults) IsSetID2() bool {
return p.ID2 != TestingDefaults_ID2_DEFAULT
}
func (p *TestingDefaults) GetID2() ID {
return p.ID2
}
var TestingDefaults_Ev1_DEFAULT *Event = &Event{
ID: DEFAULT_ID,
Message: "a message",
}
func (p *TestingDefaults) IsSetEv1() bool {
return p.Ev1 != nil
}
func (p *TestingDefaults) GetEv1() *Event {
if !p.IsSetEv1() {
return TestingDefaults_Ev1_DEFAULT
}
return p.Ev1
}
var TestingDefaults_Ev2_DEFAULT *Event = &Event{
ID: 5,
Message: "a message2",
}
func (p *TestingDefaults) IsSetEv2() bool {
return p.Ev2 != nil
}
func (p *TestingDefaults) GetEv2() *Event {
if !p.IsSetEv2() {
return TestingDefaults_Ev2_DEFAULT
}
return p.Ev2
}
func (p *TestingDefaults) GetID() ID {
return p.ID
}
func (p *TestingDefaults) GetThing() string {
return p.Thing
}
var TestingDefaults_Thing2_DEFAULT string = "another constant"
func (p *TestingDefaults) IsSetThing2() bool {
return p.Thing2 != TestingDefaults_Thing2_DEFAULT
}
func (p *TestingDefaults) GetThing2() string {
return p.Thing2
}
func (p *TestingDefaults) GetListfield() []Int {
return p.Listfield
}
func (p *TestingDefaults) GetID3() ID {
return p.ID3
}
func (p *TestingDefaults) GetBinField() []byte {
return p.BinField
}
var TestingDefaults_BinField2_DEFAULT []byte
func (p *TestingDefaults) IsSetBinField2() bool {
return p.BinField2 != nil
}
func (p *TestingDefaults) GetBinField2() []byte {
return p.BinField2
}
func (p *TestingDefaults) GetBinField3() []byte {
return p.BinField3
}
var TestingDefaults_BinField4_DEFAULT []byte = BinConst
func (p *TestingDefaults) IsSetBinField4() bool {
return !bytes.Equal(p.BinField4, TestingDefaults_BinField4_DEFAULT)
}
func (p *TestingDefaults) GetBinField4() []byte {
return p.BinField4
}
var TestingDefaults_List2_DEFAULT []Int = []Int{
1,
3,
4,
5,
8,
}
func (p *TestingDefaults) IsSetList2() bool {
return p.List2 != nil
}
func (p *TestingDefaults) GetList2() []Int {
if !p.IsSetList2() {
return TestingDefaults_List2_DEFAULT
}
return *p.List2
}
var TestingDefaults_List3_DEFAULT []Int
func (p *TestingDefaults) IsSetList3() bool {
return p.List3 != nil
}
func (p *TestingDefaults) GetList3() []Int {
return p.List3
}
func (p *TestingDefaults) GetList4() []Int {
return p.List4
}
var TestingDefaults_AMap_DEFAULT map[string]string = map[string]string{
"k1": "v1",
"k2": "v2",
}
func (p *TestingDefaults) IsSetAMap() bool {
return p.AMap != nil
}
func (p *TestingDefaults) GetAMap() map[string]string {
if !p.IsSetAMap() {
return TestingDefaults_AMap_DEFAULT
}
return *p.AMap
}
func (p *TestingDefaults) GetStatus() HealthCondition {
return p.Status
}
func (p *TestingDefaults) GetBaseStatus() golang.BaseHealthCondition {
return p.BaseStatus
}
func (p *TestingDefaults) Read(iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
issetStatus := false
issetBaseStatus := false
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
if err != nil {
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
}
if fieldTypeId == thrift.STOP {
break
}
switch fieldId {
case 1:
if v, err := iprot.ReadI64(); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
temp := ID(v)
p.ID2 = temp
}
case 2:
p.Ev1 = NewEvent()
if err := p.Ev1.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ev1), err)
}
case 3:
p.Ev2 = NewEvent()
if err := p.Ev2.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ev2), err)
}
case 4:
if v, err := iprot.ReadI64(); err != nil {
return thrift.PrependError("error reading field 4: ", err)
} else {
temp := ID(v)
p.ID = temp
}
case 5:
if v, err := iprot.ReadString(); err != nil {
return thrift.PrependError("error reading field 5: ", err)
} else {
p.Thing = v
}
case 6:
if v, err := iprot.ReadString(); err != nil {
return thrift.PrependError("error reading field 6: ", err)
} else {
p.Thing2 = v
}
case 7:
_, size, err := iprot.ReadListBegin()
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
p.Listfield = make([]Int, 0, size)
for i := 0; i < size; i++ {
var elem0 Int
if v, err := iprot.ReadI32(); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
temp := Int(v)
elem0 = temp
}
p.Listfield = append(p.Listfield, elem0)
}
if err := iprot.ReadListEnd(); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
case 8:
if v, err := iprot.ReadI64(); err != nil {
return thrift.PrependError("error reading field 8: ", err)
} else {
temp := ID(v)
p.ID3 = temp
}
case 9:
if v, err := iprot.ReadBinary(); err != nil {
return thrift.PrependError("error reading field 9: ", err)
} else {
p.BinField = v
}
case 10:
if v, err := iprot.ReadBinary(); err != nil {
return thrift.PrependError("error reading field 10: ", err)
} else {
p.BinField2 = v
}
case 11:
if v, err := iprot.ReadBinary(); err != nil {
return thrift.PrependError("error reading field 11: ", err)
} else {
p.BinField3 = v
}
case 12:
if v, err := iprot.ReadBinary(); err != nil {
return thrift.PrependError("error reading field 12: ", err)
} else {
p.BinField4 = v
}
case 13:
_, size, err := iprot.ReadListBegin()
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
temp := make([]Int, 0, size)
p.List2 = &temp
for i := 0; i < size; i++ {
var elem1 Int
if v, err := iprot.ReadI32(); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
temp := Int(v)
elem1 = temp
}
*p.List2 = append(*p.List2, elem1)
}
if err := iprot.ReadListEnd(); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
case 14:
_, size, err := iprot.ReadListBegin()
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
p.List3 = make([]Int, 0, size)
for i := 0; i < size; i++ {
var elem2 Int
if v, err := iprot.ReadI32(); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
temp := Int(v)
elem2 = temp
}
p.List3 = append(p.List3, elem2)
}
if err := iprot.ReadListEnd(); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
case 15:
_, size, err := iprot.ReadListBegin()
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
p.List4 = make([]Int, 0, size)
for i := 0; i < size; i++ {
var elem3 Int
if v, err := iprot.ReadI32(); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
temp := Int(v)
elem3 = temp
}
p.List4 = append(p.List4, elem3)
}
if err := iprot.ReadListEnd(); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
case 16:
_, _, size, err := iprot.ReadMapBegin()
if err != nil {
return thrift.PrependError("error reading map begin: ", err)
}
temp := make(map[string]string, size)
p.AMap = &temp
for i := 0; i < size; i++ {
var elem4 string
if v, err := iprot.ReadString(); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
elem4 = v
}
var elem5 string
if v, err := iprot.ReadString(); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
elem5 = v
}
(*p.AMap)[elem4] = elem5
}
if err := iprot.ReadMapEnd(); err != nil {
return thrift.PrependError("error reading map end: ", err)
}
case 17:
if v, err := iprot.ReadI32(); err != nil {
return thrift.PrependError("error reading field 17: ", err)
} else {
temp := HealthCondition(v)
p.Status = temp
}
issetStatus = true
case 18:
if v, err := iprot.ReadI32(); err != nil {
return thrift.PrependError("error reading field 18: ", err)
} else {
temp := golang.BaseHealthCondition(v)
p.BaseStatus = temp
}
issetBaseStatus = true
default:
if err := iprot.Skip(fieldTypeId); err != nil {
return err
}
}
if err := iprot.ReadFieldEnd(); err != nil {
return err
}
}
if err := iprot.ReadStructEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
}
if !issetStatus {
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field 'Status' is not present in struct 'TestingDefaults'"))
}
if !issetBaseStatus {
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field 'BaseStatus' is not present in struct 'TestingDefaults'"))
}
return nil
}
func (p *TestingDefaults) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("TestingDefaults"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if p.IsSetID2() {
if err := frugal.WriteI64(oprot, int64(p.ID2), "ID2", 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::ID2:1 ", p), err)
}
}
if err := frugal.WriteStruct(oprot, p.Ev1, "ev1", 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::ev1:2 ", p), err)
}
if err := frugal.WriteStruct(oprot, p.Ev2, "ev2", 3); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::ev2:3 ", p), err)
}
if err := frugal.WriteI64(oprot, int64(p.ID), "ID", 4); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::ID:4 ", p), err)
}
if err := frugal.WriteString(oprot, p.Thing, "thing", 5); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::thing:5 ", p), err)
}
if p.IsSetThing2() {
if err := frugal.WriteString(oprot, p.Thing2, "thing2", 6); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::thing2:6 ", p), err)
}
}
if err := p.writeField7(oprot); err != nil {
return err
}
if err := frugal.WriteI64(oprot, int64(p.ID3), "ID3", 8); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::ID3:8 ", p), err)
}
if err := frugal.WriteBinary(oprot, p.BinField, "bin_field", 9); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::bin_field:9 ", p), err)
}
if p.IsSetBinField2() {
if err := frugal.WriteBinary(oprot, p.BinField2, "bin_field2", 10); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::bin_field2:10 ", p), err)
}
}
if err := frugal.WriteBinary(oprot, p.BinField3, "bin_field3", 11); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::bin_field3:11 ", p), err)
}
if p.IsSetBinField4() {
if err := frugal.WriteBinary(oprot, p.BinField4, "bin_field4", 12); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::bin_field4:12 ", p), err)
}
}
if err := p.writeField13(oprot); err != nil {
return err
}
if err := p.writeField14(oprot); err != nil {
return err
}
if err := p.writeField15(oprot); err != nil {
return err
}
if err := p.writeField16(oprot); err != nil {
return err
}
if err := frugal.WriteI32(oprot, int32(p.Status), "status", 17); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::status:17 ", p), err)
}
if err := frugal.WriteI32(oprot, int32(p.BaseStatus), "base_status", 18); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::base_status:18 ", p), err)
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
func (p *TestingDefaults) writeField7(oprot thrift.TProtocol) error {
if err := oprot.WriteFieldBegin("listfield", thrift.LIST, 7); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:listfield: ", p), err)
}
if err := oprot.WriteListBegin(thrift.I32, len(p.Listfield)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range p.Listfield {
if err := oprot.WriteI32(int32(v)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 7:listfield: ", p), err)
}
return nil
}
func (p *TestingDefaults) writeField13(oprot thrift.TProtocol) error {
if p.IsSetList2() {
if err := oprot.WriteFieldBegin("list2", thrift.LIST, 13); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:list2: ", p), err)
}
if err := oprot.WriteListBegin(thrift.I32, len(*p.List2)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range *p.List2 {
if err := oprot.WriteI32(int32(v)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 13:list2: ", p), err)
}
}
return nil
}
func (p *TestingDefaults) writeField14(oprot thrift.TProtocol) error {
if p.IsSetList3() {
if err := oprot.WriteFieldBegin("list3", thrift.LIST, 14); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 14:list3: ", p), err)
}
if err := oprot.WriteListBegin(thrift.I32, len(p.List3)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range p.List3 {
if err := oprot.WriteI32(int32(v)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 14:list3: ", p), err)
}
}
return nil
}
func (p *TestingDefaults) writeField15(oprot thrift.TProtocol) error {
if err := oprot.WriteFieldBegin("list4", thrift.LIST, 15); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 15:list4: ", p), err)
}
if err := oprot.WriteListBegin(thrift.I32, len(p.List4)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range p.List4 {
if err := oprot.WriteI32(int32(v)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 15:list4: ", p), err)
}
return nil
}
func (p *TestingDefaults) writeField16(oprot thrift.TProtocol) error {
if p.IsSetAMap() {
if err := oprot.WriteFieldBegin("a_map", thrift.MAP, 16); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 16:a_map: ", p), err)
}
if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(*p.AMap)); err != nil {
return thrift.PrependError("error writing map begin: ", err)
}
for k, v := range *p.AMap {
if err := oprot.WriteString(string(k)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
if err := oprot.WriteString(string(v)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
}
if err := oprot.WriteMapEnd(); err != nil {
return thrift.PrependError("error writing map end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 16:a_map: ", p), err)
}
}
return nil
}
func (p *TestingDefaults) String() string {
if p == nil {
return "<nil>"
}
return fmt.Sprintf("TestingDefaults(%+v)", *p)
}
type EventWrapper struct {
ID *ID
Ev *Event
Events []*Event
Events2 map[*Event]bool
EventMap map[ID]*Event
Nums [][]Int
Enums []ItsAnEnum
ABoolField bool
AUnion *TestingUnions
TypedefOfTypedef T2String
// This is a docstring comment for a deprecated field that has been spread
// across two lines.
// Deprecated: use something else
Depr bool
// Deprecated: use something else
DeprBinary []byte
// Deprecated: use something else
DeprList []bool
EventsDefault *[]*Event
EventMapDefault *map[ID]*Event
EventSetDefault *map[*Event]bool
}
func NewEventWrapper() *EventWrapper |
var EventWrapper_ID_DEFAULT ID
func (p *EventWrapper) IsSetID() bool {
return p.ID != nil
}
func (p *EventWrapper) GetID() ID {
if !p.IsSetID() {
return EventWrapper_ID_DEFAULT
}
return *p.ID
}
var EventWrapper_Ev_DEFAULT *Event
func (p *EventWrapper) IsSetEv() bool {
return p.Ev != nil
}
func (p *EventWrapper) GetEv() *Event {
if !p.IsSetEv() {
return EventWrapper_Ev_DEFAULT
}
return p.Ev
}
func (p *EventWrapper) GetEvents() []*Event {
return p.Events
}
func (p *EventWrapper) GetEvents2() map[*Event]bool {
return p.Events2
}
func (p *EventWrapper) GetEventMap() map[ID]*Event {
return p.EventMap
}
func (p *EventWrapper) GetNums() [][]Int {
return p.Nums
}
func (p *EventWrapper) GetEnums() []ItsAnEnum {
return p.Enums
}
func (p *EventWrapper) GetABoolField() bool {
return p.ABoolField
}
var EventWrapper_AUnion_DEFAULT *TestingUnions
func (p *EventWrapper) IsSetAUnion() bool {
return p.AUnion != nil
}
func (p *EventWrapper) GetAUnion() *TestingUnions {
if !p.IsSetAUnion() {
return EventWrapper_AUnion_DEFAULT
}
return p.AUnion
}
func (p *EventWrapper) GetTypedefOfTypedef() T2String {
return p.TypedefOfTypedef
}
func (p *EventWrapper) GetDepr() bool {
return p.Depr
}
func (p *EventWrapper) GetDeprBinary() []byte {
return p.DeprBinary
}
func (p *EventWrapper) GetDeprList() []bool {
return p.DeprList
}
var EventWrapper_EventsDefault_DEFAULT []*Event = []*Event{}
func (p *EventWrapper) IsSetEventsDefault() bool {
return p.EventsDefault != nil
}
func (p *EventWrapper) GetEventsDefault() []*Event {
if !p.IsSetEventsDefault() {
return EventWrapper_EventsDefault_DEFAULT
}
return *p.EventsDefault
}
var EventWrapper_EventMapDefault_DEFAULT map[ID]*Event = map[ID]*Event{}
func (p *EventWrapper) IsSetEventMapDefault() bool {
return p.EventMapDefault != nil
}
func (p *EventWrapper) GetEventMapDefault() map[ID]*Event {
if !p.IsSetEventMapDefault() {
return EventWrapper_EventMapDefault_DEFAULT
}
return *p.EventMapDefault
}
var EventWrapper_EventSetDefault_DEFAULT map[*Event]bool = map[*Event]bool{}
func (p *EventWrapper) IsSetEventSetDefault() bool {
return p.EventSetDefault != nil
}
func (p *EventWrapper) GetEventSetDefault() map[*Event]bool {
if !p.IsSetEventSetDefault() {
return EventWrapper_EventSetDefault_DEFAULT
}
return *p.EventSetDefault
}
func (p *EventWrapper) Read(iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
issetEv := false
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
if err != nil {
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
}
if fieldTypeId == thrift.STOP {
break
}
switch fieldId {
case 1:
if v, err := iprot.ReadI64(); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
temp := ID(v)
p.ID = &temp
}
case 2:
p.Ev = NewEvent()
if err := p.Ev.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ev), err)
}
issetEv = true
case 3:
_, size, err := iprot.ReadListBegin()
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
p.Events = make([]*Event, 0, size)
for i := 0; i < size; i++ {
elem6 := NewEvent()
if err := elem6.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", elem6), err)
}
p.Events = append(p.Events, elem6)
}
if err := iprot.ReadListEnd(); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
case 4:
_, size, err := iprot.ReadSetBegin()
if err != nil {
return thrift.PrependError("error reading set begin: ", err)
}
p.Events2 = make(map[*Event]bool, size)
for i := 0; i < size; i++ {
elem7 := NewEvent()
if err := elem7.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", elem7), err)
}
(p.Events2)[elem7] = true
}
if err := iprot.ReadSetEnd(); err != nil {
return thrift.PrependError("error reading set end: ", err)
}
case 5:
_, _, size, err := iprot.ReadMapBegin()
if err != nil {
return thrift.PrependError("error reading map begin: ", err)
}
p.EventMap = make(map[ID]*Event, size)
for i := 0; i < size; i++ {
var elem8 ID
if v, err := iprot.ReadI64(); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
temp := ID(v)
elem8 = temp
}
elem9 := NewEvent()
if err := elem9.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", elem9), err)
}
(p.EventMap)[elem8] = elem9
}
if err := iprot.ReadMapEnd(); err != nil {
return thrift.PrependError("error reading map end: ", err)
}
case 6:
_, size, err := iprot.ReadListBegin()
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
p.Nums = make([][]Int, 0, size)
for i := 0; i < size; i++ {
_, size, err := iprot.ReadListBegin()
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
elem10 := make([]Int, 0, size)
for i := 0; i < size; i++ {
var elem11 Int
if v, err := iprot.ReadI32(); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
temp := Int(v)
elem11 = temp
}
elem10 = append(elem10, elem11)
}
if err := iprot.ReadListEnd(); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
p.Nums = append(p.Nums, elem10)
}
if err := iprot.ReadListEnd(); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
case 7:
_, size, err := iprot.ReadListBegin()
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
p.Enums = make([]ItsAnEnum, 0, size)
for i := 0; i < size; i++ {
var elem12 ItsAnEnum
if v, err := iprot.ReadI32(); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
temp := ItsAnEnum(v)
elem12 = temp
}
p.Enums = append(p.Enums, elem12)
}
if err := iprot.ReadListEnd(); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
case 8:
if v, err := iprot.ReadBool(); err != nil {
return thrift.PrependError("error reading field 8: ", err)
} else {
p.ABoolField = v
}
case 9:
p.AUnion = NewTestingUnions()
if err := p.AUnion.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.AUnion), err)
}
case 10:
if v, err := iprot.ReadString(); err != nil {
return thrift.PrependError("error reading field 10: ", err)
} else {
temp := T2String(v)
p.TypedefOfTypedef = temp
}
case 11:
if v, err := iprot.ReadBool(); err != nil {
return thrift.PrependError("error reading field 11: ", err)
} else {
p.Depr = v
}
case 12:
if v, err := iprot.ReadBinary(); err != nil {
return thrift.PrependError("error reading field 12: ", err)
} else {
p.DeprBinary = v
}
case 13:
_, size, err := iprot.ReadListBegin()
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
p.DeprList = make([]bool, 0, size)
for i := 0; i < size; i++ {
var elem13 bool
if v, err := iprot.ReadBool(); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
elem13 = v
}
p.DeprList = append(p.DeprList, elem13)
}
if err := iprot.ReadListEnd(); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
case 14:
_, size, err := iprot.ReadListBegin()
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
temp := make([]*Event, 0, size)
p.EventsDefault = &temp
for i := 0; i < size; i++ {
elem14 := NewEvent()
if err := elem14.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", elem14), err)
}
*p.EventsDefault = append(*p.EventsDefault, elem14)
}
if err := iprot.ReadListEnd(); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
case 15:
_, _, size, err := iprot.ReadMapBegin()
if err != nil {
return thrift.PrependError("error reading map begin: ", err)
}
temp := make(map[ID]*Event, size)
p.EventMapDefault = &temp
for i := 0; i < size; i++ {
var elem15 ID
if v, err := iprot.ReadI64(); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
temp := ID(v)
elem15 = temp
}
elem16 := NewEvent()
if err := elem16.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", elem16), err)
}
(*p.EventMapDefault)[elem15] = elem16
}
if err := iprot.ReadMapEnd(); err != nil {
return thrift.PrependError("error reading map end: ", err)
}
case 16:
_, size, err := iprot.ReadSetBegin()
if err != nil {
return thrift.PrependError("error reading set begin: ", err)
}
temp := make(map[*Event]bool, size)
p.EventSetDefault = &temp
for i := 0; i < size; i++ {
elem17 := NewEvent()
if err := elem17.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", elem17), err)
}
(*p.EventSetDefault)[elem17] = true
}
if err := iprot.ReadSetEnd(); err != nil {
return thrift.PrependError("error reading set end: ", err)
}
default:
if err := iprot.Skip(fieldTypeId); err != nil {
return err
}
}
if err := iprot.ReadFieldEnd(); err != nil {
return err
}
}
if err := iprot.ReadStructEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
}
if !issetEv {
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field 'Ev' is not present in struct 'EventWrapper'"))
}
return nil
}
func (p *EventWrapper) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("EventWrapper"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if p.IsSetID() {
if err := frugal.WriteI64(oprot, int64(*p.ID), "ID", 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::ID:1 ", p), err)
}
}
if err := frugal.WriteStruct(oprot, p.Ev, "Ev", 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::Ev:2 ", p), err)
}
if err := p.writeField3(oprot); err != nil {
return err
}
if err := p.writeField4(oprot); err != nil {
return err
}
if err := p.writeField5(oprot); err != nil {
return err
}
if err := p.writeField6(oprot); err != nil {
return err
}
if err := p.writeField7(oprot); err != nil {
return err
}
if err := frugal.WriteBool(oprot, p.ABoolField, "aBoolField", 8); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::aBoolField:8 ", p), err)
}
if err := frugal.WriteStruct(oprot, p.AUnion, "a_union", 9); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::a_union:9 ", p), err)
}
if err := frugal.WriteString(oprot, string(p.TypedefOfTypedef), "typedefOfTypedef", 10); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::typedefOfTypedef:10 ", p), err)
}
if err := frugal.WriteBool(oprot, p.Depr, "depr", 11); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::depr:11 ", p), err)
}
if err := frugal.WriteBinary(oprot, p.DeprBinary, "deprBinary", 12); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::deprBinary:12 ", p), err)
}
if err := p.writeField13(oprot); err != nil {
return err
}
if err := p.writeField14(oprot); err != nil {
return err
}
if err := p.writeField15(oprot); err != nil {
return err
}
if err := p.writeField16(oprot); err != nil {
return err
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
func (p *EventWrapper) writeField3(oprot thrift.TProtocol) error {
if err := oprot.WriteFieldBegin("Events", thrift.LIST, 3); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:Events: ", p), err)
}
if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Events)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range p.Events {
if err := v.Write(oprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 3:Events: ", p), err)
}
return nil
}
func (p *EventWrapper) writeField4(oprot thrift.TProtocol) error {
if err := oprot.WriteFieldBegin("Events2", thrift.SET, 4); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:Events2: ", p), err)
}
if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Events2)); err != nil {
return thrift.PrependError("error writing set begin: ", err)
}
for v, _ := range p.Events2 {
if err := v.Write(oprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
}
}
if err := oprot.WriteSetEnd(); err != nil {
return thrift.PrependError("error writing set end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 4:Events2: ", p), err)
}
return nil
}
func (p *EventWrapper) writeField5(oprot thrift.TProtocol) error {
if err := oprot.WriteFieldBegin("EventMap", thrift.MAP, 5); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:EventMap: ", p), err)
}
if err := oprot.WriteMapBegin(thrift.I64, thrift.STRUCT, len(p.EventMap)); err != nil {
return thrift.PrependError("error writing map begin: ", err)
}
for k, v := range p.EventMap {
if err := oprot.WriteI64(int64(k)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
if err := v.Write(oprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
}
}
if err := oprot.WriteMapEnd(); err != nil {
return thrift.PrependError("error writing map end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 5:EventMap: ", p), err)
}
return nil
}
func (p *EventWrapper) writeField6(oprot thrift.TProtocol) error {
if err := oprot.WriteFieldBegin("Nums", thrift.LIST, 6); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:Nums: ", p), err)
}
if err := oprot.WriteListBegin(thrift.LIST, len(p.Nums)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range p.Nums {
if err := oprot.WriteListBegin(thrift.I32, len(v)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range v {
if err := oprot.WriteI32(int32(v)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 6:Nums: ", p), err)
}
return nil
}
func (p *EventWrapper) writeField7(oprot thrift.TProtocol) error {
if err := oprot.WriteFieldBegin("Enums", thrift.LIST, 7); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:Enums: ", p), err)
}
if err := oprot.WriteListBegin(thrift.I32, len(p.Enums)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range p.Enums {
if err := oprot.WriteI32(int32(v)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 7:Enums: ", p), err)
}
return nil
}
func (p *EventWrapper) writeField13(oprot thrift.TProtocol) error {
if err := oprot.WriteFieldBegin("deprList", thrift.LIST, 13); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:deprList: ", p), err)
}
if err := oprot.WriteListBegin(thrift.BOOL, len(p.DeprList)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range p.DeprList {
if err := oprot.WriteBool(bool(v)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 13:deprList: ", p), err)
}
return nil
}
func (p *EventWrapper) writeField14(oprot thrift.TProtocol) error {
if p.IsSetEventsDefault() {
if err := oprot.WriteFieldBegin("EventsDefault", thrift.LIST, 14); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 14:EventsDefault: ", p), err)
}
if err := oprot.WriteListBegin(thrift.STRUCT, len(*p.EventsDefault)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range *p.EventsDefault {
if err := v.Write(oprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 14:EventsDefault: ", p), err)
}
}
return nil
}
func (p *EventWrapper) writeField15(oprot thrift.TProtocol) error {
if p.IsSetEventMapDefault() {
if err := oprot.WriteFieldBegin("EventMapDefault", thrift.MAP, 15); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 15:EventMapDefault: ", p), err)
}
if err := oprot.WriteMapBegin(thrift.I64, thrift.STRUCT, len(*p.EventMapDefault)); err != nil {
return thrift.PrependError("error writing map begin: ", err)
}
for k, v := range *p.EventMapDefault {
if err := oprot.WriteI64(int64(k)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
if err := v.Write(oprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
}
}
if err := oprot.WriteMapEnd(); err != nil {
return thrift.PrependError("error writing map end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 15:EventMapDefault: ", p), err)
}
}
return nil
}
func (p *EventWrapper) writeField16(oprot thrift.TProtocol) error {
if p.IsSetEventSetDefault() {
if err := oprot.WriteFieldBegin("EventSetDefault", thrift.SET, 16); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 16:EventSetDefault: ", p), err)
}
if err := oprot.WriteSetBegin(thrift.STRUCT, len(*p.EventSetDefault)); err != nil {
return thrift.PrependError("error writing set begin: ", err)
}
for v, _ := range *p.EventSetDefault {
if err := v.Write(oprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
}
}
if err := oprot.WriteSetEnd(); err != nil {
return thrift.PrependError("error writing set end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 16:EventSetDefault: ", p), err)
}
}
return nil
}
func (p *EventWrapper) String() string {
if p == nil {
return "<nil>"
}
return fmt.Sprintf("EventWrapper(%+v)", *p)
}
type FooArgs_ struct {
NewMessage_ string
MessageArgs_ string
MessageResult_ string
}
func NewFooArgs_() *FooArgs_ {
return &FooArgs_{}
}
func (p *FooArgs_) GetNewMessage_() string {
return p.NewMessage_
}
func (p *FooArgs_) GetMessageArgs_() string {
return p.MessageArgs_
}
func (p *FooArgs_) GetMessageResult_() string {
return p.MessageResult_
}
func (p *FooArgs_) Read(iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
if err != nil {
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
}
if fieldTypeId == thrift.STOP {
break
}
switch fieldId {
case 1:
if v, err := iprot.ReadString(); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
p.NewMessage_ = v
}
case 2:
if v, err := iprot.ReadString(); err != nil {
return thrift.PrependError("error reading field 2: ", err)
} else {
p.MessageArgs_ = v
}
case 3:
if v, err := iprot.ReadString(); err != nil {
return thrift.PrependError("error reading field 3: ", err)
} else {
p.MessageResult_ = v
}
default:
if err := iprot.Skip(fieldTypeId); err != nil {
return err
}
}
if err := iprot.ReadFieldEnd(); err != nil {
return err
}
}
if err := iprot.ReadStructEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
}
return nil
}
func (p *FooArgs_) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("FooArgs"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := frugal.WriteString(oprot, p.NewMessage_, "newMessage", 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::newMessage:1 ", p), err)
}
if err := frugal.WriteString(oprot, p.MessageArgs_, "messageArgs", 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::messageArgs:2 ", p), err)
}
if err := frugal.WriteString(oprot, p.MessageResult_, "messageResult", 3); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::messageResult:3 ", p), err)
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
func (p *FooArgs_) String() string {
if p == nil {
return "<nil>"
}
return fmt.Sprintf("FooArgs_(%+v)", *p)
}
type TestingUnions struct {
AnID *ID
AString *string
Someotherthing *Int
AnInt16 *int16
Requests Request
BinFieldInUnion []byte
// Deprecated: use something else
Depr *bool
}
func NewTestingUnions() *TestingUnions {
return &TestingUnions{}
}
var TestingUnions_AnID_DEFAULT ID
func (p *TestingUnions) IsSetAnID() bool {
return p.AnID != nil
}
func (p *TestingUnions) GetAnID() ID {
if !p.IsSetAnID() {
return TestingUnions_AnID_DEFAULT
}
return *p.AnID
}
var TestingUnions_AString_DEFAULT string
func (p *TestingUnions) IsSetAString() bool {
return p.AString != nil
}
func (p *TestingUnions) GetAString() string {
if !p.IsSetAString() {
return TestingUnions_AString_DEFAULT
}
return *p.AString
}
var TestingUnions_Someotherthing_DEFAULT Int
func (p *TestingUnions) IsSetSomeotherthing() bool {
return p.Someotherthing != nil
}
func (p *TestingUnions) GetSomeotherthing() Int {
if !p.IsSetSomeotherthing() {
return TestingUnions_Someotherthing_DEFAULT
}
return *p.Someotherthing
}
var TestingUnions_AnInt16_DEFAULT int16
func (p *TestingUnions) IsSetAnInt16() bool {
return p.AnInt16 != nil
}
func (p *TestingUnions) GetAnInt16() int16 {
if !p.IsSetAnInt16() {
return TestingUnions_AnInt16_DEFAULT
}
return *p.AnInt16
}
var TestingUnions_Requests_DEFAULT Request
func (p *TestingUnions) IsSetRequests() bool {
return p.Requests != nil
}
func (p *TestingUnions) GetRequests() Request {
return p.Requests
}
var TestingUnions_BinFieldInUnion_DEFAULT []byte
func (p *TestingUnions) IsSetBinFieldInUnion() bool {
return p.BinFieldInUnion != nil
}
func (p *TestingUnions) GetBinFieldInUnion() []byte {
return p.BinFieldInUnion
}
var TestingUnions_Depr_DEFAULT bool
func (p *TestingUnions) IsSetDepr() bool {
return p.Depr != nil
}
func (p *TestingUnions) GetDepr() bool {
if !p.IsSetDepr() {
return TestingUnions_Depr_DEFAULT
}
return *p.Depr
}
func (p *TestingUnions) CountSetFieldsTestingUnions() int {
count := 0
if p.IsSetAnID() {
count++
}
if p.IsSetAString() {
count++
}
if p.IsSetSomeotherthing() {
count++
}
if p.IsSetAnInt16() {
count++
}
if p.IsSetRequests() {
count++
}
if p.IsSetBinFieldInUnion() {
count++
}
if p.IsSetDepr() {
count++
}
return count
}
func (p *TestingUnions) Read(iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
if err != nil {
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
}
if fieldTypeId == thrift.STOP {
break
}
switch fieldId {
case 1:
if v, err := iprot.ReadI64(); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
temp := ID(v)
p.AnID = &temp
}
case 2:
if v, err := iprot.ReadString(); err != nil {
return thrift.PrependError("error reading field 2: ", err)
} else {
p.AString = &v
}
case 3:
if v, err := iprot.ReadI32(); err != nil {
return thrift.PrependError("error reading field 3: ", err)
} else {
temp := Int(v)
p.Someotherthing = &temp
}
case 4:
if v, err := iprot.ReadI16(); err != nil {
return thrift.PrependError("error reading field 4: ", err)
} else {
p.AnInt16 = &v
}
case 5:
_, _, size, err := iprot.ReadMapBegin()
if err != nil {
return thrift.PrependError("error reading map begin: ", err)
}
p.Requests = make(Request, size)
for i := 0; i < size; i++ {
var elem18 Int
if v, err := iprot.ReadI32(); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
temp := Int(v)
elem18 = temp
}
var elem19 string
if v, err := iprot.ReadString(); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
elem19 = v
}
(p.Requests)[elem18] = elem19
}
if err := iprot.ReadMapEnd(); err != nil {
return thrift.PrependError("error reading map end: ", err)
}
case 6:
if v, err := iprot.ReadBinary(); err != nil {
return thrift.PrependError("error reading field 6: ", err)
} else {
p.BinFieldInUnion = v
}
case 7:
if v, err := iprot.ReadBool(); err != nil {
return thrift.PrependError("error reading field 7: ", err)
} else {
p.Depr = &v
}
default:
if err := iprot.Skip(fieldTypeId); err != nil {
return err
}
}
if err := iprot.ReadFieldEnd(); err != nil {
return err
}
}
if err := iprot.ReadStructEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
}
if c := p.CountSetFieldsTestingUnions(); c != 1 {
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("%T read union: exactly one field must be set (%d set).", p, c))
}
return nil
}
func (p *TestingUnions) Write(oprot thrift.TProtocol) error {
if c := p.CountSetFieldsTestingUnions(); c != 1 {
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("%T write union: exactly one field must be set (%d set).", p, c))
}
if err := oprot.WriteStructBegin("TestingUnions"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if p.IsSetAnID() {
if err := frugal.WriteI64(oprot, int64(*p.AnID), "AnID", 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::AnID:1 ", p), err)
}
}
if p.IsSetAString() {
if err := frugal.WriteString(oprot, *p.AString, "aString", 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::aString:2 ", p), err)
}
}
if p.IsSetSomeotherthing() {
if err := frugal.WriteI32(oprot, int32(*p.Someotherthing), "someotherthing", 3); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::someotherthing:3 ", p), err)
}
}
if p.IsSetAnInt16() {
if err := frugal.WriteI16(oprot, *p.AnInt16, "AnInt16", 4); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::AnInt16:4 ", p), err)
}
}
if err := p.writeField5(oprot); err != nil {
return err
}
if p.IsSetBinFieldInUnion() {
if err := frugal.WriteBinary(oprot, p.BinFieldInUnion, "bin_field_in_union", 6); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::bin_field_in_union:6 ", p), err)
}
}
if p.IsSetDepr() {
if err := frugal.WriteBool(oprot, *p.Depr, "depr", 7); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::depr:7 ", p), err)
}
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
func (p *TestingUnions) writeField5(oprot thrift.TProtocol) error {
if p.IsSetRequests() {
if err := oprot.WriteFieldBegin("Requests", thrift.MAP, 5); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:Requests: ", p), err)
}
if err := oprot.WriteMapBegin(thrift.I32, thrift.STRING, len(p.Requests)); err != nil {
return thrift.PrependError("error writing map begin: ", err)
}
for k, v := range p.Requests {
if err := oprot.WriteI32(int32(k)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
if err := oprot.WriteString(string(v)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
}
if err := oprot.WriteMapEnd(); err != nil {
return thrift.PrependError("error writing map end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 5:Requests: ", p), err)
}
}
return nil
}
func (p *TestingUnions) String() string {
if p == nil {
return "<nil>"
}
return fmt.Sprintf("TestingUnions(%+v)", *p)
}
type AwesomeException struct {
// ID is a unique identifier for an awesome exception.
ID ID
// Reason contains the error message.
Reason string
// Deprecated: use something else
Depr bool
}
func NewAwesomeException() *AwesomeException {
return &AwesomeException{}
}
func (p *AwesomeException) GetID() ID {
return p.ID
}
func (p *AwesomeException) GetReason() string {
return p.Reason
}
func (p *AwesomeException) GetDepr() bool {
return p.Depr
}
func (p *AwesomeException) Read(iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
if err != nil {
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
}
if fieldTypeId == thrift.STOP {
break
}
switch fieldId {
case 1:
if v, err := iprot.ReadI64(); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
temp := ID(v)
p.ID = temp
}
case 2:
if v, err := iprot.ReadString(); err != nil {
return thrift.PrependError("error reading field 2: ", err)
} else {
p.Reason = v
}
case 3:
if v, err := iprot.ReadBool(); err != nil {
return thrift.PrependError("error reading field 3: ", err)
} else {
p.Depr = v
}
default:
if err := iprot.Skip(fieldTypeId); err != nil {
return err
}
}
if err := iprot.ReadFieldEnd(); err != nil {
return err
}
}
if err := iprot.ReadStructEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
}
return nil
}
func (p *AwesomeException) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("AwesomeException"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := frugal.WriteI64(oprot, int64(p.ID), "ID", 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::ID:1 ", p), err)
}
if err := frugal.WriteString(oprot, p.Reason, "Reason", 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::Reason:2 ", p), err)
}
if err := frugal.WriteBool(oprot, p.Depr, "depr", 3); err != nil {
return thrift.PrependError(fmt.Sprintf("%T::depr:3 ", p), err)
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
func (p *AwesomeException) String() string {
if p == nil {
return "<nil>"
}
return fmt.Sprintf("AwesomeException(%+v)", *p)
}
func (p *AwesomeException) Error() string {
return p.String()
}
| {
return &EventWrapper{}
} |
p1.rs | use file_reader;
const INPUT_FILENAME: &str = "input.txt";
fn | () {
let input_str = match file_reader::file_to_vec(INPUT_FILENAME) {
Err(_) => {
println!("Couldn't turn file into vec!");
return;
},
Ok(v) => v,
};
let mut input_str_f: Vec<String> = Vec::new();
let mut input_idx = 0;
for line in input_str.into_iter() {
if input_str_f.len() == input_idx {
input_str_f.push(line);
} else if line == "" {
input_idx += 1;
} else {
input_str_f[input_idx].push_str(&line);
}
}
let input: Vec<Vec<char>> =
input_str_f.into_iter().map(process_input).collect();
let result = input.into_iter().fold(0, |acc, x| acc + x.len());
println!("{:?}", result);
}
fn process_input(input: String) -> Vec<char> {
let mut input_vec: Vec<char> = input.chars().collect();
input_vec.sort();
input_vec.dedup();
input_vec
}
| main |
server.js | const express = require('express');
const morgan = require('morgan');
const fs = require('fs');
const historyApiFallback = require('connect-history-api-fallback');
const mongoose = require('mongoose');
const path = require('path');
const webpack = require('webpack');
const webpackDevMiddleware = require('webpack-dev-middleware');
const webpackHotMiddleware = require('webpack-hot-middleware');
const config = require('../config/config');
const webpackConfig = require('../webpack.config');
const isDev = process.env.NODE_ENV !== 'production';
const port = process.env.PORT || 8080;
// Configuration
// ================================================================================================
// Set up Mongoose
mongoose.connect(isDev ? config.db_dev : config.db);
mongoose.Promise = global.Promise;
const app = express();
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
app.use(morgan('dev'));
// API routes
require('./routes')(app);
if (isDev) {
const compiler = webpack(webpackConfig);
app.use(historyApiFallback({
verbose: false
}));
app.use(webpackDevMiddleware(compiler, {
publicPath: webpackConfig.output.publicPath,
contentBase: path.resolve(__dirname, '../client/public'),
stats: {
colors: true,
hash: false,
timings: true,
chunks: false,
chunkModules: false,
modules: false
}
}));
app.use(webpackHotMiddleware(compiler));
app.use(express.static(path.resolve(__dirname, '../dist')));
} else {
app.use(express.static(path.resolve(__dirname, '../dist')));
app.get('*', function (req, res) {
res.sendFile(path.resolve(__dirname, '../dist/index.html'));
res.end();
});
}
var cors = require('cors');
app.use(cors()) | })
app.listen(port, '0.0.0.0', (err) => {
//app.listen(port, 'localhost', (err) => {
if (err) {
console.log(err);
}
console.info('>>> 🌎 Open localhost:%s/ in your browser.', port);
});
module.exports = app; |
app.get('/products/:id', function (req, res, next) {
res.json({msg: 'This is CORS-enabled for all origins!'}) |
test_command_input.py | import os
import pytest
def test_wrong_select_db_index(cli):
cli.sendline("select 1")
cli.expect(["OK", "127.0.0.1"])
cli.sendline("select 128")
cli.expect(["DB index is out of range", "127.0.0.1:6379[1]>"])
if int(os.environ["REDIS_VERSION"]) > 5:
text = "value is not an integer or out of range"
else:
text = "invalid DB index"
cli.sendline("select abc")
cli.expect([text, "127.0.0.1:6379[1]>"])
cli.sendline("select 15")
cli.expect("OK")
def test_set_command_with_shash(clean_redis, cli):
cli.sendline("set a \\hello\\") # legal redis command
cli.expect("OK")
cli.sendline("get a")
cli.expect(r"hello")
def test_enter_key_binding(clean_redis, cli):
cli.send("set")
cli.expect("set")
cli.send("\033[B") # down
cli.sendline() # enter
cli.sendline(" a 'hello'")
cli.expect("OK")
cli.sendline("get a")
cli.expect(r"hello")
@pytest.mark.skipif("int(os.environ['REDIS_VERSION']) < 6")
def test_auth_hidden_password_with_username(clean_redis, cli):
cli.send("auth default hello-world")
cli.expect("default")
cli.expect(r"\*{11}")
@pytest.mark.skipif("int(os.environ['REDIS_VERSION']) > 5")
def test_auth_hidden_password(clean_redis, cli):
|
def test_hello_command_is_not_supported(cli):
cli.sendline("hello 3")
cli.expect("IRedis currently not support RESP3")
def test_abort_reading_connection(cli):
cli.sendline("blpop mylist 30")
cli.send(chr(3))
cli.expect(
r"KeyboardInterrupt received! User canceled reading response!", timeout=10
)
cli.sendline("set foo bar")
cli.expect("OK")
cli.sendline("get foo")
cli.expect("bar")
| cli.send("auth hello-world")
cli.expect("auth")
cli.expect(r"\*{11}") |
disk_errors_test.go | // Copyright 2021 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package hardware
import (
"strings"
"testing"
"github.com/google/go-cmp/cmp"
)
func TestDiskErrorLines(t *testing.T) {
splitLines := func(text string) []string {
return strings.Split(text, "\n")
}
for _, tc := range []struct {
name string
lines []string | {
name: "ATA errors",
lines: splitLines(`[ 49.135097] ata1.00: exception Emask 0x0 SAct 0x10000000 SErr 0x0 action 0x6 frozen
[ 49.135112] ata1.00: failed command: READ FPDMA QUEUED
[ 49.135126] ata1.00: cmd 60/40:e0:f0:f1:b5/00:00:00:00:00/40 tag 28 ncq dma 32768 in
[ 49.135126] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 49.135133] ata1.00: status: { DRDY }
[ 49.135142] ata1: hard resetting link
[ 49.445043] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 49.448140] ata1.00: configured for UDMA/133
[ 49.448173] ata1.00: device reported invalid CHS sector 0
[ 49.448196] ata1: EH complete`),
want: splitLines(`[ 49.135097] ata1.00: exception Emask 0x0 SAct 0x10000000 SErr 0x0 action 0x6 frozen
[ 49.135142] ata1: hard resetting link`),
},
{
name: "SCSI errors",
lines: splitLines(`[ 241.378165] sd 0:0:0:0: [sda] 30031872 512-byte logical blocks: (15.4 GB/14.3 GiB)
[ 241.378905] sd 0:0:0:0: [sda] Write Protect is off
[ 241.378910] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 241.379429] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 241.414705] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 241.614066] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 241.614076] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 05 d0 80 00 00 08 00
[ 241.614080] print_req_error: I/O error, dev sda, sector 381056
[ 241.654058] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 241.654068] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 01 50 48 00 00 30 00`),
want: splitLines(`[ 241.614066] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 241.654058] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK`),
},
// Block device errors should be ignored because some of them are
// produced for loopback devices, in which case errors are harmless.
{
name: "Block device errors (blk_update_request)",
lines: splitLines(`[ 16.076930] blk_update_request: I/O error, dev loop9, sector 0
[ 16.076941] blk_update_request: I/O error, dev loop9, sector 0`),
want: nil,
},
{
name: "Block device errors (print_req_error)",
lines: splitLines(`[ 112.866869] print_req_error: I/O error, dev loop9, sector 0
[ 112.866888] print_req_error: I/O error, dev loop9, sector 0
[ 112.866893] Buffer I/O error on dev loop9, logical block 0, async page read`),
want: nil,
},
} {
got := diskErrorLines(tc.lines)
if diff := cmp.Diff(got, tc.want); diff != "" {
t.Errorf("%s: mismatch (-got +want):\n%s", tc.name, diff)
}
}
} | want []string
}{ |
v1_rolling_update_stateful_set_strategy.py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.14.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class V1RollingUpdateStatefulSetStrategy(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'partition': 'int'
}
attribute_map = {
'partition': 'partition'
}
def __init__(self, partition=None):
"""
V1RollingUpdateStatefulSetStrategy - a model defined in Swagger
"""
self._partition = None
self.discriminator = None
if partition is not None:
self.partition = partition
@property
def partition(self):
"""
Gets the partition of this V1RollingUpdateStatefulSetStrategy.
Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.
:return: The partition of this V1RollingUpdateStatefulSetStrategy.
:rtype: int
"""
return self._partition
@partition.setter
def partition(self, partition):
"""
Sets the partition of this V1RollingUpdateStatefulSetStrategy.
Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.
:param partition: The partition of this V1RollingUpdateStatefulSetStrategy.
:type: int
"""
self._partition = partition
def to_dict(self):
"""
Returns the model properties as a dict
"""
result = {}
for attr, _ in iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""
Returns the string representation of the model
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()
def __eq__(self, other):
"""
Returns true if both objects are equal
"""
if not isinstance(other, V1RollingUpdateStatefulSetStrategy):
return False
return self.__dict__ == other.__dict__
| def __ne__(self, other):
"""
Returns true if both objects are not equal
"""
return not self == other | |
test_request_history.py | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from test.base import BaseTest
from activitystreams import parse as as_parser
from dino.validation import request
class RequestHistoryTest(BaseTest):
def setUp(self):
super(RequestHistoryTest, self).setUp()
self.create_channel_and_room()
def test_history(self):
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_no_target_id(self):
act = self.activity_for_history(skip={'target_id'})
response_data = request.on_history(as_parser(act))
self.assertEqual(False, response_data[0])
def test_history_not_allowed_not_owner_not_in_room_age(self):
self.leave_room()
self.remove_owner()
self.remove_owner_channel()
self.set_acl_single('history|age', str(int(BaseTest.AGE) + 10) + ':')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(False, response_data[0])
def test_history_not_allowed_not_owner_in_room(self):
self.join_room()
self.remove_owner()
self.remove_owner_channel()
self.set_acl_single('history|age', str(int(BaseTest.AGE) + 10) + ':')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(False, response_data[0])
def test_history_allowed_owner_not_in_room(self):
self.leave_room()
self.set_owner()
self.set_acl_single('history|sameroom', '')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_not_allowed_not_owner_not_in_room_sameroom(self):
self.leave_room()
self.remove_owner()
self.remove_owner_channel()
self.set_acl_single('history|sameroom', '')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(False, response_data[0])
def test_history_not_allowed_owner_in_room(self):
self.join_room()
self.set_owner()
self.set_acl_single('history|age', str(int(BaseTest.AGE) + 10) + ':')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_allowed_not_owner_not_in_room(self):
self.leave_room()
self.remove_owner()
self.remove_owner_channel()
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_allowed_not_owner_in_room(self):
self.join_room()
self.remove_owner()
self.remove_owner_channel()
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_allowed_owner_in_room(self):
| self.join_room()
self.set_owner()
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0]) |
|
glmt_test.go | package glmt
import (
"context"
"reflect"
"regexp"
"testing"
"gitlab.com/gitlab-merge-tool/glmt/internal/config"
"gitlab.com/gitlab-merge-tool/glmt/internal/gitlab"
hooksi "gitlab.com/gitlab-merge-tool/glmt/internal/hooks/impl"
"gitlab.com/gitlab-merge-tool/glmt/internal/team"
teami "gitlab.com/gitlab-merge-tool/glmt/internal/team/impl"
)
func TestRemoteParse(t *testing.T) {
r := "https://github.com/hummerd/client_golang.git"
p, err := projectFromRemote(r)
if err != nil {
t.Fatalf("failed to parse remote %s: %v", r, err)
}
if p != "hummerd/client_golang" {
t.Fatalf("wrong project: %s", p)
}
r = "[email protected]:hummerd/client_golang.git"
p, err = projectFromRemote(r)
if err != nil {
t.Fatalf("failed to parse remote %s: %v", r, err)
}
if p != "hummerd/client_golang" {
t.Fatalf("wrong project: %s", p)
}
r = "[email protected]:hummerd/client_golang"
p, err = projectFromRemote(r)
if err != nil {
t.Fatalf("failed to parse remote %s: %v", r, err)
}
if p != "hummerd/client_golang" {
t.Fatalf("wrong project: %s", p)
}
}
func TestTextArgs(t *testing.T) {
expTa := map[string]string{
TmpVarProjectName: "prj1",
TmpVarBranchName: "feature/TASK-123/some-description",
TmpVarTargetBranchName: "develop",
TmpVarGitlabMentions: "@test",
TmpVarRemote: "origin",
TmpVarUsername: "xxx",
"Task": "TASK-123",
"TaskType": "feature",
"BranchDescription": "some-description",
}
params := CreateMRParams{
TargetBranch: expTa["TargetBranchName"],
BranchRegexp: regexp.MustCompile(`(?P<TaskType>.*)/(?P<Task>.*)/(?P<BranchDescription>.*)`),
}
members := []*team.Member{{
Username: "test",
}}
ta := getTextArgs(expTa["BranchName"], expTa["ProjectName"], "origin", "xxx", params, members)
if !reflect.DeepEqual(expTa, ta) {
t.Fatalf("expected ta: %+v, got %+v", expTa, ta)
}
}
func | (t *testing.T) {
gs := &gitStub{
r: "https://github.com/hummerd/client_golang.git",
b: "feature/TASK-123/add-some-feature",
}
cp := CreateMRParams{
DescriptionTemplate: "Merge {{.TaskType}} {{.Task}} \"{{humanizeText .BranchDescription}}\" into {{.TargetBranchName}}",
TitleTemplate: "{{.Task}} {{humanizeText .BranchDescription}}",
RemoveBranch: true,
Squash: true,
TargetBranch: "develop",
LabelVars: []string{"TaskType"},
BranchRegexp: regexp.MustCompile("(?P<TaskType>.*)/(?P<Task>.*)/(?P<BranchDescription>.*)"),
}
good := false
gls := &gitlabStub{
f: func(method string, arg interface{}) {
if method == "CreateMR" {
good = true
exp := gitlab.CreateMRRequest{
Description: "Merge feature TASK-123 \"Add some feature\" into develop",
Title: "TASK-123 Add some feature",
Project: "hummerd/client_golang",
SourceBranch: gs.b,
TargetBranch: cp.TargetBranch,
RemoveSourceBranch: cp.RemoveBranch,
Squash: cp.Squash,
AssigneeID: 123,
Labels: "feature",
}
if !reflect.DeepEqual(exp, arg) {
t.Fatalf("expected create request: %+v, got %+v", exp, arg)
}
}
},
}
ts, _ := teami.NewTeamSource("")
hs := hooksi.NewHooks(config.Hooks{}, nil, nil)
c := Core{
git: gs,
gitLab: gls,
teamSource: ts,
hooks: hs,
}
mr, err := c.CreateMR(context.Background(), cp)
if err != nil {
t.Fatal("error creating MR", err)
}
if mr.ID != 123 {
t.Fatal("wrong MR id", mr.ID)
}
if !good {
t.Fatal("no call to CreateMR")
}
}
type gitStub struct {
r string
b string
}
func (gs *gitStub) Remote() (string, error) {
return gs.r, nil
}
func (gs *gitStub) CurrentBranch() (string, error) {
return gs.b, nil
}
type gitlabCallback func(string, interface{})
type gitlabStub struct {
f gitlabCallback
}
func (gls *gitlabStub) CreateMR(ctx context.Context, req gitlab.CreateMRRequest) (gitlab.CreateMRResponse, error) {
gls.f("CreateMR", req)
return gitlab.CreateMRResponse{
ID: 123,
}, nil
}
func (gls *gitlabStub) CurrentUser(ctx context.Context) (gitlab.UserResponse, error) {
gls.f("CurrentUser", nil)
return gitlab.UserResponse{
ID: 123,
}, nil
}
| TestCreateMR |
cross_reference_crud.py | from sqlalchemy.orm import Session
from datetime import datetime
from fastapi import HTTPException
from fastapi import status
from fastapi.encoders import jsonable_encoder
from literature.schemas import CrossReferenceSchema
from literature.schemas import CrossReferenceSchemaUpdate
from literature.models import CrossReferenceModel
from literature.models import ReferenceModel
from literature.models import ResourceModel
from literature.models import ResourceDescriptorModel
from literature.crud.reference_resource import create_obj, add_reference_resource
def create(db: Session, cross_reference: CrossReferenceSchema) -> str:
cross_reference_data = jsonable_encoder(cross_reference)
if db.query(CrossReferenceModel).filter(CrossReferenceModel.curie == cross_reference_data['curie']).first():
raise HTTPException(status_code=status.HTTP_409_CONFLICT,
detail=f"CrossReference with curie {cross_reference_data['curie']} already exists")
db_obj = create_obj(db, CrossReferenceModel, cross_reference_data)
db.add(db_obj)
db.commit()
return "created"
def | (db: Session, curie: str) -> None:
cross_reference = db.query(CrossReferenceModel).filter(CrossReferenceModel.curie == curie).first()
if not cross_reference:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND,
detail=f"Cross Reference with curie {curie} not found")
db.delete(cross_reference)
db.commit()
return None
def patch(db: Session, curie: str, cross_reference_update: CrossReferenceSchemaUpdate) -> dict:
cross_reference_data = jsonable_encoder(cross_reference_update)
cross_reference_db_obj = db.query(CrossReferenceModel).filter(CrossReferenceModel.curie == curie).first()
if not cross_reference_db_obj:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND,
detail=f"Cross Reference with curie {curie} not found")
add_reference_resource(db, cross_reference_db_obj, cross_reference_update, non_fatal=True)
for field, value in cross_reference_data.items():
setattr(cross_reference_db_obj, field, value)
cross_reference_db_obj.date_updated = datetime.utcnow()
db.commit()
return {"message": "updated"}
def show(db: Session, curie: str, indirect=True) -> dict:
cross_reference = db.query(CrossReferenceModel).filter(CrossReferenceModel.curie == curie).first()
if not cross_reference:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND,
detail=f"CrossReference with the curie {curie} is not available")
cross_reference_data = jsonable_encoder(cross_reference)
if cross_reference_data['resource_id']:
cross_reference_data['resource_curie'] = db.query(ResourceModel.curie).filter(ResourceModel.resource_id == cross_reference_data['resource_id']).first().curie
del cross_reference_data['resource_id']
if cross_reference_data['reference_id']:
cross_reference_data['reference_curie'] = db.query(ReferenceModel.curie).filter(ReferenceModel.reference_id == cross_reference_data['reference_id']).first().curie
del cross_reference_data['reference_id']
author_ids = []
editor_ids = []
if not indirect:
for author in cross_reference.authors:
author_ids.append(author.author_id)
for editor in cross_reference.editors:
editor_ids.append(editor.editor_id)
cross_reference_data['author_ids'] = author_ids
cross_reference_data['editor_ids'] = editor_ids
[db_prefix, local_id] = curie.split(":", 1)
resource_descriptor = db.query(ResourceDescriptorModel).filter(ResourceDescriptorModel.db_prefix == db_prefix).first()
if resource_descriptor:
default_url = resource_descriptor.default_url.replace("[%s]", local_id)
cross_reference_data['url'] = default_url
if cross_reference_data['pages']:
pages_data = []
for cr_page in cross_reference_data['pages']:
page_url = ""
for rd_page in resource_descriptor.pages:
if rd_page.name == cr_page:
page_url = rd_page.url
break
pages_data.append({"name": cr_page,
"url": page_url.replace("[%s]", local_id)})
cross_reference_data['pages'] = pages_data
elif cross_reference_data['pages']:
pages_data = []
for cr_page in cross_reference_data['pages']:
pages_data.append({"name": cr_page})
cross_reference_data['pages'] = pages_data
return cross_reference_data
def show_changesets(db: Session, curie: str):
cross_reference = db.query(CrossReferenceModel).filter(CrossReferenceModel.curie == curie).first()
if not cross_reference:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND,
detail=f"Cross Reference with curie {curie} is not available")
history = []
for version in cross_reference.versions:
tx = version.transaction
history.append({'transaction': {'id': tx.id,
'issued_at': tx.issued_at,
'user_id': tx.user_id},
'changeset': version.changeset})
return history
| destroy |
index.ts | export { default as valudateNotNull } from './validateNotNull.util'; | export { default as runPromise } from './runPromise.util'; |
|
page-state.test.ts | /* eslint-disable functional/functional-parameters */
/* eslint-disable functional/no-expression-statement */
import { getPageState } from ".";
describe("getPageState", () => {
test('returns "body" focus selector by default', () => {
const state = getPageState();
| y: 0,
});
});
}); | expect(state).toEqual({
focusSelector: "body",
x: 0, |
boneTreeItemComponent.tsx | import { IExplorerExtensibilityGroup } from "babylonjs/Debug/debugLayer";
import { faBone } from "@fortawesome/free-solid-svg-icons";
import { TreeItemLabelComponent } from "../treeItemLabelComponent";
import { ExtensionsComponent } from "../extensionsComponent";
import * as React from "react";
import { Bone } from "babylonjs/Bones/bone";
interface IBoneTreeItemComponenttProps {
bone: Bone;
extensibilityGroups?: IExplorerExtensibilityGroup[];
onClick: () => void;
}
export class BoneTreeItemComponent extends React.Component<IBoneTreeItemComponenttProps> {
constructor(props: IBoneTreeItemComponenttProps) {
super(props);
}
| return (
<div className="skeletonTools">
<TreeItemLabelComponent label={bone.name || "no name"} onClick={() => this.props.onClick()} icon={faBone} color="lightgray" />
{<ExtensionsComponent target={bone} extensibilityGroups={this.props.extensibilityGroups} />}
</div>
);
}
} |
render() {
const bone = this.props.bone;
|
firewall_rule.py | # VMware vCloud Director Python SDK
# Copyright (c) 2014-2019 VMware, Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from pyvcloud.vcd.client import create_element
from pyvcloud.vcd.client import EntityType
from pyvcloud.vcd.exceptions import InvalidParameterException
from pyvcloud.vcd.gateway import Gateway
from pyvcloud.vcd.gateway_services import GatewayServices
from pyvcloud.vcd.network_url_constants import FIREWALL_RULE_URL_TEMPLATE
from pyvcloud.vcd.network_url_constants import FIREWALL_RULES_URL_TEMPLATE
from pyvcloud.vcd.network_url_constants import FIREWALL_URL_TEMPLATE
class FirewallRule(GatewayServices):
__SOURCE = 'source'
__DESTINATION = 'destination'
__GROUP_OBJECT_LIST = [
'securitygroup', 'ipset', 'virtualmachine', 'network'
]
__VNIC_GROUP_LIST = ['gatewayinterface']
__APPLICATION = 'application'
__SERVICE = 'service'
__PROTOCOL_LIST = ['tcp', 'udp', 'icmp', 'any']
def _build_self_href(self, rule_id):
rule_href = (
self.network_url + FIREWALL_RULE_URL_TEMPLATE).format(rule_id)
self.href = rule_href
def _extract_id(self, rule_href):
rule_id_index = rule_href.index(FIREWALL_RULES_URL_TEMPLATE) + \
len(FIREWALL_RULES_URL_TEMPLATE) + 1
return rule_href[rule_id_index:]
def __config_url(self):
config_index = self.href.index(FIREWALL_URL_TEMPLATE)
return self.href[:config_index] + FIREWALL_URL_TEMPLATE
def _reload(self):
"""Reloads the resource representation of the Firewall rule."""
self.resource = \
self.client.get_resource(self.href)
def delete(self):
"""Delete a Firewall rule from gateway."""
self._get_resource()
return self.client.delete_resource(self.href)
def edit(self,
source_values=None,
destination_values=None,
services=None,
new_name=None):
"""Edit a Firewall rule.
:param list source_values: list of source values. e.g.,
[value:value_type]
:param list destination_values: list of destination values. e.g.,
[value:value_type]
:param list services: protocol to port mapping.
e.g., [{'tcp' : {'any' : any}}]
:param str new_name: new name of the firewall rule.
"""
self._get_resource()
self.validate_types(source_values, FirewallRule.__SOURCE)
self.validate_types(destination_values, FirewallRule.__DESTINATION)
firewall_rule_temp = self.resource
if source_values:
if not hasattr(firewall_rule_temp, FirewallRule.__SOURCE):
firewall_rule_temp.append(
create_element(FirewallRule.__SOURCE))
if not hasattr(firewall_rule_temp.source, 'exclude'):
firewall_rule_temp.source.append(
create_element('exclude', False))
self._populate_objects_info(firewall_rule_temp, source_values,
FirewallRule.__SOURCE)
if destination_values:
if not hasattr(firewall_rule_temp, FirewallRule.__DESTINATION):
firewall_rule_temp.append(
create_element(FirewallRule.__DESTINATION))
if not hasattr(firewall_rule_temp.destination, 'exclude'):
firewall_rule_temp.destination.append(
create_element('exclude', False))
self._populate_objects_info(firewall_rule_temp, destination_values,
FirewallRule.__DESTINATION)
if services:
if not hasattr(firewall_rule_temp, FirewallRule.__APPLICATION):
firewall_rule_temp.append(
create_element(FirewallRule.__APPLICATION))
self._populate_services(firewall_rule_temp, services)
if new_name:
firewall_rule_temp.name = new_name
self.client.put_resource(self.href, firewall_rule_temp,
EntityType.DEFAULT_CONTENT_TYPE.value)
def _populate_services(self, firewall_rule_temp, services):
"""Populates service elements.
:param firewall_rule_temp: Firewall rule
:param [] services: protocol to port mapping.
e.g., [{'tcp' : {'any' : any}}]
"""
if services:
for service in services:
protocol = [k for k in service.keys()][0]
if protocol not in FirewallRule.__PROTOCOL_LIST:
valid_protocols = ', '.join(FirewallRule.__PROTOCOL_LIST)
raise InvalidParameterException(
protocol + " is not valid. It should be from " +
valid_protocols)
value = service.get(protocol)
source_port = [port for port in value.keys()][0]
destination_port = value.get(source_port)
self.__populate_protocol_elements(firewall_rule_temp, protocol,
source_port,
destination_port)
def __populate_protocol_elements(self, firewall_rule_temp, protocol,
source_port, destination_port):
"""Populate protocol elements. It mutates the firewall rule object.
:param firewall_rule_temp: Firewall rule obj
:param protocol: protocol
:param source_port: source port
:param destination_port: destination port
"""
application_tag = firewall_rule_temp.application
service_tag = create_element('service')
service_tag.append(create_element('protocol', protocol))
service_tag.append(create_element('port', destination_port))
service_tag.append(create_element('sourcePort', source_port))
if protocol == 'icmp':
service_tag.append(create_element('icmpType', 'any'))
application_tag.append(service_tag)
def _populate_objects_info(self, firewall_rule_temp, values, type):
"""It will mutate firewall_rule_temp.
:param firewall_rule_temp: Firewall rule object resource
:param list values: list of values
:param str type: type. e.g., source, destination
"""
for value in values:
values_arr = value.split(':')
object_type = values_arr[1]
object = values_arr[0]
if type == FirewallRule.__SOURCE:
firewall_rule_temp.source.append(
self._get_group_element(type, object_type, object))
if type == FirewallRule.__DESTINATION:
firewall_rule_temp.destination.append(
self._get_group_element(type, object_type, object))
def _get_group_element(self, type, object_type, value):
"""Get group element base upon the type and object type.
:param str type: It can be source/destination
:param str object_type: Possible values for this would be
'gatewayinterface','virtualmachine','network', 'ipset',
'securitygroup', 'ip'
:param str value: value
:return: group objectified element
:rtype: :rtype: lxml.objectify.ObjectifiedElement
"""
if object_type == 'ip':
return create_element('ipAddress', value)
if object_type in FirewallRule.__GROUP_OBJECT_LIST:
return self.__find_element(type, object_type, value,
'groupingObjectId')
elif object_type in FirewallRule.__VNIC_GROUP_LIST:
return self.__find_element(type, object_type, value, 'vnicGroupId')
def __find_element(self, type, object_type, value, group_type):
"""Find element in the properties using group type.
:param str type: It can be source/destination
:param dict object_type: object types
:param str value: value
:param str group_type: group type. e.g., groupingObjectId
"""
gateway_res = Gateway(self.client, resource=self.parent)
object_list = gateway_res.list_firewall_objects(type, object_type)
for object in object_list:
if object.get('name') == value:
properties = object.get('prop')
for prop in properties:
if prop.get('name') == group_type:
return create_element(group_type, prop.get('value'))
def validate_types(self, source_types, type):
"""Validate input param for valid type.
:param list source_types: list of value:value_type. e.g.,
ExtNw:gatewayinterface
:param str type: It can be source/destination
:raise: InvalidParameterException: exception if input param is not
valid.
"""
if source_types:
valid_type_list = [
'gatewayinterface', 'virtualmachine', 'network', 'ipset',
'securitygroup', 'ip'
]
for source_type in source_types:
if source_type.lower() == 'any':
|
source_type_arr = source_type.split(':')
if len(source_type_arr) <= 1:
raise InvalidParameterException(
type + " type should be in the format of "
"value:value_type. for ex: "
"ExtNw:gatewayinterface")
valid_type = source_type_arr[1]
if valid_type not in valid_type_list:
valid_type_list_str = ','.join(valid_type_list)
raise InvalidParameterException(
valid_type + " param is not valid. It should be "
"from " + valid_type_list_str)
def enable_disable_firewall_rule(self, is_enabled):
"""Enabled disabled firewall rule from gateway.
:param bool is_enabled: flag to enable/disable the firewall rule.
"""
current_firewall_status = self._get_resource().enabled
if is_enabled == current_firewall_status:
return
if is_enabled:
self._get_resource().enabled = True
return self.client.put_resource(
self.href, self._get_resource(),
EntityType.DEFAULT_CONTENT_TYPE.value)
else:
self._get_resource().enabled = False
return self.client.put_resource(
self.href, self._get_resource(),
EntityType.DEFAULT_CONTENT_TYPE.value)
def info_firewall_rule(self):
"""Get the details of firewall rule.
return: Dictionary having firewall rule details.
e.g.
{'Id': 196609, 'Name': 'Test rule', 'Rule type':'user',
'Enabled':'True','Logging enabled':'True','Action':'Accept'}
:rtype: Dictionary
"""
firewall_rule_info = {}
resource = self._get_resource()
firewall_rule_info['Id'] = resource.id
firewall_rule_info['Name'] = resource.name
firewall_rule_info['Rule type'] = resource.ruleType
firewall_rule_info['Enabled'] = resource.enabled
firewall_rule_info['Logging enabled'] = resource.loggingEnabled
firewall_rule_info['Action'] = resource.action
return firewall_rule_info
def list_firewall_rule_source_destination(self, type):
"""Get the list of firewall rule source/destination.
:param str type: It can be source/destination
return: dict of firewall rule's source/destination details.
e.g.
{'exclude':'True','ipAddress':['10.112.12.12','10.232.1.2'],
'vnicGroupId':['vse','external','internal','vnic-0'],
'groupingObjectId':['1f0aab71-6d11-4567-994e-2c090fea7350:ipset',
'urn:vcloud:network:3ed60402-904f-410d-913c-6da77b43a257:']
}
:rtype: dict
"""
resource = self._get_resource()
firewall_rule_source_destination = {}
if hasattr(resource, type):
if hasattr(resource[type], 'exclude'):
firewall_rule_source_destination['exclude'] = resource[
type].exclude
if hasattr(resource[type], 'vnicGroupId'):
firewall_rule_source_destination['vnicGroupId'] = [
vnicGroupId for vnicGroupId in resource[type].vnicGroupId
]
if hasattr(resource[type], 'ipAddress'):
firewall_rule_source_destination['ipAddress'] = [
ipAddress for ipAddress in resource[type].ipAddress
]
if hasattr(resource[type], 'groupingObjectId'):
firewall_rule_source_destination['groupingObjectId'] = [
groupingObjectId
for groupingObjectId in resource[type].groupingObjectId
]
return firewall_rule_source_destination
def _build_firewall_rules_href(self):
return self.network_url + FIREWALL_URL_TEMPLATE
def update_firewall_rule_sequence(self, index):
"""Change firewall rule's sequence of gateway.
:param int index: new sequence index of firewall rule.
"""
index = int(index)
gateway_res = Gateway(self.client, resource=self.parent)
firewall_rule = gateway_res.get_firewall_rules()
resource = self._get_resource()
for rule in firewall_rule.firewallRules.firewallRule:
if rule.id == resource.id:
firewall_rule.firewallRules.remove(rule)
firewall_rule.firewallRules.insert(index, rule)
break
return self.client.put_resource(self._build_firewall_rules_href(),
firewall_rule,
EntityType.DEFAULT_CONTENT_TYPE.value)
def delete_firewall_rule_source_destination(self, value, type):
"""Delete firewall rule's source/destination value of gateway.
It will delete all source/destination value of given value.
:param str value: value to remove from source/destination.
:param str type: It can be source/destination
"""
resource = self._get_resource()
if hasattr(resource, type):
for object in resource[type].iter():
if object == value:
resource[type].remove(object)
return self.client.put_resource(self.href, resource,
EntityType.DEFAULT_CONTENT_TYPE.value)
| continue |
utils.py | import os
import errno
import tensorflow as tf
from keras import backend as K
def safe_mkdir(dir_to_make: str) -> None:
'''
Attempts to make a directory following the Pythonic EAFP strategy which prevents race conditions.
:param dir_to_make: The directory path to attempt to make.
:return: None
'''
try:
os.makedirs(dir_to_make)
except OSError as e:
if e.errno != errno.EEXIST:
print('ERROR: Unable to create directory: {}'.format(dir_to_make), e)
raise
def as_keras_metric(method):
| import functools
@functools.wraps(method)
def wrapper(self, args, **kwargs):
""" Wrapper for turning tensorflow metrics into keras metrics """
value, update_op = method(self, args, **kwargs)
K.get_session().run(tf.local_variables_initializer())
with tf.control_dependencies([update_op]):
value = tf.identity(value)
return value
return wrapper |
|
commit_announcer.py | # Copyright (C) 2013 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import logging
import re
import threading
import time
from webkitpy.common.checkout.scm.git import Git
from webkitpy.common.system.executive import ScriptError
from webkitpy.thirdparty.irc.ircbot import SingleServerIRCBot
_log = logging.getLogger(__name__)
SERVER = "irc.freenode.net"
PORT = 6667
CHANNEL = "#blink"
NICKNAME = "commit-bot"
PULL_TIMEOUT_SECONDS = 60 * 5
UPDATE_WAIT_SECONDS = 10
RETRY_ATTEMPTS = 8
class CommitAnnouncer(SingleServerIRCBot):
_commit_detail_format = "%H\n%ae\n%s\n%b" # commit-sha1, author email, subject, body
def __init__(self, tool, announce_path, irc_password):
SingleServerIRCBot.__init__(self, [(SERVER, PORT, irc_password)], NICKNAME, NICKNAME)
self.announce_path = announce_path
self.git = Git(cwd=tool.scm().checkout_root, filesystem=tool.filesystem, executive=tool.executive)
self.commands = {
'help': self.help,
'ping': self.ping,
'quit': self.stop,
}
self.last_commit = None
def start(self):
if not self._update():
return
self.last_commit = self.git.latest_git_commit()
SingleServerIRCBot.start(self)
def post_new_commits(self):
if not self.connection.is_connected():
return
if not self._update(force_clean=True):
self.stop("Failed to update repository!")
return
new_commits = self.git.git_commits_since(self.last_commit)
if not new_commits:
return
self.last_commit = new_commits[-1]
for commit in new_commits:
if not self._should_announce_commit(commit):
continue
commit_detail = self._commit_detail(commit)
if commit_detail:
_log.info('%s Posting commit %s', self._time(), commit)
_log.info('%s Posted message: %s', self._time(), repr(commit_detail))
self._post(commit_detail)
else:
_log.error('Malformed commit log for %s', commit)
# Bot commands.
def help(self):
self._post('Commands available: %s' % ' '.join(self.commands.keys()))
def ping(self):
self._post('Pong.')
def stop(self, message=""):
self.connection.execute_delayed(0, lambda: self.die(message))
# IRC event handlers. Methods' arguments are determined by superclass
# and some arguments maybe unused - pylint: disable=unused-argument
def on_nicknameinuse(self, connection, event):
connection.nick('%s_' % connection.get_nickname())
def on_welcome(self, connection, event):
connection.join(CHANNEL)
def on_pubmsg(self, connection, event):
message = event.arguments()[0]
command = self._message_command(message)
if command:
command()
def _update(self, force_clean=False):
if not self.git.is_cleanly_tracking_remote_master():
if not force_clean:
confirm = raw_input('This repository has local changes, continue? (uncommitted changes will be lost) y/n: ')
if not confirm.lower() == 'y':
return False
try:
self.git.ensure_cleanly_tracking_remote_master()
except ScriptError as e:
_log.error('Failed to clean repository: %s', e)
return False
attempts = 1
while attempts <= RETRY_ATTEMPTS:
if attempts > 1:
# User may have sent a keyboard interrupt during the wait.
if not self.connection.is_connected():
return False
wait = int(UPDATE_WAIT_SECONDS) << (attempts - 1)
if wait < 120:
_log.info('Waiting %s seconds', wait)
else:
_log.info('Waiting %s minutes', wait / 60)
time.sleep(wait)
_log.info('Pull attempt %s out of %s', attempts, RETRY_ATTEMPTS)
try:
self.git.pull(timeout_seconds=PULL_TIMEOUT_SECONDS)
return True
except ScriptError as e:
_log.error('Error pulling from server: %s', e)
_log.error('Output: %s', e.output)
attempts += 1
_log.error('Exceeded pull attempts')
_log.error('Aborting at time: %s', self._time())
return False
def _time(self):
return time.strftime('[%x %X %Z]', time.localtime())
def _message_command(self, message):
prefix = '%s:' % self.connection.get_nickname()
if message.startswith(prefix):
command_name = message[len(prefix):].strip()
if command_name in self.commands:
return self.commands[command_name]
return None
def _should_announce_commit(self, commit):
return any(path.startswith(self.announce_path) for path in self.git.affected_files(commit))
def _commit_detail(self, commit):
return self._format_commit_detail(self.git.git_commit_detail(commit, self._commit_detail_format))
def _format_commit_detail(self, commit_detail):
if commit_detail.count('\n') < self._commit_detail_format.count('\n'):
return ''
commit, email, subject, body = commit_detail.split('\n', 3)
commit_position_re = r'^Cr-Commit-Position: refs/heads/master@\{#(?P<commit_position>\d+)\}'
commit_position = None
red_flag_strings = ['NOTRY=true', 'TBR=']
red_flags = []
for line in body.split('\n'):
match = re.search(commit_position_re, line)
if match:
commit_position = match.group('commit_position')
for red_flag_string in red_flag_strings:
if line.lower().startswith(red_flag_string.lower()):
red_flags.append(line.strip())
url = 'https://crrev.com/%s' % (commit_position if commit_position else commit[:8])
red_flag_message = '\x037%s\x03' % (' '.join(red_flags)) if red_flags else ''
return ('%s %s committed "%s" %s' % (url, email, subject, red_flag_message)).strip()
def _post(self, message):
|
def _sanitize_string(self, message):
return message.encode('ascii', 'backslashreplace')
class CommitAnnouncerThread(threading.Thread):
def __init__(self, tool, announce_path, irc_password):
threading.Thread.__init__(self)
self.bot = CommitAnnouncer(tool, announce_path, irc_password)
def run(self):
self.bot.start()
def stop(self):
self.bot.stop()
self.join()
| self.connection.execute_delayed(0, lambda: self.connection.privmsg(CHANNEL, self._sanitize_string(message))) |
themeContext.js | import { createContext } from 'react';
import { globalScope } from '../lib/globalScope'; | const key = Symbol.for('@sanity/ui/context/theme');
globalScope[key] = globalScope[key] || createContext(null);
export const ThemeContext = globalScope[key];
//# sourceMappingURL=themeContext.js.map |
|
NotificationPanel.tsx | /*
Copyright 2016, 2019, 2021 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. | import React from "react";
import { _t } from '../../languageHandler';
import { MatrixClientPeg } from "../../MatrixClientPeg";
import BaseCard from "../views/right_panel/BaseCard";
import { replaceableComponent } from "../../utils/replaceableComponent";
import TimelinePanel from "./TimelinePanel";
import Spinner from "../views/elements/Spinner";
import { TileShape } from "../views/rooms/EventTile";
import { Layout } from "../../settings/Layout";
interface IProps {
onClose(): void;
}
/*
* Component which shows the global notification list using a TimelinePanel
*/
@replaceableComponent("structures.NotificationPanel")
export default class NotificationPanel extends React.PureComponent<IProps> {
render() {
const emptyState = (<div className="mx_RightPanel_empty mx_NotificationPanel_empty">
<h2>{ _t('You’re all caught up') }</h2>
<p>{ _t('You have no visible notifications.') }</p>
</div>);
let content;
const timelineSet = MatrixClientPeg.get().getNotifTimelineSet();
if (timelineSet) {
// wrap a TimelinePanel with the jump-to-event bits turned off.
content = (
<TimelinePanel
manageReadReceipts={false}
manageReadMarkers={false}
timelineSet={timelineSet}
showUrlPreview={false}
tileShape={TileShape.Notif}
empty={emptyState}
alwaysShowTimestamps={true}
layout={Layout.Group}
/>
);
} else {
console.error("No notifTimelineSet available!");
content = <Spinner />;
}
return <BaseCard className="mx_NotificationPanel" onClose={this.props.onClose} withoutScrollContainer>
{ content }
</BaseCard>;
}
} | */
|
model_pipeline_branchesitempull_requestlinks.go | /*
* Swaggy Jenkins
*
* Jenkins API clients generated from Swagger / Open API specification
*
* API version: 1.1.2-pre.0
* Contact: [email protected]
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/ |
type PipelineBranchesitempullRequestlinks struct {
Self string `json:"self,omitempty"`
Class string `json:"_class,omitempty"`
} |
package openapi |
sessions.py | # Copyright (c) 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from webob import exc
from murano.api.v1 import request_statistics
from murano.common.i18n import _
from murano.common import wsgi
from murano.db import models
from murano.db.services import environments as envs
from murano.db.services import sessions
from murano.db import session as db_session
from murano.openstack.common import log as logging
from murano.services import states
LOG = logging.getLogger(__name__)
API_NAME = 'Sessions'
class Controller(object):
def _check_environment(self, request, environment_id):
unit = db_session.get_session()
environment = unit.query(models.Environment).get(environment_id)
if environment is None:
msg = _('Environment <EnvId {0}>'
' is not found').format(environment_id)
LOG.error(msg)
raise exc.HTTPNotFound(explanation=msg)
if environment_id != envs.get_cloud_id():
if environment.tenant_id != request.context.tenant:
msg = _('User is not authorized to access '
'this tenant resources.')
LOG.error(msg)
raise exc.HTTPUnauthorized(explanation=msg)
def _check_session(self, request, environment_id, session, session_id):
if session is None:
msg = _('Session <SessionId {0}> is not found').format(session_id)
LOG.error(msg)
raise exc.HTTPNotFound(explanation=msg)
if session.environment_id != environment_id:
msg = _('Session <SessionId {0}> is not tied with Environment '
'<EnvId {1}>').format(session_id, environment_id)
LOG.error(msg)
raise exc.HTTPNotFound(explanation=msg)
self._check_environment(request, environment_id)
@request_statistics.stats_count(API_NAME, 'Create')
def configure(self, request, environment_id):
LOG.debug('Session:Configure <EnvId: {0}>'.format(environment_id))
self._check_environment(request, environment_id)
# no new session can be opened if environment has deploying status
env_status = envs.EnvironmentServices.get_status(environment_id)
if env_status in (states.EnvironmentStatus.DEPLOYING,
states.EnvironmentStatus.DELETING):
msg = _('Could not open session for environment <EnvId: {0}>,'
'environment has deploying status.').format(environment_id)
LOG.error(msg)
raise exc.HTTPForbidden(explanation=msg)
user_id = request.context.user
session = sessions.SessionServices.create(environment_id, user_id)
return session.to_dict()
@request_statistics.stats_count(API_NAME, 'Index')
def show(self, request, environment_id, session_id):
LOG.debug('Session:Show <SessionId: {0}>'.format(session_id))
unit = db_session.get_session()
session = unit.query(models.Session).get(session_id)
self._check_session(request, environment_id, session, session_id)
user_id = request.context.user
msg = _('User <UserId {0}> is not authorized to access session'
'<SessionId {1}>.').format(user_id, session_id)
if session.user_id != user_id:
LOG.error(msg)
raise exc.HTTPUnauthorized(explanation=msg)
if not sessions.SessionServices.validate(session):
msg = _('Session <SessionId {0}> is invalid').format(session_id)
LOG.error(msg)
raise exc.HTTPForbidden(explanation=msg)
return session.to_dict()
@request_statistics.stats_count(API_NAME, 'Delete')
def delete(self, request, environment_id, session_id):
LOG.debug('Session:Delete <SessionId: {0}>'.format(session_id))
unit = db_session.get_session()
session = unit.query(models.Session).get(session_id)
self._check_session(request, environment_id, session, session_id)
user_id = request.context.user
if session.user_id != user_id:
msg = _('User <UserId {0}> is not authorized to access session'
'<SessionId {1}>.').format(user_id, session_id)
LOG.error(msg)
raise exc.HTTPUnauthorized(explanation=msg)
if session.state == states.SessionState.DEPLOYING:
msg = _('Session <SessionId: {0}> is in deploying state and '
'could not be deleted').format(session_id)
LOG.error(msg)
raise exc.HTTPForbidden(explanation=msg)
with unit.begin():
unit.delete(session)
return None
@request_statistics.stats_count(API_NAME, 'Deploy')
def deploy(self, request, environment_id, session_id):
LOG.debug('Session:Deploy <SessionId: {0}>'.format(session_id))
unit = db_session.get_session()
session = unit.query(models.Session).get(session_id)
session.tenant_id = request.context.tenant
self._check_session(request, environment_id, session, session_id)
if not sessions.SessionServices.validate(session):
msg = _('Session <SessionId {0}> is invalid').format(session_id)
LOG.error(msg)
raise exc.HTTPForbidden(explanation=msg)
if session.state != states.SessionState.OPENED:
msg = _('Session <SessionId {0}> is already deployed or '
'deployment is in progress').format(session_id)
LOG.error(msg)
raise exc.HTTPForbidden(explanation=msg)
envs.EnvironmentServices.deploy(session,
unit, |
def create_resource():
return wsgi.Resource(Controller()) | request.context.auth_token)
|
GBDT_modeling.py | import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
import xgboost as xgb
import h5py
import os
from data_clean import pre_process,get_agg
#------------------------------定义评估标准---------------------------
def map5eval(pre | n):
actual = dtrain.get_label()
predicted = preds.argsort(axis=1)[:-np.arange(5)]
metric = 0
for i in range(5):
metric += np.sum(actual==predicted[:i])/(i+1)
metric /= actual.shape[0]
return 'map5',-metric
#------------------------------对模型进行训练-----------------------------------
clf = xgb.XGBClassifier(objective='multi:softmax',max_depth=5,n_estimators=300,learning_rate=0.01,nthread=4,subsample=0.7,colsample_bytree=0.7,min_child_weight=3,silent=False)
destinations = pd.read_csv('input/destinations.csv')
result = pd.read_csv('input/sample_result.csv')
agg1 = pd.read_csv('output/srch_dest_hc_hm_agg.csv')
if os.path.exists('rows_complete.txt'):
with open('rows_complete.txt','r') as f:
skipsize = int(f.readline())
else:
skipsize = 0
skip = 0 if skipsize==0 else range(1,skipsize)
tchunksize = 1000000
print('%d rows will be skipped and next %d rows will be used for training' % (skipsize, tchunksize))
train = pd.read_csv('input/train.csv', parse_dates=['date_time', 'srch_ci', 'srch_co'], skiprows=skip, nrows=tchunksize)
train = train[train.is_booking==1]
train = pd.merge(train, destinations, how='left', on='srch_destination_id')
train = pd.merge(train, agg1, how='left', on=['srch_destination_id','hotel_country','hotel_market'])
pre_process(train)
y = train.hotel_cluster
train.drop(['cnt', 'hotel_cluster', 'is_booking'], axis=1, inplace=True)
X_train, X_test, y_train, y_test = train_test_split(train, y, stratify=y, test_size=0.2)
clf.fit(X_train, y_train, early_stopping_rounds=50, eval_metric=map5eval, eval_set=[(X_train, y_train),(X_test, y_test)])
#-----------------------------对测试数据进行预测-----------------------------------
count = 0
chunksize = 10000
preds = np.empty((result.shape[0],clf.n_classes_))
reader = pd.read_csv('input/test.csv', parse_dates=['date_time', 'srch_ci', 'srch_co'], chunksize=chunksize)
for chunk in reader:
chunk = pd.merge(chunk, destinations, how='left', on='srch_destination_id')
chunk = pd.merge(chunk, agg1, how='left', on=['srch_destination_id', 'hotel_country', 'hotel_market'])
chunk.drop(['id'], axis=1, inplace=True)
pre_process(chunk)
pred = clf.predict_proba(chunk)
preds[count:(count + chunk.shape[0]), :] = pred
count = count + chunksize
print('%d rows completed' % count)
del clf
del agg1
if os.path.exists('output/probs/allpreds_xgb.h5'):
with h5py.File('output/probs/allpreds_xgb.h5', 'r+') as hf:
print('reading in and combining probabilities')
predshf = hf['preds']
preds += predshf.value
print('writing latest probabilities to file')
predshf[...] = preds
else:
with h5py.File('../output/probs/allpreds_xgb.h5', 'w') as hf:
print('writing latest probabilities to file')
hf.create_dataset('preds', data=preds)
print('generating submission')
col_ind = np.argsort(-preds, axis=1)[:,:5]
hc = [' '.join(row.astype(str)) for row in col_ind]
sub = pd.DataFrame(data=hc, index=result.id)
sub.reset_index(inplace=True)
sub.columns = result.columns
sub.to_csv('output/pred_sub.csv', index=False)
skipsize += tchunksize
with open('rows_complete.txt', 'w') as f:
f.write(str(skipsize)) | ds,dtrai |
arturia_midi.py | import debug
import device
# Status command to use when sending commands between scripts
INTER_SCRIPT_STATUS_BYTE = 0x00
INTER_SCRIPT_DATA1_BTN_DOWN_CMD = 0x01 # Data2 contains the id of the button
INTER_SCRIPT_DATA1_BTN_UP_CMD = 0x02 # Data2 contains the id of the button
INTER_SCRIPT_DATA1_UPDATE_STATE = 0x03 # Data2 contains the status of the update (INTER_SCRIPT_DATA2_STATE_...)
INTER_SCRIPT_DATA1_BEGIN_PAYLOAD_CMD = 0xFE
INTER_SCRIPT_DATA1_END_PAYLOAD_CMD = 0xFF
PAYLOAD_STATUS_BYTE = 0x01
PLUGIN_PORT_NUM = 10
SYSEX_HEADER = [0xF0, 0x00, 0x20, 0x6B, 0x7F, 0x42]
SYSEX_FOOTER = [0xF7]
INTER_SCRIPT_DATA2_STATE_PAD_RECORD_STOP = 0x00
INTER_SCRIPT_DATA2_STATE_PAD_RECORD_START = 0x01
class MidiEventDispatcher:
""" Dispatches a MIDI event after feeding it through a transform function.
MIDI event dispatcher transforms the MIDI event into a value through a transform function provided at construction
time. This value is then used as a key into a lookup table that provides a dispatcher and filter function. If the
filter function returns true, then the event is sent to the dispatcher function.
"""
def __init__(self, transform_fn):
self._transform_fn = transform_fn
# Table contains a mapping of status code -> (callback_fn, filter_fn)
self._dispatch_map = {}
def SetHandler(self, key, callback_fn, filter_fn=None):
""" Associate a handler function and optional filter predicate function to a key.
If the transform of the midi event matches the key, then the event is dispatched to the callback function
given that the filter predicate function also returns true.
:param key: the result value of transform_fn(event) to match against.
:param callback_fn: function that is called with the event in the event the transformed event matches.
:param filter_fn: function that takes an event and returns true if the event should be dispatched. If false
is returned, then the event is dropped and never passed to callback_fn. Not specifying means that callback_fn
is always called if transform_fn matches the key.
"""
def _default_true_fn(_): return True
if filter_fn is None:
filter_fn = _default_true_fn
self._dispatch_map[key] = (callback_fn, filter_fn)
return self
def SetHandlerForKeys(self, keys, callback_fn, filter_fn=None):
""" Associate the same handler for a group of keys. See SetHandler for more details. """
for k in keys:
self.SetHandler(k, callback_fn, filter_fn=filter_fn)
return self
def Dispatch(self, event):
""" Dispatches a midi event to the appropriate listener.
:param event: the event to dispatch.
"""
key = self._transform_fn(event)
processed = False
if key in self._dispatch_map:
callback_fn, filter_fn = self._dispatch_map[key]
if filter_fn(event):
callback_fn(event)
processed = True
else:
debug.log("DISPATCHER", "Event dropped by filter.", event=event)
processed = True
else:
debug.log("DISPATCHER", "No handler found.", event=event)
| def send_to_device(data):
"""Sends a data payload to Arturia device. """
# debug.log('CMD', 'Sending payload: ' + str(data))
# Reference regarding SysEx code : # https://forum.arturia.com/index.php?topic=90496.0
device.midiOutSysex(bytes(SYSEX_HEADER) + bytes(data) + bytes(SYSEX_FOOTER))
def dispatch_message_to_other_scripts(status, data1, data2, payload=None):
""" Sends midi commands to other scripts scripts. """
for i in range(device.dispatchReceiverCount()):
msg = status + (data1 << 8) + (data2 << 16)
if payload is None:
device.dispatch(i, msg)
else:
msg = INTER_SCRIPT_DATA1_BEGIN_PAYLOAD_CMD
msg += (INTER_SCRIPT_DATA1_BEGIN_PAYLOAD_CMD << 8)
device.dispatch(i, msg)
# Send payload
for j in range(0, len(payload), 2):
msg = PAYLOAD_STATUS_BYTE + (payload[j] << 8)
if j + 1 < len(payload):
msg += (payload[j + 1] << 16)
device.dispatch(i, msg)
msg = INTER_SCRIPT_STATUS_BYTE
msg += (INTER_SCRIPT_DATA1_END_PAYLOAD_CMD << 8)
device.dispatch(i, msg) | return processed
|
struct-async.rs | // check-pass
// edition:2018
#![feature(async_await)]
#![feature(arbitrary_self_types)]
#![allow(non_snake_case)]
use std::rc::Rc;
struct Struct { }
impl Struct {
async fn ref_Struct(self: Struct, f: &u32) -> &u32 {
f
}
async fn box_Struct(self: Box<Struct>, f: &u32) -> &u32 {
f
}
async fn rc_Struct(self: Rc<Struct>, f: &u32) -> &u32 {
f
}
async fn box_box_Struct(self: Box<Box<Struct>>, f: &u32) -> &u32 {
f
}
async fn box_rc_Struct(self: Box<Rc<Struct>>, f: &u32) -> &u32 {
f
}
}
fn main() | { } |
|
ic_list.js | export const ic_list = { "viewBox": "0 0 24 24", "children": [{"name":"path","attribs":{"d":"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"},"children":[]}] }; |
||
generic_client_test.go | /*
Copyright (c) Microsoft Corporation.
Licensed under the MIT license.
*/
package genericarmclient_test
import (
"context"
"net/http"
"testing"
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/go-autorest/autorest/to"
. "github.com/onsi/gomega"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
resources "github.com/Azure/azure-service-operator/v2/api/microsoft.resources/v1alpha1api20200601"
"github.com/Azure/azure-service-operator/v2/internal/genericarmclient"
"github.com/Azure/azure-service-operator/v2/internal/testcommon"
"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
)
func Test_NewResourceGroup(t *testing.T) {
g := NewGomegaWithT(t)
ctx := context.Background()
testContext, err := testContext.ForTest(t)
g.Expect(err).ToNot(HaveOccurred())
resourceGroup := testContext.NewTestResourceGroup()
resolved := genruntime.ConvertToARMResolvedDetails{
Name: resourceGroup.Name,
ResolvedReferences: genruntime.MakeResolvedReferences(nil),
}
resourceGroupSpec, err := resourceGroup.Spec.ConvertToARM(resolved)
g.Expect(err).ToNot(HaveOccurred())
typedResourceGroupSpec := resourceGroupSpec.(resources.ResourceGroupSpecARM)
id := genericarmclient.MakeResourceGroupID(testContext.AzureSubscription, resourceGroup.Name)
poller, err := testContext.AzureClient.BeginCreateOrUpdateByID(ctx, id, typedResourceGroupSpec.GetAPIVersion(), typedResourceGroupSpec)
g.Expect(err).ToNot(HaveOccurred())
g.Eventually(poller).Should(testContext.AzureMatch.BeProvisioned(ctx))
// Get the resource
status := resources.ResourceGroupStatus{}
_, err = testContext.AzureClient.GetByID(ctx, id, typedResourceGroupSpec.GetAPIVersion(), &status)
g.Expect(err).ToNot(HaveOccurred())
// Delete the deployment
_, err = testContext.AzureClient.DeleteByID(ctx, id, typedResourceGroupSpec.GetAPIVersion())
g.Expect(err).ToNot(HaveOccurred())
// Ensure that the resource group is deleted
g.Eventually([]string{id, typedResourceGroupSpec.GetAPIVersion()}).Should(testContext.AzureMatch.BeDeleted(ctx))
}
func Test_NewResourceGroup_Error(t *testing.T) | {
g := NewGomegaWithT(t)
ctx := context.Background()
testContext, err := testContext.ForTest(t)
g.Expect(err).ToNot(HaveOccurred())
rgName := testContext.Namer.GenerateName("rg")
resourceGroup := resources.ResourceGroup{
ObjectMeta: metav1.ObjectMeta{
Name: rgName,
},
Spec: resources.ResourceGroupSpec{
Location: "BadLocation",
Tags: testcommon.CreateTestResourceGroupDefaultTags(),
},
}
resolved := genruntime.ConvertToARMResolvedDetails{
Name: rgName,
ResolvedReferences: genruntime.MakeResolvedReferences(nil),
}
resourceGroupSpec, err := resourceGroup.Spec.ConvertToARM(resolved)
g.Expect(err).ToNot(HaveOccurred())
typedResourceGroupSpec := resourceGroupSpec.(resources.ResourceGroupSpecARM)
id := genericarmclient.MakeResourceGroupID(testContext.AzureSubscription, resourceGroup.Name)
_, err = testContext.AzureClient.BeginCreateOrUpdateByID(ctx, id, typedResourceGroupSpec.GetAPIVersion(), typedResourceGroupSpec)
g.Expect(err).To(HaveOccurred())
// Some basic assertions about the shape of the error
var cloudError *genericarmclient.CloudError
var httpErr azcore.HTTPResponse
g.Expect(errors.As(err, &cloudError)).To(BeTrue())
g.Expect(errors.As(err, &httpErr)).To(BeTrue())
// The body was already closed... suppressing linter
// nolint:bodyclose
g.Expect(httpErr.RawResponse().StatusCode).To(Equal(http.StatusBadRequest))
g.Expect(to.String(cloudError.InnerError.Code)).To(Equal("LocationNotAvailableForResourceGroup"))
} |
|
startPyquil330.py | # qubit number=4
# total number=10
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def | ()-> Program:
prog = Program() # circuit begin
prog += H(1) # number=2
prog += H(2) # number=3
prog += H(3) # number=4
prog += Y(3) # number=5
prog += SWAP(1,0) # number=6
prog += Y(2) # number=8
prog += Y(2) # number=9
# circuit end
return prog
def summrise_results(bitstrings) -> dict:
d = {}
for l in bitstrings:
if d.get(l) is None:
d[l] = 1
else:
d[l] = d[l] + 1
return d
if __name__ == '__main__':
prog = make_circuit()
qvm = get_qc('4q-qvm')
results = qvm.run_and_measure(prog,1024)
bitstrings = np.vstack([results[i] for i in qvm.qubits()]).T
bitstrings = [''.join(map(str, l)) for l in bitstrings]
writefile = open("../data/startPyquil330.csv","w")
print(summrise_results(bitstrings),file=writefile)
writefile.close()
| make_circuit |
watcher.go | // Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package kubernetes
import (
"context"
"fmt"
"time"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/util/workqueue"
"github.com/elastic/beats/v7/libbeat/logp"
)
const (
add = "add"
update = "update"
delete = "delete"
)
var (
accessor = meta.NewAccessor()
)
// Watcher watches Kubernetes resources events
type Watcher interface {
// Start watching Kubernetes API for new events after resources were listed
Start() error
// Stop watching Kubernetes API for new events
Stop()
// AddEventHandler add event handlers for corresponding event type watched
AddEventHandler(ResourceEventHandler)
// Store returns the store object for the watcher
Store() cache.Store
}
// WatchOptions controls watch behaviors
type WatchOptions struct {
// SyncTimeout is a timeout for listing historical resources
SyncTimeout time.Duration
// Node is used for filtering watched resource to given node, use "" for all nodes
Node string
// Namespace is used for filtering watched resource to given namespace, use "" for all namespaces
Namespace string
// IsUpdated allows registering a func that allows the invoker of the Watch to decide what amounts to an update
// vs what does not.
IsUpdated func(old, new interface{}) bool
// HonorReSyncs allows resync events to be requeued on the worker
HonorReSyncs bool
}
type item struct {
object interface{}
objectRaw interface{}
state string
}
type watcher struct {
client kubernetes.Interface
informer cache.SharedInformer
store cache.Store
queue workqueue.RateLimitingInterface
ctx context.Context
stop context.CancelFunc
handler ResourceEventHandler
logger *logp.Logger
}
// NewWatcher initializes the watcher client to provide a events handler for
// resource from the cluster (filtered to the given node)
func NewWatcher(client kubernetes.Interface, resource Resource, opts WatchOptions, indexers cache.Indexers) (Watcher, error) |
// AddEventHandler adds a resource handler to process each request that is coming into the watcher
func (w *watcher) AddEventHandler(h ResourceEventHandler) {
w.handler = h
}
// Store returns the store object for the resource that is being watched
func (w *watcher) Store() cache.Store {
return w.store
}
// Start watching pods
func (w *watcher) Start() error {
go w.informer.Run(w.ctx.Done())
if !cache.WaitForCacheSync(w.ctx.Done(), w.informer.HasSynced) {
return fmt.Errorf("kubernetes informer unable to sync cache")
}
w.logger.Debugf("cache sync done")
//TODO: Do we run parallel workers for this? It is useful when we run metricbeat as one instance per cluster?
// Wrap the process function with wait.Until so that if the controller crashes, it starts up again after a second.
go wait.Until(func() {
for w.process(w.ctx) {
}
}, time.Second*1, w.ctx.Done())
return nil
}
func (w *watcher) Stop() {
w.queue.ShutDown()
w.stop()
}
// enqueue takes the most recent object that was received, figures out the namespace/name of the object
// and adds it to the work queue for processing.
func (w *watcher) enqueue(obj interface{}, state string) {
// DeletionHandlingMetaNamespaceKeyFunc that we get a key only if the resource's state is not Unknown.
key, err := cache.DeletionHandlingMetaNamespaceKeyFunc(obj)
if err != nil {
return
}
if deleted, ok := obj.(cache.DeletedFinalStateUnknown); ok {
w.logger.Debugf("Enqueued DeletedFinalStateUnknown contained object: %+v", deleted.Obj)
obj = deleted.Obj
}
w.queue.Add(&item{key, obj, state})
}
// process gets the top of the work queue and processes the object that is received.
func (w *watcher) process(ctx context.Context) bool {
keyObj, quit := w.queue.Get()
if quit {
return false
}
err := func(obj interface{}) error {
defer w.queue.Done(obj)
var entry *item
var ok bool
if entry, ok = obj.(*item); !ok {
w.queue.Forget(obj)
utilruntime.HandleError(fmt.Errorf("expected *item in workqueue but got %#v", obj))
return nil
}
key := entry.object.(string)
o, exists, err := w.store.GetByKey(key)
if err != nil {
return nil
}
if !exists {
if entry.state == delete {
w.logger.Debugf("Object %+v was not found in the store, deleting anyway!", key)
// delete anyway in order to clean states
w.handler.OnDelete(entry.objectRaw)
}
return nil
}
switch entry.state {
case add:
w.handler.OnAdd(o)
case update:
w.handler.OnUpdate(o)
case delete:
w.handler.OnDelete(o)
}
return nil
}(keyObj)
if err != nil {
utilruntime.HandleError(err)
return true
}
return true
}
| {
var store cache.Store
var queue workqueue.RateLimitingInterface
informer, objType, err := NewInformer(client, resource, opts, indexers)
if err != nil {
return nil, err
}
store = informer.GetStore()
queue = workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), objType)
ctx, cancel := context.WithCancel(context.Background())
if opts.IsUpdated == nil {
opts.IsUpdated = func(o, n interface{}) bool {
old, _ := accessor.ResourceVersion(o.(runtime.Object))
new, _ := accessor.ResourceVersion(n.(runtime.Object))
// Only enqueue changes that have a different resource versions to avoid processing resyncs.
if old != new {
return true
}
return false
}
}
w := &watcher{
client: client,
informer: informer,
store: store,
queue: queue,
ctx: ctx,
stop: cancel,
logger: logp.NewLogger("kubernetes"),
handler: NoOpEventHandlerFuncs{},
}
w.informer.AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(o interface{}) {
w.enqueue(o, add)
},
DeleteFunc: func(o interface{}) {
w.enqueue(o, delete)
},
UpdateFunc: func(o, n interface{}) {
if opts.IsUpdated(o, n) {
w.enqueue(n, update)
} else if opts.HonorReSyncs {
// HonorReSyncs ensure that at the time when the kubernetes client does a "resync", i.e, a full list of all
// objects we make sure that autodiscover processes them. Why is this necessary? An effective control loop works
// based on two state changes, a list and a watch. A watch is triggered each time the state of the system changes.
// However, there is no guarantee that all events from a watch are processed by the receiver. To ensure that missed events
// are properly handled, a period re-list is done to ensure that every state within the system is effectively handled.
// In this case, we are making sure that we are enqueueing an "add" event because, an runner that is already in Running
// state should just be deduped by autodiscover and not stop/started periodically as would be the case with an update.
w.enqueue(n, add)
}
},
})
return w, nil
} |
issue364.go | package main
import (
"github.com/bjxujiang/gf/frame/g"
"time"
)
func test1() {
db := g.DB()
db.SetDebug(true)
time.Sleep(1 * time.Minute)
r, e := db.Table("test").Where("id", 10000).Count()
if e != nil {
panic(e)
}
g.Dump(r)
}
func test2() {
db := g.DB()
db.SetDebug(true) | if e != nil {
panic(e)
}
g.Dump(r)
}
func main() {
test1()
test2()
} | dao := db.Table("test").Safe()
time.Sleep(1 * time.Minute)
r, e := dao.Where("id", 10000).Count() |
use_cloud_organization.rs | use crate::state::State;
use async_trait::async_trait;
use nu_engine::CommandArgs;
use nu_errors::ShellError;
use nu_protocol::{Signature, SyntaxShape, TaggedDictBuilder};
use nu_source::Tag;
use nu_stream::OutputStream;
use std::sync::{Arc, Mutex};
pub struct UseCloudOrganization {
state: Arc<Mutex<State>>,
}
impl UseCloudOrganization {
pub fn new(state: Arc<Mutex<State>>) -> Self {
Self { state }
}
}
#[async_trait]
impl nu_engine::WholeStreamCommand for UseCloudOrganization {
fn name(&self) -> &str {
"use cloud-organization"
}
fn | (&self) -> Signature {
Signature::build("use cloud-organization").required(
"identifier",
SyntaxShape::String,
"the identifier of the cloud organization",
)
}
fn usage(&self) -> &str {
"Sets the active cloud organization based on its identifier"
}
fn run(&self, args: CommandArgs) -> Result<OutputStream, ShellError> {
let guard = self.state.lock().unwrap();
guard.set_active_cloud_org(args.req(0)?)?;
let mut using_now = TaggedDictBuilder::new(Tag::default());
using_now.insert_value("cloud_organization", guard.active_cloud_org_name().unwrap());
let cloud = vec![using_now.into_value()];
Ok(cloud.into())
}
}
| signature |
aula95_desempacotar.py | tupla = 11, 10, 12
def func(a, b, c):
print(a)
print(b)
print(c)
print(30*'-')
lista.sort()
func(*lista)
l = [*tupla] #Ou l = list(tupla)
l.sort()
func(*l)
func(**dict(zip(("b", "a", "c"), tupla))) | #Aula 95 - Exemplo de desempacotamento
lista = [11, 10, 12] |
|
no-yield-to-default.js | 'use strict';
const { match } = require('../helpers/node-matcher');
const Rule = require('./base');
const ERROR_MESSAGE = 'A block named "default" is not valid';
const BLOCK_PARAM_KEYWORDS = ['has-block', 'has-block-params', 'hasBlock', 'hasBlockParams'];
function isYield(node) {
return match(node, { type: 'PathExpression', original: 'yield' });
}
function isBlockParamKeyword(node) {
return BLOCK_PARAM_KEYWORDS.some((keyword) =>
match(node, { type: 'PathExpression', original: keyword })
);
}
module.exports = class NoYieldToDefault extends Rule {
handleBlockParamKeyword(node) {
let [toParam] = node.params;
if (match(toParam, { type: 'StringLiteral', value: 'default' })) {
this.log({
message: ERROR_MESSAGE,
line: toParam.loc && toParam.loc.start.line,
column: toParam.loc && toParam.loc.start.column,
source: this.sourceForNode(toParam),
});
}
}
visitor() {
return {
MustacheStatement(node) {
if (isYield(node.path)) {
let toHashPair = node.hash.pairs.find((p) => p.key === 'to');
if (match(toHashPair, { value: { type: 'StringLiteral', value: 'default' } })) {
this.log({
message: ERROR_MESSAGE,
line: toHashPair.loc && toHashPair.loc.start.line,
column: toHashPair.loc && toHashPair.loc.start.column,
source: this.sourceForNode(toHashPair),
});
}
} else if (isBlockParamKeyword(node.path)) {
this.handleBlockParamKeyword(node);
}
},
| },
};
}
};
module.exports.ERROR_MESSAGE = ERROR_MESSAGE; | SubExpression(node) {
if (isBlockParamKeyword(node.path)) {
this.handleBlockParamKeyword(node);
} |
main_test.go | package main
import (
"net/http"
"net/http/httptest"
"testing"
)
func TestToMain(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
t.Fatalf("must use %s method", http.MethodGet)
}
w.Write([]byte("Hello, World!"))
}))
endpoint = ts.URL
main()
}
func Example() | {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello, World!"))
}))
endpoint = ts.URL
main()
// Output:
// Hello, World!
// Status: 200 OK
// StatusCode: 200
} |
|
index.js | const express = require('express');
const bodyParser = require('body-parser');
const axios = require('axios');
const app = express();
app.use(bodyParser.json());
app.post('/events', async (req, res) => {
/*
* req ==> event properties from EventBus (Broker)
* - type
* - {data}
*/
const {type, data} = req.body;
if(type === 'CommentCreated') {
/**
* Approve or reject comment
* - status :
* - check if orange is the content of the comment
* - true status = rejected
* - false status = approved
*/
const status = data.content.includes('orange') ? 'rejected' : 'approved';
/**
* Event emitted => event bus
* with the updated status
*/
await axios.post('http://event-bus-service:4005/events', {
type: 'CommentModerated',
data: {
commentId: data.commentId,
content: data.content,
postId: data.postId,
status
}
});
}
| app.listen(4003, () => {
console.log('listen on 4003');
}); | res.send({});
});
|
mod.rs | //! This module contains the [`Space`] helper class as well has related
//! rendering helpers to add custom elements or different clients to a space.
use crate::{
backend::renderer::{Frame, ImportAll, Renderer},
desktop::{
layer::{layer_map_for_output, LayerSurface},
popup::PopupManager,
utils::{output_leave, output_update},
window::Window,
},
utils::{Logical, Point, Rectangle, Transform},
wayland::{
compositor::{get_parent, is_sync_subsurface},
output::Output,
},
};
use indexmap::{IndexMap, IndexSet};
use std::{collections::VecDeque, fmt};
use wayland_server::protocol::wl_surface::WlSurface;
mod element;
mod layer;
mod output;
mod popup;
mod window;
pub use self::element::*;
use self::layer::*;
use self::output::*;
use self::window::*;
crate::utils::ids::id_gen!(next_space_id, SPACE_ID, SPACE_IDS);
/// Represents two dimensional plane to map windows and outputs upon.
#[derive(Debug)]
pub struct Space {
pub(super) id: usize,
// in z-order, back to front
windows: IndexSet<Window>,
outputs: Vec<Output>,
logger: ::slog::Logger,
}
impl PartialEq for Space {
fn eq(&self, other: &Space) -> bool {
self.id == other.id
}
}
impl Drop for Space {
fn drop(&mut self) {
SPACE_IDS.lock().unwrap().remove(&self.id);
}
}
impl Space {
/// Create a new [`Space`]
pub fn new<L>(log: L) -> Space
where
L: Into<Option<slog::Logger>>,
{
Space {
id: next_space_id(),
windows: IndexSet::new(),
outputs: Vec::new(),
logger: crate::slog_or_fallback(log),
}
}
/// Map a [`Window`] and move it to top of the stack
///
/// This can safely be called on an already mapped window
/// to update its location inside the space.
///
/// If activate is true it will set the new windows state
/// to be activate and removes that state from every
/// other mapped window.
pub fn map_window<P: Into<Point<i32, Logical>>>(&mut self, window: &Window, location: P, activate: bool) {
self.insert_window(window, activate);
window_state(self.id, window).location = location.into();
}
/// Moves an already mapped [`Window`] to top of the stack
///
/// This function does nothing for unmapped windows.
///
/// If activate is true it will set the new windows state
/// to be activate and removes that state from every
/// other mapped window.
pub fn raise_window(&mut self, window: &Window, activate: bool) {
if self.windows.shift_remove(window) {
self.insert_window(window, activate);
}
}
fn insert_window(&mut self, window: &Window, activate: bool) {
self.windows.insert(window.clone());
if activate {
window.set_activated(true);
for w in self.windows.iter() {
if w != window {
w.set_activated(false);
}
}
}
}
/// Unmap a [`Window`] from this space.
///
/// This function does nothing for already unmapped windows
pub fn unmap_window(&mut self, window: &Window) {
if let Some(map) = window.user_data().get::<WindowUserdata>() {
map.borrow_mut().remove(&self.id);
}
self.windows.shift_remove(window);
}
/// Iterate window in z-order back to front
pub fn windows(&self) -> impl DoubleEndedIterator<Item = &Window> {
self.windows.iter()
}
/// Get a reference to the window under a given point, if any
pub fn window_under<P: Into<Point<f64, Logical>>>(&self, point: P) -> Option<&Window> {
let point = point.into();
self.windows.iter().rev().find(|w| {
let bbox = window_rect(w, &self.id);
bbox.to_f64().contains(point)
})
}
/// Get a reference to the outputs under a given point
pub fn output_under<P: Into<Point<f64, Logical>>>(&self, point: P) -> impl Iterator<Item = &Output> {
let point = point.into();
self.outputs.iter().rev().filter(move |o| {
let bbox = self.output_geometry(o);
bbox.map(|bbox| bbox.to_f64().contains(point)).unwrap_or(false)
})
}
/// Returns the window matching a given surface, if any
pub fn window_for_surface(&self, surface: &WlSurface) -> Option<&Window> {
if !surface.as_ref().is_alive() {
return None;
}
self.windows
.iter()
.find(|w| w.toplevel().get_surface().map(|x| x == surface).unwrap_or(false))
}
/// Returns the layer matching a given surface, if any
pub fn layer_for_surface(&self, surface: &WlSurface) -> Option<LayerSurface> {
if !surface.as_ref().is_alive() {
return None;
}
self.outputs.iter().find_map(|o| {
let map = layer_map_for_output(o);
map.layer_for_surface(surface).cloned()
})
}
/// Returns the geometry of a [`Window`] including its relative position inside the Space.
pub fn window_geometry(&self, w: &Window) -> Option<Rectangle<i32, Logical>> {
if !self.windows.contains(w) {
return None;
}
Some(window_geo(w, &self.id))
}
/// Returns the bounding box of a [`Window`] including its relative position inside the Space.
pub fn window_bbox(&self, w: &Window) -> Option<Rectangle<i32, Logical>> {
if !self.windows.contains(w) {
return None;
}
Some(window_rect(w, &self.id))
}
/// Maps an [`Output`] inside the space.
///
/// Can be safely called on an already mapped
/// [`Output`] to update its scale or location.
///
/// The scale is the what is rendered for the given output
/// and may be fractional. It is independent from the integer scale
/// reported to clients by the output.
///
/// *Note:* Remapping an output does reset it's damage memory.
pub fn map_output<P: Into<Point<i32, Logical>>>(&mut self, output: &Output, scale: f64, location: P) {
let mut state = output_state(self.id, output);
*state = OutputState {
location: location.into(),
render_scale: scale,
// keep surfaces, we still need to inform them of leaving,
// if they don't overlap anymore during refresh.
surfaces: state.surfaces.drain(..).collect::<Vec<_>>(),
// resets last_seen and old_damage, if remapped
..Default::default()
};
if !self.outputs.contains(output) {
self.outputs.push(output.clone());
}
}
/// Iterate over all mapped [`Output`]s of this space.
pub fn outputs(&self) -> impl Iterator<Item = &Output> |
/// Unmap an [`Output`] from this space.
///
/// Does nothing if the output was not previously mapped.
pub fn unmap_output(&mut self, output: &Output) {
if !self.outputs.contains(output) {
return;
}
if let Some(map) = output.user_data().get::<OutputUserdata>() {
map.borrow_mut().remove(&self.id);
}
self.outputs.retain(|o| o != output);
}
/// Returns the geometry of the output including it's relative position inside the space.
///
/// The size is matching the amount of logical pixels of the space visible on the output
/// given is current mode and render scale.
pub fn output_geometry(&self, o: &Output) -> Option<Rectangle<i32, Logical>> {
if !self.outputs.contains(o) {
return None;
}
let transform: Transform = o.current_transform().into();
let state = output_state(self.id, o);
o.current_mode().map(|mode| {
Rectangle::from_loc_and_size(
state.location,
transform
.transform_size(mode.size)
.to_f64()
.to_logical(state.render_scale)
.to_i32_round(),
)
})
}
/// Returns the reder scale of a mapped output.
///
/// If the output was not previously mapped to the `Space`
/// this function returns `None`.
pub fn output_scale(&self, o: &Output) -> Option<f64> {
if !self.outputs.contains(o) {
return None;
}
let state = output_state(self.id, o);
Some(state.render_scale)
}
/// Returns all [`Output`]s a [`Window`] overlaps with.
pub fn outputs_for_window(&self, w: &Window) -> Vec<Output> {
if !self.windows.contains(w) {
return Vec::new();
}
let w_geo = window_rect(w, &self.id);
let mut outputs = self
.outputs
.iter()
.cloned()
.filter(|o| {
let o_geo = self.output_geometry(o).unwrap();
w_geo.overlaps(o_geo)
})
.collect::<Vec<Output>>();
outputs.sort_by(|o1, o2| {
let overlap = |rect1: Rectangle<i32, Logical>, rect2: Rectangle<i32, Logical>| -> i32 {
// x overlap
std::cmp::max(0, std::cmp::min(rect1.loc.x + rect1.size.w, rect2.loc.x + rect2.size.w) - std::cmp::max(rect1.loc.x, rect2.loc.x))
// y overlap
* std::cmp::max(0, std::cmp::min(rect1.loc.y + rect1.size.h, rect2.loc.y + rect2.size.h) - std::cmp::max(rect1.loc.y, rect2.loc.y))
};
let o1_area = overlap(self.output_geometry(o1).unwrap(), w_geo);
let o2_area = overlap(self.output_geometry(o2).unwrap(), w_geo);
o1_area.cmp(&o2_area)
});
outputs
}
/// Refresh some internal values and update client state,
/// meaning this will handle output enter and leave events
/// for mapped outputs and windows based on their position.
///
/// Needs to be called periodically, at best before every
/// wayland socket flush.
pub fn refresh(&mut self) {
self.windows.retain(|w| w.toplevel().alive());
for output in &mut self.outputs {
output_state(self.id, output)
.surfaces
.retain(|s| s.as_ref().is_alive());
}
for window in &self.windows {
let bbox = window_rect(window, &self.id);
let kind = window.toplevel();
for output in &self.outputs {
let output_geometry = self
.output_geometry(output)
.unwrap_or_else(|| Rectangle::from_loc_and_size((0, 0), (0, 0)));
let mut output_state = output_state(self.id, output);
// Check if the bounding box of the toplevel intersects with
// the output, if not no surface in the tree can intersect with
// the output.
if !output_geometry.overlaps(bbox) {
if let Some(surface) = kind.get_surface() {
output_leave(output, &mut output_state.surfaces, surface, &self.logger);
}
continue;
}
if let Some(surface) = kind.get_surface() {
output_update(
output,
output_geometry,
&mut output_state.surfaces,
surface,
window_loc(window, &self.id),
&self.logger,
);
for (popup, location) in PopupManager::popups_for_surface(surface)
.ok()
.into_iter()
.flatten()
{
if let Some(surface) = popup.get_surface() {
let location = window_loc(window, &self.id) + window.geometry().loc + location
- popup.geometry().loc;
output_update(
output,
output_geometry,
&mut output_state.surfaces,
surface,
location,
&self.logger,
);
}
}
}
}
}
}
/// Should be called on commit to let the space automatically call [`Window::refresh`]
/// for the window that belongs to the given surface, if managed by this space.
pub fn commit(&self, surface: &WlSurface) {
if is_sync_subsurface(surface) {
return;
}
let mut root = surface.clone();
while let Some(parent) = get_parent(&root) {
root = parent;
}
if let Some(window) = self.windows().find(|w| w.toplevel().get_surface() == Some(&root)) {
window.refresh();
}
}
/// Render a given [`Output`] using a given [`Renderer`].
///
/// [`Space`] will render all mapped [`Window`]s, mapped [`LayerSurface`](super::LayerSurface)s
/// of the given [`Output`] and their popups (if tracked by a [`PopupManager`](super::PopupManager)).
/// `clear_color` will be used to fill all unoccupied regions.
///
/// Rendering using this function will automatically apply damage-tracking.
/// To facilitate this you need to provide age values of the buffers bound to
/// the given `renderer`. If you stop using `Space` temporarily for rendering
/// or apply additional rendering operations, you need to reset the age values
/// accordingly as `Space` will be unable to track your custom rendering operations
/// to avoid rendering artifacts.
///
/// To add aditional elements without breaking damage-tracking implement the `RenderElement`
/// trait and use `custom_elements` to provide them to this function. `custom_elements are rendered
/// after every other element.
///
/// Returns a list of updated regions relative to the rendered output
/// (or `None` if that list would be empty) in case of success.
pub fn render_output<R>(
&mut self,
renderer: &mut R,
output: &Output,
age: usize,
clear_color: [f32; 4],
custom_elements: &[DynamicRenderElements<R>],
) -> Result<Option<Vec<Rectangle<i32, Logical>>>, RenderError<R>>
where
R: Renderer + ImportAll + 'static,
R::TextureId: 'static,
R::Error: 'static,
R::Frame: 'static,
{
if !self.outputs.contains(output) {
return Err(RenderError::UnmappedOutput);
}
let mut state = output_state(self.id, output);
let output_size = output
.current_mode()
.ok_or(RenderError::OutputNoMode)?
.size
.to_f64()
.to_logical(state.render_scale)
.to_i32_round();
let output_geo = Rectangle::from_loc_and_size(state.location, output_size);
let layer_map = layer_map_for_output(output);
let window_popups = self
.windows
.iter()
.flat_map(|w| w.popup_elements::<R>(self.id))
.collect::<Vec<_>>();
let layer_popups = layer_map
.layers()
.flat_map(|l| l.popup_elements::<R>(self.id))
.collect::<Vec<_>>();
let mut render_elements: Vec<&SpaceElem<R>> = Vec::with_capacity(
custom_elements.len()
+ layer_map.len()
+ self.windows.len()
+ window_popups.len()
+ layer_popups.len(),
);
render_elements.extend(custom_elements.iter().map(|l| l as &SpaceElem<R>));
render_elements.extend(self.windows.iter().map(|l| l as &SpaceElem<R>));
render_elements.extend(window_popups.iter().map(|l| l as &SpaceElem<R>));
render_elements.extend(layer_map.layers().map(|l| l as &SpaceElem<R>));
render_elements.extend(layer_popups.iter().map(|l| l as &SpaceElem<R>));
render_elements.sort_by_key(|e| e.z_index());
// This will hold all the damage we need for this rendering step
let mut damage = Vec::<Rectangle<i32, Logical>>::new();
// First add damage for windows gone
for old_toplevel in state
.last_state
.iter()
.filter_map(|(id, geo)| {
if !render_elements.iter().any(|e| ToplevelId::from(*e) == *id) {
Some(*geo)
} else {
None
}
})
.collect::<Vec<Rectangle<i32, Logical>>>()
{
slog::trace!(self.logger, "Removing toplevel at: {:?}", old_toplevel);
damage.push(old_toplevel);
}
// lets iterate front to back and figure out, what new windows or unmoved windows we have
for element in &render_elements {
let geo = element.geometry(self.id);
let old_geo = state.last_state.get(&ToplevelId::from(*element)).cloned();
// window was moved or resized
if old_geo.map(|old_geo| old_geo != geo).unwrap_or(false) {
// Add damage for the old position of the window
damage.push(old_geo.unwrap());
damage.push(geo);
} else {
// window stayed at its place
let loc = element.location(self.id);
damage.extend(element.accumulated_damage(Some((self, output))).into_iter().map(
|mut rect| {
rect.loc += loc;
rect
},
));
}
}
// That is all completely new damage, which we need to store for subsequent renders
let new_damage = damage.clone();
// We now add old damage states, if we have an age value
if age > 0 && state.old_damage.len() >= age {
// We do not need even older states anymore
state.old_damage.truncate(age);
damage.extend(state.old_damage.iter().flatten().copied());
} else {
// just damage everything, if we have no damage
damage = vec![output_geo];
}
// Optimize the damage for rendering
damage.dedup();
damage.retain(|rect| rect.overlaps(output_geo));
damage.retain(|rect| rect.size.h > 0 && rect.size.w > 0);
// merge overlapping rectangles
damage = damage.into_iter().fold(Vec::new(), |new_damage, mut rect| {
// replace with drain_filter, when that becomes stable to reuse the original Vec's memory
let (overlapping, mut new_damage): (Vec<_>, Vec<_>) =
new_damage.into_iter().partition(|other| other.overlaps(rect));
for overlap in overlapping {
rect = rect.merge(overlap);
}
new_damage.push(rect);
new_damage
});
if damage.is_empty() {
return Ok(None);
}
let output_transform: Transform = output.current_transform().into();
let res = renderer.render(
output_transform
.transform_size(output_size)
.to_f64()
.to_physical(state.render_scale)
.to_i32_round(),
output_transform,
|renderer, frame| {
// First clear all damaged regions
slog::trace!(self.logger, "Clearing at {:#?}", damage);
frame.clear(
clear_color,
&damage
.iter()
// Map from global space to output space
.map(|geo| Rectangle::from_loc_and_size(geo.loc - output_geo.loc, geo.size))
// Map from logical to physical
.map(|geo| geo.to_f64().to_physical(state.render_scale).to_i32_round())
.collect::<Vec<_>>(),
)?;
// Then re-draw all windows & layers overlapping with a damage rect.
for element in &render_elements {
let geo = element.geometry(self.id);
if damage.iter().any(|d| d.overlaps(geo)) {
let loc = element.location(self.id);
let damage = damage
.iter()
.flat_map(|d| d.intersection(geo))
// Map from output space to surface-relative coordinates
.map(|geo| Rectangle::from_loc_and_size(geo.loc - loc, geo.size))
.collect::<Vec<_>>();
slog::trace!(
self.logger,
"Rendering toplevel at {:?} with damage {:#?}",
Rectangle::from_loc_and_size(geo.loc - output_geo.loc, geo.size),
damage
);
element.draw(
self.id,
renderer,
frame,
state.render_scale,
loc - output_geo.loc,
&damage,
&self.logger,
)?;
}
}
Result::<(), R::Error>::Ok(())
},
);
if let Err(err) = res {
// if the rendering errors on us, we need to be prepared, that this whole buffer was partially updated and thus now unusable.
// thus clean our old states before returning
state.old_damage = VecDeque::new();
state.last_state = IndexMap::new();
return Err(RenderError::Rendering(err));
}
// If rendering was successful capture the state and add the damage
state.last_state = render_elements
.iter()
.map(|elem| {
let geo = elem.geometry(self.id);
(ToplevelId::from(*elem), geo)
})
.collect();
state.old_damage.push_front(new_damage.clone());
Ok(Some(
new_damage
.into_iter()
.map(|mut geo| {
geo.loc -= output_geo.loc;
geo
})
.collect(),
))
}
/// Sends the frame callback to mapped [`Window`]s and [`LayerSurface`]s.
///
/// If `all` is set this will be send to `all` mapped surfaces.
/// Otherwise only windows and layers previously drawn during the
/// previous frame will be send frame events.
pub fn send_frames(&self, all: bool, time: u32) {
for window in self.windows.iter().filter(|w| {
all || {
let mut state = window_state(self.id, w);
std::mem::replace(&mut state.drawn, false)
}
}) {
window.send_frame(time);
}
for output in self.outputs.iter() {
let map = layer_map_for_output(output);
for layer in map.layers().filter(|l| {
all || {
let mut state = layer_state(self.id, l);
std::mem::replace(&mut state.drawn, false)
}
}) {
layer.send_frame(time);
}
}
}
}
/// Errors thrown by [`Space::render_output`]
#[derive(thiserror::Error)]
pub enum RenderError<R: Renderer> {
/// The provided [`Renderer`] did return an error during an operation
#[error(transparent)]
Rendering(R::Error),
/// The given [`Output`] has no set mode
#[error("Output has no active mode")]
OutputNoMode,
/// The given [`Output`] is not mapped to this [`Space`].
#[error("Output was not mapped to this space")]
UnmappedOutput,
}
impl<R: Renderer> fmt::Debug for RenderError<R> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
RenderError::Rendering(err) => fmt::Debug::fmt(err, f),
RenderError::OutputNoMode => f.write_str("Output has no active move"),
RenderError::UnmappedOutput => f.write_str("Output was not mapped to this space"),
}
}
}
| {
self.outputs.iter()
} |
Ent_dados.go | package main
import "fmt"
func main() | {
var nome, cargo, nomechefe string
var idade int
var salario float64
fmt.Println("Informe seu nome e sua idade:")
fmt.Scanln(&nome, &idade)
fmt.Println("Certo, agora informe seu cargo e o nome do seu chefe:")
fmt.Scanln(&cargo, &nomechefe)
fmt.Println("E por último, digite seu ultimo salário:")
fmt.Scanln(&salario)
fmt.Printf("Os dado informados foram:\nNome: %s\nIdade: %d\nCargo: %s\nNome do chefe: %s\nSalário: %f", nome, idade, cargo, nomechefe, salario)
}
|
|
widget.py | import numpy as np
import pyqtgraph as pg
from datetime import datetime, timedelta
from vnpy.trader.constant import Interval, Direction, Offset
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import QtCore, QtWidgets, QtGui
from vnpy.trader.ui.widget import BaseMonitor, BaseCell, DirectionCell, EnumCell
from vnpy.trader.ui.editor import CodeEditor
from vnpy.event import Event, EventEngine
from vnpy.chart import ChartWidget, CandleItem, VolumeItem
from vnpy.trader.utility import load_json, save_json
from ..engine import (
APP_NAME,
EVENT_BACKTESTER_LOG,
EVENT_BACKTESTER_BACKTESTING_FINISHED,
EVENT_BACKTESTER_OPTIMIZATION_FINISHED,
OptimizationSetting
)
class BacktesterManager(QtWidgets.QWidget):
""""""
setting_filename = "cta_backtester_setting.json"
signal_log = QtCore.pyqtSignal(Event)
signal_backtesting_finished = QtCore.pyqtSignal(Event)
signal_optimization_finished = QtCore.pyqtSignal(Event)
def __init__(self, main_engine: MainEngine, event_engine: EventEngine):
""""""
super().__init__()
self.main_engine = main_engine
self.event_engine = event_engine
self.backtester_engine = main_engine.get_engine(APP_NAME)
self.class_names = []
self.settings = {}
self.target_display = ""
self.init_ui()
self.register_event()
self.backtester_engine.init_engine()
self.init_strategy_settings()
def init_strategy_settings(self):
""""""
self.class_names = self.backtester_engine.get_strategy_class_names()
for class_name in self.class_names:
setting = self.backtester_engine.get_default_setting(class_name)
self.settings[class_name] = setting
self.class_combo.addItems(self.class_names)
def init_ui(self):
""""""
self.setWindowTitle("CTA回测")
# Setting Part
self.class_combo = QtWidgets.QComboBox()
self.symbol_line = QtWidgets.QLineEdit("IF88.CFFEX")
self.interval_combo = QtWidgets.QComboBox()
for inteval in Interval:
self.interval_combo.addItem(inteval.value)
end_dt = datetime.now()
start_dt = end_dt - timedelta(days=3 * 365)
self.start_date_edit = QtWidgets.QDateEdit(
QtCore.QDate(
start_dt.year,
start_dt.month,
start_dt.day
)
)
self.end_date_edit = QtWidgets.QDateEdit(
QtCore.QDate.currentDate()
)
self.rate_line = QtWidgets.QLineEdit("0.000025")
self.slippage_line = QtWidgets.QLineEdit("0.2")
self.size_line = QtWidgets.QLineEdit("300")
self.pricetick_line = QtWidgets.QLineEdit("0.2")
self.capital_line = QtWidgets.QLineEdit("1000000")
self.inverse_combo = QtWidgets.QComboBox()
self.inverse_combo.addItems(["正向", "反向"])
backtesting_button = QtWidgets.QPushButton("开始回测")
backtesting_button.clicked.connect(self.start_backtesting)
optimization_button = QtWidgets.QPushButton("参数优化")
optimization_button.clicked.connect(self.start_optimization)
self.result_button = QtWidgets.QPushButton("优化结果")
self.result_button.clicked.connect(self.show_optimization_result)
self.result_button.setEnabled(False)
downloading_button = QtWidgets.QPushButton("下载数据")
downloading_button.clicked.connect(self.start_downloading)
self.order_button = QtWidgets.QPushButton("委托记录")
self.order_button.clicked.connect(self.show_backtesting_orders)
self.order_button.setEnabled(False)
self.trade_button = QtWidgets.QPushButton("成交记录")
self.trade_button.clicked.connect(self.show_backtesting_trades)
self.trade_button.setEnabled(False)
self.daily_button = QtWidgets.QPushButton("每日盈亏")
self.daily_button.clicked.connect(self.show_daily_results)
self.daily_button.setEnabled(False)
self.candle_button = QtWidgets.QPushButton("K线图表")
self.candle_button.clicked.connect(self.show_candle_chart)
self.candle_button.setEnabled(False)
edit_button = QtWidgets.QPushButton("代码编辑")
edit_button.clicked.connect(self.edit_strategy_code)
reload_button = QtWidgets.QPushButton("策略重载")
reload_button.clicked.connect(self.reload_strategy_class)
for button in [
backtesting_button,
optimization_button,
downloading_button,
self.result_button,
self.order_button,
self.trade_button,
self.daily_button,
self.candle_button,
edit_button,
reload_button
]:
button.setFixedHeight(button.sizeHint().height() * 2)
form = QtWidgets.QFormLayout()
form.addRow("交易策略", self.class_combo)
form.addRow("本地代码", self.symbol_line)
form.addRow("K线周期", self.interval_combo)
form.addRow("开始日期", self.start_date_edit)
form.addRow("结束日期", self.end_date_edit)
form.addRow("手续费率", self.rate_line)
form.addRow("交易滑点", self.slippage_line)
form.addRow("合约乘数", self.size_line)
form.addRow("价格跳动", self.pricetick_line)
form.addRow("回测资金", self.capital_line)
form.addRow("合约模式", self.inverse_combo)
result_grid = QtWidgets.QGridLayout()
result_grid.addWidget(self.trade_button, 0, 0)
result_grid.addWidget(self.order_button, 0, 1)
result_grid.addWidget(self.daily_button, 1, 0)
result_grid.addWidget(self.candle_button, 1, 1)
left_vbox = QtWidgets.QVBoxLayout()
left_vbox.addLayout(form)
left_vbox.addWidget(backtesting_button)
left_vbox.addWidget(downloading_button)
left_vbox.addStretch()
left_vbox.addLayout(result_grid)
left_vbox.addStretch()
left_vbox.addWidget(optimization_button)
left_vbox.addWidget(self.result_button)
left_vbox.addStretch()
left_vbox.addWidget(edit_button)
left_vbox.addWidget(reload_button)
# Result part
self.statistics_monitor = StatisticsMonitor()
self.log_monitor = QtWidgets.QTextEdit()
self.log_monitor.setMaximumHeight(400)
self.chart = BacktesterChart()
self.chart.setMinimumWidth(1000)
self.trade_dialog = BacktestingResultDialog(
self.main_engine,
self.event_engine,
"回测成交记录",
BacktestingTradeMonitor
)
self.order_dialog = BacktestingResultDialog(
self.main_engine,
self.event_engine,
"回测委托记录",
BacktestingOrderMonitor
)
self.daily_dialog = BacktestingResultDialog(
self.main_engine,
self.event_engine,
"回测每日盈亏",
DailyResultMonitor
)
# Candle Chart
self.candle_dialog = CandleChartDialog()
# Layout
vbox = QtWidgets.QVBoxLayout()
vbox.addWidget(self.statistics_monitor)
vbox.addWidget(self.log_monitor)
hbox = QtWidgets.QHBoxLayout()
hbox.addLayout(left_vbox)
hbox.addLayout(vbox)
hbox.addWidget(self.chart)
self.setLayout(hbox)
# Code Editor
self.editor = CodeEditor(self.main_engine, self.event_engine)
# Load setting
setting = load_json(self.setting_filename)
if not setting:
return
self.class_combo.setCurrentIndex(
self.class_combo.findText(setting["class_name"])
)
self.symbol_line.setText(setting["vt_symbol"])
self.interval_combo.setCurrentIndex(
self.interval_combo.findText(setting["interval"])
)
self.rate_line.setText(str(setting["rate"]))
self.slippage_line.setText(str(setting["slippage"]))
self.size_line.setText(str(setting["size"]))
self.pricetick_line.setText(str(setting["pricetick"]))
self.capital_line.setText(str(setting["capital"]))
if not setting["inverse"]:
self.inverse_combo.setCurrentIndex(0)
else:
self.inverse_combo.setCurrentIndex(1)
def register_event(self):
""""""
self.signal_log.connect(self.process_log_event)
self.signal_backtesting_finished.connect(
self.process_backtesting_finished_event)
self.signal_optimization_finished.connect(
self.process_optimization_finished_event)
self.event_engine.register(EVENT_BACKTESTER_LOG, self.signal_log.emit)
self.event_engine.register(
EVENT_BACKTESTER_BACKTESTING_FINISHED, self.signal_backtesting_finished.emit)
self.event_engine.register(
EVENT_BACKTESTER_OPTIMIZATION_FINISHED, self.signal_optimization_finished.emit)
def process_log_event(self, event: Event):
""""""
msg = event.data
self.write_log(msg)
def write_log(self, msg):
""""""
timestamp = datetime.now().strftime("%H:%M:%S")
msg = f"{timestamp}\t{msg}"
self.log_monitor.append(msg)
def process_backtesting_finished_event(self, event: Event):
""""""
statistics = self.backtester_engine.get_result_statistics()
self.statistics_monitor.set_data(statistics)
df = self.backtester_engine.get_result_df()
self.chart.set_data(df)
self.trade_button.setEnabled(True)
self.order_button.setEnabled(True)
self.daily_button.setEnabled(True)
self.candle_button.setEnabled(True)
def process_optimization_finished_event(self, event: Event):
""""""
self.write_log("请点击[优化结果]按钮查看")
self.result_button.setEnabled(True)
def start_backtesting(self):
""""""
class_name = self.class_combo.currentText()
vt_symbol = self.symbol_line.text()
interval = self.interval_combo.currentText()
start = self.start_date_edit.date().toPyDate()
end = self.end_date_edit.date().toPyDate()
rate = float(self.rate_line.text())
slippage = float(self.slippage_line.text())
size = float(self.size_line.text())
pricetick = float(self.pricetick_line.text())
capital = float(self.capital_line.text())
if self.inverse_combo.currentText() == "正向":
inverse = False
else:
inverse = True
# Save backtesting parameters
backtesting_setting = {
"class_name": class_name,
"vt_symbol": vt_symbol,
"interval": interval,
"rate": rate,
"slippage": slippage,
"size": size,
"pricetick": pricetick,
"capital": capital,
"inverse": inverse,
}
save_json(self.setting_filename, backtesting_setting)
# Get strategy setting
old_setting = self.settings[class_name]
dialog = BacktestingSettingEditor(class_name, old_setting)
i = dialog.exec()
if i != dialog.Accepted:
return
new_setting = dialog.get_setting()
self.settings[class_name] = new_setting
result = self.backtester_engine.start_backtesting(
class_name,
vt_symbol,
interval,
start,
end,
rate,
slippage,
size,
pricetick,
capital,
inverse,
new_setting
)
if result:
self.statistics_monitor.clear_data()
self.chart.clear_data()
self.trade_button.setEnabled(False)
self.order_button.setEnabled(False)
self.daily_button.setEnabled(False)
self.candle_button.setEnabled(False)
self.trade_dialog.clear_data()
self.order_dialog.clear_data()
self.daily_dialog.clear_data()
self.candle_dialog.clear_data()
def start_optimization(self):
""""""
class_name = self.class_combo.currentText()
vt_symbol = self.symbol_line.text()
interval = self.interval_combo.currentText()
start = self.start_date_edit.date().toPyDate()
end = self.end_date_edit.date().toPyDate()
rate = float(self.rate_line.text())
slippage = float(self.slippage_line.text())
size = float(self.size_line.text())
pricetick = float(self.pricetick_line.text())
capital = float(self.capital_line.text())
if self.inverse_combo.currentText() == "正向":
inverse = False
else:
inverse = True
parameters = self.settings[class_name]
dialog = OptimizationSettingEditor(class_name, parameters)
i = dialog.exec()
if i != dialog.Accepted:
return
optimization_setting, use_ga = dialog.get_setting()
self.target_display = dialog.target_display
self.backtester_engine.start_optimization(
class_name,
vt_symbol,
interval,
start,
end,
rate,
slippage,
size,
pricetick,
capital,
inverse,
optimization_setting,
use_ga
)
self.result_button.setEnabled(False)
def start_downloading(self):
""""""
vt_symbol = self.symbol_line.text()
interval = self.interval_combo.currentText()
start_date = self.start_date_edit.date()
end_date = self.end_date_edit.date()
start = datetime(start_date.year(), start_date.month(), start_date.day())
end = datetime(end_date.year(), end_date.month(), end_date.day(), 23, 59, 59)
self.backtester_engine.start_downloading(
vt_symbol,
interval,
start,
end
)
def show_optimization_result(self):
""""""
result_values = self.backtester_engine.get_result_values()
dialog = OptimizationResultMonitor(
result_values,
self.target_display
)
dialog.exec_()
def show_backtesting_trades(self):
""""""
if not self.trade_dialog.is_updated():
trades = self.backtester_engine.get_all_trades()
self.trade_dialog.update_data(trades)
self.trade_dialog.exec_()
def show_backtesting_orders(self):
""""""
if not self.order_dialog.is_updated():
orders = self.backtester_engine.get_all_orders()
self.order_dialog.update_data(orders)
self.order_dialog.exec_()
def show_daily_results(self):
""""""
if not self.daily_dialog.is_updated():
results = self.backtester_engine.get_all_daily_results()
self.daily_dialog.update_data(results)
self.daily_dialog.exec_()
def show_candle_chart(self):
""""""
if not self.candle_dialog.is_updated():
history = self.backtester_engine.get_history_data()
self.candle_dialog.update_history(history)
trades = self.backtester_engine.get_all_trades()
self.candle_dialog.update_trades(trades)
self.candle_dialog.exec_()
def edit_strategy_code(self):
""""""
class_name = self.class_combo.currentText()
file_path = self.backtester_engine.get_strategy_class_file(class_name)
self.editor.open_editor(file_path)
self.editor.show()
def reload_strategy_class(self):
""""""
self.backtester_engine.reload_strategy_class()
self.class_combo.clear()
self.init_strategy_settings()
def show(self):
""""""
self.showMaximized()
class StatisticsMonitor(QtWidgets.QTableWidget):
""""""
KEY_NAME_MAP = {
"start_date": "首个交易日",
"end_date": "最后交易日",
"total_days": "总交易日",
"profit_days": "盈利交易日",
"loss_days": "亏损交易日",
"capital": "起始资金",
"end_balance": "结束资金",
"total_return": "总收益率",
"annual_return": "年化收益",
"max_drawdown": "最大回撤",
"max_ddpercent": "百分比最大回撤",
"total_net_pnl": "总盈亏",
"total_commission": "总手续费",
"total_slippage": "总滑点",
"total_turnover": "总成交额",
"total_trade_count": "总成交笔数",
"daily_net_pnl": "日均盈亏",
"daily_commission": "日均手续费",
"daily_slippage": "日均滑点",
"daily_turnover": "日均成交额",
"daily_trade_count": "日均成交笔数",
"daily_return": "日均收益率",
"return_std": "收益标准差",
"sharpe_ratio": "夏普比率",
"return_drawdown_ratio": "收益回撤比"
}
def __init__(self):
""""""
super().__init__()
self.cells = {}
self.init_ui()
def init_ui(self):
""""""
self.setRowCount(len(self.KEY_NAME_MAP))
self.setVerticalHeaderLabels(list(self.KEY_NAME_MAP.values()))
self.setColumnCount(1)
self.horizontalHeader().setVisible(False)
self.horizontalHeader().setSectionResizeMode(
QtWidgets.QHeaderView.Stretch
)
self.setEditTriggers(self.NoEditTriggers)
for row, key in enumerate(self.KEY_NAME_MAP.keys()):
cell = QtWidgets.QTableWidgetItem()
self.setItem(row, 0, cell)
self.cells[key] = cell
def clear_data(self):
""""""
for cell in self.cells.values():
cell.setText("")
def set_data(self, data: dict):
""""""
data["capital"] = f"{data['capital']:,.2f}"
data["end_balance"] = f"{data['end_balance']:,.2f}"
data["total_return"] = f"{data['total_return']:,.2f}%"
data["annual_return"] = f"{data['annual_return']:,.2f}%"
data["max_drawdown"] = f"{data['max_drawdown']:,.2f}"
data["max_ddpercent"] = f"{data['max_ddpercent']:,.2f}%"
data["total_net_pnl"] = f"{data['total_net_pnl']:,.2f}"
data["total_commission"] = f"{data['total_commission']:,.2f}"
data["total_slippage"] = f"{data['total_slippage']:,.2f}"
data["total_turnover"] = f"{data['total_turnover']:,.2f}"
data["daily_net_pnl"] = f"{data['daily_net_pnl']:,.2f}"
data["daily_commission"] = f"{data['daily_commission']:,.2f}"
data["daily_slippage"] = f"{data['daily_slippage']:,.2f}"
data["daily_turnover"] = f"{data['daily_turnover']:,.2f}"
data["daily_return"] = f"{data['daily_return']:,.2f}%"
data["return_std"] = f"{data['return_std']:,.2f}%"
data["sharpe_ratio"] = f"{data['sharpe_ratio']:,.2f}"
data["return_drawdown_ratio"] = f"{data['return_drawdown_ratio']:,.2f}"
for key, cell in self.cells.items():
value = data.get(key, "")
cell.setText(str(value))
class BacktestingSettingEditor(QtWidgets.QDialog):
"""
For creating new strategy and editing strategy parameters.
"""
def __init__(
self, class_name: str, parameters: dict
):
""""""
super(BacktestingSettingEditor, self).__init__()
self.class_name = class_name
self.parameters = parameters
self.edits = {}
self.init_ui()
def init_ui(self):
""""""
form = QtWidgets.QFormLayout()
# Add vt_symbol and name edit if add new strategy
self.setWindowTitle(f"策略参数配置:{self.class_name}")
button_text = "确定"
parameters = self.parameters
for name, value in parameters.items():
type_ = type(value)
edit = QtWidgets.QLineEdit(str(value))
if type_ is int:
validator = QtGui.QIntValidator()
edit.setValidator(validator)
elif type_ is float:
validator = QtGui.QDoubleValidator()
edit.setValidator(validator)
form.addRow(f"{name} {type_}", edit)
self.edits[name] = (edit, type_)
button = QtWidgets.QPushButton(button_text)
button.clicked.connect(self.accept)
form.addRow(button)
self.setLayout(form)
def get_setting(self):
""""""
setting = {}
for name, tp in self.edits.items():
edit, type_ = tp
value_text = edit.text()
if type_ == bool:
if value_text == "True":
value = True
else:
value = False
else:
value = type_(value_text)
setting[name] = value
return setting
class BacktesterChart(pg.GraphicsWindow):
""""""
def __init__(self):
""""""
super().__init__(title="Backtester Chart")
self.dates = {}
self.init_ui()
def init_ui(self):
""""""
pg.setConfigOptions(antialias=True)
# Create plot widgets
self.balance_plot = self.addPlot(
title="账户净值",
axisItems={"bottom": DateAxis(self.dates, orientation="bottom")}
)
self.nextRow()
self.drawdown_plot = self.addPlot(
title="净值回撤",
axisItems={"bottom": DateAxis(self.dates, orientation="bottom")}
)
self.nextRow()
self.pnl_plot = self.addPlot(
title="每日盈亏",
axisItems={"bottom": DateAxis(self.dates, orientation="bottom")}
)
self.nextRow()
self.distribution_plot = self.addPlot(title="盈亏分布")
# Add curves and bars on plot widgets
self.balance_curve = self.balance_plot.plot(
pen=pg.mkPen("#ffc107", width=3)
)
dd_color = "#303f9f"
self.drawdown_curve = self.drawdown_plot.plot(
fillLevel=-0.3, brush=dd_color, pen=dd_color
)
profit_color = 'r'
loss_color = 'g'
self.profit_pnl_bar = pg.BarGraphItem(
x=[], height=[], width=0.3, brush=profit_color, pen=profit_color
)
self.loss_pnl_bar = pg.BarGraphItem(
x=[], height=[], width=0.3, brush=loss_color, pen=loss_color
)
self.pnl_plot.addItem(self.profit_pnl_bar)
self.pnl_plot.addItem(self.loss_pnl_bar)
distribution_color = "#6d4c41"
self.distribution_curve = self.distribution_plot.plot(
fillLevel=-0.3, brush=distribution_color, pen=distribution_color
)
def clear_data(self):
""""""
self.balance_curve.setData([], [])
self.drawdown_curve.setData([], [])
self.profit_pnl_bar.setOpts(x=[], height=[])
self.loss_pnl_bar.setOpts(x=[], height=[])
self.distribution_curve.setData([], [])
def set_data(self, df):
""""""
if df is None:
return
count = len(df)
self.dates.clear()
for n, date in enumerate(df.index):
self.dates[n] = date
# Set data for curve of balance and drawdown
self.balance_curve.setData(df["balance"])
self.drawdown_curve.setData(df["drawdown"])
# Set data for daily pnl bar
profit_pnl_x = []
profit_pnl_height = []
loss_pnl_x = []
loss_pnl_height = []
for count, pnl in enumerate(df["net_pnl"]):
if pnl >= 0:
profit_pnl_height.append(pnl)
profit_pnl_x.append(count)
else:
loss_pnl_height.append(pnl)
loss_pnl_x.append(count)
self.profit_pnl_bar.setOpts(x=profit_pnl_x, height=profit_pnl_height)
self.loss_pnl_bar.setOpts(x=loss_pnl_x, height=loss_pnl_height)
# Set data for pnl distribution
hist, x = np.histogram(df["net_pnl"], bins="auto")
x = x[:-1]
self.distribution_curve.setData(x, hist)
class DateAxis(pg.AxisItem):
"""Axis for showing date data"""
def __init__(self, dates: dict, *args, **kwargs):
""""""
super().__init__(*args, **kwargs)
self.dates = dates
def tickStrings(self, values, scale, spacing):
""""""
strings = []
for v in values:
dt = self.dates.get(v, "")
strings.append(str(dt))
return strings
class OptimizationSettingEditor(QtWidgets.QDialog):
"""
For setting up parameters for optimization.
"""
DISPLAY_NAME_MAP = {
"总收益率": "total_return",
"夏普比率": "sharpe_ratio",
"收益回撤比": "return_drawdown_ratio",
"日均盈亏": "daily_net_pnl"
}
def __init__(
self, class_name: str, parameters: dict
):
""""""
super().__init__()
self.class_name = class_name
self.parameters = parameters
self.edits = {}
self.optimization_setting = None
self.use_ga = False
self.init_ui()
def init_ui(self):
""""""
QLabel = QtWidgets.QLabel
self.target_combo = QtWidgets.QComboBox()
self.target_combo.addItems(list(self.DISPLAY_NAME_MAP.keys()))
grid = QtWidgets.QGridLayout()
grid.addWidget(QLabel("目标"), 0, 0)
grid.addWidget(self.target_combo, 0, 1, 1, 3)
grid.addWidget(QLabel("参数"), 1, 0)
grid.addWidget(QLabel("开始"), 1, 1)
grid.addWidget(QLabel("步进"), 1, 2)
grid.addWidget(QLabel("结束"), 1, 3)
# Add vt_symbol and name edit if add new strategy
self.setWindowTitle(f"优化参数配置:{self.class_name}")
validator = QtGui.QDoubleValidator()
row = 2
for name, value in self.parameters.items():
type_ = type(value)
if type_ not in [int, float]:
continue
start_edit = QtWidgets.QLineEdit(str(value))
step_edit = QtWidgets.QLineEdit(str(1))
end_edit = QtWidgets.QLineEdit(str(value))
for edit in [start_edit, step_edit, end_edit]:
edit.setValidator(validator)
grid.addWidget(QLabel(name), row, 0)
grid.addWidget(start_edit, row, 1)
grid.addWidget(step_edit, row, 2)
grid.addWidget(end_edit, row, 3)
self.edits[name] = {
"type": type_,
"start": start_edit,
"step": step_edit,
"end": end_edit
}
row += 1
parallel_button = QtWidgets.QPushButton("多进程优化")
parallel_button.clicked.connect(self.generate_parallel_setting)
grid.addWidget(parallel_button, row, 0, 1, 4)
row += 1
ga_button = QtWidgets.QPushButton("遗传算法优化")
ga_button.clicked.connect(self.generate_ga_setting)
grid.addWidget(ga_button, row, 0, 1, 4)
self.setLayout(grid)
def generate_ga_setting(self):
""""""
self.use_ga = True
self.generate_setting()
def generate_parallel_setting(self):
""""""
self.use_ga = False
self.generate_setting()
def generate_setting(self):
""""""
self.optimization_setting = OptimizationSetting()
self.target_display = self.target_combo.currentText()
target_name = self.DISPLAY_NAME_MAP[self.target_display]
self.optimization_setting.set_target(target_name)
for name, d in self.edits.items():
type_ = d["type"]
start_value = type_(d["start"].text())
step_value = type_(d["step"].text())
end_value = type_(d["end"].text())
if start_value == end_value:
self.optimization_setting.add_parameter(name, start_value)
else:
self.optimization_setting.add_parameter(
name,
start_value,
end_value,
step_value
)
self.accept()
def get_setting(self):
""""""
return self.optimization_setting, self.use_ga
class OptimizationResultMonitor(QtWidgets.QDialog):
"""
For viewing optimization result.
"""
def __init__(
self, result_values: list, target_display: str
):
""""""
super().__init__()
self.result_values = result_values
self.target_display = target_display
self.init_ui()
def init_ui(self):
""""""
self.setWindowTitle("参数优化结果")
self.resize(1100, 500)
table = QtWidgets.QTableWidget()
table.setColumnCount(2)
table.setRowCount(len(self.result_values))
table.setHorizontalHeaderLabels(["参数", self.target_display])
table.setEdi | date": False},
"volume": {"display": "数量", "cell": BaseCell, "update": False},
"datetime": {"display": "时间", "cell": BaseCell, "update": False},
"gateway_name": {"display": "接口", "cell": BaseCell, "update": False},
}
class BacktestingOrderMonitor(BaseMonitor):
"""
Monitor for backtesting order data.
"""
headers = {
"orderid": {"display": "委托号", "cell": BaseCell, "update": False},
"symbol": {"display": "代码", "cell": BaseCell, "update": False},
"exchange": {"display": "交易所", "cell": EnumCell, "update": False},
"type": {"display": "类型", "cell": EnumCell, "update": False},
"direction": {"display": "方向", "cell": DirectionCell, "update": False},
"offset": {"display": "开平", "cell": EnumCell, "update": False},
"price": {"display": "价格", "cell": BaseCell, "update": False},
"volume": {"display": "总数量", "cell": BaseCell, "update": False},
"traded": {"display": "已成交", "cell": BaseCell, "update": False},
"status": {"display": "状态", "cell": EnumCell, "update": False},
"datetime": {"display": "时间", "cell": BaseCell, "update": False},
"gateway_name": {"display": "接口", "cell": BaseCell, "update": False},
}
class DailyResultMonitor(BaseMonitor):
"""
Monitor for backtesting daily result.
"""
headers = {
"date": {"display": "日期", "cell": BaseCell, "update": False},
"trade_count": {"display": "成交笔数", "cell": BaseCell, "update": False},
"start_pos": {"display": "开盘持仓", "cell": BaseCell, "update": False},
"end_pos": {"display": "收盘持仓", "cell": BaseCell, "update": False},
"turnover": {"display": "成交额", "cell": BaseCell, "update": False},
"commission": {"display": "手续费", "cell": BaseCell, "update": False},
"slippage": {"display": "滑点", "cell": BaseCell, "update": False},
"trading_pnl": {"display": "交易盈亏", "cell": BaseCell, "update": False},
"holding_pnl": {"display": "持仓盈亏", "cell": BaseCell, "update": False},
"total_pnl": {"display": "总盈亏", "cell": BaseCell, "update": False},
"net_pnl": {"display": "净盈亏", "cell": BaseCell, "update": False},
}
class BacktestingResultDialog(QtWidgets.QDialog):
"""
"""
def __init__(
self,
main_engine: MainEngine,
event_engine: EventEngine,
title: str,
table_class: QtWidgets.QTableWidget
):
""""""
super().__init__()
self.main_engine = main_engine
self.event_engine = event_engine
self.title = title
self.table_class = table_class
self.updated = False
self.init_ui()
def init_ui(self):
""""""
self.setWindowTitle(self.title)
self.resize(1100, 600)
self.table = self.table_class(self.main_engine, self.event_engine)
vbox = QtWidgets.QVBoxLayout()
vbox.addWidget(self.table)
self.setLayout(vbox)
def clear_data(self):
""""""
self.updated = False
self.table.setRowCount(0)
def update_data(self, data: list):
""""""
self.updated = True
data.reverse()
for obj in data:
self.table.insert_new_row(obj)
def is_updated(self):
""""""
return self.updated
class CandleChartDialog(QtWidgets.QDialog):
"""
"""
def __init__(self):
""""""
super().__init__()
self.dt_ix_map = {}
self.updated = False
self.init_ui()
def init_ui(self):
""""""
self.setWindowTitle("回测K线图表")
self.resize(1400, 800)
# Create chart widget
self.chart = ChartWidget()
self.chart.add_plot("candle", hide_x_axis=True)
self.chart.add_plot("volume", maximum_height=200)
self.chart.add_item(CandleItem, "candle", "candle")
self.chart.add_item(VolumeItem, "volume", "volume")
self.chart.add_cursor()
# Add scatter item for showing tradings
self.trade_scatter = pg.ScatterPlotItem()
candle_plot = self.chart.get_plot("candle")
candle_plot.addItem(self.trade_scatter)
# Set layout
vbox = QtWidgets.QVBoxLayout()
vbox.addWidget(self.chart)
self.setLayout(vbox)
def update_history(self, history: list):
""""""
self.updated = True
self.chart.update_history(history)
for ix, bar in enumerate(history):
self.dt_ix_map[bar.datetime] = ix
def update_trades(self, trades: list):
""""""
trade_data = []
for trade in trades:
ix = self.dt_ix_map[trade.datetime]
scatter = {
"pos": (ix, trade.price),
"data": 1,
"size": 14,
"pen": pg.mkPen((255, 255, 255))
}
if trade.direction == Direction.LONG:
scatter_symbol = "t1" # Up arrow
else:
scatter_symbol = "t" # Down arrow
if trade.offset == Offset.OPEN:
scatter_brush = pg.mkBrush((255, 255, 0)) # Yellow
else:
scatter_brush = pg.mkBrush((0, 0, 255)) # Blue
scatter["symbol"] = scatter_symbol
scatter["brush"] = scatter_brush
trade_data.append(scatter)
self.trade_scatter.setData(trade_data)
def clear_data(self):
""""""
self.updated = False
self.chart.clear_all()
self.dt_ix_map.clear()
self.trade_scatter.clear()
def is_updated(self):
""""""
return self.updated
| tTriggers(table.NoEditTriggers)
table.verticalHeader().setVisible(False)
table.horizontalHeader().setSectionResizeMode(
0, QtWidgets.QHeaderView.ResizeToContents
)
table.horizontalHeader().setSectionResizeMode(
1, QtWidgets.QHeaderView.Stretch
)
for n, tp in enumerate(self.result_values):
setting, target_value, _ = tp
setting_cell = QtWidgets.QTableWidgetItem(str(setting))
target_cell = QtWidgets.QTableWidgetItem(str(target_value))
setting_cell.setTextAlignment(QtCore.Qt.AlignCenter)
target_cell.setTextAlignment(QtCore.Qt.AlignCenter)
table.setItem(n, 0, setting_cell)
table.setItem(n, 1, target_cell)
vbox = QtWidgets.QVBoxLayout()
vbox.addWidget(table)
self.setLayout(vbox)
class BacktestingTradeMonitor(BaseMonitor):
"""
Monitor for backtesting trade data.
"""
headers = {
"tradeid": {"display": "成交号 ", "cell": BaseCell, "update": False},
"orderid": {"display": "委托号", "cell": BaseCell, "update": False},
"symbol": {"display": "代码", "cell": BaseCell, "update": False},
"exchange": {"display": "交易所", "cell": EnumCell, "update": False},
"direction": {"display": "方向", "cell": DirectionCell, "update": False},
"offset": {"display": "开平", "cell": EnumCell, "update": False},
"price": {"display": "价格", "cell": BaseCell, "up |
ExampleAppBankIdLogin.tsx | import * as React from "react"; | Text,
View,
WebView,
} from "react-native";
import { NavigationScreenProp } from "react-navigation";
import { connect } from "react-redux";
import { bindActionCreators, Dispatch } from "redux";
import {
RequestSSOTokenFromApi,
requestSSOTokenFromApiAction,
SSOTokenAction,
} from "../../actions/sso-token";
import { BANK_ID_REDIRECT_PATH } from "../../constants/bank-id";
import { IAppConfigState } from "../../types/app-config";
import { ISSOTokenState } from "../../types/sso-token";
import { IStoreState } from "../../types/store";
interface IComponentProps {
navigation: NavigationScreenProp<any, any>;
}
interface IStateToProps {
ssoToken: ISSOTokenState;
appConfig: IAppConfigState;
}
interface IDispatchToProps {
requestSSOTokenFromApi: RequestSSOTokenFromApi;
}
type Props = IComponentProps & IStateToProps & IDispatchToProps;
class ExampleAppBankIdLogin extends React.Component<Props> {
public static navigationOptions = {
headerBackTitle: null,
title: "BankID login",
};
public handleNavigationStateChanged = (navState: NavState): void => {
const { ssoToken, requestSSOTokenFromApi, appConfig } = this.props;
if (navState.url === `${appConfig.environment}/${BANK_ID_REDIRECT_PATH}`) {
if (!ssoToken.isFetching && !ssoToken.data && !ssoToken.error) {
requestSSOTokenFromApi();
}
}
}
public render() {
const { ssoToken, navigation, appConfig } = this.props;
if (ssoToken.isFetching) {
return (
<View style={styles.container}>
<Text>Fetching token...</Text>
</View>
);
}
return (
<WebView
source={{ uri: `${appConfig.environment}/${navigation.state.params.path}` }}
style={styles.container}
onNavigationStateChange={this.handleNavigationStateChanged}
startInLoadingState={true}
/>
);
}
}
const styles = StyleSheet.create({
container: {
alignItems: "center",
backgroundColor: "#fffffa",
flex: 1,
justifyContent: "center",
},
});
const mapStateToProps = (state: IStoreState) => ({
appConfig: state.appConfig,
ssoToken: state.ssoToken,
});
const mapDispatchToProps = (dispatch: Dispatch<SSOTokenAction>) => bindActionCreators({
requestSSOTokenFromApi: requestSSOTokenFromApiAction,
}, dispatch);
export default connect<IStateToProps, IDispatchToProps>(
mapStateToProps,
mapDispatchToProps,
)(ExampleAppBankIdLogin); | import {
NavState,
StyleSheet, |
lexer.rs | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
use crate::char_constants::*;
use crate::lexer_position::LexerPosition;
use crate::syntax_node::Token;
use crate::token_kind::TokenKind;
use common::Span;
/// Lexer for the *executable* subset of the GraphQL specification:
/// https://github.com/graphql/graphql-spec/blob/master/spec/Appendix%20B%20--%20Grammar%20Summary.md
///
/// Lazily transforms a source str into a sequence of `Token`s that encode
/// leading trivia, a kind, trailing trivia, and spans that exclude the trivia.
#[derive(Clone, Debug)]
pub struct Lexer<'a> {
position: LexerPosition<'a>,
}
impl<'a> Lexer<'a> {
pub fn new(source: &'a str) -> Self {
Lexer {
position: LexerPosition::new(source),
}
}
/// Advance the lexer and return the next token.
pub fn next(&mut self) -> Token {
self.skip_leading_trivia();
let start = self.position.index();
let kind = self.next_kind();
let span = Span::from_usize(start, self.position.index() - start);
self.skip_trailing_trivia();
Token { kind, span }
}
fn peek(&self) -> TokenKind {
let mut clone = self.clone();
clone.next_kind()
}
fn next_kind(&mut self) -> TokenKind {
let ch = self.position.next();
match ch {
LINE_FEED => TokenKind::NewLine,
CARRIAGE_RETURN => {
self.position.eat(LINE_FEED);
TokenKind::NewLine
}
TAB | SPACE => {
self.position.skip_while(is_non_newline_whitespace);
TokenKind::Whitespace
}
AT => TokenKind::At,
CLOSE_BRACE => TokenKind::CloseBrace,
CLOSE_BRACKET => TokenKind::CloseBracket,
CLOSE_PAREN => TokenKind::CloseParen,
COLON => TokenKind::Colon,
COMMA => TokenKind::Comma,
DOUBLE_QUOTE => self.lex_string_literal_rest(),
EQUALS => TokenKind::Equals,
EXCLAMATION => TokenKind::Exclamation,
HASH => self.lex_comment(),
NULL => TokenKind::EndOfFile,
OPEN_BRACE => TokenKind::OpenBrace,
OPEN_BRACKET => TokenKind::OpenBracket,
OPEN_PAREN => TokenKind::OpenParen,
PIPE => TokenKind::Pipe,
PERIOD => {
// It's invalid to have anything other than exactly '...', but since period
// has no other meaning we can recover in the parser.
let peek = self.position.peek();
if peek == PERIOD {
self.position.next();
if self.position.peek() == PERIOD {
self.position.next();
TokenKind::Spread
} else {
TokenKind::PeriodPeriod
}
} else if is_digit(peek) {
self.position.next();
self.lex_number_error()
} else {
TokenKind::Period
}
}
DOLLAR => self.lex_variable_identifier_rest(),
MINUS => self.lex_number_literal_rest(ch),
PLUS => self.lex_number_error(),
ch if is_digit(ch) => self.lex_number_literal_rest(ch),
ch if is_identifier_start(ch) => self.lex_identifer_rest(),
_ => self.lex_error(),
}
}
/// Skips over all insignificant tokens (including newlines) up to the start of
/// the next significant token,
fn skip_leading_trivia(&mut self) {
let mut clone = self.clone();
loop {
match clone.peek() {
TokenKind::NewLine
| TokenKind::SingleLineComment
| TokenKind::Whitespace
| TokenKind::Comma => {
// intentionally ignore since we know the result is valid
let _ = clone.next_kind();
}
_ => {
self.position = clone.position;
break;
}
}
}
}
/// Skips over all insigificant tokens up to the next newline
fn skip_trailing_trivia(&mut self) {
let mut clone = self.clone();
loop {
match clone.peek() {
TokenKind::SingleLineComment | TokenKind::Whitespace | TokenKind::Comma => {
// intentionally ignore since we know the result is valid
let _ = clone.next_kind();
}
_ => {
self.position = clone.position;
break;
}
}
}
}
/// Skips any remaining invalid tokens (expected to be called after
/// encountering the first invalid token), recording the error details
/// and returning a token error.
fn lex_error(&mut self) -> TokenKind {
let mut position = self.position.clone();
loop {
match position.peek() {
LINE_FEED | CARRIAGE_RETURN | TAB | SPACE | AT | CLOSE_BRACE | CLOSE_BRACKET
| CLOSE_PAREN | COLON | COMMA | DOUBLE_QUOTE | EQUALS | EXCLAMATION | HASH
| MINUS | NULL | OPEN_BRACE | OPEN_BRACKET | OPEN_PAREN | PIPE | PLUS | PERIOD
| DOLLAR => break,
ch => {
if is_digit(ch) || is_identifier_start(ch) {
break;
} else {
position.next(); // consume the invalid char
continue;
}
}
};
}
self.position = position;
TokenKind::ErrorUnsupportedCharacterSequence
}
/// Skips any remaining number-like characters (digits, period, plus/minus, exponent, or
/// identifier).
fn lex_number_error(&mut self) -> TokenKind {
let mut position = self.position.clone();
loop {
let ch = position.peek();
match ch {
PERIOD | PLUS | MINUS => {
position.next();
continue;
}
_ => {
if is_digit(ch) || is_identifier_start(ch) {
position.next();
continue;
} else {
break;
}
}
};
}
self.position = position;
TokenKind::ErrorUnsupportedNumberLiteral
}
/// Comment :: # CommentChar*
///
/// CommentChar :: SourceCharacter but not LineTerminator
fn lex_comment(&mut self) -> TokenKind {
loop {
match self.position.peek() {
LINE_FEED | CARRIAGE_RETURN | NULL => return TokenKind::SingleLineComment,
_ => {
self.position.next();
}
}
}
}
/// Lexes the remainder of an identifer (after the leading '$' char).
///
/// Variable : $ Name
fn lex_variable_identifier_rest(&mut self) -> TokenKind {
if !is_identifier_start(self.position.peek()) {
TokenKind::ErrorInvalidVariableIdentifier
} else {
self.position.next(); // skip identifier start
self.position.skip_while(is_identifer_part);
TokenKind::VariableIdentifier
}
}
/// Lexes the remainder of an identifer (after the first char).
///
/// Name :: /[_A-Za-z][_0-9A-Za-z]*/
fn lex_identifer_rest(&mut self) -> TokenKind {
self.position.skip_while(is_identifer_part);
TokenKind::Identifier
}
/// Lexes the remainder of a string literal (after the leading double quote)
///
/// StringValue ::
/// " StringCharacter* "
/// """ BlockStringCharacter* """
///
/// StringCharacter ::
/// SourceCharacter but not " or \ or LineTerminator
/// \u EscapedUnicode
/// \ EscapedCharacter
///
/// EscapedUnicode :: /[0-9A-Fa-f]{4}/
///
/// EscapedCharacter :: one of " \ / b f n r t
///
/// BlockStringCharacter ::
/// SourceCharacter but not """ or \"""
/// \"""
/// Note: Block string values are interpreted to exclude blank initial and trailing lines and uniform indentation with {BlockStringValue()}.
///
/// SourceCharacter :: /[\u0009\u000A\u000D\u0020-\uFFFF]/
fn | (&mut self) -> TokenKind {
// TODO T60450344: full string literal support
if self.position.peek() == DOUBLE_QUOTE && self.position.peek_offset(1) == DOUBLE_QUOTE {
unimplemented!("TODO T60450344: support for triple-quoted strings")
}
loop {
match self.position.next() {
NULL => {
return TokenKind::ErrorUnterminatedStringLiteral;
}
BACKSLASH => match self.position.next() {
'"' | '\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' => continue,
'u' => unimplemented!("TODO T60450344: handle unicode escape sequence"),
NULL => {
return TokenKind::ErrorUnterminatedStringLiteral;
}
ch => unimplemented!("TODO T60450344: handle unknown escape sequence {:?}", ch),
},
DOUBLE_QUOTE => return TokenKind::StringLiteral,
_ => continue,
}
}
}
/// Lexes the remainder of a number, after consuming the provided character
///
/// IntValue :: IntegerPart
///
/// IntegerPart ::
/// NegativeSign? 0
/// NegativeSign? NonZeroDigit Digit*
///
/// NegativeSign :: -
///
/// Digit :: one of 0 1 2 3 4 5 6 7 8 9
///
/// NonZeroDigit :: Digit but not 0
///
/// FloatValue ::
/// IntegerPart FractionalPart
/// IntegerPart ExponentPart
/// IntegerPart FractionalPart ExponentPart
///
/// FractionalPart :: . Digit+
///
/// ExponentPart :: ExponentIndicator Sign? Digit+
///
/// ExponentIndicator :: one of e E
///
/// Sign :: one of + -
///
fn lex_number_literal_rest(&mut self, consumed_ch: char) -> TokenKind {
let mut ch = consumed_ch;
let mut is_float = false;
if ch == MINUS {
ch = self.position.next();
}
if ch == DIGIT_0 {
ch = self.position.peek();
if is_digit(ch) {
return self.lex_number_error();
}
} else if is_digit(ch) {
// Skip any additional digits
self.position.skip_while(is_digit);
ch = self.position.peek();
} else {
return self.lex_number_error();
}
if ch == PERIOD {
self.position.next(); // Consume the period
is_float = true;
if self.read_digits().is_err() {
return self.lex_number_error();
}
ch = self.position.peek();
}
if ch == CHAR_E || ch == CHAR_LOWER_E {
is_float = true;
self.position.next(); // Consume the E
ch = self.position.peek();
if ch == MINUS || ch == PLUS {
self.position.next(); // Consume the sign
}
if self.read_digits().is_err() {
return self.lex_number_error();
}
ch = self.position.peek();
}
if ch == PERIOD || is_identifier_start(ch) {
return self.lex_number_error();
}
if is_float {
TokenKind::FloatLiteral
} else {
TokenKind::IntegerLiteral
}
}
/// Consumes all consecutive digits, or errors if the next character is not a digit.
fn read_digits(&mut self) -> Result<(), ()> {
let ch = self.position.peek();
if !is_digit(ch) {
Err(())
} else {
self.position.skip_while(is_digit);
Ok(())
}
}
}
fn is_digit(ch: char) -> bool {
ch >= DIGIT_0 && ch <= DIGIT_9
}
fn is_identifier_start(ch: char) -> bool {
(ch >= CHAR_A && ch <= CHAR_Z) || (ch >= CHAR_LOWER_A && ch <= CHAR_LOWER_Z) || ch == UNDERSCORE
}
fn is_identifer_part(ch: char) -> bool {
is_identifier_start(ch) || is_digit(ch)
}
fn is_non_newline_whitespace(ch: char) -> bool {
match ch {
SPACE | TAB | VERTICAL_TAB | FORM_FEED => true,
_ => false,
}
}
#[allow(dead_code)]
fn is_newline(ch: char) -> bool {
match ch {
LINE_FEED | CARRIAGE_RETURN | LINE_SEPARATOR | PARAGRAPH_SEPARATOR => true,
_ => false,
}
}
#[cfg(test)]
mod tests {
use super::*;
macro_rules! assert_token {
($src:expr, $kind:expr, $start:expr, $length:expr) => {
assert_eq!(
Lexer::new($src).next(),
$crate::syntax_node::Token {
span: Span::new($start, $length),
kind: $kind
},
"Testing the lexing of string '{}'",
$src
);
};
}
#[test]
fn test_number_successes() {
assert_token!("4", TokenKind::IntegerLiteral, 0, 1);
assert_token!("4.123", TokenKind::FloatLiteral, 0, 5);
assert_token!("-4", TokenKind::IntegerLiteral, 0, 2);
assert_token!("9", TokenKind::IntegerLiteral, 0, 1);
assert_token!("0", TokenKind::IntegerLiteral, 0, 1);
assert_token!("-4.123", TokenKind::FloatLiteral, 0, 6);
assert_token!("0.123", TokenKind::FloatLiteral, 0, 5);
assert_token!("123e4", TokenKind::FloatLiteral, 0, 5);
assert_token!("123E4", TokenKind::FloatLiteral, 0, 5);
assert_token!("123e-4", TokenKind::FloatLiteral, 0, 6);
assert_token!("123e+4", TokenKind::FloatLiteral, 0, 6);
assert_token!("-1.123e4", TokenKind::FloatLiteral, 0, 8);
assert_token!("-1.123E4", TokenKind::FloatLiteral, 0, 8);
assert_token!("-1.123e-4", TokenKind::FloatLiteral, 0, 9);
assert_token!("-1.123e+4", TokenKind::FloatLiteral, 0, 9);
assert_token!("-1.123e4567", TokenKind::FloatLiteral, 0, 11);
assert_token!("-0", TokenKind::IntegerLiteral, 0, 2);
}
#[test]
fn test_number_failures() {
assert_token!("00", TokenKind::ErrorUnsupportedNumberLiteral, 0, 2);
assert_token!("01", TokenKind::ErrorUnsupportedNumberLiteral, 0, 2);
assert_token!("-01", TokenKind::ErrorUnsupportedNumberLiteral, 0, 3);
assert_token!("+1", TokenKind::ErrorUnsupportedNumberLiteral, 0, 2);
assert_token!("01.23", TokenKind::ErrorUnsupportedNumberLiteral, 0, 5);
assert_token!("1.", TokenKind::ErrorUnsupportedNumberLiteral, 0, 2);
assert_token!("1e", TokenKind::ErrorUnsupportedNumberLiteral, 0, 2);
assert_token!("1.e1", TokenKind::ErrorUnsupportedNumberLiteral, 0, 4);
assert_token!("1.A", TokenKind::ErrorUnsupportedNumberLiteral, 0, 3);
assert_token!("-A", TokenKind::ErrorUnsupportedNumberLiteral, 0, 2);
assert_token!("1.0e", TokenKind::ErrorUnsupportedNumberLiteral, 0, 4);
assert_token!("1.0eA", TokenKind::ErrorUnsupportedNumberLiteral, 0, 5);
assert_token!("1.2e3e", TokenKind::ErrorUnsupportedNumberLiteral, 0, 6);
assert_token!("1.2e3.4", TokenKind::ErrorUnsupportedNumberLiteral, 0, 7);
assert_token!("1.23.4", TokenKind::ErrorUnsupportedNumberLiteral, 0, 6);
assert_token!(".123", TokenKind::ErrorUnsupportedNumberLiteral, 0, 4);
// check that we don't consume trailing valid items
assert_token!("1.23.4{}", TokenKind::ErrorUnsupportedNumberLiteral, 0, 6);
assert_token!("1.23.4 {}", TokenKind::ErrorUnsupportedNumberLiteral, 0, 6);
assert_token!("1.23.4 []", TokenKind::ErrorUnsupportedNumberLiteral, 0, 6);
assert_token!("1.23.4 foo", TokenKind::ErrorUnsupportedNumberLiteral, 0, 6);
assert_token!(
"1.23.4 $foo",
TokenKind::ErrorUnsupportedNumberLiteral,
0,
6
);
}
}
| lex_string_literal_rest |
siteverification-gen.go | // Package siteverification provides access to the Google Site Verification API.
//
// See https://developers.google.com/site-verification/
//
// Usage example:
//
// import "google.golang.org/api/siteverification/v1"
// ...
// siteverificationService, err := siteverification.New(oauthHttpClient)
package siteverification // import "google.golang.org/api/siteverification/v1"
import (
"bytes"
"encoding/json"
"errors"
"fmt"
context "golang.org/x/net/context"
ctxhttp "golang.org/x/net/context/ctxhttp"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
"io"
"net/http"
"net/url"
"strconv"
"strings"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = ctxhttp.Do
const apiId = "siteVerification:v1"
const apiName = "siteVerification"
const apiVersion = "v1"
const basePath = "https://www.googleapis.com/siteVerification/v1/"
// OAuth2 scopes used by this API.
const (
// Manage the list of sites and domains you control
SiteverificationScope = "https://www.googleapis.com/auth/siteverification"
// Manage your new site verifications with Google
SiteverificationVerifyOnlyScope = "https://www.googleapis.com/auth/siteverification.verify_only"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.WebResource = NewWebResourceService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
WebResource *WebResourceService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewWebResourceService(s *Service) *WebResourceService {
rs := &WebResourceService{s: s}
return rs
}
type WebResourceService struct {
s *Service
}
type SiteVerificationWebResourceGettokenRequest struct {
// Site: The site for which a verification token will be generated.
Site *SiteVerificationWebResourceGettokenRequestSite `json:"site,omitempty"`
// VerificationMethod: The verification method that will be used to
// verify this site. For sites, 'FILE' or 'META' methods may be used.
// For domains, only 'DNS' may be used.
VerificationMethod string `json:"verificationMethod,omitempty"`
// ForceSendFields is a list of field names (e.g. "Site") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *SiteVerificationWebResourceGettokenRequest) MarshalJSON() ([]byte, error) {
type noMethod SiteVerificationWebResourceGettokenRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// SiteVerificationWebResourceGettokenRequestSite: The site for which a
// verification token will be generated.
type SiteVerificationWebResourceGettokenRequestSite struct {
// Identifier: The site identifier. If the type is set to SITE, the
// identifier is a URL. If the type is set to INET_DOMAIN, the site
// identifier is a domain name.
Identifier string `json:"identifier,omitempty"`
// Type: The type of resource to be verified. Can be SITE or INET_DOMAIN
// (domain name).
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Identifier") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *SiteVerificationWebResourceGettokenRequestSite) MarshalJSON() ([]byte, error) {
type noMethod SiteVerificationWebResourceGettokenRequestSite
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
type SiteVerificationWebResourceGettokenResponse struct {
// Method: The verification method to use in conjunction with this
// token. For FILE, the token should be placed in the top-level
// directory of the site, stored inside a file of the same name. For
// META, the token should be placed in the HEAD tag of the default page
// that is loaded for the site. For DNS, the token should be placed in a
// TXT record of the domain.
Method string `json:"method,omitempty"`
// Token: The verification token. The token must be placed appropriately
// in order for verification to succeed.
Token string `json:"token,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Method") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *SiteVerificationWebResourceGettokenResponse) MarshalJSON() ([]byte, error) {
type noMethod SiteVerificationWebResourceGettokenResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
type SiteVerificationWebResourceListResponse struct {
// Items: The list of sites that are owned by the authenticated user.
Items []*SiteVerificationWebResourceResource `json:"items,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *SiteVerificationWebResourceListResponse) MarshalJSON() ([]byte, error) {
type noMethod SiteVerificationWebResourceListResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
type SiteVerificationWebResourceResource struct {
// Id: The string used to identify this site. This value should be used
// in the "id" portion of the REST URL for the Get, Update, and Delete
// operations.
Id string `json:"id,omitempty"`
// Owners: The email addresses of all verified owners.
Owners []string `json:"owners,omitempty"`
// Site: The address and type of a site that is verified or will be
// verified.
Site *SiteVerificationWebResourceResourceSite `json:"site,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Id") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *SiteVerificationWebResourceResource) MarshalJSON() ([]byte, error) {
type noMethod SiteVerificationWebResourceResource
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// SiteVerificationWebResourceResourceSite: The address and type of a
// site that is verified or will be verified.
type SiteVerificationWebResourceResourceSite struct {
// Identifier: The site identifier. If the type is set to SITE, the
// identifier is a URL. If the type is set to INET_DOMAIN, the site
// identifier is a domain name.
Identifier string `json:"identifier,omitempty"`
// Type: The site type. Can be SITE or INET_DOMAIN (domain name).
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Identifier") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *SiteVerificationWebResourceResourceSite) MarshalJSON() ([]byte, error) {
type noMethod SiteVerificationWebResourceResourceSite
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// method id "siteVerification.webResource.delete":
type WebResourceDeleteCall struct {
s *Service
id string
urlParams_ gensupport.URLParams
ctx_ context.Context
}
// Delete: Relinquish ownership of a website or domain.
func (r *WebResourceService) Delete(id string) *WebResourceDeleteCall {
c := &WebResourceDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.id = id
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *WebResourceDeleteCall) Fields(s ...googleapi.Field) *WebResourceDeleteCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *WebResourceDeleteCall) Context(ctx context.Context) *WebResourceDeleteCall {
c.ctx_ = ctx
return c
}
func (c *WebResourceDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "webResource/{id}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.Expand(req.URL, map[string]string{
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
if c.ctx_ != nil {
return ctxhttp.Do(c.ctx_, c.s.client, req)
}
return c.s.client.Do(req)
}
// Do executes the "siteVerification.webResource.delete" call.
func (c *WebResourceDeleteCall) Do(opts ...googleapi.CallOption) error {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if err != nil {
return err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return err
}
return nil
// {
// "description": "Relinquish ownership of a website or domain.",
// "httpMethod": "DELETE",
// "id": "siteVerification.webResource.delete",
// "parameterOrder": [
// "id"
// ],
// "parameters": {
// "id": {
// "description": "The id of a verified site or domain.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "webResource/{id}",
// "scopes": [
// "https://www.googleapis.com/auth/siteverification"
// ]
// }
}
// method id "siteVerification.webResource.get":
type WebResourceGetCall struct {
s *Service
id string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
}
// Get: Get the most current data for a website or domain.
func (r *WebResourceService) Get(id string) *WebResourceGetCall {
c := &WebResourceGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.id = id
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *WebResourceGetCall) Fields(s ...googleapi.Field) *WebResourceGetCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *WebResourceGetCall) IfNoneMatch(entityTag string) *WebResourceGetCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *WebResourceGetCall) Context(ctx context.Context) *WebResourceGetCall {
c.ctx_ = ctx
return c
}
func (c *WebResourceGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "webResource/{id}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
googleapi.Expand(req.URL, map[string]string{
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
req.Header.Set("If-None-Match", c.ifNoneMatch_)
}
if c.ctx_ != nil {
return ctxhttp.Do(c.ctx_, c.s.client, req)
}
return c.s.client.Do(req)
}
// Do executes the "siteVerification.webResource.get" call.
// Exactly one of *SiteVerificationWebResourceResource or error will be
// non-nil. Any non-2xx status code is an error. Response headers are in
// either *SiteVerificationWebResourceResource.ServerResponse.Header or
// (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *WebResourceGetCall) Do(opts ...googleapi.CallOption) (*SiteVerificationWebResourceResource, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &SiteVerificationWebResourceResource{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Get the most current data for a website or domain.",
// "httpMethod": "GET",
// "id": "siteVerification.webResource.get",
// "parameterOrder": [
// "id"
// ],
// "parameters": {
// "id": {
// "description": "The id of a verified site or domain.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "webResource/{id}",
// "response": {
// "$ref": "SiteVerificationWebResourceResource"
// },
// "scopes": [
// "https://www.googleapis.com/auth/siteverification"
// ]
// }
}
// method id "siteVerification.webResource.getToken":
type WebResourceGetTokenCall struct {
s *Service
siteverificationwebresourcegettokenrequest *SiteVerificationWebResourceGettokenRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
}
// GetToken: Get a verification token for placing on a website or
// domain.
func (r *WebResourceService) GetToken(siteverificationwebresourcegettokenrequest *SiteVerificationWebResourceGettokenRequest) *WebResourceGetTokenCall {
c := &WebResourceGetTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.siteverificationwebresourcegettokenrequest = siteverificationwebresourcegettokenrequest
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *WebResourceGetTokenCall) Fields(s ...googleapi.Field) *WebResourceGetTokenCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *WebResourceGetTokenCall) Context(ctx context.Context) *WebResourceGetTokenCall {
c.ctx_ = ctx
return c
}
func (c *WebResourceGetTokenCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.siteverificationwebresourcegettokenrequest)
if err != nil {
return nil, err
}
ctype := "application/json"
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "token")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent()) | return c.s.client.Do(req)
}
// Do executes the "siteVerification.webResource.getToken" call.
// Exactly one of *SiteVerificationWebResourceGettokenResponse or error
// will be non-nil. Any non-2xx status code is an error. Response
// headers are in either
// *SiteVerificationWebResourceGettokenResponse.ServerResponse.Header or
// (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *WebResourceGetTokenCall) Do(opts ...googleapi.CallOption) (*SiteVerificationWebResourceGettokenResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &SiteVerificationWebResourceGettokenResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Get a verification token for placing on a website or domain.",
// "httpMethod": "POST",
// "id": "siteVerification.webResource.getToken",
// "path": "token",
// "request": {
// "$ref": "SiteVerificationWebResourceGettokenRequest"
// },
// "response": {
// "$ref": "SiteVerificationWebResourceGettokenResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/siteverification",
// "https://www.googleapis.com/auth/siteverification.verify_only"
// ]
// }
}
// method id "siteVerification.webResource.insert":
type WebResourceInsertCall struct {
s *Service
siteverificationwebresourceresource *SiteVerificationWebResourceResource
urlParams_ gensupport.URLParams
ctx_ context.Context
}
// Insert: Attempt verification of a website or domain.
func (r *WebResourceService) Insert(verificationMethod string, siteverificationwebresourceresource *SiteVerificationWebResourceResource) *WebResourceInsertCall {
c := &WebResourceInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.urlParams_.Set("verificationMethod", verificationMethod)
c.siteverificationwebresourceresource = siteverificationwebresourceresource
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *WebResourceInsertCall) Fields(s ...googleapi.Field) *WebResourceInsertCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *WebResourceInsertCall) Context(ctx context.Context) *WebResourceInsertCall {
c.ctx_ = ctx
return c
}
func (c *WebResourceInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.siteverificationwebresourceresource)
if err != nil {
return nil, err
}
ctype := "application/json"
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "webResource")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
if c.ctx_ != nil {
return ctxhttp.Do(c.ctx_, c.s.client, req)
}
return c.s.client.Do(req)
}
// Do executes the "siteVerification.webResource.insert" call.
// Exactly one of *SiteVerificationWebResourceResource or error will be
// non-nil. Any non-2xx status code is an error. Response headers are in
// either *SiteVerificationWebResourceResource.ServerResponse.Header or
// (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *WebResourceInsertCall) Do(opts ...googleapi.CallOption) (*SiteVerificationWebResourceResource, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &SiteVerificationWebResourceResource{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Attempt verification of a website or domain.",
// "httpMethod": "POST",
// "id": "siteVerification.webResource.insert",
// "parameterOrder": [
// "verificationMethod"
// ],
// "parameters": {
// "verificationMethod": {
// "description": "The method to use for verifying a site or domain.",
// "location": "query",
// "required": true,
// "type": "string"
// }
// },
// "path": "webResource",
// "request": {
// "$ref": "SiteVerificationWebResourceResource"
// },
// "response": {
// "$ref": "SiteVerificationWebResourceResource"
// },
// "scopes": [
// "https://www.googleapis.com/auth/siteverification",
// "https://www.googleapis.com/auth/siteverification.verify_only"
// ]
// }
}
// method id "siteVerification.webResource.list":
type WebResourceListCall struct {
s *Service
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
}
// List: Get the list of your verified websites and domains.
func (r *WebResourceService) List() *WebResourceListCall {
c := &WebResourceListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *WebResourceListCall) Fields(s ...googleapi.Field) *WebResourceListCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *WebResourceListCall) IfNoneMatch(entityTag string) *WebResourceListCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *WebResourceListCall) Context(ctx context.Context) *WebResourceListCall {
c.ctx_ = ctx
return c
}
func (c *WebResourceListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "webResource")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
req.Header.Set("If-None-Match", c.ifNoneMatch_)
}
if c.ctx_ != nil {
return ctxhttp.Do(c.ctx_, c.s.client, req)
}
return c.s.client.Do(req)
}
// Do executes the "siteVerification.webResource.list" call.
// Exactly one of *SiteVerificationWebResourceListResponse or error will
// be non-nil. Any non-2xx status code is an error. Response headers are
// in either
// *SiteVerificationWebResourceListResponse.ServerResponse.Header or (if
// a response was returned at all) in error.(*googleapi.Error).Header.
// Use googleapi.IsNotModified to check whether the returned error was
// because http.StatusNotModified was returned.
func (c *WebResourceListCall) Do(opts ...googleapi.CallOption) (*SiteVerificationWebResourceListResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &SiteVerificationWebResourceListResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Get the list of your verified websites and domains.",
// "httpMethod": "GET",
// "id": "siteVerification.webResource.list",
// "path": "webResource",
// "response": {
// "$ref": "SiteVerificationWebResourceListResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/siteverification"
// ]
// }
}
// method id "siteVerification.webResource.patch":
type WebResourcePatchCall struct {
s *Service
id string
siteverificationwebresourceresource *SiteVerificationWebResourceResource
urlParams_ gensupport.URLParams
ctx_ context.Context
}
// Patch: Modify the list of owners for your website or domain. This
// method supports patch semantics.
func (r *WebResourceService) Patch(id string, siteverificationwebresourceresource *SiteVerificationWebResourceResource) *WebResourcePatchCall {
c := &WebResourcePatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.id = id
c.siteverificationwebresourceresource = siteverificationwebresourceresource
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *WebResourcePatchCall) Fields(s ...googleapi.Field) *WebResourcePatchCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *WebResourcePatchCall) Context(ctx context.Context) *WebResourcePatchCall {
c.ctx_ = ctx
return c
}
func (c *WebResourcePatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.siteverificationwebresourceresource)
if err != nil {
return nil, err
}
ctype := "application/json"
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "webResource/{id}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PATCH", urls, body)
googleapi.Expand(req.URL, map[string]string{
"id": c.id,
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
if c.ctx_ != nil {
return ctxhttp.Do(c.ctx_, c.s.client, req)
}
return c.s.client.Do(req)
}
// Do executes the "siteVerification.webResource.patch" call.
// Exactly one of *SiteVerificationWebResourceResource or error will be
// non-nil. Any non-2xx status code is an error. Response headers are in
// either *SiteVerificationWebResourceResource.ServerResponse.Header or
// (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *WebResourcePatchCall) Do(opts ...googleapi.CallOption) (*SiteVerificationWebResourceResource, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &SiteVerificationWebResourceResource{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Modify the list of owners for your website or domain. This method supports patch semantics.",
// "httpMethod": "PATCH",
// "id": "siteVerification.webResource.patch",
// "parameterOrder": [
// "id"
// ],
// "parameters": {
// "id": {
// "description": "The id of a verified site or domain.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "webResource/{id}",
// "request": {
// "$ref": "SiteVerificationWebResourceResource"
// },
// "response": {
// "$ref": "SiteVerificationWebResourceResource"
// },
// "scopes": [
// "https://www.googleapis.com/auth/siteverification"
// ]
// }
}
// method id "siteVerification.webResource.update":
type WebResourceUpdateCall struct {
s *Service
id string
siteverificationwebresourceresource *SiteVerificationWebResourceResource
urlParams_ gensupport.URLParams
ctx_ context.Context
}
// Update: Modify the list of owners for your website or domain.
func (r *WebResourceService) Update(id string, siteverificationwebresourceresource *SiteVerificationWebResourceResource) *WebResourceUpdateCall {
c := &WebResourceUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.id = id
c.siteverificationwebresourceresource = siteverificationwebresourceresource
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *WebResourceUpdateCall) Fields(s ...googleapi.Field) *WebResourceUpdateCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *WebResourceUpdateCall) Context(ctx context.Context) *WebResourceUpdateCall {
c.ctx_ = ctx
return c
}
func (c *WebResourceUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.siteverificationwebresourceresource)
if err != nil {
return nil, err
}
ctype := "application/json"
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "webResource/{id}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PUT", urls, body)
googleapi.Expand(req.URL, map[string]string{
"id": c.id,
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
if c.ctx_ != nil {
return ctxhttp.Do(c.ctx_, c.s.client, req)
}
return c.s.client.Do(req)
}
// Do executes the "siteVerification.webResource.update" call.
// Exactly one of *SiteVerificationWebResourceResource or error will be
// non-nil. Any non-2xx status code is an error. Response headers are in
// either *SiteVerificationWebResourceResource.ServerResponse.Header or
// (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *WebResourceUpdateCall) Do(opts ...googleapi.CallOption) (*SiteVerificationWebResourceResource, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &SiteVerificationWebResourceResource{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Modify the list of owners for your website or domain.",
// "httpMethod": "PUT",
// "id": "siteVerification.webResource.update",
// "parameterOrder": [
// "id"
// ],
// "parameters": {
// "id": {
// "description": "The id of a verified site or domain.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "webResource/{id}",
// "request": {
// "$ref": "SiteVerificationWebResourceResource"
// },
// "response": {
// "$ref": "SiteVerificationWebResourceResource"
// },
// "scopes": [
// "https://www.googleapis.com/auth/siteverification"
// ]
// }
} | if c.ctx_ != nil {
return ctxhttp.Do(c.ctx_, c.s.client, req)
} |
orm.go | // Code generated by mockery v2.8.0. DO NOT EDIT.
package mocks
import (
context "context"
feeds "github.com/smartcontractkit/chainlink/core/services/feeds"
mock "github.com/stretchr/testify/mock"
)
// ORM is an autogenerated mock type for the ORM type
type ORM struct {
mock.Mock
}
// CountManagers provides a mock function with given fields:
func (_m *ORM) CountManagers() (int64, error) {
ret := _m.Called()
var r0 int64
if rf, ok := ret.Get(0).(func() int64); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CreateManager provides a mock function with given fields: ctx, ms
func (_m *ORM) CreateManager(ctx context.Context, ms *feeds.FeedsManager) (int32, error) {
ret := _m.Called(ctx, ms)
var r0 int32
if rf, ok := ret.Get(0).(func(context.Context, *feeds.FeedsManager) int32); ok {
r0 = rf(ctx, ms)
} else {
r0 = ret.Get(0).(int32)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *feeds.FeedsManager) error); ok {
r1 = rf(ctx, ms)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetManager provides a mock function with given fields: ctx, id
func (_m *ORM) GetManager(ctx context.Context, id int32) (*feeds.FeedsManager, error) {
ret := _m.Called(ctx, id)
var r0 *feeds.FeedsManager
if rf, ok := ret.Get(0).(func(context.Context, int32) *feeds.FeedsManager); ok {
r0 = rf(ctx, id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*feeds.FeedsManager)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int32) error); ok {
r1 = rf(ctx, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListManagers provides a mock function with given fields: ctx
func (_m *ORM) ListManagers(ctx context.Context) ([]feeds.FeedsManager, error) {
ret := _m.Called(ctx)
var r0 []feeds.FeedsManager
if rf, ok := ret.Get(0).(func(context.Context) []feeds.FeedsManager); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]feeds.FeedsManager)
}
}
| } else {
r1 = ret.Error(1)
}
return r0, r1
} | var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) |
cmdprompt.rs | // (C) 2020 Srimanta Barua <[email protected]>
use std::cell::RefCell;
use std::rc::Rc;
use euclid::{point2, size2, Rect, Size2D};
use unicode_segmentation::UnicodeSegmentation;
use crate::buffer::CursorStyle;
use crate::common::{PixelSize, DPI};
use crate::config::Config;
use crate::input::{Action, Motion, MotionOrObj};
use crate::painter::Painter;
use crate::style::TextStyle;
use crate::text::{RopeOrStr, ShapedText, TextAlignment, TextShaper};
use crate::theme::Theme;
const TAB_WIDTH: usize = 8;
pub(crate) struct CmdPrompt {
command: String,
pub(crate) rect: Rect<u32, PixelSize>,
// Text shaping
dpi: Size2D<u32, DPI>,
text_shaper: Rc<RefCell<TextShaper>>,
// Shaped text
shaped: ShapedText,
ascender: i32,
descender: i32,
// Misc.
config: Rc<Config>,
theme: Rc<Theme>,
prompt_len: usize,
cursor_bidx: usize,
cursor_gidx: usize,
}
impl CmdPrompt {
pub(crate) fn new(
config: Rc<Config>,
dpi: Size2D<u32, DPI>,
text_shaper: Rc<RefCell<TextShaper>>,
win_rect: Rect<u32, PixelSize>,
theme: Rc<Theme>,
) -> CmdPrompt {
let (ascender, descender, shaped) = {
let shaper = &mut *text_shaper.borrow_mut();
let raster = shaper
.get_raster(config.prompt_face, TextStyle::default())
.unwrap();
let metrics = raster.get_metrics(config.prompt_font_size, dpi);
let shaped = shaper.shape_line(
"".into(),
dpi,
TAB_WIDTH,
&[(0, config.prompt_face)],
&[(0, TextStyle::default())],
&[(0, config.prompt_font_size)],
&[(0, theme.prompt.foreground)],
&[(0, None)],
&[(0, TextAlignment::Left)],
);
(metrics.ascender, metrics.descender, shaped)
};
let height = (ascender - descender) as u32;
let rheight = height + config.prompt_padding_vertical * 2;
assert!(win_rect.size.height > rheight);
let rect = Rect::new(
point2(
win_rect.origin.x,
win_rect.origin.y + win_rect.size.height - rheight,
),
size2(win_rect.size.width, rheight),
);
CmdPrompt {
command: "".to_owned(),
rect,
config,
dpi,
text_shaper,
shaped,
ascender,
descender,
theme,
prompt_len: 0,
cursor_bidx: 0,
cursor_gidx: 0,
}
}
pub(crate) fn draw(&self, painter: &mut Painter) {
let shaper = &mut *self.text_shaper.borrow_mut();
let mut painter = painter.widget_ctx(self.rect.cast(), self.theme.prompt.background, false);
let pos = point2(
self.config.prompt_padding_horizontal as i32,
self.config.prompt_padding_vertical as i32 + self.ascender,
);
let cursor = if self.command.len() > 0 {
Some((
self.cursor_gidx,
self.theme.prompt.cursor,
CursorStyle::Line,
))
} else {
None
};
painter.draw_shaped_text(
shaper,
pos,
&self.shaped,
cursor,
self.rect.size.width - self.config.prompt_padding_horizontal,
(self.ascender - self.descender) as u32,
false,
);
}
pub(crate) fn resize(&mut self, win_rect: Rect<u32, PixelSize>) -> Rect<u32, PixelSize> {
let height = (self.ascender - self.descender) as u32;
let rheight = height + self.config.prompt_padding_vertical * 2;
assert!(win_rect.size.height > rheight);
self.rect.origin.x = win_rect.origin.x;
self.rect.origin.y = win_rect.origin.y + win_rect.size.height - rheight;
self.rect.size.width = win_rect.size.width;
Rect::new(
win_rect.origin,
size2(win_rect.size.width, win_rect.size.height - rheight),
)
}
pub(crate) fn set_prompt(&mut self, s: &str) {
self.command.clear();
self.command.push_str(s);
self.prompt_len = s.len();
let (_, gidx) = bidx_gidx_from_bidx(&self.command, self.prompt_len);
self.cursor_bidx = self.prompt_len;
self.cursor_gidx = gidx;
self.reshape();
}
pub(crate) fn clear(&mut self) |
pub(crate) fn get_command(&mut self) -> String {
self.command[self.prompt_len..].to_owned()
}
pub(crate) fn handle_action(&mut self, action: &Action) {
match action {
Action::Move(m) => match m {
MotionOrObj::Motion(Motion::Left(0)) | MotionOrObj::Motion(Motion::Right(0)) => {
return
}
MotionOrObj::Motion(Motion::Left(mut n)) => {
let mut start = self.cursor_bidx;
let mut cis = self.command[self.prompt_len..self.cursor_bidx].char_indices();
while let Some((i, _)) = cis.next_back() {
start = self.prompt_len + i;
n -= 1;
if n == 0 {
break;
}
}
if start == self.cursor_bidx {
return;
}
let (bidx, gidx) = bidx_gidx_from_bidx(&self.command, start);
self.cursor_bidx = bidx;
self.cursor_gidx = gidx;
}
MotionOrObj::Motion(Motion::Right(mut n)) => {
n += 1;
let mut end = self.cursor_bidx;
for (i, _) in self.command[self.cursor_bidx..].char_indices() {
end = self.cursor_bidx + i;
n -= 1;
if n == 0 {
break;
}
}
if n > 0 {
end = self.command.len();
}
if end == self.cursor_bidx {
return;
}
let (bidx, gidx) = bidx_gidx_from_bidx(&self.command, end);
self.cursor_bidx = bidx;
self.cursor_gidx = gidx;
}
MotionOrObj::Motion(Motion::LineStart) => {
let (bidx, gidx) = bidx_gidx_from_bidx(&self.command, self.prompt_len);
self.cursor_bidx = bidx;
self.cursor_gidx = gidx;
}
MotionOrObj::Motion(Motion::LineEnd) => {
let (bidx, gidx) = bidx_gidx_from_bidx(&self.command, self.command.len());
self.cursor_bidx = bidx;
self.cursor_gidx = gidx;
}
_ => {}
},
Action::Delete(m) => match m {
MotionOrObj::Motion(Motion::Left(0)) | MotionOrObj::Motion(Motion::Right(0)) => {
return
}
MotionOrObj::Motion(Motion::Left(mut n)) => {
let mut start = self.cursor_bidx;
let mut cis = self.command[self.prompt_len..self.cursor_bidx].char_indices();
while let Some((i, _)) = cis.next_back() {
start = self.prompt_len + i;
n -= 1;
if n == 0 {
break;
}
}
if start == self.cursor_bidx {
return;
}
self.command.replace_range(start..self.cursor_bidx, "");
let (bidx, gidx) = bidx_gidx_from_bidx(&self.command, start);
self.cursor_bidx = bidx;
self.cursor_gidx = gidx;
}
MotionOrObj::Motion(Motion::Right(mut n)) => {
n += 1;
let mut end = self.cursor_bidx;
for (i, _) in self.command[self.cursor_bidx..].char_indices() {
end = self.cursor_bidx + i;
n -= 1;
if n == 0 {
break;
}
}
if n > 0 {
end = self.command.len();
}
if end == self.cursor_bidx {
return;
}
self.command.replace_range(self.cursor_bidx..end, "");
let (bidx, gidx) = bidx_gidx_from_bidx(&self.command, self.cursor_bidx);
self.cursor_bidx = bidx;
self.cursor_gidx = gidx;
}
MotionOrObj::Motion(Motion::LineStart) => {
self.command
.replace_range(self.prompt_len..self.cursor_bidx, "");
let (bidx, gidx) = bidx_gidx_from_bidx(&self.command, self.prompt_len);
self.cursor_bidx = bidx;
self.cursor_gidx = gidx;
}
MotionOrObj::Motion(Motion::LineEnd) => {
self.command.replace_range(self.cursor_bidx.., "");
let (bidx, gidx) = bidx_gidx_from_bidx(&self.command, self.cursor_bidx);
self.cursor_bidx = bidx;
self.cursor_gidx = gidx;
}
_ => {}
},
Action::InsertChar(c) => {
self.command.insert(self.cursor_bidx, *c);
self.cursor_bidx += c.len_utf8();
let (bidx, gidx) = bidx_gidx_from_bidx(&self.command, self.cursor_bidx);
self.cursor_bidx = bidx;
self.cursor_gidx = gidx;
}
_ => {}
}
self.reshape();
}
fn reshape(&mut self) {
let lc = self.command.chars().count();
let shaper = &mut *self.text_shaper.borrow_mut();
self.shaped = shaper.shape_line(
RopeOrStr::from(self.command.as_ref()),
self.dpi,
TAB_WIDTH,
&[(lc, self.config.prompt_face)],
&[(lc, TextStyle::default())],
&[(lc, self.config.prompt_font_size)],
&[(lc, self.theme.prompt.foreground)],
&[(lc, None)],
&[(lc, TextAlignment::Left)],
);
}
}
fn bidx_gidx_from_bidx(s: &str, bidx: usize) -> (usize, usize) {
let (mut gidx, mut blen) = (0, 0);
for g in s.graphemes(true) {
let len = g.len();
if len + blen > bidx {
return (blen, gidx);
}
blen += len;
if g == "\t" {
gidx = (gidx / TAB_WIDTH) * TAB_WIDTH + TAB_WIDTH;
} else {
gidx += 1;
}
}
(blen, gidx)
}
| {
self.command.clear();
self.prompt_len = 0;
self.cursor_bidx = 0;
self.cursor_gidx = 0;
self.reshape();
} |
visualizer.integration.ts | // Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/context-explorer
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
import {Context} from '@loopback/core';
import {expect} from '@loopback/testlab';
import {ContextGraph} from '../..';
import {renderGraph} from '../../visualizer';
describe('Visualizer', () => {
let app: Context;
let server: Context;
beforeEach(givenContexts);
| it('creates a dot graph with bindings', async function (this: Mocha.Context) {
if ((process.platform as string) === 'os390') return this.skip();
server.bind('port').to(3000);
app.bind('now').toDynamicValue(() => new Date());
const json = server.inspect();
const graph = new ContextGraph(json);
const dot = graph.render();
const svg = await renderGraph(dot, {engine: 'fdp', format: 'svg'});
expect(svg).to.match(/^<\?xml/);
expect(svg).to.match(/<svg /);
});
function givenContexts() {
app = new Context('app');
server = new Context(app, 'server');
}
}); | |
solve.py | ########
# PART 1
def dragon_step(a):
"""
For example, after a single step of this process,
1 becomes 100.
0 becomes 001.
11111 becomes 11111000000.
111100001010 becomes 1111000010100101011110000
"""
b = [0 if x==1 else 1 for x in a]
b.reverse()
return a + [0] + b
def checksum(input):
"""
Consider each pair: 11, 00, 10, 11, 01, 00.
These are same, same, different, same, different, same, producing 110101.
The resulting string has length 6, which is even, so we repeat the process.
The pairs are 11 (same), 01 (different), 01 (different).
This produces the checksum 100, which has an odd length, so we stop.
"""
calc = [1 if a == b else 0 for a, b in zip(input[::2], input[1::2])]
if len(calc) % 2 == 0:
calc = checksum(calc)
return calc
def | (disc, length):
while len(disc) < length:
disc = dragon_step(disc)
return disc[:length]
assert dragon_step([1]) == [1, 0, 0]
assert dragon_step([0]) == [0, 0, 1]
assert dragon_step([1,1,1,1,1]) == [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0]
assert dragon_step([1,1,1,1,0,0,0,0,1,0,1,0]) == [1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0]
assert checksum([1,1,0,0,1,0,1,1,0,1,0,0]) == [1, 0, 0]
example = generate_disc([1,0,0,0,0], 20)
assert checksum(example) == [0,1,1,0,0]
p1 = generate_disc([1,0,0,1,1,1,1,1,0,1,1,0,1,1,0,0,1], 272)
answer = "".join(map(str, checksum(p1)))
print("Part 1 =", answer)
assert answer == "10111110010110110" # check with accepted answer
########
# PART 2
p2 = generate_disc([1,0,0,1,1,1,1,1,0,1,1,0,1,1,0,0,1], 35651584)
answer = "".join(map(str, checksum(p2)))
print("Part 2 =", answer)
assert answer == "01101100001100100" # check with accepted answer
| generate_disc |
DevModeService.js | service: "palm://org.webosports.service.devmode/"
}); | enyo.kind({
name: "DevModeService",
kind: "enyo.PalmService", |
|
count_facets.py | import json |
combine = jydoop.sumreducer
def map(key, value, context):
try:
payload = json.loads(value)
except:
context.write("Bogus\tBogus\tBogus\tBogus", 1)
return
output = []
try:
info = payload['geckoAppInfo']
if type(info) == dict:
output.append(info['name'])
output.append(info['os'])
output.append(info['updateChannel'])
output.append(info['version'])
except KeyError:
pass
if len(output) == 4:
outkey = "\t".join(output)
context.write(outkey, 1)
reduce = jydoop.sumreducer | import jydoop
import healthreportutils
setupjob = healthreportutils.setupjob |
game-creation-service.ts | import {Injectable} from "@angular/core";
import {Http} from "@angular/http";
import "rxjs/add/operator/map";
import {Data, VersionStored} from "./start-up-data/load-data";
import {Storage} from "@ionic/storage";
@Injectable()
export class GameCreationService {
constructor(
private http: Http,
private storage: Storage,
) {
console.log('Hello GameCreationService Provider');
}
loadData(versionStorageKey: string, levelStorageKey: string): Promise<any> {
let env = this;
let version: Promise<VersionStored> = env.http.get("assets/levels.json")
.map(res => {
return {
key: versionStorageKey,
value: res.json().version
}
})
.toPromise();
return version.then((latestVersion) => {
return env.checkVersionStored(latestVersion)
.then((versionIsDifferent) => {
if (versionIsDifferent) {
return env.storeDataFromJson("assets/levels.json", levelStorageKey);
} else {
return Promise.resolve();
}
})
})
}
checkVersionStored(version: VersionStored): Promise<boolean> {
let env = this;
return env.storage.get(version.key).then((versionValue) => {
let versionIsDifferent = versionValue != version.value;
let promise = Promise.resolve(versionIsDifferent);
if (versionIsDifferent) {
promise = env.storage.set(version.key, version.value) | console.log("Database updated to version " + version.value);
return versionIsDifferent;
})
} else {
console.log("Database up to date already (v." + versionValue + ")");
}
return promise;
});
}
storeDataFromJson(url: string, levelStorageKey: string): Promise<any> {
let env = this;
console.log("Setting up database...");
return env.http.get(url)
.map(res => res.json().levels)
.map((levelsData) => {
let data = new Data(levelStorageKey, levelsData);
return data.storeData(env.storage);
})
.toPromise();
}
} | .then(() => { |
users_test.go | package models
import (
"fmt"
"testing"
"chirp.com/config"
"chirp.com/testdata"
)
func | (t *testing.T) {
cfg := config.TestConfig()
dbCfg := cfg.Database
testdata.ResetDB(cfg)
services, err := NewServices(
WithGorm(dbCfg.Dialect(), dbCfg.ConnectionInfo()),
WithLogMode(!cfg.IsProd()),
// WithUser(cfg.Pepper, cfg.HMACKey),
)
if err != nil {
t.Error(err)
}
defer services.Close()
userDB := &userGorm{services.db}
user, err := userDB.ByEmail("[email protected]")
if err != nil {
t.Error(err)
}
fmt.Println(user)
}
| TestUserDB |
integration_test.go | /*
Copyright 2019 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package resources
import (
"testing"
"knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1"
camelv1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
"github.com/google/go-cmp/cmp"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
func TestMakeDeployment_sink(t *testing.T) {
got, err := MakeIntegration(&CamelArguments{
Name: "test-name",
Namespace: "test-namespace",
Source: v1alpha1.CamelSourceOriginSpec{
DeprecatedComponent: &v1alpha1.CamelSourceOriginComponentSpec{
URI: "timer:tick",
Properties: map[string]string{
"k": "v",
"k2": "v2",
},
ServiceAccountName: "test-service-account",
Context: "test-context",
},
},
Sink: "http://test-sink",
})
if err != nil {
t.Error(err)
}
want := &camelv1alpha1.Integration{
TypeMeta: metav1.TypeMeta{
APIVersion: "camel.apache.org/v1alpha1",
Kind: "Integration",
},
ObjectMeta: metav1.ObjectMeta{
GenerateName: "test-name-",
Namespace: "test-namespace",
},
Spec: camelv1alpha1.IntegrationSpec{
ServiceAccountName: "test-service-account",
Kit: "test-context",
Sources: []camelv1alpha1.SourceSpec{
{
DataSpec: camelv1alpha1.DataSpec{
Name: "source.yaml",
Content: "- from:\n steps:\n - to:\n uri: knative://endpoint/sink\n uri: timer:tick\n",
},
},
},
Configuration: []camelv1alpha1.ConfigurationSpec{
{
Type: "property",
Value: "k=v",
},
{
Type: "property",
Value: "k2=v2",
},
},
Traits: map[string]camelv1alpha1.TraitSpec{
"knative": {
Configuration: map[string]string{
"configuration": `{"services":[{"type":"endpoint","protocol":"http","name":"sink","host":"test-sink","port":80,"metadata":{"service.path":"/"}}]}`,
},
},
},
},
}
if diff := cmp.Diff(want, got); diff != "" { | t.Errorf("unexpected integration (-want, +got) = %v", diff)
}
} |
|
philpapers.js | // this api is the work of the PhilPapers team (http://philpapers.org). all rights reserved.
var xpapers_embed_buffer = '';
xpapers_embed_buffer += "<ol class='xpapers_entryList'> <li id='eSANADO-9' class='xpapers_entry'><span class=\"xpapers_citation\"><a class='xpapers_title' href=\"http://philpapers.org/rec/SANADO-9\" target=\"_blank\">A Defense of Modest Foundationalism.</a><span class='xpapers_pubInfo'></span></span><div class=\"xpapers_extras\"></div></li> ";
xpapers_embed_buffer += "<li id='eSANERI-2' class='xpapers_entry'><span class=\"xpapers_citation\"><a class='xpapers_title' href=\"http://philpapers.org/rec/SANERI-2\" target=\"_blank\">Empathy's Role in Understanding the World.</a><span class='xpapers_pubInfo'></span></span><div class=\"xpapers_extras\"></div></li> ";
xpapers_embed_buffer += "<li id='eSANJTO' class='xpapers_entry'><span class=\"xpapers_citation\"><a class='xpapers_title' href=\"http://philpapers.org/rec/SANJTO\" target=\"_blank\">Jewish Teachings of Mankind and God in the Book of Genesis 1-3.</a><span class='xpapers_pubInfo'></span></span><div class=\"xpapers_extras\"></div></li> ";
xpapers_embed_buffer += "<li id='eSANOTA-4' class='xpapers_entry'><span class=\"xpapers_citation\"><a class='xpapers_title' href=\"https://philpapers.org/rec/SANOTA-4\">On the Absurdity of Theistic Evolution.</a><span class='xpapers_pubInfo'></span></span><div class=\"xpapers_extras\"></div></li> ";
xpapers_embed_buffer += "<li id='SANNAT-3' class='xpapers_entry'><span class=\"xpapers_citation\"><a class='xpapers_title' href=\"https://philpapers.org/rec/SANNAT-3\">Neoliberalism and the Emerging Precariat.</a><span class='xpapers_pubInfo'></span></span><div class=\"xpapers_extras\"></div></li>";
function | () {
if (arguments.callee.done) return;
arguments.callee.done = true;
var el = document.getElementById('xpapers_gadget');
if (el) {
el.innerHTML = xpapers_embed_buffer + "<div style='font-size:smaller;padding-top:12.5px;padding-right:25px;text-align:center'>powered by <a href='http://philpapers.org'>PhilPapers</a> | <a href='http://philpapers.org/profile/207902/myworks.pl?refresh=1'>Refresh</a>";
}
}
if (document.addEventListener) {
document.addEventListener('DOMContentLoaded', xpapers_embed_init, false);
}
(function() {
/*@*/
try {
document.body.doScroll('up');
return xpapers_embed_init();
} catch(e) {}
/* (false) @*/
if (/loaded|complete/.test(document.readyState)) return xpapers_embed_init();
/* @*/
if (!xpapers_embed_init.done) setTimeout(arguments.callee, 30);
})();
if (window.addEventListener) {
window.addEventListener('load', xpapers_embed_init, false);
} else if (window.attachEvent) {
window.attachEvent('onload', xpapers_embed_init);
}
| xpapers_embed_init |
util_style.py | # -*- coding: utf-8 -*-
"""
"""
class StyleUtil(object):
"""
"""
@staticmethod
def | (column, vp=None):
"""
:param column:
:param vp:
"""
pass
| create_gradient |
log.go | /*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package framework
import (
"bytes"
"fmt"
"regexp"
"runtime/debug"
"time"
"github.com/onsi/ginkgo"
)
func nowStamp() string {
return time.Now().Format(time.StampMilli)
}
func log(level string, format string, args ...interface{}) {
fmt.Fprintf(ginkgo.GinkgoWriter, nowStamp()+": "+level+": "+format+"\n", args...)
}
// Logf logs the info.
func Logf(format string, args ...interface{}) {
log("INFO", format, args...)
}
// Failf logs the fail info, including a stack trace starts at 2 levels above its caller
// (for example, for call chain f -> g -> Failf("foo", ...) error would be logged for "f").
func Failf(format string, args ...interface{}) {
msg := fmt.Sprintf(format, args...)
skip := 2
log("FAIL", "%s\n\nFull Stack Trace\n%s", msg, PrunedStack(skip))
ginkgoFail(nowStamp()+": "+msg, skip)
}
// Fail is a replacement for ginkgo.Fail which logs the problem as it occurs
// together with a stack trace and then calls ginkgowrapper.Fail.
func Fail(msg string, callerSkip ...int) {
skip := 1
if len(callerSkip) > 0 {
skip += callerSkip[0]
}
log("FAIL", "%s\n\nFull Stack Trace\n%s", msg, PrunedStack(skip))
ginkgoFail(nowStamp()+": "+msg, skip)
}
var codeFilterRE = regexp.MustCompile(`/github.com/onsi/ginkgo/`)
// PrunedStack is a wrapper around debug.Stack() that removes information
// about the current goroutine and optionally skips some of the initial stack entries.
// With skip == 0, the returned stack will start with the caller of PruneStack.
// From the remaining entries it automatically filters out useless ones like
// entries coming from Ginkgo.
//
// This is a modified copy of PruneStack in https://github.com/onsi/ginkgo/blob/f90f37d87fa6b1dd9625e2b1e83c23ffae3de228/internal/codelocation/code_location.go#L25:
// - simplified API and thus renamed (calls debug.Stack() instead of taking a parameter)
// - source code filtering updated to be specific to Kubernetes
// - optimized to use bytes and in-place slice filtering from
// https://github.com/golang/go/wiki/SliceTricks#filter-in-place
func PrunedStack(skip int) []byte {
fullStackTrace := debug.Stack()
stack := bytes.Split(fullStackTrace, []byte("\n"))
// Ensure that the even entries are the method names and the
// the odd entries the source code information.
if len(stack) > 0 && bytes.HasPrefix(stack[0], []byte("goroutine ")) {
// Ignore "goroutine 29 [running]:" line.
stack = stack[1:]
}
// The "+2" is for skipping over:
// - runtime/debug.Stack()
// - PrunedStack()
skip += 2
if len(stack) > 2*skip |
n := 0
for i := 0; i < len(stack)/2; i++ {
// We filter out based on the source code file name.
if !codeFilterRE.Match([]byte(stack[i*2+1])) {
stack[n] = stack[i*2]
stack[n+1] = stack[i*2+1]
n += 2
}
}
stack = stack[:n]
return bytes.Join(stack, []byte("\n"))
}
| {
stack = stack[2*skip:]
} |
test_sentence.py | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for positioning sentences.
"""
from __future__ import absolute_import, division
import itertools
from twisted.positioning import _sentence
from twisted.trial.unittest import TestCase
sentinelValueOne = "someStringValue"
sentinelValueTwo = "someOtherStringValue"
class DummyProtocol(object):
"""
A simple, fake protocol.
"""
@staticmethod
def getSentenceAttributes():
return ["type", sentinelValueOne, sentinelValueTwo]
class DummySentence(_sentence._BaseSentence): | """
A sentence for L{DummyProtocol}.
"""
ALLOWED_ATTRIBUTES = DummyProtocol.getSentenceAttributes()
class MixinProtocol(_sentence._PositioningSentenceProducerMixin):
"""
A simple, fake protocol that declaratively tells you the sentences
it produces using L{base.PositioningSentenceProducerMixin}.
"""
_SENTENCE_CONTENTS = {
None: [
sentinelValueOne,
sentinelValueTwo,
None # See MixinTests.test_noNoneInSentenceAttributes
],
}
class MixinSentence(_sentence._BaseSentence):
"""
A sentence for L{MixinProtocol}.
"""
ALLOWED_ATTRIBUTES = MixinProtocol.getSentenceAttributes()
class SentenceTestsMixin(object):
"""
Tests for positioning protocols and their respective sentences.
"""
def test_attributeAccess(self):
"""
A sentence attribute gets the correct value, and accessing an
unset attribute (which is specified as being a valid sentence
attribute) gets L{None}.
"""
thisSentinel = object()
sentence = self.sentenceClass({sentinelValueOne: thisSentinel})
self.assertEqual(getattr(sentence, sentinelValueOne), thisSentinel)
self.assertIsNone(getattr(sentence, sentinelValueTwo))
def test_raiseOnMissingAttributeAccess(self):
"""
Accessing a nonexistent attribute raises C{AttributeError}.
"""
sentence = self.sentenceClass({})
self.assertRaises(AttributeError, getattr, sentence, "BOGUS")
def test_raiseOnBadAttributeAccess(self):
"""
Accessing bogus attributes raises C{AttributeError}, *even*
when that attribute actually is in the sentence data.
"""
sentence = self.sentenceClass({"BOGUS": None})
self.assertRaises(AttributeError, getattr, sentence, "BOGUS")
sentenceType = "tummies"
reprTemplate = "<%s (%s) {%s}>"
def _expectedRepr(self, sentenceType="unknown type", dataRepr=""):
"""
Builds the expected repr for a sentence.
@param sentenceType: The name of the sentence type (e.g "GPGGA").
@type sentenceType: C{str}
@param dataRepr: The repr of the data in the sentence.
@type dataRepr: C{str}
@return: The expected repr of the sentence.
@rtype: C{str}
"""
clsName = self.sentenceClass.__name__
return self.reprTemplate % (clsName, sentenceType, dataRepr)
def test_unknownTypeRepr(self):
"""
Test the repr of an empty sentence of unknown type.
"""
sentence = self.sentenceClass({})
expectedRepr = self._expectedRepr()
self.assertEqual(repr(sentence), expectedRepr)
def test_knownTypeRepr(self):
"""
Test the repr of an empty sentence of known type.
"""
sentence = self.sentenceClass({"type": self.sentenceType})
expectedRepr = self._expectedRepr(self.sentenceType)
self.assertEqual(repr(sentence), expectedRepr)
class MixinTests(TestCase, SentenceTestsMixin):
"""
Tests for protocols deriving from L{base.PositioningSentenceProducerMixin}
and their sentences.
"""
def setUp(self):
self.protocol = MixinProtocol()
self.sentenceClass = MixinSentence
def test_noNoneInSentenceAttributes(self):
"""
L{None} does not appear in the sentence attributes of the
protocol, even though it's in the specification.
This is because L{None} is a placeholder for parts of the sentence you
don't really need or want, but there are some bits later on in the
sentence that you do want. The alternative would be to have to specify
things like "_UNUSED0", "_UNUSED1"... which would end up cluttering
the sentence data and eventually adapter state.
"""
sentenceAttributes = self.protocol.getSentenceAttributes()
self.assertNotIn(None, sentenceAttributes)
sentenceContents = self.protocol._SENTENCE_CONTENTS
sentenceSpecAttributes = itertools.chain(*sentenceContents.values())
self.assertIn(None, sentenceSpecAttributes) | |
mailAttachment.ts | /**
* Mail Baby API
* This is an API defintion for accesssing the Mail.Baby mail service.
*
* The version of the OpenAPI document: 1.0.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
| /**
* A File attachment for an email
*/
export interface MailAttachment {
/**
* Contents of the attached file
*/
data: Blob;
/**
* Optional filename to specify for the attachment.
*/
filename?: string;
} | |
icon_insights.rs |
pub struct IconInsights {
props: crate::Props,
}
impl yew::Component for IconInsights {
type Properties = crate::Props;
type Message = ();
fn create(props: Self::Properties, _: yew::prelude::ComponentLink<Self>) -> Self
|
fn update(&mut self, _: Self::Message) -> yew::prelude::ShouldRender
{
true
}
fn change(&mut self, _: Self::Properties) -> yew::prelude::ShouldRender
{
false
}
fn view(&self) -> yew::prelude::Html
{
yew::prelude::html! {
<svg
class=self.props.class.unwrap_or("")
width=self.props.size.unwrap_or(24).to_string()
height=self.props.size.unwrap_or(24).to_string()
viewBox="0 0 24 24"
fill=self.props.fill.unwrap_or("none")
stroke=self.props.color.unwrap_or("currentColor")
stroke-width=self.props.stroke_width.unwrap_or(2).to_string()
stroke-linecap=self.props.stroke_linecap.unwrap_or("round")
stroke-linejoin=self.props.stroke_linejoin.unwrap_or("round")
>
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24" viewBox="0 0 24 24" width="24"><g><rect fill="none" height="24" width="24"/><rect fill="none" height="24" width="24"/></g><g><g><path d="M21,8c-1.45,0-2.26,1.44-1.93,2.51l-3.55,3.56c-0.3-0.09-0.74-0.09-1.04,0l-2.55-2.55C12.27,10.45,11.46,9,10,9 c-1.45,0-2.27,1.44-1.93,2.52l-4.56,4.55C2.44,15.74,1,16.55,1,18c0,1.1,0.9,2,2,2c1.45,0,2.26-1.44,1.93-2.51l4.55-4.56 c0.3,0.09,0.74,0.09,1.04,0l2.55,2.55C12.73,16.55,13.54,18,15,18c1.45,0,2.27-1.44,1.93-2.52l3.56-3.55 C21.56,12.26,23,11.45,23,10C23,8.9,22.1,8,21,8z"/><polygon points="15,9 15.94,6.93 18,6 15.94,5.07 15,3 14.08,5.07 12,6 14.08,6.93"/><polygon points="3.5,11 4,9 6,8.5 4,8 3.5,6 3,8 1,8.5 3,9"/></g></g></svg>
</svg>
}
}
}
| {
Self { props }
} |
latexAUXFile.js | import {Format} from "../../Format.js";
export class | extends Format
{
name = "Latex Auxiliary File";
ext = [".aux"];
forbidExtMatch = true;
magic = ["LaTeX auxiliary file"];
weakMagic = true;
untouched = true;
metaProvider = ["text"];
}
| latexAUXFile |
pytest_yamlsound.py | import yaml, pytest
def pytest_collect_file(parent, path):
if path.ext == ".yml" and path.basename.startswith("test"):
return YamlFile.from_parent(parent, fspath=path)
class YamlException(Exception):
"""Custom exception for error reporting."""
class YamlFile(pytest.File):
def collect(self):
raw = yaml.safe_load(self.fspath.open())
for spec in raw:
name = spec["name"]
yield YamlItem.from_parent(self, name=name, spec=spec)
class YamlItem(pytest.Item):
def __init__(self, name, parent, spec):
super().__init__(name, parent)
self.spec = spec
def runtest(self):
test_type = self.spec.get("type")
if test_type != "check-compression":
raise YamlException(f"unknown test type: {test_type}")
codec = self.spec.get("codec")
if codec != "mp3":
raise YamlException(f"unknown codec: {codec}")
# pseudo check
inputfile = self.spec.get("inputfile")
compression = self.spec.get("compression")
real_comp = "15%"
if compression != real_comp:
raise YamlException(
f"compression of {inputfile} was {real_comp}, "
f"expected {compression}")
def repr_failure(self, excinfo):
"""Called when self.runtest() raises an exception."""
if isinstance(excinfo.value, YamlException):
return f"spec failed: {excinfo.value}"
return super().repr_failure(excinfo) |
def reportinfo(self):
return self.fspath, 0, f"usecase: {self.name}" | |
garf_data.py | import json, os
class GarfData:
file = os.path.join(os.getcwd(), "garf_data.json")
token: str
path_to_ffmpeg: str
jokes: list
trigger_words: list
def __init__(self):
with open(self.file, "r") as f:
json_dict = json.loads(f.read())
self.token = json_dict["token"]
self.path_to_ffmpeg = json_dict["path_to_ffmpeg"]
self.jokes = json_dict["jokes"]
self.trigger_words = json_dict["trigger_words"] | "path_to_ffmpeg": self.path_to_ffmpeg,
"jokes": self.jokes,
"trigger_words": self.trigger_words
}
with open(self.file, "w") as f:
f.write(json.dumps(json_dict, indent = 4) + os.linesep) |
def overwrite(self):
json_dict = {
"token": self.token, |
admin.py | from .models import Choice
from .models import Question
from django.contrib import admin
# Register your models here.
class ChoiceInline(admin.TabularInline):
model = Choice
extra = 1
class QuestionAdmin(admin.ModelAdmin):
|
admin.site.register(Question, QuestionAdmin)
| fieldsets = [
(None, {'fields': ['question_text']}),
('Date information', {'fields': ['pub_date']}),
]
inlines = [ChoiceInline]
list_display = ('question_text', 'pub_date', 'was_published_recently')
list_filter = ['pub_date']
search_fields = ['question_text'] |
harness_controller.py | #!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
import ConfigParser
import logging
import os
import subprocess
import time
from autothreadharness import settings
logger = logging.getLogger(__name__)
HARNESS_SVN_VERSION_R44 = 1471
"""int: this is the first published release that miniweb was removed from Harness"""
def _try_kill(proc):
logger.info('Try kill process')
times = 1
while proc.poll() is None:
proc.kill()
time.sleep(5)
if proc.poll() is not None:
logger.info('Process has been killed')
break
logger.info('Trial %d failed', times)
times += 1
if times > 3:
|
class HarnessController(object):
"""Harness service control
This controls harness service, including the harness back-end and front-end.
"""
harness = None
"""harness back-end"""
miniweb = None
"""harness front-end"""
def __init__(self, result_dir=None):
self.result_dir = result_dir
self.harness_file = ''
harness_info = ConfigParser.ConfigParser()
harness_info.read('%s\\info.ini' % settings.HARNESS_HOME)
self.version = harness_info.getint('Thread_Harness_Info', 'SVN')
def start(self):
logger.info('Starting harness service')
if self.harness:
logger.warning('Harness already started')
else:
env = dict(os.environ, PYTHONPATH='%s\\Thread_Harness;%s\\ThirdParty\\hsdk-python\\src'
% (settings.HARNESS_HOME, settings.HARNESS_HOME))
self.harness_file = '%s\\harness-%s.log' % (self.result_dir, time.strftime('%Y%m%d%H%M%S'))
with open(self.harness_file, 'w') as harness_out:
self.harness = subprocess.Popen([settings.HARNESS_HOME + '\\Python27\\python.exe',
settings.HARNESS_HOME + '\\Thread_Harness\\Run.py'],
cwd=settings.HARNESS_HOME,
stdout=harness_out,
stderr=harness_out,
env=env)
time.sleep(2)
if self.version >= HARNESS_SVN_VERSION_R44:
return
if self.miniweb:
logger.warning('Miniweb already started')
else:
with open('%s\\miniweb-%s.log' % (self.result_dir, time.strftime('%Y%m%d%H%M%S')), 'w') as miniweb_out:
self.miniweb = subprocess.Popen([settings.HARNESS_HOME + '\\MiniWeb\\miniweb.exe'],
stdout=miniweb_out,
stderr=miniweb_out,
cwd=settings.HARNESS_HOME + '\\MiniWeb')
def stop(self):
logger.info('Stopping harness service')
if self.harness:
_try_kill(self.harness)
self.harness = None
else:
logger.warning('Harness not started yet')
if self.version >= HARNESS_SVN_VERSION_R44:
return
if self.miniweb:
_try_kill(self.miniweb)
self.miniweb = None
else:
logger.warning('Miniweb not started yet')
def tail(self):
with open(self.harness_file) as harness_out:
harness_out.seek(-100, 2)
return ''.join(harness_out.readlines())
def __del__(self):
self.stop()
| raise SystemExit() |
models.py | # Copyright 2014 Rackspace
# Copyright 2016 Blue Box, an IBM Company
# Copyright 2017 Walmart Stores Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_db.sqlalchemy import models
import sqlalchemy as sa
from sqlalchemy.ext import orderinglist
from sqlalchemy import orm
from sqlalchemy.orm import validates
from sqlalchemy.sql import func
from octavia.api.v2.types import amphora
from octavia.api.v2.types import availability_zone_profile
from octavia.api.v2.types import availability_zones
from octavia.api.v2.types import flavor_profile
from octavia.api.v2.types import flavors
from octavia.api.v2.types import health_monitor
from octavia.api.v2.types import l7policy
from octavia.api.v2.types import l7rule
from octavia.api.v2.types import listener
from octavia.api.v2.types import load_balancer
from octavia.api.v2.types import member
from octavia.api.v2.types import pool
from octavia.api.v2.types import quotas
from octavia.common import constants
from octavia.common import data_models
from octavia.db import base_models
from octavia.i18n import _
class ProvisioningStatus(base_models.BASE, base_models.LookupTableMixin):
__tablename__ = "provisioning_status"
class OperatingStatus(base_models.BASE, base_models.LookupTableMixin):
__tablename__ = "operating_status"
class Protocol(base_models.BASE, base_models.LookupTableMixin):
__tablename__ = "protocol"
class Algorithm(base_models.BASE, base_models.LookupTableMixin):
__tablename__ = "algorithm"
class AmphoraRoles(base_models.BASE, base_models.LookupTableMixin):
__tablename__ = "amphora_roles"
class LBTopology(base_models.BASE, base_models.LookupTableMixin):
__tablename__ = "lb_topology"
class SessionPersistenceType(base_models.BASE, base_models.LookupTableMixin):
__tablename__ = "session_persistence_type"
class HealthMonitorType(base_models.BASE, base_models.LookupTableMixin):
__tablename__ = "health_monitor_type"
class VRRPAuthMethod(base_models.BASE, base_models.LookupTableMixin):
__tablename__ = "vrrp_auth_method"
class L7RuleType(base_models.BASE, base_models.LookupTableMixin):
__tablename__ = "l7rule_type"
class L7RuleCompareType(base_models.BASE, base_models.LookupTableMixin):
__tablename__ = "l7rule_compare_type"
class L7PolicyAction(base_models.BASE, base_models.LookupTableMixin):
__tablename__ = "l7policy_action"
class AmphoraBuildSlots(base_models.BASE):
__tablename__ = "amphora_build_slots"
id = sa.Column(sa.Integer(), primary_key=True)
slots_used = sa.Column(sa.Integer())
class AmphoraBuildRequest(base_models.BASE):
__tablename__ = "amphora_build_request"
amphora_id = sa.Column(sa.String(36), nullable=True, primary_key=True)
priority = sa.Column(sa.Integer())
created_time = sa.Column(sa.DateTime, default=func.now(), nullable=False)
status = sa.Column(sa.String(16), default='WAITING', nullable=False)
class SessionPersistence(base_models.BASE):
__data_model__ = data_models.SessionPersistence
__tablename__ = "session_persistence"
pool_id = sa.Column(
sa.String(36),
sa.ForeignKey("pool.id", name="fk_session_persistence_pool_id"),
nullable=False,
primary_key=True)
type = sa.Column(
sa.String(36),
sa.ForeignKey(
"session_persistence_type.name",
name="fk_session_persistence_session_persistence_type_name"),
nullable=False)
cookie_name = sa.Column(sa.String(255), nullable=True)
persistence_timeout = sa.Column(sa.Integer(), nullable=True)
persistence_granularity = sa.Column(sa.String(64), nullable=True)
pool = orm.relationship("Pool", uselist=False,
back_populates="session_persistence")
class ListenerStatistics(base_models.BASE):
__data_model__ = data_models.ListenerStatistics
__tablename__ = "listener_statistics"
listener_id = sa.Column(
sa.String(36),
primary_key=True,
nullable=False)
amphora_id = sa.Column(
sa.String(36),
primary_key=True,
nullable=False)
bytes_in = sa.Column(sa.BigInteger, nullable=False)
bytes_out = sa.Column(sa.BigInteger, nullable=False)
active_connections = sa.Column(sa.Integer, nullable=False)
total_connections = sa.Column(sa.BigInteger, nullable=False)
request_errors = sa.Column(sa.BigInteger, nullable=False)
@validates('bytes_in', 'bytes_out',
'active_connections', 'total_connections',
'request_errors')
def validate_non_negative_int(self, key, value):
if value < 0:
data = {'key': key, 'value': value}
raise ValueError(_('The %(key)s field can not have '
'negative value. '
'Current value is %(value)d.') % data)
return value
class Member(base_models.BASE, base_models.IdMixin, base_models.ProjectMixin,
models.TimestampMixin, base_models.NameMixin,
base_models.TagMixin):
__data_model__ = data_models.Member
__tablename__ = "member"
__v2_wsme__ = member.MemberResponse
__table_args__ = (
sa.UniqueConstraint('pool_id', 'ip_address', 'protocol_port',
name='uq_member_pool_id_address_protocol_port'),
)
pool_id = sa.Column(
sa.String(36),
sa.ForeignKey("pool.id", name="fk_member_pool_id"),
nullable=False)
subnet_id = sa.Column(sa.String(36), nullable=True)
ip_address = sa.Column('ip_address', sa.String(64), nullable=False)
protocol_port = sa.Column(sa.Integer, nullable=False)
weight = sa.Column(sa.Integer, nullable=True)
backup = sa.Column(sa.Boolean(), nullable=False)
monitor_address = sa.Column(sa.String(64), nullable=True)
monitor_port = sa.Column(sa.Integer, nullable=True)
provisioning_status = sa.Column(
sa.String(16),
sa.ForeignKey("provisioning_status.name",
name="fk_member_provisioning_status_name"),
nullable=False)
operating_status = sa.Column(
sa.String(16),
sa.ForeignKey("operating_status.name",
name="fk_member_operating_status_name"),
nullable=False)
enabled = sa.Column(sa.Boolean(), nullable=False)
pool = orm.relationship("Pool", back_populates="members")
_tags = orm.relationship(
'Tags',
single_parent=True,
lazy='subquery',
cascade='all,delete-orphan',
primaryjoin='and_(foreign(Tags.resource_id)==Member.id)'
)
class HealthMonitor(base_models.BASE, base_models.IdMixin,
base_models.ProjectMixin, models.TimestampMixin,
base_models.NameMixin, base_models.TagMixin):
__data_model__ = data_models.HealthMonitor
__tablename__ = "health_monitor"
__v2_wsme__ = health_monitor.HealthMonitorResponse
__table_args__ = (
sa.UniqueConstraint('pool_id',
name='uq_health_monitor_pool'),
)
type = sa.Column(
sa.String(36),
sa.ForeignKey("health_monitor_type.name",
name="fk_health_monitor_health_monitor_type_name"),
nullable=False)
pool_id = sa.Column(
sa.String(36),
sa.ForeignKey("pool.id", name="fk_health_monitor_pool_id"),
nullable=False)
delay = sa.Column(sa.Integer, nullable=False)
timeout = sa.Column(sa.Integer, nullable=False)
fall_threshold = sa.Column(sa.Integer, nullable=False)
rise_threshold = sa.Column(sa.Integer, nullable=False)
http_method = sa.Column(sa.String(16), nullable=True)
url_path = sa.Column(sa.String(2048), nullable=True)
expected_codes = sa.Column(sa.String(64), nullable=True)
enabled = sa.Column(sa.Boolean, nullable=False)
pool = orm.relationship("Pool", uselist=False,
back_populates="health_monitor")
provisioning_status = sa.Column(
sa.String(16),
sa.ForeignKey("provisioning_status.name",
name="fk_health_monitor_provisioning_status_name"),
nullable=False)
operating_status = sa.Column(
sa.String(16),
sa.ForeignKey("operating_status.name",
name="fk_health_monitor_operating_status_name"),
nullable=False)
_tags = orm.relationship(
'Tags',
single_parent=True,
lazy='subquery',
cascade='all,delete-orphan',
primaryjoin='and_(foreign(Tags.resource_id)==HealthMonitor.id)'
)
http_version = sa.Column(sa.Float, nullable=True)
domain_name = sa.Column(sa.String(255), nullable=True)
class Pool(base_models.BASE, base_models.IdMixin, base_models.ProjectMixin,
models.TimestampMixin, base_models.NameMixin, base_models.TagMixin):
__data_model__ = data_models.Pool
__tablename__ = "pool"
__v2_wsme__ = pool.PoolResponse
description = sa.Column(sa.String(255), nullable=True)
protocol = sa.Column(
sa.String(16),
sa.ForeignKey("protocol.name", name="fk_pool_protocol_name"),
nullable=False)
lb_algorithm = sa.Column(
sa.String(255),
sa.ForeignKey("algorithm.name", name="fk_pool_algorithm_name"),
nullable=False)
provisioning_status = sa.Column(
sa.String(16),
sa.ForeignKey("provisioning_status.name",
name="fk_pool_provisioning_status_name"),
nullable=False)
operating_status = sa.Column(
sa.String(16),
sa.ForeignKey("operating_status.name",
name="fk_pool_operating_status_name"),
nullable=False)
enabled = sa.Column(sa.Boolean, nullable=False)
load_balancer_id = sa.Column(
sa.String(36),
sa.ForeignKey("load_balancer.id", name="fk_pool_load_balancer_id"),
nullable=True)
health_monitor = orm.relationship("HealthMonitor", uselist=False,
cascade="delete", back_populates="pool")
load_balancer = orm.relationship("LoadBalancer", uselist=False,
back_populates="pools")
members = orm.relationship("Member", uselist=True, cascade="delete",
back_populates="pool")
session_persistence = orm.relationship(
"SessionPersistence", uselist=False, cascade="delete",
back_populates="pool")
_default_listeners = orm.relationship("Listener", uselist=True,
back_populates="default_pool")
l7policies = orm.relationship("L7Policy", uselist=True,
back_populates="redirect_pool")
_tags = orm.relationship(
'Tags',
single_parent=True,
lazy='subquery',
cascade='all,delete-orphan',
primaryjoin='and_(foreign(Tags.resource_id)==Pool.id)'
)
tls_certificate_id = sa.Column(sa.String(255), nullable=True)
ca_tls_certificate_id = sa.Column(sa.String(255), nullable=True)
crl_container_id = sa.Column(sa.String(255), nullable=True)
tls_enabled = sa.Column(sa.Boolean, default=False, nullable=False)
# This property should be a unique list of any listeners that reference
# this pool as its default_pool and any listeners referenced by enabled
# L7Policies with at least one l7rule which also reference this pool. The
# intent is that pool.listeners should be a unique list of listeners
# *actually* using the pool.
@property
def listeners(self):
_listeners = self._default_listeners[:]
_l_ids = [l.id for l in _listeners]
l7_listeners = [p.listener for p in self.l7policies
if len(p.l7rules) > 0 and p.enabled is True]
for l in l7_listeners:
if l.id not in _l_ids:
_listeners.append(l)
_l_ids.append(l.id)
return _listeners
class LoadBalancer(base_models.BASE, base_models.IdMixin,
base_models.ProjectMixin, models.TimestampMixin,
base_models.NameMixin, base_models.TagMixin):
__data_model__ = data_models.LoadBalancer
__tablename__ = "load_balancer"
__v2_wsme__ = load_balancer.LoadBalancerResponse
description = sa.Column(sa.String(255), nullable=True)
provisioning_status = sa.Column(
sa.String(16),
sa.ForeignKey("provisioning_status.name",
name="fk_load_balancer_provisioning_status_name"),
nullable=False)
operating_status = sa.Column(
sa.String(16),
sa.ForeignKey("operating_status.name",
name="fk_load_balancer_operating_status_name"),
nullable=False)
topology = sa.Column(
sa.String(36),
sa.ForeignKey("lb_topology.name", name="fk_lb_topology_name"),
nullable=True)
enabled = sa.Column(sa.Boolean, nullable=False)
amphorae = orm.relationship("Amphora", uselist=True,
back_populates="load_balancer")
server_group_id = sa.Column(sa.String(36), nullable=True)
provider = sa.Column(sa.String(64), nullable=True)
vip = orm.relationship('Vip', cascade='delete', uselist=False,
backref=orm.backref('load_balancer', uselist=False))
pools = orm.relationship('Pool', cascade='delete', uselist=True,
back_populates="load_balancer")
listeners = orm.relationship('Listener', cascade='delete', uselist=True,
back_populates='load_balancer')
_tags = orm.relationship(
'Tags',
single_parent=True,
lazy='subquery',
cascade='all,delete-orphan',
primaryjoin='and_(foreign(Tags.resource_id)==LoadBalancer.id)'
)
flavor_id = sa.Column(
sa.String(36),
sa.ForeignKey("flavor.id", name="fk_lb_flavor_id"), nullable=True)
availability_zone = sa.Column(
sa.String(255),
sa.ForeignKey("availability_zone.name",
name="fk_load_balancer_availability_zone_name"),
nullable=True)
class VRRPGroup(base_models.BASE):
__data_model__ = data_models.VRRPGroup
__tablename__ = "vrrp_group"
load_balancer_id = sa.Column(
sa.String(36),
sa.ForeignKey("load_balancer.id",
name="fk_vrrp_group_load_balancer_id"),
nullable=False, primary_key=True)
vrrp_group_name = sa.Column(sa.String(36), nullable=True)
vrrp_auth_type = sa.Column(sa.String(16), sa.ForeignKey(
"vrrp_auth_method.name",
name="fk_load_balancer_vrrp_auth_method_name"))
vrrp_auth_pass = sa.Column(sa.String(36), nullable=True)
advert_int = sa.Column(sa.Integer(), nullable=True)
load_balancer = orm.relationship("LoadBalancer", uselist=False,
backref=orm.backref("vrrp_group",
uselist=False,
cascade="delete"))
class Vip(base_models.BASE):
__data_model__ = data_models.Vip
__tablename__ = "vip"
load_balancer_id = sa.Column(
sa.String(36),
sa.ForeignKey("load_balancer.id",
name="fk_vip_load_balancer_id"),
nullable=False, primary_key=True)
ip_address = sa.Column(sa.String(64), nullable=True)
port_id = sa.Column(sa.String(36), nullable=True)
subnet_id = sa.Column(sa.String(36), nullable=True)
network_id = sa.Column(sa.String(36), nullable=True)
qos_policy_id = sa.Column(sa.String(36), nullable=True)
octavia_owned = sa.Column(sa.Boolean(), nullable=True)
class Listener(base_models.BASE, base_models.IdMixin,
base_models.ProjectMixin, models.TimestampMixin,
base_models.NameMixin, base_models.TagMixin):
__data_model__ = data_models.Listener
__tablename__ = "listener"
__v2_wsme__ = listener.ListenerResponse
__table_args__ = (
sa.UniqueConstraint(
'load_balancer_id', 'protocol', 'protocol_port',
name='uq_listener_load_balancer_id_protocol_port'),
)
description = sa.Column(sa.String(255), nullable=True)
protocol = sa.Column(
sa.String(16),
sa.ForeignKey("protocol.name", name="fk_listener_protocol_name"),
nullable=False)
protocol_port = sa.Column(sa.Integer(), nullable=False)
connection_limit = sa.Column(sa.Integer, nullable=True)
load_balancer_id = sa.Column(
sa.String(36),
sa.ForeignKey("load_balancer.id", name="fk_listener_load_balancer_id"),
nullable=True)
tls_certificate_id = sa.Column(sa.String(255), nullable=True)
default_pool_id = sa.Column(
sa.String(36),
sa.ForeignKey("pool.id", name="fk_listener_pool_id"),
nullable=True)
provisioning_status = sa.Column(
sa.String(16),
sa.ForeignKey("provisioning_status.name",
name="fk_listener_provisioning_status_name"),
nullable=False)
operating_status = sa.Column(
sa.String(16),
sa.ForeignKey("operating_status.name",
name="fk_listener_operating_status_name"),
nullable=False)
enabled = sa.Column(sa.Boolean(), nullable=False)
load_balancer = orm.relationship("LoadBalancer", uselist=False,
back_populates="listeners")
default_pool = orm.relationship("Pool", uselist=False,
back_populates="_default_listeners")
sni_containers = orm.relationship(
'SNI', cascade='delete', uselist=True,
backref=orm.backref('listener', uselist=False))
l7policies = orm.relationship(
'L7Policy', uselist=True, order_by='L7Policy.position',
collection_class=orderinglist.ordering_list('position', count_from=1),
cascade='delete', back_populates='listener')
peer_port = sa.Column(sa.Integer(), nullable=True)
insert_headers = sa.Column(sa.PickleType())
timeout_client_data = sa.Column(sa.Integer, nullable=True)
timeout_member_connect = sa.Column(sa.Integer, nullable=True)
timeout_member_data = sa.Column(sa.Integer, nullable=True)
timeout_tcp_inspect = sa.Column(sa.Integer, nullable=True)
client_ca_tls_certificate_id = sa.Column(sa.String(255), nullable=True)
client_authentication = sa.Column(
sa.String(10),
sa.ForeignKey("client_authentication_mode.name",
name="fk_listener_client_authentication_mode_name"),
nullable=False, default=constants.CLIENT_AUTH_NONE)
client_crl_container_id = sa.Column(sa.String(255), nullable=True)
_tags = orm.relationship(
'Tags',
single_parent=True,
lazy='subquery',
cascade='all,delete-orphan',
primaryjoin='and_(foreign(Tags.resource_id)==Listener.id)'
)
# This property should be a unique list of the default_pool and anything
# referenced by enabled L7Policies with at least one rule that also
# reference this listener. The intent is that listener.pools should be a
# unique list of pools this listener is *actually* using.
@property
def pools(self):
_pools = []
_p_ids = []
if self.default_pool:
_pools.append(self.default_pool)
_p_ids.append(self.default_pool.id)
l7_pools = [p.redirect_pool for p in self.l7policies
if p.redirect_pool is not None and len(p.l7rules) > 0 and
p.enabled is True]
for p in l7_pools:
if p.id not in _p_ids:
_pools.append(p)
_p_ids.append(p.id)
return _pools
allowed_cidrs = orm.relationship(
'ListenerCidr', cascade='all,delete-orphan',
uselist=True, backref=orm.backref('listener', uselist=False))
class SNI(base_models.BASE):
__data_model__ = data_models.SNI
__tablename__ = "sni"
__table_args__ = (
sa.PrimaryKeyConstraint('listener_id', 'tls_container_id'),
)
listener_id = sa.Column(
sa.String(36),
sa.ForeignKey("listener.id", name="fk_sni_listener_id"),
nullable=False)
tls_container_id = sa.Column(sa.String(128), nullable=False)
position = sa.Column(sa.Integer(), nullable=True)
class Amphora(base_models.BASE, base_models.IdMixin, models.TimestampMixin):
__data_model__ = data_models.Amphora
__tablename__ = "amphora"
__v2_wsme__ = amphora.AmphoraResponse
load_balancer_id = sa.Column(
sa.String(36), sa.ForeignKey("load_balancer.id",
name="fk_amphora_load_balancer_id"),
nullable=True)
compute_id = sa.Column(sa.String(36), nullable=True)
lb_network_ip = sa.Column(sa.String(64), nullable=True)
vrrp_ip = sa.Column(sa.String(64), nullable=True)
ha_ip = sa.Column(sa.String(64), nullable=True)
vrrp_port_id = sa.Column(sa.String(36), nullable=True)
ha_port_id = sa.Column(sa.String(36), nullable=True)
cert_expiration = sa.Column(sa.DateTime(timezone=True), default=None,
nullable=True)
cert_busy = sa.Column(sa.Boolean(), default=False, nullable=False)
role = sa.Column(
sa.String(36),
sa.ForeignKey("amphora_roles.name", name="fk_amphora_roles_name"),
nullable=True)
status = sa.Column(
sa.String(36),
sa.ForeignKey("provisioning_status.name",
name="fk_container_provisioning_status_name"))
vrrp_interface = sa.Column(sa.String(16), nullable=True)
vrrp_id = sa.Column(sa.Integer(), nullable=True)
vrrp_priority = sa.Column(sa.Integer(), nullable=True)
cached_zone = sa.Column(sa.String(255), nullable=True)
image_id = sa.Column(sa.String(36), nullable=True)
load_balancer = orm.relationship("LoadBalancer", uselist=False,
back_populates='amphorae')
compute_flavor = sa.Column(sa.String(255), nullable=True)
class AmphoraHealth(base_models.BASE):
__data_model__ = data_models.AmphoraHealth
__tablename__ = "amphora_health"
amphora_id = sa.Column(
sa.String(36), nullable=False, primary_key=True)
last_update = sa.Column(sa.DateTime, default=func.now(),
nullable=False)
busy = sa.Column(sa.Boolean(), default=False, nullable=False)
class L7Rule(base_models.BASE, base_models.IdMixin, base_models.ProjectMixin,
models.TimestampMixin, base_models.TagMixin):
__data_model__ = data_models.L7Rule
__tablename__ = "l7rule"
__v2_wsme__ = l7rule.L7RuleResponse
l7policy_id = sa.Column(
sa.String(36),
sa.ForeignKey("l7policy.id", name="fk_l7rule_l7policy_id"),
nullable=False)
type = sa.Column(
sa.String(36),
sa.ForeignKey(
"l7rule_type.name",
name="fk_l7rule_l7rule_type_name"),
nullable=False)
compare_type = sa.Column(
sa.String(36),
sa.ForeignKey(
"l7rule_compare_type.name",
name="fk_l7rule_l7rule_compare_type_name"),
nullable=False)
key = sa.Column(sa.String(255), nullable=True)
value = sa.Column(sa.String(255), nullable=False)
invert = sa.Column(sa.Boolean(), default=False, nullable=False)
enabled = sa.Column(sa.Boolean(), nullable=False)
l7policy = orm.relationship("L7Policy", uselist=False,
back_populates="l7rules")
provisioning_status = sa.Column(
sa.String(16),
sa.ForeignKey("provisioning_status.name",
name="fk_l7rule_provisioning_status_name"),
nullable=False)
operating_status = sa.Column(
sa.String(16),
sa.ForeignKey("operating_status.name",
name="fk_l7rule_operating_status_name"),
nullable=False)
_tags = orm.relationship(
'Tags',
single_parent=True,
lazy='subquery',
cascade='all,delete-orphan',
primaryjoin='and_(foreign(Tags.resource_id)==L7Rule.id)'
)
class L7Policy(base_models.BASE, base_models.IdMixin, base_models.ProjectMixin,
models.TimestampMixin, base_models.NameMixin,
base_models.TagMixin):
__data_model__ = data_models.L7Policy
__tablename__ = "l7policy"
__v2_wsme__ = l7policy.L7PolicyResponse
description = sa.Column(sa.String(255), nullable=True)
listener_id = sa.Column(
sa.String(36),
sa.ForeignKey("listener.id", name="fk_l7policy_listener_id"),
nullable=False)
action = sa.Column(
sa.String(36),
sa.ForeignKey(
"l7policy_action.name",
name="fk_l7policy_l7policy_action_name"),
nullable=False)
redirect_pool_id = sa.Column(
sa.String(36),
sa.ForeignKey("pool.id", name="fk_l7policy_pool_id"),
nullable=True)
redirect_url = sa.Column(
sa.String(255),
nullable=True)
redirect_prefix = sa.Column(
sa.String(255),
nullable=True)
redirect_http_code = sa.Column(sa.Integer, nullable=True)
position = sa.Column(sa.Integer, nullable=False)
enabled = sa.Column(sa.Boolean(), nullable=False)
listener = orm.relationship("Listener", uselist=False,
back_populates="l7policies")
redirect_pool = orm.relationship("Pool", uselist=False,
back_populates="l7policies")
l7rules = orm.relationship("L7Rule", uselist=True, cascade="delete",
back_populates="l7policy")
provisioning_status = sa.Column(
sa.String(16),
sa.ForeignKey("provisioning_status.name",
name="fk_l7policy_provisioning_status_name"),
nullable=False)
operating_status = sa.Column(
sa.String(16),
sa.ForeignKey("operating_status.name",
name="fk_l7policy_operating_status_name"),
nullable=False)
_tags = orm.relationship(
'Tags',
single_parent=True,
lazy='subquery',
cascade='all,delete-orphan',
primaryjoin='and_(foreign(Tags.resource_id)==L7Policy.id)'
)
class Quotas(base_models.BASE):
__data_model__ = data_models.Quotas
__tablename__ = "quotas"
__v2_wsme__ = quotas.QuotaAllBase
project_id = sa.Column(sa.String(36), primary_key=True)
health_monitor = sa.Column(sa.Integer(), nullable=True)
listener = sa.Column(sa.Integer(), nullable=True)
load_balancer = sa.Column(sa.Integer(), nullable=True)
member = sa.Column(sa.Integer(), nullable=True)
pool = sa.Column(sa.Integer(), nullable=True)
in_use_health_monitor = sa.Column(sa.Integer(), nullable=True)
in_use_listener = sa.Column(sa.Integer(), nullable=True)
in_use_load_balancer = sa.Column(sa.Integer(), nullable=True)
in_use_member = sa.Column(sa.Integer(), nullable=True)
in_use_pool = sa.Column(sa.Integer(), nullable=True)
class FlavorProfile(base_models.BASE, base_models.IdMixin,
base_models.NameMixin):
__data_model__ = data_models.FlavorProfile
__tablename__ = "flavor_profile"
__v2_wsme__ = flavor_profile.FlavorProfileResponse
provider_name = sa.Column(sa.String(255), nullable=False)
flavor_data = sa.Column(sa.String(4096), nullable=False)
class Flavor(base_models.BASE,
base_models.IdMixin,
base_models.NameMixin):
__data_model__ = data_models.Flavor
__tablename__ = "flavor"
__v2_wsme__ = flavors.FlavorResponse
__table_args__ = (
sa.UniqueConstraint('name',
name='uq_flavor_name'),
)
description = sa.Column(sa.String(255), nullable=True)
enabled = sa.Column(sa.Boolean(), nullable=False)
flavor_profile_id = sa.Column(
sa.String(36),
sa.ForeignKey("flavor_profile.id",
name="fk_flavor_flavor_profile_id"),
nullable=False)
class AvailabilityZoneProfile(base_models.BASE, base_models.IdMixin, | __data_model__ = data_models.AvailabilityZoneProfile
__tablename__ = "availability_zone_profile"
__v2_wsme__ = availability_zone_profile.AvailabilityZoneProfileResponse
provider_name = sa.Column(sa.String(255), nullable=False)
availability_zone_data = sa.Column(sa.String(4096), nullable=False)
class AvailabilityZone(base_models.BASE,
base_models.NameMixin):
__data_model__ = data_models.AvailabilityZone
__tablename__ = "availability_zone"
__v2_wsme__ = availability_zones.AvailabilityZoneResponse
__table_args__ = (
sa.PrimaryKeyConstraint('name'),
)
description = sa.Column(sa.String(255), nullable=True)
enabled = sa.Column(sa.Boolean(), nullable=False)
availability_zone_profile_id = sa.Column(
sa.String(36),
sa.ForeignKey("availability_zone_profile.id",
name="fk_az_az_profile_id"),
nullable=False)
class ClientAuthenticationMode(base_models.BASE):
__tablename__ = "client_authentication_mode"
name = sa.Column(sa.String(10), primary_key=True, nullable=False)
class SparesPool(base_models.BASE):
__tablename__ = "spares_pool"
updated_at = sa.Column(sa.DateTime, primary_key=True, nullable=True)
class ListenerCidr(base_models.BASE):
__data_model__ = data_models.ListenerCidr
__tablename__ = "listener_cidr"
__table_args__ = (
sa.PrimaryKeyConstraint('listener_id', 'cidr'),
)
listener_id = sa.Column(
sa.String(36),
sa.ForeignKey("listener.id", name="fk_listener_cidr_listener_id"),
nullable=False)
cidr = sa.Column(sa.String(64), nullable=False) | base_models.NameMixin):
|
set_commands_enabled.rs | use packet_derive::{packet, MCPEPacketDataAuto};
#[packet(0x3B)]
#[derive(MCPEPacketDataAuto)]
pub struct | {
enabled: bool,
}
| SetCommandsEnabledPacket |
game.rs | use crate::assets::{ImageId, Images};
use crate::components::{Position, Velocity};
use crate::gl::Gl;
use crate::input_system::{BunnyCount, InputEvent, InputSystem};
use crate::move_system::MoveSystem;
use crate::render_system::{DisplayEvent, RenderSystem, Sprite, Transform, WindowSize};
use anyhow::Result;
use rand::Rng;
use specs::prelude::*;
use specs::shrev::EventChannel;
use std::rc::Rc;
use std::sync::Mutex;
use vek::Vec2;
use wasm_bindgen::closure::Closure;
use wasm_bindgen::JsCast;
use web_sys::Window;
pub struct Game {
gl: Rc<Gl>,
images: Rc<Images>,
dom_event_handlers: DomEvents,
world: World,
input_system: InputSystem,
move_system: MoveSystem,
render_system: RenderSystem,
}
impl Game {
pub async fn init(gl: Rc<Gl>, window: &Window, canvas_size: Vec2<i32>) -> Result<Self> {
let images = load_images(gl.clone()).await?;
let images = Rc::new(images);
let bunny_image = images.find_image_id("/assets/images/bunny.png").unwrap();
let mut world = init_world(canvas_size, &images);
Ok(Game {
gl: gl.clone(),
images: Rc::new(Images::new(gl.clone())),
dom_event_handlers: DomEvents::register(window),
input_system: InputSystem::new(images.clone(), &mut world, bunny_image),
render_system: RenderSystem::new(gl.clone(), &images, &world, canvas_size),
move_system: MoveSystem,
world,
})
}
pub fn process_events(&mut self) {
let mut channel = self.world.fetch_mut::<EventChannel<InputEvent>>();
self.dom_event_handlers.process_input(&mut channel);
}
pub fn bunny_count(&self) -> u32 {
self.world.fetch::<BunnyCount>().0
}
pub fn run_world(&mut self, canvas_size: Vec2<i32>) {
{
let mut window_size = self.world.fetch_mut::<WindowSize>();
window_size.size = canvas_size;
}
self.input_system.run_now(&mut self.world);
self.move_system.run_now(&mut self.world);
self.render_system.run_now(&mut self.world);
self.world.maintain();
}
}
async fn load_images(gl: Rc<Gl>) -> Result<Images> {
let mut images = Images::new(gl);
images.load("/assets/images/bunny.png").await?;
Ok(images)
}
fn init_world(canvas_size: Vec2<i32>, images: &Images) -> World {
let mut world = World::new();
world.register::<Position>();
world.register::<Velocity>();
world.register::<Transform>();
world.register::<Sprite>();
world.insert(EventChannel::<DisplayEvent>::new());
world.insert(EventChannel::<InputEvent>::new());
world.insert(WindowSize { size: canvas_size });
world.insert(BunnyCount(3));
let mut rng = rand::thread_rng();
let bunny_id = images.find_image_id("/assets/images/bunny.png").unwrap();
let bunny_image = images.image(bunny_id).unwrap();
for _ in 0..3 {
let x: i32 = rng.gen_range(0, canvas_size.x);
let y: i32 = rng.gen_range(0, canvas_size.y);
world
.create_entity()
.with(Position::new(x as f32, y as f32))
.with(Velocity::from_angle(
rng.gen_range(-std::f32::consts::PI, std::f32::consts::PI),
4.,
))
.with(Transform::from_image(&bunny_image))
.with(Sprite::from_image(bunny_id))
.build();
}
world
}
struct DomEvents {
mouse_down: Closure<dyn Fn()>,
mouse_up: Closure<dyn Fn()>,
input_events: Rc<Mutex<Vec<InputEvent>>>,
}
impl DomEvents {
pub fn register(window: &Window) -> Self {
let input_events = Rc::new(Mutex::new(Vec::<InputEvent>::new()));
let events = input_events.clone();
let mouse_down = Closure::wrap(Box::new(move || {
let mut evs = events.lock().unwrap();
evs.push(InputEvent::MouseDown);
}) as Box<dyn Fn()>);
window
.add_event_listener_with_callback("mousedown", mouse_down.as_ref().unchecked_ref())
.unwrap();
let events = input_events.clone();
let mouse_up = Closure::wrap(Box::new(move || {
let mut evs = events.lock().unwrap();
evs.push(InputEvent::MouseUp);
}) as Box<dyn Fn()>);
window
.add_event_listener_with_callback("mouseup", mouse_up.as_ref().unchecked_ref())
.unwrap();
DomEvents {
mouse_down,
mouse_up,
input_events,
}
}
pub fn process_input(&self, channel: &mut EventChannel<InputEvent>) |
pub fn clear(&mut self) {
self.input_events.lock().unwrap().clear();
}
}
| {
let mut events = self.input_events.lock().unwrap();
channel.drain_vec_write(&mut events);
} |
handle.rs | use std::{ops::Deref, sync::Arc};
use crate::assets::Asset;
#[derive(Debug)]
pub struct Handle<A: Asset> { |
impl<A: Asset> Handle<A> {
pub(crate) fn new(data: Arc<A>) -> Self {
Self { data }
}
}
impl<A: Asset> Deref for Handle<A> {
type Target = A;
fn deref(&self) -> &Self::Target {
self.data.as_ref()
}
} | data: Arc<A>,
} |
test_fx.py | # Owner(s): ["oncall: fx"]
import builtins
import contextlib
import copy
import functools
import inspect
import math
import numbers
import operator
import os
import pickle
import sys
import torch
import traceback
import typing
import types
import warnings
import unittest
from math import sqrt
from torch.multiprocessing import Process
from torch.testing import FileCheck
from torch.testing._internal.common_methods_invocations import op_db
from torch.testing._internal.common_device_type import ops, onlyCPU, instantiate_device_type_tests
import torch.utils._pytree as pytree
import torch.fx._pytree as fx_pytree
from torch.fx import symbolic_trace, Proxy, Node, GraphModule, Interpreter, Tracer, Transformer, Graph, wrap, PH, CodeGen
from torch.fx.node import Target, Argument
from torch.fx.passes import shape_prop
from torch.fx.immutable_collections import immutable_dict, immutable_list
from torch.fx.experimental.rewriter import RewritingTracer
from torch.fx.operator_schemas import get_signature_for_torch_op
from copy import deepcopy
from collections import namedtuple
from torch.fx.proxy import TraceError
from torch.fx._compatibility import _BACK_COMPAT_OBJECTS, _MARKED_WITH_COMATIBLITY
from fx.test_subgraph_rewriter import TestSubgraphRewriter # noqa: F401
from fx.test_dce_pass import TestDCE # noqa: F401
from fx.test_fx_const_fold import TestConstFold # noqa: F401
from fx.test_fx_param_shape_control_flow import TestConstParamShapeInControlFlow # noqa: F401
if sys.version_info >= (3, 7):
from fx.test_gradual_type import AnnotationsTest # noqa: F401
if sys.version_info >= (3, 7):
from fx.test_gradual_type import TypeCheckerTest # noqa: F401
from typing import Any, Callable, Dict, NamedTuple, List, Optional, Tuple, Union
from torch.testing._internal.common_utils import (
IS_FBCODE,
IS_MACOS,
IS_WINDOWS,
TEST_WITH_ROCM,
find_library_location,
run_tests,
)
from torch.testing._internal.jit_utils import JitTestCase
from fx.named_tup import MyNamedTup
try:
from torchvision import models as torchvision_models
HAS_TORCHVISION = True
except ImportError:
HAS_TORCHVISION = False
skipIfNoTorchVision = unittest.skipIf(not HAS_TORCHVISION, "no torchvision")
class SimpleTest(torch.nn.Module):
def forward(self, x):
return torch.relu(x + 3.0)
def a_non_torch_leaf(a, b):
return a + b
# Used for test_autowrap_function. Autowrapped functions need to be global
def fx_int(x: float) -> int:
return int(x)
def fx_int_x2(x: float) -> int:
return int(x) * 2
# used in test_pytree. It's all the way out here because pickling a GraphModule
# that uses Point errors out if Point is local to the function
Point = namedtuple('Point', ['x', 'y'])
# Test wrap() passing both a function name as well as a function
# directly
def a_lifted_leaf(a, b):
return a[0] + a[1] + b
wrap('a_lifted_leaf')
# Test wrapping twice doesn't break anything
wrap('a_lifted_leaf')
def a_lifted_leaf2(a, b):
return a[0] + a[1] + b
wrap(a_lifted_leaf2)
wrap('len')
wrap('getattr')
@wrap
def wrapped_via_decorator(a):
return a + 1
wrap('wrapped_with_submodule')
def wrapped_with_submodule(x: torch.Tensor, batchnorm1d: torch.nn.BatchNorm1d):
return batchnorm1d(x)
real_wrapped_via_decorator = wrapped_via_decorator
real_a_lifed_leaf = a_lifted_leaf
real_a_lifed_leaf2 = a_lifted_leaf2
_sqrt = sqrt
wrap('wrapper_fn')
def wrapper_fn(x):
return torch.foo(x)
class Pair(NamedTuple):
x : torch.Tensor
y : torch.Tensor
# for testing pytrees
class Foo(object): # noqa: B209
def __init__(self, a, b):
self.a = a
self.b = b
class TestFX(JitTestCase):
def setUp(self):
# Checking for mutable operations whil tracing is feature flagged
# Enable it in testing but not by default
self.orig_tracer_mutable_flag = torch.fx.proxy.TracerBase.check_mutable_operations
torch.fx.proxy.TracerBase.check_mutable_operations = True
if not (TEST_WITH_ROCM or IS_FBCODE or IS_WINDOWS or IS_MACOS):
lib_file_path = find_library_location('libtorchbind_test.so')
torch.ops.load_library(str(lib_file_path))
def tearDown(self):
torch.fx.proxy.TracerBase.check_mutable_operations = self.orig_tracer_mutable_flag
def checkGraphModule(self, m: torch.nn.Module, args, kwargs=None):
"""Check that an nn.Module's results match the GraphModule version
for a given set of args/kwargs.
"""
kwargs = kwargs if kwargs else {}
ref_outs = m(*args, **kwargs)
gm = symbolic_trace(m)
gm.graph.lint()
test_outs = gm(*args, **kwargs)
self.assertEqual(ref_outs, test_outs)
def test_graph_module(self):
class MySub(torch.nn.Module):
def __init__(self):
super().__init__()
self.w = torch.nn.Parameter(torch.rand(4, 3))
def forward(self, x):
return self.w + x
class MyModule(torch.nn.Module):
def __init__(self):
super().__init__()
self.lin = torch.nn.Linear(4, 3)
self.sub_mod = MySub()
self.w = torch.nn.Parameter(torch.rand(3))
def forward(self, A, B, c):
t = torch.sigmoid(A) + self.lin(c)
return self.sub_mod(t.data + self.w + t + 1 - A + B // A + -A + A.add(B, alpha=3))
m = MyModule()
gm = symbolic_trace(m)
ms = torch.jit.script(gm)
class M2(torch.nn.Module):
def forward(self, A):
m, idx = torch.max(A, 0)
return m + 1, idx + 1
m2 = M2()
gm2 = symbolic_trace(m2)
class T(torch.nn.Module):
def forward(self, A, b=4, *args, c=5, **kwargs):
x = A + 1 + args[0] + kwargs['3']
return x
t = T()
symbolic_trace(t)
# test for issue described at https://github.com/pytorch/pytorch/issues/63883
class M3(torch.nn.Module):
def forward(self, x):
return torch.relu(x)
m3 = M3()
gm3 = symbolic_trace(m3)
new_instance = gm3.__new__(type(gm3))
new_instance.__init__(gm3, gm3.graph)
x = torch.randn(5, 3)
torch.testing.assert_allclose(new_instance(x), torch.relu(x))
def test_custom_import(self):
graph = torch.fx.Graph()
a = graph.placeholder('x')
b = graph.placeholder('y')
c = graph.call_function(a_non_torch_leaf, (a, b))
d = graph.call_function(torch.sin, (c,))
graph.output(d)
gm = GraphModule(torch.nn.Module(), graph)
x, y = torch.rand(1), torch.rand(1)
self.assertEqual(torch.sin(x + y), gm(x, y))
def test_args_kwargs(self):
class T(torch.nn.Module):
def forward(self, *args, **kwargs):
x = args[0] + kwargs['foo']
return x
t = T()
self.checkGraphModule(t, (torch.rand(1), torch.rand(1)), {'foo': torch.rand(1)})
def test_args_kwargs_no_self(self):
class T(torch.nn.Module):
def forward(*args, **kwargs): # noqa: B902
self = args[0]
return torch.relu(args[1])
t = T()
with self.assertRaisesRegex(RuntimeError, r'cannot be part of \*args expansion'):
self.checkGraphModule(t, (torch.rand(1), torch.rand(1)), {'foo': torch.rand(1)})
def test_fx_shifts(self):
class MyModule(torch.nn.Module):
def forward(self, x):
return x << 3, x >> 3
input = torch.LongTensor(10).random_(0, 1024)
m = MyModule()
self.checkGraphModule(m, (input,))
def test_fx_and_or(self):
class MyModule(torch.nn.Module):
def forward(self, x):
return x & x, x | x
input = torch.LongTensor(10).random_(0, 1024)
m = MyModule()
self.checkGraphModule(m, (input,))
def test_dict(self):
class MyDictMod(torch.nn.Module):
def forward(self, d):
return d['3'].relu(), {'4' : d['3'].neg()}
input_dict = {'3': torch.rand(3, 4)}
m = MyDictMod()
self.checkGraphModule(m, (input_dict,))
def test_matmul_tracing(self):
const = torch.randn(3)
def matmul_f(x):
return x @ const
mod = symbolic_trace(matmul_f)
inp = torch.randn(3)
self.assertEqual(mod(inp), matmul_f(inp))
def rmatmul_f(x):
return const @ x
mod = symbolic_trace(rmatmul_f)
inp = torch.randn(3)
self.assertEqual(mod(inp), rmatmul_f(inp))
def test_disallow_override(self):
# Custom delegate to disallow in-place tensor operations
class NoMutableCallTracer(Tracer):
def create_node(self, kind : str, target : Union[str, Callable],
args : Tuple[Argument, ...], kwargs : Dict[str, Any], name : Optional[str] = None,
type_expr : Optional[Any] = None) -> Node:
name = target if isinstance(target, str) else torch.typename(target)
if name[-1] == '_':
raise RuntimeError('In-place operations are not supported')
return super().create_node(kind, target, args, kwargs, name)
# Test method
class MyInplaceMod(torch.nn.Module):
def forward(self, x):
x.add_(3.0)
return x
m = MyInplaceMod()
with self.assertRaisesRegex(RuntimeError, 'In-place operations'):
NoMutableCallTracer().trace(m)
# Test free function
class MyInplaceMod2(torch.nn.Module):
def forward(self, x):
torch.log_(x)
return x
m2 = MyInplaceMod2()
with self.assertRaisesRegex(RuntimeError, 'In-place operations'):
NoMutableCallTracer().trace(m2)
# Test symbolic node as an arg
class MyInplaceMod3(torch.nn.Module):
def forward(self, x):
y = torch.ones(3, 4)
y.add_(x)
return x
m3 = MyInplaceMod3()
with self.assertRaisesRegex(RuntimeError, 'In-place operations'):
NoMutableCallTracer().trace(m3)
def test_leaf_module(self):
# Custom delegate to make it so that there are no leaf modules, everything
# should get traced through
class NoLeafModulesTracer(Tracer):
def is_leaf_module(self, m, qualname):
return False
class MyReluMod(torch.nn.Module):
def __init__(self):
super().__init__()
self.relu = torch.nn.ReLU()
def forward(self, x):
return self.relu(x)
mrm = MyReluMod()
sym = NoLeafModulesTracer().trace(mrm)
for node in sym.nodes:
self.assertNotEqual(node.op, 'call_module')
sym.lint()
def test_wrap(self):
self.assertEqual(3 + 4 + 5, a_lifted_leaf((3, 4), 5))
def to_trace(y):
return a_lifted_leaf((4, y), 3) + a_lifted_leaf((3, 4), 5) + a_lifted_leaf((y, y), y)
m = symbolic_trace(to_trace)
self.assertIn('a_lifted_leaf', m.code)
self.assertEqual(27, m(2))
self.assertIs(a_lifted_leaf, real_a_lifed_leaf)
def test_wrap_fn_directly(self):
self.assertEqual(3 + 4 + 5, a_lifted_leaf2((3, 4), 5))
def to_trace(y):
return a_lifted_leaf2((4, y), 3) + a_lifted_leaf2((3, 4), 5) + a_lifted_leaf2((y, y), y)
m = symbolic_trace(to_trace)
self.assertIn('a_lifted_leaf2', m.code)
self.assertEqual(27, m(2))
self.assertIs(a_lifted_leaf2, real_a_lifed_leaf2)
def test_wrapped_via_decorator(self):
self.assertEqual(wrapped_via_decorator(0), 1)
def to_trace(y):
return wrapped_via_decorator(y)
m = symbolic_trace(to_trace)
self.assertIn('wrapped_via_decorator', m.code)
self.assertEqual(m(0), 1)
self.assertIs(wrapped_via_decorator, real_wrapped_via_decorator)
self.assertFalse(hasattr(wrapped_via_decorator, "__fx_already_patched"))
def test_wrapped_via_decorator_and_transformed(self):
self.assertEqual(wrapped_via_decorator(0), 1)
def to_trace(y):
return wrapped_via_decorator(y)
m = symbolic_trace(to_trace)
self.assertIn('wrapped_via_decorator', m.code)
self.assertEqual(m(0), 1)
self.assertIs(wrapped_via_decorator, real_wrapped_via_decorator)
self.assertFalse(hasattr(wrapped_via_decorator, "__fx_already_patched"))
transformed = torch.fx.Transformer(m).transform()
self.assertIn('wrapped_via_decorator', transformed.code)
self.assertEqual(transformed(0), 1)
self.assertIs(wrapped_via_decorator, real_wrapped_via_decorator)
self.assertFalse(hasattr(wrapped_via_decorator, "__fx_already_patched"))
def test_wrap_with_submodule(self):
class M(torch.nn.Module):
def __init__(self):
super(M, self).__init__()
self.batchnorm1d = torch.nn.BatchNorm1d(2, affine=False)
def forward(self, x: torch.Tensor):
return wrapped_with_submodule(x, self.batchnorm1d)
m = symbolic_trace(M())
self.assertIn("wrapped_with_submodule", m.code)
input = torch.rand(3, 2)
ref_batchnorm1d = torch.nn.BatchNorm1d(2, affine=False)
self.assertEqual(ref_batchnorm1d(input), m(input))
def test_wrapped_retrace(self):
def to_trace(y):
return wrapped_via_decorator(y)
m = symbolic_trace(to_trace)
self.assertIn('wrapped_via_decorator', m.code)
self.assertEqual(m(0), 1)
retraced = symbolic_trace(m)
self.assertIn('wrapped_via_decorator', retraced.code)
self.assertEqual(retraced(0), 1)
def test_graph_edit_with_proxy(self):
class M(torch.nn.Module):
def forward(self, a, b):
return a + b
m = M()
g = symbolic_trace(m).graph
new_g = torch.fx.Graph()
val_map : Dict[Node, Node] = {}
output_val = new_g.graph_copy(g, val_map)
t = Proxy(output_val)
# test that we can use proxy objects to generate more graph code later for things that do not need to work with modules.
new_g.output((t + t).node)
gm = GraphModule(m, new_g)
gm.graph.lint()
self.assertEqual(gm(3, 4), 14)
def test_graph_unique_names(self):
class M(torch.nn.Module):
def forward(self, a, b):
return a + b
m = M()
g = symbolic_trace(m).graph
new_g = torch.fx.Graph()
val_map : Dict[Node, Node] = {}
output_val = new_g.graph_copy(g, val_map)
t = Proxy(output_val)
# test that we can use proxy objects to generate more graph code later for things that do not need to work with modules.
new_g.output((t + t).node)
gm = GraphModule(m, new_g)
seen_names : Set[str] = set()
for node in gm.graph.nodes:
assert node.name not in seen_names
seen_names.add(node.name)
def test_stack_traces(self):
class M(torch.nn.Module):
def forward(self, a, b):
return a + b
tracer = torch.fx.Tracer()
tracer.record_stack_traces = True
graph = tracer.trace(M())
# saving the original list because we will insert new nodes as a part of a test
orig_graph_nodes = list(graph.nodes)
for node in orig_graph_nodes:
if node.op == 'output':
continue
self.assertTrue(node.stack_trace is not None)
assert 'test_fx.py' in node.stack_trace
# verify that copying the node does not lose the stack trace
new_node = graph.node_copy(node)
self.assertTrue(new_node.stack_trace is not None)
assert 'test_fx.py' in new_node.stack_trace
def test_graph_unique_names_manual(self):
graph : torch.fx.Graph = torch.fx.Graph()
a : torch.fx.Node = graph.create_node('placeholder', 'x')
b : torch.fx.Node = graph.create_node('call_module', 'linear_mod', args=(a,), name='foo_1_1')
c : torch.fx.Node = graph.create_node('get_attr', 'y_attr', name='foo_1')
d : torch.fx.Node = graph.create_node('call_function', operator.add, args=(b, c))
graph.output(d)
graph2 = torch.fx.Graph()
val_map : Dict[Node, Node] = {}
graph2.graph_copy(graph, val_map)
seen_names : Set[str] = set()
for node in graph2.nodes:
assert node.name not in seen_names
seen_names.add(node.name)
def test_unpack(self):
class M(torch.nn.Module):
def forward(self, a, b):
c, d = a
return c + d + b
a = (torch.rand(1), torch.rand(1))
b = torch.rand(1)
m = M()
self.checkGraphModule(m, (a, b))
def test_native_callable(self):
if TEST_WITH_ROCM or IS_FBCODE or IS_WINDOWS or IS_MACOS:
raise unittest.SkipTest("non-portable load_library call used in test")
# This test exercises the case where we use FX to translate from Python
# code to some native callable object
#
# For the purposes of testing, we use ElementwiseInterpreter defined
# in test_custom_class.cpp.
#
# We test that we can
# 1) Construct a native callable from FX IR
# 2) Construct a drop-in replacement module that delegates to the
# native callable rather than the original code
# 3) Run both the original code and native callable wrapper with
# equivalent results
# 4) TorchScript compile the native callable wrapper and confirm
# equivalent results with the reference
# 5) TorchScript serialize and deserialize the native callable
# and confirm equivalent results with the reference
# We use this simple Module as a reference computation
class MySimpleMod(torch.nn.Module):
def forward(self, x):
return 3.0 * x + x
msm = MySimpleMod()
# This is what a lowering pass might look like: a function that takes
# a valid nn.Module, symbolically traces it, lowers the Module to some
# representation, and wraps that representation up into another
# nn.Module instance that handles dispatch to the compiled/lowered code.
def lower_to_elementwise_interpreter(orig_mod : torch.nn.Module) -> torch.nn.Module:
# ===== Stage 1: Symbolic trace the module =====
mod = symbolic_trace(orig_mod)
# ===== Stage 2: Lower GraphModule representation to the C++
# interpreter's instruction format ======
instructions = []
constant_idx = 0
constants = {}
fn_input_names = []
target_to_name = {
operator.add : "add",
operator.mul : "mul"
}
output_node : Optional[Node] = None
# For each instruction, create a triple
# (instruction_name : str, inputs : List[str], output : str)
# to feed into the C++ interpreter
for n in mod.graph.nodes:
target, args, out_name = n.target, n.args, n.name
assert len(n.kwargs) == 0, "kwargs currently not supported"
if n.op == 'placeholder':
# Placeholders specify function argument names. Save these
# for later when we generate the wrapper GraphModule
fn_input_names.append(target)
elif n.op == 'call_function':
assert target in target_to_name, "Unsupported call target " + target
arg_names = []
for arg in args:
if not isinstance(arg, Node):
# Pull out constants. These constants will later be
# fed to the interpreter C++ object via add_constant()
arg_name = f'constant_{constant_idx}'
constants[arg_name] = torch.tensor(
[arg] if isinstance(arg, numbers.Number) else arg)
arg_names.append(arg_name)
constant_idx += 1
else:
arg_names.append(arg.name)
instructions.append((target_to_name[target], arg_names, out_name))
elif n.op == 'output':
if output_node is not None:
raise RuntimeError('Multiple output nodes!')
output_node = n
else:
raise RuntimeError('Unsupported opcode ' + n.op)
interpreter = torch.classes._TorchScriptTesting._ElementwiseInterpreter()
# Load constants
for k, v in constants.items():
interpreter.add_constant(k, v)
# Specify names for positional input arguments
interpreter.set_input_names(fn_input_names)
# Load instructions
interpreter.set_instructions(instructions)
# Specify name for single output
assert isinstance(output_node.args[0], torch.fx.Node)
interpreter.set_output_name(output_node.args[0].name)
# ===== Stage 3: Create a wrapper GraphModule around the interpreter =====
class WrapperModule(torch.nn.Module):
def __init__(self, interpreter):
super().__init__()
self.interpreter = interpreter
wrapper = WrapperModule(interpreter)
# Create a graph that: 1) Takes function arguments 2) Invokes the interpreter
# 3) Returns the speficied return value
# FIXME: The following code could be greatly simplified by symbolic_trace'ing
# the wrapper with a Tracer that considers the Wrapper instance a root
# module, however, I can't get `__call__` exposed on TorchBind classes
# without it messing up Python `hasattr` for some reason. More digging
# into CPython's implementation of hasattr is probably in order...
graph = torch.fx.Graph()
# Add placeholders for fn inputs
placeholder_nodes = []
for name in fn_input_names:
placeholder_nodes.append(graph.create_node('placeholder', name))
# Get the interpreter object
interpreter_node = graph.create_node('get_attr', 'interpreter')
# Add a node to call the interpreter instance
output_node = graph.create_node(
op='call_method', target='__call__', args=(interpreter_node, placeholder_nodes))
# Register output
graph.output(output_node)
graph.lint()
# Return final GraphModule!!!
return GraphModule(wrapper, graph)
# Lower GraphModule to C++ interpreter
lowered = lower_to_elementwise_interpreter(msm)
# Compare correctness with original module
x = torch.rand(3, 4)
ref_out = msm(x)
test_out = lowered(x)
torch.testing.assert_close(test_out, ref_out)
# Test TorchScript compilation
scripted_lowered = torch.jit.script(lowered)
script_out = scripted_lowered(x)
torch.testing.assert_close(script_out, ref_out)
# Test TorchScript ser/de
import_copy = self.getExportImportCopy(scripted_lowered)
imported_out = import_copy(x)
torch.testing.assert_close(imported_out, ref_out)
def test_reserved_getattr(self):
"""Ensure that we do not name any nodes with a reserved builtin like `getattr`"""
class M(torch.nn.Module):
def forward(self, a):
return a.foo.bar.baz
m = M()
m_g = symbolic_trace(m)
m_g.graph.lint()
for node in m_g.graph.nodes:
self.assertTrue(node.name != "getattr")
def test_node_tagging(self):
class TaggingTracer(Tracer):
def create_node(self, kind : str, target : Union[str, Callable],
args : Tuple[Argument, ...], kwargs : Dict[str, Any], name : Optional[str] = None,
type_expr : Optional[Any] = None) -> Node:
n = super().create_node(kind, target, args, kwargs, name)
n.tag = 'foo'
return n
class M(torch.nn.Module):
def forward(self, a, b):
return a + b
m = M()
g = TaggingTracer().trace(m)
g.lint()
for n in g.nodes:
self.assertTrue(hasattr(n, 'tag'))
self.assertEqual(n.tag, 'foo')
def test_tensor_attribute(self):
class TensorAttribute(torch.nn.Module):
def __init__(self):
super().__init__()
self.tensor = torch.rand(3, 4)
def forward(self, x):
return torch.nn.functional.linear(x, self.tensor)
ta = TensorAttribute()
traced = symbolic_trace(ta)
traced(torch.rand(4, 4))
class WrapperForQualname(torch.nn.Module):
def __init__(self):
super().__init__()
self.ta = TensorAttribute()
def forward(self, x):
return torch.nn.functional.linear(x, self.ta.tensor)
wfq = WrapperForQualname()
traced2 = symbolic_trace(wfq)
traced2.graph.lint()
traced2(torch.rand(4, 4))
def test_tensor_attribute_coalseced(self):
def count_attrs(fx_module):
targets = set()
for node in traced.graph.nodes:
if node.op == 'get_attr':
targets.add(node.target)
return len(targets)
val = torch.tensor(5)
def f(x):
return x + val + val
traced = symbolic_trace(f)
traced.graph.lint()
self.assertEqual(count_attrs(traced), 1)
val2 = torch.tensor(5)
def f(x):
val = torch.tensor(5)
return x + val + val2
traced = symbolic_trace(f)
traced.graph.lint()
self.assertEqual(count_attrs(traced), 2)
def test_symbolic_trace_sequential(self):
class Simple(torch.nn.Module):
def forward(self, x):
return torch.neg(x)
seq = torch.nn.Sequential(
Simple(),
Simple(),
Simple()
)
traced = symbolic_trace(seq)
traced.graph.lint()
x = torch.rand(3, 4)
self.assertEqual(traced(x), seq(x))
def test_tensor_constant(self):
class ConstTensor(torch.nn.Module):
def forward(self, x):
return torch.nn.functional.linear(x, torch.zeros(3, 4))
ct = ConstTensor()
traced = symbolic_trace(ct)
traced.graph.lint()
traced(torch.rand(4, 4))
def test_pickle_graphmodule(self):
class Nested(torch.nn.Module):
def __init__(self):
super().__init__()
self.st = torch.nn.Linear(4, 4)
def forward(self, x):
return self.st(x)
n = Nested()
traced = symbolic_trace(n)
traced.graph.lint()
pickled = pickle.dumps(traced)
loaded = pickle.loads(pickled)
loaded.graph.lint()
x = torch.rand(3, 4)
self.assertEqual(loaded(x), traced(x))
def test_pickle_custom_import(self):
graph = torch.fx.Graph()
a = graph.placeholder('x')
b = graph.placeholder('y')
c = graph.call_function(a_non_torch_leaf, (a, b))
d = graph.call_function(torch.sin, (c,))
graph.output(d)
gm = GraphModule(torch.nn.Module(), graph)
pickled = pickle.dumps(gm)
loaded = pickle.loads(pickled)
loaded.graph.lint()
x, y = torch.rand(1), torch.rand(1)
self.assertEqual(loaded(x, y), gm(x, y))
def test_all_input_nodes(self):
graph : torch.fx.Graph = torch.fx.Graph()
a : torch.fx.Node = graph.placeholder('x')
b : torch.fx.Node = graph.call_module('linear_mod', args=(a,))
c : torch.fx.Node = graph.get_attr('y_attr')
d : torch.fx.Node = graph.call_function(operator.add, args=(b, c))
e : torch.fx.Node = graph.call_function(torch.unsqueeze, args=(d, 0))
graph.output(e)
graph.lint()
self.assertEqual(b.all_input_nodes, [a])
self.assertEqual(c.all_input_nodes, [])
self.assertEqual(d.all_input_nodes, [b, c])
self.assertEqual(e.all_input_nodes, [d])
def test_deepcopy_graphmodule_with_transform(self):
st = SimpleTest()
traced = symbolic_trace(st)
traced.graph.lint()
def transform(traced):
new_graph = torch.fx.Graph()
val_map : Dict[Node, Node] = {}
output_value = new_graph.graph_copy(traced.graph, val_map)
relu_out = new_graph.create_node(
op='call_method', target='neg', args=(output_value,), kwargs={})
new_graph.output(relu_out)
return GraphModule(traced, new_graph)
transformed = transform(traced)
transformed.graph.lint()
copied = copy.deepcopy(transformed)
self.assertNotEqual(id(type(transformed)), id(type(copied)))
x = torch.randn(3, 4)
self.assertEqual(copied(x), transformed(x))
def test_deepcopy_with_submods_params(self):
class Bar(torch.nn.Module):
def __init__(self):
super().__init__()
self.param = torch.nn.Parameter(torch.rand(3, 4))
def forward(self, x):
return torch.relu(x) + self.param
class Baz(torch.nn.Module):
def __init__(self):
super().__init__()
self.param = torch.nn.Parameter(torch.rand(3, 4))
self.bar = Bar()
def forward(self, x):
return self.bar(x) - self.param
baz = Baz()
traced = symbolic_trace(baz)
traced.graph.lint()
copied = copy.deepcopy(traced)
copied.graph.lint()
def test_deepcopy_graph_with_tracer_cls(self):
class TestTracer(Tracer):
def is_leaf_module(self, module, name):
return True
g = Graph(tracer_cls=TestTracer)
x = g.placeholder("x")
g.output(x)
h = copy.deepcopy(g)
self.assertIsNotNone(h._tracer_cls)
self.assertTrue(g._tracer_cls == h._tracer_cls)
def test_unpack_list_better_error(self):
class SomeArgs(torch.nn.Module):
def forward(self, a, b):
return torch.rand(3, 4)
class UnpacksList(torch.nn.Module):
def __init__(self):
super().__init__()
self.sa = SomeArgs()
def forward(self, x : list):
return self.sa(*x)
ul = UnpacksList()
with self.assertRaisesRegex(TraceError, 'Proxy object cannot be iterated.'):
symbolic_trace(ul)
def test_unpack_dict_better_error(self):
class SomeKwargs(torch.nn.Module):
def forward(self, x=3, y=4):
return torch.rand(3, 4)
class UnpacksDict(torch.nn.Module):
def __init__(self):
super().__init__()
self.sk = SomeKwargs()
def forward(self, x : dict):
return self.sk(**x)
ud = UnpacksDict()
with self.assertRaisesRegex(TraceError, 'Proxy object cannot be iterated.'):
symbolic_trace(ud)
def test_pretty_print_targets(self):
# Test that Graph pretty-print prints friendly name for targets
# in `operator` and `builtins`
class SomeMod(torch.nn.Module):
def forward(self, x):
return torch.add(x.foo + x.bar, 3.0)
traced = symbolic_trace(SomeMod())
graph_str = str(traced.graph)
self.assertIn('builtins.getattr', graph_str)
self.assertIn('operator.add', graph_str)
self.assertIn('torch.add', graph_str)
def test_pretty_print_node(self):
class M(torch.nn.Module):
def __init__(self):
super().__init__()
self.param: torch.nn.Parameter = torch.nn.Parameter(
torch.rand(3, 4))
self.linear = torch.nn.Linear(4, 5)
def forward(self, x: torch.Tensor, y: int = 2):
return self.linear(x[y] + self.param).clamp(min=0.0, max=1.0)
traced = symbolic_trace(M())
all_formatted = "\n".join([n.format_node() for n in traced.graph.nodes])
FileCheck().check("x").check("placeholder") \
.check("y").check("placeholder") \
.check("getitem").check("call_function") \
.check("param").check("get_attr") \
.check("add").check("call_function") \
.check("linear").check("call_module") \
.check("clamp").check("call_method") \
.run(all_formatted)
def test_script_tensor_constant(self):
# TorchScript seems to ignore attributes that start with `__`.
# We used to call anonymous Tensor values `__tensor_constant*`, but
# they were getting ignored by script. Now they're called
# `_tensor_constant*`
class IHaveATensorConstant(torch.nn.Module):
def forward(self, x):
return x + torch.rand(3, 4)
traced = torch.fx.symbolic_trace(IHaveATensorConstant())
torch.jit.script(traced)
def test_autowrap_functions(self):
class AutowrapFnTest(torch.nn.Module):
def forward(self, x):
return fx_int(x.shape[0] / 2)
class AutowrapFnTest2(torch.nn.Module):
def forward(self, x):
return fx_int(x.shape[0] / 2) + fx_int_x2(x.shape[0] / 2)
# Check function(s) are wrapped
# `int` would normally throw a TypeError as argument can't be `Proxy`
tracer = Tracer(autowrap_functions=(fx_int,))
graph = tracer.trace(AutowrapFnTest())
traced = GraphModule(tracer.root, graph, 'test')
tracer_2 = Tracer(autowrap_functions=(fx_int, fx_int_x2))
tracer_2.trace(AutowrapFnTest2())
# Test scriptability
traced_scripted = torch.jit.script(traced)
self.assertEqual(traced_scripted(torch.rand(4)), 2)
def test_torch_fx_len(self):
class FXLenTest(torch.nn.Module):
def forward(self, x):
return len(x)
traced = symbolic_trace(FXLenTest())
self.assertEqual(traced(torch.rand(3, 4)), 3)
# Test scriptability
scripted = torch.jit.script(FXLenTest())
self.assertEqual(scripted(torch.rand(3)), 3)
traced_scripted = torch.jit.script(traced)
self.assertEqual(traced_scripted(torch.rand(3)), 3)
# Test non-proxy len
class FXLenTest2(torch.nn.Module):
def __init__(self):
super().__init__()
self.l = [3, 4, 5]
def forward(self, x):
return x + len(self.l)
traced2 = symbolic_trace(FXLenTest2())
inp = torch.rand(3, 4)
self.assertEqual(traced2(inp), inp + 3.0)
self.assertIs(len, builtins.len)
def test_torch_fx_getattr(self):
class FXGetattrTest(torch.nn.Module):
def forward(self, x):
return getattr(x, 'nonexistent_attr', torch.Tensor([2, 3]))
traced = symbolic_trace(FXGetattrTest())
self.assertEqual(traced(torch.rand(3, 4)), torch.Tensor([2, 3]))
def test_sqrt(self):
class Sqrt1(torch.nn.Module):
def forward(self, x):
return sqrt(x.size(0))
class Sqrt2(torch.nn.Module):
def forward(self, x):
return math.sqrt(x.size(0))
class Sqrt3(torch.nn.Module):
def forward(self, x):
return x + math.sqrt(2) + sqrt(2)
self.checkGraphModule(Sqrt1(), [torch.zeros(8)])
self.checkGraphModule(Sqrt2(), [torch.zeros(8)])
self.checkGraphModule(Sqrt3(), [torch.zeros(8)])
self.assertIs(sqrt, _sqrt)
self.assertIs(math.sqrt, _sqrt)
def test_torch_custom_ops(self):
class M(torch.nn.Module):
def forward(self, a):
b = torch.ops.aten.sigmoid(a)
c = torch.ops.aten.cat([a, b])
return torch.ops.aten.cat((c, c))
m = M()
input = torch.randn(3)
ref_out = m(input)
gm = symbolic_trace(m)
gm.graph.lint()
out = gm(input)
self.assertEqual(out, ref_out)
def test_pickle_torch_custom_ops(self):
class M(torch.nn.Module):
def forward(self, a):
b = torch.ops.aten.sigmoid(a)
c = torch.ops.aten.cat([a, b])
return torch.ops.aten.cat((c, c))
m = M()
input = torch.randn(3)
ref_out = m(input)
gm = symbolic_trace(m)
gm.graph.lint()
pickled = pickle.dumps(gm)
loaded = pickle.loads(pickled)
self.assertEqual(loaded(input), gm(input))
def test_pretty_print(self):
st = SimpleTest()
traced = symbolic_trace(st)
traced.graph.lint()
printed = str(traced)
assert 'SimpleTest()' in printed
assert 'torch.relu' in printed
def test_pretty_print_graph(self):
class KwargPrintTest(torch.nn.Module):
def forward(self, x):
return torch.squeeze(x + 3.0, dim=2)
st = KwargPrintTest()
traced = symbolic_trace(st)
traced.graph.lint()
stringed = str(traced.graph)
for s in ['args', 'kwargs', '#users']:
assert s in stringed
def test_custom_proxy_type(self):
class TensorPair:
def __init__(self, left, right):
self.left, self.right = left, right
def add(self, other):
l = self.left + other.left
r = self.right + other.right
return TensorPair(l, r)
def mul(self, other):
l = self.left * other.left
r = self.right * other.right
return TensorPair(l, r)
def use_tensor_pair(x : TensorPair, y : TensorPair):
s = x.add(y)
return s.mul(x)
x = TensorPair(torch.randn(5, 3), torch.randn(5, 3))
y = TensorPair(torch.randn(5, 3), torch.randn(5, 3))
ref_out = use_tensor_pair(x, y)
traced = symbolic_trace(use_tensor_pair)
traced_out = traced(x, y)
self.assertEqual(traced_out.left, ref_out.left)
self.assertEqual(traced_out.right, ref_out.right)
def test_custom_proxy_type_literal(self):
class TensorPair(metaclass=torch.fx.ProxyableClassMeta):
def __init__(self, left, right):
self.left, self.right = left, right
def add(self, other):
l = self.left + other.left
r = self.right + other.right
return TensorPair(l, r)
def mul(self, other):
l = self.left * other.left
r = self.right * other.right
return TensorPair(l, r)
def use_tensor_pair_literal(x : TensorPair):
s = x.add(TensorPair(torch.zeros(5, 3), torch.zeros(5, 3)))
return s.mul(x)
x = TensorPair(torch.randn(5, 3), torch.randn(5, 3))
ref_out = use_tensor_pair_literal(x)
traced = symbolic_trace(use_tensor_pair_literal)
traced_out = traced(x)
self.assertEqual(traced_out.left, ref_out.left)
self.assertEqual(traced_out.right, ref_out.right)
def test_custom_proxy_dynamic_value(self):
class TensorPair(metaclass=torch.fx.ProxyableClassMeta):
def __init__(self, left, right):
self.left, self.right = left, right
def add(self, other):
l = self.left + other.left
r = self.right + other.right
return TensorPair(l, r)
def mul(self, other):
l = self.left * other.left
r = self.right * other.right
return TensorPair(l, r)
def use_tensor_pair_ctor(x : TensorPair, y : torch.Tensor):
s = x.add(TensorPair(y, y))
return s.mul(x)
x = TensorPair(torch.randn(5, 3), torch.randn(5, 3))
y = torch.randn(5, 3)
ref_out = use_tensor_pair_ctor(x, y)
traced = symbolic_trace(use_tensor_pair_ctor)
traced_out = traced(x, y)
self.assertEqual(traced_out.left, ref_out.left)
self.assertEqual(traced_out.right, ref_out.right)
def test_custom_proxy_input_dependent_control_flow(self):
class ZeroTensor(metaclass=torch.fx.ProxyableClassMeta):
def __init__(self, inp):
if inp.sum() == 0:
self.is_zero = True
self.tensor = torch.tensor([])
else:
self.is_zero = False
self.tensor = inp
def add(self, other):
if self.is_zero:
return ZeroTensor(other.tensor)
elif other.is_zero:
return self
def use_zero_tensor(x : torch.Tensor, y : torch.Tensor):
return ZeroTensor(x + y)
x, y = torch.randn(5, 3), torch.randn(5, 3)
ref_out = use_zero_tensor(x, y)
traced = symbolic_trace(use_zero_tensor)
traced_out = traced(x, y)
self.assertEqual(traced_out.is_zero, ref_out.is_zero)
self.assertEqual(traced_out.tensor, ref_out.tensor)
def test_graph_fns(self):
g = Graph()
a = g.placeholder('a')
b = g.call_module('linear', (a,))
c = g.get_attr('bias')
d = g.call_method('add', (b, c))
e = g.call_function(torch.sin, (d,))
g.output(e)
mod = torch.nn.Module()
mod.linear = torch.nn.Linear(3, 4)
mod.bias = torch.rand(4)
gm = GraphModule(mod, g)
gm.graph.lint()
input = torch.rand(3)
r = gm(input)
ref = torch.sin(mod.linear(input) + mod.bias)
self.assertEqual(r, ref)
def test_remove_uses(self):
g : torch.fx.Graph = Graph()
x : torch.fx.Node = g.placeholder('x')
relu : torch.fx.Node = g.call_function(torch.relu, (x,))
neg : torch.fx.Node = g.call_function(torch.neg, (relu,))
g.output(neg)
neg.replace_all_uses_with(relu)
g.erase_node(neg)
self.assertTrue(neg not in relu.users)
def test_nonetype_annotation(self):
eb = torch.nn.EmbeddingBag(3, 4)
symbolic_trace(eb)
def test_pickle_nonetype_annotation(self):
eb = torch.nn.EmbeddingBag(10, 3, mode='sum')
traced = symbolic_trace(eb)
pickled = pickle.dumps(traced)
loaded = pickle.loads(pickled)
loaded.graph.lint()
input = torch.LongTensor([1, 2, 4, 5, 4, 3, 2, 9])
offsets = torch.LongTensor([0, 4])
self.assertEqual(loaded(input, offsets), traced(input, offsets))
def test_return_tuple(self):
class M(torch.nn.Module):
def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]:
return (x, x + x)
original = M()
traced = symbolic_trace(original)
self.assertEqual(traced(torch.ones(1)), original.forward(torch.ones(1)))
def test_construct_root_dict(self):
graph : torch.fx.Graph = torch.fx.Graph()
a : torch.fx.Node = graph.create_node('placeholder', 'x')
b : torch.fx.Node = graph.create_node('call_module', 'foo.bar.baz', args=(a,))
c : torch.fx.Node = graph.create_node('get_attr', 'zip.zap.zam')
d : torch.fx.Node = graph.create_node('call_function', operator.add, args=(b, c))
graph.output(d)
linear_mod : torch.nn.Module = torch.nn.Linear(3, 4)
add_param : torch.Tensor = torch.rand(3, 4)
gm : torch.fx.GraphModule = torch.fx.GraphModule(
{'foo.bar.baz': linear_mod, 'zip.zap.zam' : add_param}, graph)
gm.graph.lint()
assert 'self.foo.bar.baz' in gm.code
x : torch.Tensor = torch.rand(3, 3)
out : torch.Tensor = gm(x)
ref_out : torch.Tensor = linear_mod(x) + add_param
self.assertEqual(out, ref_out)
def test_symbolic_trace_assert(self):
class AssertsTensorShape(torch.nn.Module):
def forward(self, x):
torch._assert(x.shape[1] > 4, "assert_foobar")
return x
m = AssertsTensorShape()
# verify traceability
traced = symbolic_trace(m)
# verify assertion on traced model works correctly at runtime
traced(torch.rand(4, 5))
with self.assertRaisesRegex(AssertionError, "assert_foobar"):
traced(torch.rand(4, 3))
# verify the symbolically traced module is scriptable
ms = torch.jit.script(m)
with self.assertRaisesRegex(torch.jit.Error, "assert_foobar"):
ms(torch.rand(4, 3))
def test_fx_create_arg(self):
class CustomArgObject:
def __init__(self, x, y):
self.x = x
self.y = y
def __fx_create_arg__(self, tracer: torch.fx.Tracer):
return tracer.create_node(
"call_function",
CustomArgObject,
args=(
tracer.create_arg(self.x),
tracer.create_arg(self.y),
),
kwargs={},
)
class HasCustomArgObjectWhenLeaf(torch.nn.Module):
def forward(self, o: CustomArgObject):
# Not normally traceable; good reason to make
# this module a leaf.
for x in o.x:
o.y += x
return o.y
class Root(torch.nn.Module):
def __init__(self):
super().__init__()
self.inner = HasCustomArgObjectWhenLeaf()
def forward(self, x, y):
o = CustomArgObject(x, y)
return self.inner(o)
class CreateArgTracer(torch.fx.Tracer):
def is_leaf_module(self, m, module_qualified_name):
return type(m) is HasCustomArgObjectWhenLeaf
m = Root()
graph = CreateArgTracer().trace(m)
gm = torch.fx.GraphModule(m, graph)
assert "CustomArgObject(" in gm.code
def test_trace_fn_constant(self):
some_constant = torch.rand(3, 4)
def add_const(x):
return some_constant + x
traced = symbolic_trace(add_const)
input = torch.rand(3, 4)
self.assertEqual(traced(input), add_const(input))
def test_copy_no_remap(self):
traced = symbolic_trace(SimpleTest())
g = traced.graph
copied = torch.fx.Graph()
for node in g.nodes:
copied.node_copy(node)
with self.assertRaisesRegex(RuntimeError, 'does not belong to this Graph'):
copied.lint()
def test_wrong_topo(self):
graph : torch.fx.Graph = torch.fx.Graph()
a : torch.fx.Node = graph.create_node('placeholder', 'x')
b : torch.fx.Node = graph.create_node('call_module', 'foo.bar.baz', args=(a,))
c : torch.fx.Node = graph.create_node('get_attr', 'zip.zap.zam')
d : torch.fx.Node = graph.create_node('call_function', operator.add, args=(b, c))
graph.output(d)
nodes = list(graph.nodes)
nodes[3].append(nodes[2])
with self.assertRaisesRegex(RuntimeError, 'was used before it has been defined'):
graph.lint()
def test_wrong_target_type(self):
graph : torch.fx.Graph = torch.fx.Graph()
with self.assertRaises(ValueError):
n = torch.fx.Node(graph=graph, name='foo', op='call_function', target='foo',
args=(), kwargs={})
def test_example_shape_prop(self):
class TestCase(torch.nn.Module):
def __init__(self):
super().__init__()
self.attr = torch.randn(3, 4)
self.submod = torch.nn.Linear(4, 4)
def forward(self, x):
return torch.neg(self.submod(x.relu() + self.attr))
tc = TestCase()
tc_traced = symbolic_trace(tc)
ref_out = tc_traced(torch.rand(3, 4))
shape_prop.ShapeProp(tc_traced).propagate(torch.rand(3, 4))
# Make sure we're testing all opcodes
opcodes = set()
output_shape : Optional[torch.Shape] = None
output_stride : Optional[Tuple[int]] = None
for node in tc_traced.graph.nodes:
opcodes.add(node.op)
if node.op == 'output':
output_shape = node.args[0].meta['tensor_meta'].shape
output_stride = node.args[0].meta['tensor_meta'].stride
self.assertEqual(opcodes, set(['placeholder', 'get_attr', 'call_function', 'call_method',
'call_module', 'output']))
# Test shape propogation and make sure results match actual
self.assertEqual(output_shape, ref_out.shape)
self.assertEqual(output_stride, ref_out.stride())
def test_shape_prop_layout(self):
class ConvTest(torch.nn.Module):
def __init__(self):
super().__init__()
self.conv_mod = torch.nn.Conv2d(5, 5, 3)
def forward(self, x):
return self.conv_mod(x)
# contiguous layout
test_mod = ConvTest()
traced = symbolic_trace(test_mod)
x = torch.randn(5, 5, 224, 224)
shape_prop.ShapeProp(traced).propagate(x)
assert(all(node.meta['tensor_meta'].memory_format is torch.contiguous_format
for node in traced.graph.nodes))
x_channels_last = x.contiguous(memory_format=torch.channels_last)
traced.to(memory_format=torch.channels_last)
shape_prop.ShapeProp(traced).propagate(x_channels_last)
for node in traced.graph.nodes:
# NB: the implementation of conv may not preserve the memory format,
# unfortunately. The best we can do is just check that the placeholder
# node is channels-last
if node.op in {'placeholder'}:
self.assertEqual(node.meta['tensor_meta'].memory_format, torch.channels_last)
def test_shape_prop_aggregate(self):
class ReturnTwo(torch.nn.Module):
def forward(self, x):
return (3, torch.sum(x))
class UnderTest(torch.nn.Module):
def __init__(self):
super().__init__()
self.rt = ReturnTwo()
def forward(self, x):
return self.rt(x)
ut = UnderTest()
class RTTracer(torch.fx.Tracer):
def is_leaf_module(self, m, module_qualified_name):
return type(m) is ReturnTwo
graph = RTTracer().trace(ut)
mod = torch.fx.GraphModule(ut, graph)
shape_prop.ShapeProp(mod).propagate(torch.rand(3, 4))
for node in mod.graph.nodes:
if node.op == 'call_module':
assert 'tensor_meta' in node.meta
tensor_meta = node.meta['tensor_meta']
assert tensor_meta[0] == 3
assert tensor_meta[1].shape == torch.Size([])
def test_shape_prop_layout_3d(self):
class ConvTest3d(torch.nn.Module):
def __init__(self):
super().__init__()
self.conv_mod = torch.nn.Conv3d(5, 5, 3)
def forward(self, x):
return self.conv_mod(x)
test_mod_3d = ConvTest3d()
traced_3d = symbolic_trace(test_mod_3d)
x_3d = torch.randn(5, 5, 224, 224, 15)
shape_prop.ShapeProp(traced_3d).propagate(x_3d)
assert(all(node.meta['tensor_meta'].memory_format is torch.contiguous_format
for node in traced_3d.graph.nodes))
x_channels_last_3d = x_3d.contiguous(memory_format=torch.channels_last_3d)
traced_3d.to(memory_format=torch.channels_last_3d)
shape_prop.ShapeProp(traced_3d).propagate(x_channels_last_3d)
for node in traced_3d.graph.nodes:
# NB: the implementation of conv may not preserve the memory format,
# unfortunately. The best we can do is just check that the placeholder
# node is channels-last
if node.op in {'placeholder'}:
self.assertEqual(node.meta['tensor_meta'].memory_format, torch.channels_last_3d)
def test_interpreter(self):
class MyModule(torch.nn.Module):
def __init__(self):
super().__init__()
self.param = torch.nn.Parameter(torch.rand(3, 4))
self.linear = torch.nn.Linear(4, 5)
def forward(self, x):
return self.linear(x + self.param).clamp(min=0.0, max=1.0)
m = MyModule()
gm = torch.fx.symbolic_trace(m)
interpreter = Interpreter(gm)
input = torch.randn(3, 4)
self.assertEqual(interpreter.run(input), gm(input))
self.assertEqual(interpreter.run(input), m(input))
def test_interpreter_run_node_override(self):
class MyModule(torch.nn.Module):
def __init__(self):
super().__init__()
self.param = torch.nn.Parameter(torch.rand(3, 4))
self.linear = torch.nn.Linear(4, 5)
def forward(self, x):
return self.linear(x + self.param).clamp(min=0.0, max=1.0)
m = MyModule()
gm = torch.fx.symbolic_trace(m)
class RunNodeInterpreter(Interpreter):
def __init__(self, module):
super().__init__(module)
def run_node(self, n : Node) -> Any:
result = super().run_node(n)
n.cached_value = result
return result
input = torch.randn(3, 4)
RunNodeInterpreter(gm).run(input)
for node in gm.graph.nodes:
assert hasattr(node, 'cached_value')
def test_interpreter_onthefly_swap(self):
def fn(x):
return torch.sigmoid(x).neg()
gm = torch.fx.symbolic_trace(fn)
class NegSigmSwapInterpreter(Interpreter):
def call_function(self, target : Target, args : Tuple, kwargs : Dict) -> Any:
if target == torch.sigmoid:
return torch.neg(*args, **kwargs)
return super().call_function(n)
def call_method(self, target : Target, args : Tuple, kwargs : Dict) -> Any:
if target == 'neg':
call_self, *args_tail = args
return call_self.sigmoid(*args_tail, **kwargs)
return super().call_method(n)
input = torch.randn(3, 4)
result = NegSigmSwapInterpreter(gm).run(input)
self.assertEqual(result, torch.neg(input).sigmoid())
def test_interpreter_partial_eval(self):
class MyModule(torch.nn.Module):
def __init__(self):
super().__init__()
self.param = torch.nn.Parameter(torch.rand(3, 4))
self.linear = torch.nn.Linear(4, 5)
def forward(self, x):
return self.linear(x + self.param).clamp(min=0.0, max=1.0)
gm = torch.fx.symbolic_trace(MyModule())
interp = Interpreter(gm)
env = {}
for node in gm.graph.nodes:
if node.op == 'call_module' and node.target == 'linear':
env[node] = torch.arange(0, 12, 1).reshape(3, 4) - 6.0
break
assert len(env) == 1
x = torch.randn(3, 4)
result = interp.run(x, initial_env=env)
self.assertEqual(result, (torch.arange(0, 12, 1).reshape(3, 4) - 6.0).clamp(0.0, 1.0))
def test_interpreter_star_args(self):
def with_star_args(x, *args):
return x + args[0]
gm = torch.fx.symbolic_trace(with_star_args)
interp = Interpreter(gm)
result = interp.run(torch.ones(3, 4), torch.ones(3, 4), torch.rand(3, 4))
self.assertEqual(result, torch.ones(3, 4) * 2.0)
@skipIfNoTorchVision
def test_interpreter_noop_resnet18(self):
rn18 = torchvision_models.resnet18()
transformed = torch.fx.Transformer(symbolic_trace(rn18)).transform()
inp = torch.randn(5, 3, 224, 224)
self.assertEqual(transformed(inp), rn18(inp))
@skipIfNoTorchVision
def test_interpreter_gc_values(self):
rn18 = torchvision_models.resnet18()
interp = Interpreter(symbolic_trace(rn18))
inp = torch.rand(5, 3, 224, 224)
out = interp.run(inp)
env_key_names = set(n.name for n in interp.env.keys())
self.assertEqual(env_key_names, set(['output']))
def test_interpreter_default_args(self):
class Model(torch.nn.Module):
def forward(self, x, y=3.14159):
return x + y
model = Model()
gm = torch.fx.symbolic_trace(model)
interp = Interpreter(gm)
x = torch.randn(5, 3)
out = interp.run(x)
torch.testing.assert_allclose(out, x + 3.14159)
def test_interpreter_not_enough_args(self):
class Model(torch.nn.Module):
def forward(self, x, y):
return x + y
model = Model()
gm = torch.fx.symbolic_trace(model)
interp = Interpreter(gm)
x = torch.randn(5, 3)
with self.assertRaisesRegex(RuntimeError,
'Expected positional argument for parameter y, but one was not passed in'):
out = interp.run(x)
def test_transformer_noop(self):
class MyModule(torch.nn.Module):
def __init__(self):
super().__init__()
self.param = torch.nn.Parameter(torch.rand(3, 4))
self.linear = torch.nn.Linear(4, 5)
def forward(self, x):
return self.linear(x + self.param).clamp(min=0.0, max=1.0)
m = MyModule()
gm = torch.fx.symbolic_trace(m)
new_gm = Transformer(gm).transform()
input = torch.randn(3, 4)
self.assertEqual(new_gm(input), gm(input))
def test_transformer_op_swap(self):
def fn(x):
return torch.sigmoid(x).neg()
gm = torch.fx.symbolic_trace(fn)
class NegSigmSwapXformer(Transformer):
def call_function(self, target : Target, args : Tuple, kwargs : Dict) -> Any:
if target == torch.sigmoid:
return torch.neg(*args, **kwargs)
return super().call_function(n)
def call_method(self, target : Target, args : Tuple, kwargs : Dict) -> Any:
if target == 'neg':
call_self, *args_tail = args
return call_self.sigmoid(*args_tail, **kwargs)
return super().call_method(n)
transformed = NegSigmSwapXformer(gm).transform()
input = torch.randn(3, 4)
self.assertEqual(transformed(input), torch.neg(input).sigmoid())
def test_transformer_multi_outputs(self):
class MyModule(torch.nn.Module):
def __init__(self):
super().__init__()
self.param = torch.nn.Parameter(torch.rand(3, 4))
self.linear = torch.nn.Linear(4, 5)
def forward(self, x):
x = x + self.param
out = self.linear(x)
return x, out
m = MyModule()
gm = torch.fx.symbolic_trace(m)
new_gm = Transformer(gm).transform()
input = torch.randn(3, 4)
self.assertEqual(new_gm(input), gm(input))
def test_fn_type_annotations(self):
class Foo(torch.nn.Module):
def forward(self, p : Pair, z : torch.Tensor, i : int) -> Dict[str, torch.Tensor]:
return {'a': p.x + p.y + z + i}
foo_scripted = torch.jit.script(Foo())
foo_scripted(Pair(torch.rand(5), torch.rand(5)), torch.rand(5), 3)
fxed = symbolic_trace(Foo())
fxed_scripted = torch.jit.script(fxed)
fxed_scripted(Pair(torch.rand(5), torch.rand(5)), torch.rand(5), 3)
def test_fn_type_annotation_empty(self):
def forward(a : List[torch.Tensor]):
return a[0]
torch.jit.script(symbolic_trace(forward))
def test_wrapped_method(self):
def wrap_with_relu(fn):
@functools.wraps(fn)
def wrapper(*args, **kwargs):
return torch.relu(fn(*args, **kwargs))
return wrapper
class Foo(torch.nn.Module):
@wrap_with_relu
def forward(self, x, w):
return torch.matmul(x, w)
f = Foo()
traced = symbolic_trace(f)
x, w = torch.rand(3, 4), torch.rand(4, 4)
self.assertTrue(any(n.target == torch.relu for n in traced.graph.nodes))
def test_empty_graph_codegen(self):
graph = torch.fx.Graph()
gm = torch.fx.GraphModule(torch.nn.Module(), graph)
self.assertEqual(gm(), None)
def test_sequential(self):
m = torch.nn.Sequential(torch.nn.Conv2d(1, 1, 1))
gm = torch.fx.symbolic_trace(m)
gm_copy = copy.deepcopy(gm)
def test_ctx_mgr(self):
@contextlib.contextmanager
def do_nothing():
yield
class M(torch.nn.Module):
def __init__(self):
super().__init__()
@do_nothing()
def forward(self, x):
return torch.relu(x)
m = M()
self.checkGraphModule(m, (torch.rand(3, 4),))
def test_typename_print(self):
graph : torch.fx.Graph = torch.fx.Graph()
x : torch.fx.Node = graph.create_node('placeholder', 'x')
b : torch.fx.Node = graph.create_node('call_function', target=torch.relu, args=(x,),
type_expr=List[float])
output : torch.fx.Node = graph.output(b)
self.assertTrue('typing.List[float]' in str(graph))
def test_layout(self):
class M(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, x):
return torch.empty_like(x, layout=torch.strided, pin_memory=False).fill_(0)
traced = symbolic_trace(M())
x = torch.rand(5, 9, 3, 4)
self.assertEqual(traced(x), torch.zeros_like(x))
def test_ellipsis(self):
class M(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, x, y):
return x + y[:, 1:10, ...]
traced = symbolic_trace(M())
x, y = torch.rand(5, 9, 3, 4), torch.rand(5, 15, 3, 4)
self.assertEqual(traced(x, y), x + y[:, 1:10, ...])
def test_inf_nan(self):
class FooMod(torch.nn.Module):
def forward(self, x):
return x + float('inf'), x + float('-inf'), x + float('nan')
fm = FooMod()
self.checkGraphModule(fm, (torch.rand(3, 4),))
def test_inf_nan_kwds(self):
graph : torch.fx.Graph = torch.fx.Graph()
x : torch.fx.Node = graph.create_node('placeholder', 'x')
b : torch.fx.Node = graph.create_node('call_function', operator.add, (x, float('inf')), {}, name='inf')
c : torch.fx.Node = graph.create_node('call_function', operator.add, (x, float('nan')), {}, name='nan')
graph.output((b, c))
gm = torch.fx.GraphModule(torch.nn.Module(), graph)
x = torch.rand(3, 4)
self.assertEqual(gm(x), (x + float('inf'), x + float('nan')))
def test_deepcopy_recursion_depth(self):
depth = sys.getrecursionlimit() + 20
g = torch.fx.Graph()
x = g.placeholder('x')
for i in range(depth):
x = g.call_function(torch.relu, (x,))
g.output(x)
copied_graph = copy.deepcopy(g)
val_map = {}
for orig_node, new_node in zip(g.nodes, copied_graph.nodes):
val_map[orig_node] = new_node
for orig_node, new_node in zip(g.nodes, copied_graph.nodes):
orig_users = set(orig_node.users.keys())
orig_users_equiv = set(val_map[u] for u in orig_users)
new_users = set(new_node.users.keys())
self.assertEqual(orig_users_equiv, new_users)
@skipIfNoTorchVision
def test_replace_uses(self):
rn18 = torchvision_models.resnet18()
class LowerReluTracer(torch.fx.Tracer):
def is_leaf_module(self, m : torch.nn.Module, qualname : str):
if isinstance(m, torch.nn.ReLU):
return False
return super().is_leaf_module(m, qualname)
rn18_traced = GraphModule(rn18, LowerReluTracer().trace(rn18))
to_erase = []
for node in rn18_traced.graph.nodes:
if node.op == 'call_function' and node.target in [torch.relu, torch.nn.functional.relu]:
kwargs = node.kwargs.copy()
# Neg doesn't have in-place
kwargs.pop('inplace')
with rn18_traced.graph.inserting_before(node):
new_node = rn18_traced.graph.call_function(
the_function=torch.neg, args=node.args, kwargs=node.kwargs)
node.replace_all_uses_with(replace_with=new_node)
to_erase.append(node)
for node in to_erase:
rn18_traced.graph.erase_node(node)
def test_replace_input(self):
graph : torch.fx.Graph = torch.fx.Graph()
x : torch.fx.Node = graph.create_node('placeholder', 'x')
y : torch.fx.Node = graph.create_node('placeholder', 'y')
b : torch.fx.Node = graph.create_node('call_function', target=torch.relu, args=(x,))
output : torch.fx.Node = graph.output(b)
b.replace_input_with(x, y)
gm = torch.fx.GraphModule(torch.nn.Module(), graph)
input_x = torch.randn(33, 44)
input_y = torch.randn(11, 22)
self.assertEqual(gm(input_x, input_y), torch.relu(input_y))
def test_insertion_point(self):
graph : torch.fx.Graph = torch.fx.Graph()
x : torch.fx.Node = graph.create_node('placeholder', 'x')
b : torch.fx.Node = graph.create_node('call_function', target=torch.relu, args=(x,))
output : torch.fx.Node = graph.output(b)
with graph.inserting_before(b):
neg : torch.fx.Node = graph.call_function(the_function=torch.neg, args=(x,))
_, *relu_args = b.args
b.args = (neg, *relu_args)
gm = torch.fx.GraphModule(torch.nn.Module(), graph)
input = torch.randn(33, 44)
self.assertEqual(gm(input), torch.relu(torch.neg(input)))
def test_update_args_api(self):
graph : torch.fx.Graph = torch.fx.Graph()
x : torch.fx.Node = graph.create_node('placeholder', 'x')
y : torch.fx.Node = graph.create_node('placeholder', 'y')
b : torch.fx.Node = graph.create_node('call_function', target=torch.relu, args=(x,))
output : torch.fx.Node = graph.output(b)
orig_gm = torch.fx.GraphModule(torch.nn.Module(), graph)
inp_x, inp_y = torch.randn(5, 3), torch.randn(3, 5)
self.assertEqual(orig_gm(inp_x, inp_y), torch.relu(inp_x))
b.update_arg(0, y)
new_gm = torch.fx.GraphModule(torch.nn.Module(), graph)
self.assertEqual(new_gm(inp_x, inp_y), torch.relu(inp_y))
def test_update_kwargs_api(self):
graph : torch.fx.Graph = torch.fx.Graph()
x : torch.fx.Node = graph.create_node('placeholder', 'x')
y : torch.fx.Node = graph.create_node('placeholder', 'y')
b : torch.fx.Node = graph.create_node('call_function', target=torch.relu, kwargs={'input': x})
output : torch.fx.Node = graph.output(b)
orig_gm = torch.fx.GraphModule(torch.nn.Module(), graph)
inp_x, inp_y = torch.randn(5, 3), torch.randn(3, 5)
self.assertEqual(orig_gm(inp_x, inp_y), torch.relu(inp_x))
b.update_kwarg('input', y)
new_gm = torch.fx.GraphModule(torch.nn.Module(), graph)
self.assertEqual(new_gm(inp_x, inp_y), torch.relu(inp_y))
def test_move_before(self):
graph : torch.fx.Graph = torch.fx.Graph()
x : torch.fx.Node = graph.create_node('placeholder', 'x')
b : torch.fx.Node = graph.create_node('call_function', target=torch.relu, args=(x,))
output : torch.fx.Node = graph.output(b)
neg : torch.fx.Node = graph.call_function(the_function=torch.neg, args=(x,))
_, *relu_args = b.args
b.args = (neg, *relu_args)
b.prepend(neg)
gm = torch.fx.GraphModule(torch.nn.Module(), graph)
input = torch.randn(33, 44)
self.assertEqual(gm(input), torch.relu(torch.neg(input)))
def test_prepend_self(self):
graph : torch.fx.Graph = torch.fx.Graph()
x : torch.fx.Node = graph.create_node('placeholder', 'x')
b : torch.fx.Node = graph.create_node('call_function', target=torch.relu, args=(x,))
output : torch.fx.Node = graph.output(b)
b.prepend(b)
x.append(b)
self.assertEqual(len(graph.nodes), 3)
def test_erase_node_error(self):
st = SimpleTest()
traced = symbolic_trace(st)
for node in traced.graph.nodes:
# Test deleting with uses both in another Node and at the output
if node.target in [operator.add, torch.relu]:
with self.assertRaisesRegex(RuntimeError, 'but it still had .* users in the graph'):
traced.graph.erase_node(node)
def test_copy_it(self):
d = immutable_dict([(3, 4), (5, 6)])
l = immutable_list([(3, 4), (5, 6)])
self.assertEqual(d, deepcopy(d))
self.assertEqual(l, deepcopy(l))
def test_get_torch_func_signature(self):
for key in dir(torch):
obj = getattr(torch, key)
if callable(obj):
schemas = get_signature_for_torch_op(obj)
def test_find_uses(self):
graph = torch.fx.Graph()
x = torch.fx.Proxy(graph.placeholder('x'))
y = torch.relu(x)
z = x + x
u = torch.neg(x)
graph.output((y + z + u).node)
graph.lint()
users_of_x = x.node.users
self.assertEqual(len(users_of_x), 3)
expected_ops = set(['relu', 'add', 'neg'])
for use in users_of_x:
assert any(use.name.startswith(prefix) for prefix in expected_ops)
def test_inline_graph(self):
class InlineInto(torch.nn.Module):
def forward(self, x):
return torch.relu(x)
class ToInline(torch.nn.Module):
def forward(self, x):
return torch.neg(x)
inline_into = symbolic_trace(InlineInto())
to_inline = symbolic_trace(ToInline())
combined_graph = torch.fx.Graph()
output_node = combined_graph.graph_copy(inline_into.graph, {})
input_node = list(to_inline.graph.nodes)[0]
assert input_node and input_node.op == 'placeholder'
val_map = {input_node : output_node}
output = combined_graph.graph_copy(to_inline.graph, val_map)
combined_graph.output(output)
combined_module = torch.fx.GraphModule(torch.nn.Module(), combined_graph)
input = torch.rand(3, 4)
self.assertEqual(combined_module(input), input.relu().neg())
def test_multi_insert_point(self):
graph = torch.fx.Graph()
x = torch.fx.Proxy(graph.placeholder('x'))
relu = torch.relu(x)
with graph.inserting_before(relu.node):
y = torch.neg(x)
z = torch.tanh(y)
graph.output((relu.node, z.node))
graph.lint()
expected_ops = ['x', 'neg', 'tanh', 'relu']
for node, expected in zip(graph.nodes, expected_ops):
assert expected in node.name
def test_reassign_args_kwargs_uses(self):
graph = torch.fx.Graph()
x, y = Proxy(graph.placeholder('x')), Proxy(graph.placeholder('y'))
z = x + y
zed = z + z + z
graph.output(zed.node)
graph.lint()
# zed = z + z + z -> zed = z + z + x
zed.node.args = (zed.node.args[0], x.node)
self.assertEqual(list(x.node.users.keys()), [z.node, zed.node])
# z = x + y -> z = y + y
z.node.args = (y.node, y.node)
self.assertEqual(list(x.node.users.keys()), [zed.node])
def test_trace_function(self):
def foo(x, y):
return torch.relu(x) + y
x, y = torch.randn(3, 4), torch.randn(3, 4)
self.checkGraphModule(foo, (x, y))
def test_trace_dict_int_keys(self):
class ModWithDictArg(torch.nn.Module):
def forward(self, d : Dict[int, torch.Tensor]):
return d[42]
class CallsModWithDict(torch.nn.Module):
def __init__(self):
super().__init__()
self.m = ModWithDictArg()
def forward(self, x):
return self.m({42: x})
class MyTracer(torch.fx.Tracer):
def is_leaf_module(self, m: torch.nn.Module, module_qualified_name : str) -> bool:
return isinstance(m, ModWithDictArg)
traced_graph = MyTracer().trace(CallsModWithDict())
def test_trace_dict_proxy_keys(self):
class ModWithDictArg(torch.nn.Module):
def forward(self, d : Dict[torch.Tensor, torch.Tensor]):
return d[42]
class CallsModWithDict(torch.nn.Module):
def __init__(self):
super().__init__()
self.m = ModWithDictArg()
def forward(self, x):
return self.m({x: x})
class MyTracer(torch.fx.Tracer):
def is_leaf_module(self, m: torch.nn.Module, module_qualified_name : str) -> bool:
return isinstance(m, ModWithDictArg)
with self.assertRaisesRegex(RuntimeError, 'cannot contain a Node'):
traced_graph = MyTracer().trace(CallsModWithDict())
| def test_module_deepcopy_edit_nodes(self):
class Foo(torch.nn.Module):
def forward(self, x):
return torch.relu(x)
traced1 = symbolic_trace(Foo())
copied = copy.deepcopy(traced1)
for node in copied.graph.nodes:
if node.target == torch.relu:
node.target = torch.neg
copied.recompile()
traced1.recompile()
x = torch.randn(15, 15)
torch.testing.assert_allclose(traced1(x), torch.relu(x))
torch.testing.assert_allclose(copied(x), torch.neg(x))
def test_direct_param_use(self):
class TransposeTest(torch.nn.Module):
def __init__(self):
super().__init__()
self.b = torch.nn.Parameter(torch.rand(4, 3))
def forward(self, x):
return self.b
class Foo(torch.nn.Module):
def __init__(self):
super().__init__()
self.a = TransposeTest()
def forward(self, x):
return self.a.b, self.a.b.t(), self.a.b.view(12)
traced = torch.fx.symbolic_trace(Foo())
assert(all('constant' not in node.target for node in traced.graph.nodes))
def test_single_default_arg(self):
class M(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, y=1):
return y
m = M()
self.checkGraphModule(m, ())
self.checkGraphModule(m, (3,))
def test_multiple_default_args(self):
class M(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, y=1, z=2):
return y + z
m = M()
self.checkGraphModule(m, ())
self.checkGraphModule(m, (3,))
self.checkGraphModule(m, (3, 4))
def test_regular_and_default_args(self):
class M(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, x, y=1):
return x + y
m = M()
self.checkGraphModule(m, (2,))
self.checkGraphModule(m, (2, 3))
def test_string_literal_return(self):
class M(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self):
return "foo"
m = M()
self.checkGraphModule(m, ())
def test_namedtuple_return_qualname(self):
class NamedTupReturn(torch.nn.Module):
def forward(self, x):
return MyNamedTup(x, x)
traced = symbolic_trace(NamedTupReturn())
input = torch.rand(3, 4)
self.assertEqual(traced(input), MyNamedTup(input, input))
def test_update_args_kwargs_yells_at_you(self):
symtraced = symbolic_trace(SimpleTest())
node = next(iter(symtraced.graph.nodes))
with self.assertRaisesRegex(AttributeError, '__update_args_kwargs'):
node.__update_args_kwargs((), {})
def test_torchbind_class_attribute_in_fx(self):
if TEST_WITH_ROCM or IS_FBCODE or IS_WINDOWS or IS_MACOS:
self.skipTest("torch.classes._TorchScriptTesting._StackString is registered, skipping")
class FooBar1234(torch.nn.Module):
def __init__(self):
super(FooBar1234, self).__init__()
self.f = torch.classes._TorchScriptTesting._StackString(["3", "4"])
def forward(self):
return self.f.top()
m = FooBar1234()
self.checkGraphModule(m, ())
def test_torchbind_class_attribute_in_fx_tensor_arg(self):
if TEST_WITH_ROCM or IS_FBCODE or IS_WINDOWS or IS_MACOS:
self.skipTest("torch.classes._TorchScriptTesting._ReLUClass is registered, skipping")
class FooBar2341(torch.nn.Module):
def __init__(self):
super(FooBar2341, self).__init__()
self.f = torch.classes._TorchScriptTesting._ReLUClass()
def forward(self, x):
return self.f.run(x)
m = FooBar2341()
traced = symbolic_trace(m)
input = torch.randn(3, 4)
self.assertEqual(traced(input), m(input))
self.assertTrue(any(n.op == 'call_method' for n in traced.graph.nodes))
def test_script_method_trace(self):
class Scripted(torch.nn.Module):
def forward(self, x):
return torch.relu(x)
class Holder(torch.nn.Module):
def __init__(self):
super().__init__()
self.s = torch.jit.script(Scripted())
def forward(self, x):
return self.s(x)
h = Holder()
traced = symbolic_trace(h)
input = torch.randn(3, 4)
self.assertEqual(traced(input), h(input))
self.assertTrue(any(n.op == 'call_method' for n in traced.graph.nodes))
def test_namedtuple_return_trace(self):
class NamedTupReturn(torch.nn.Module):
def forward(self, x):
return Pair(x, x)
traced = symbolic_trace(NamedTupReturn())
input = torch.rand(3, 4)
self.assertEqual(traced(input), Pair(input, input))
def test_return_type_exists(self):
class ReturnTypeModule(torch.nn.Module):
def other(self, x: List[str]) -> List[str]:
return x
def forward(self, x: List[str]) -> List[str]:
return self.other(x)
traced = symbolic_trace(ReturnTypeModule())
self.assertIn("-> typing_List[str]", traced._code)
scripted = torch.jit.script(traced)
self.assertIn("-> List[str]", scripted.code)
def getitem_inner(self):
class GetItemBase(torch.nn.Module):
def __init__(self):
super().__init__()
self.register_buffer('pe', torch.randn(8, 8))
class GetItem1(GetItemBase):
def forward(self, x):
return self.pe[:, :x.size(0)]
class GetItem2(GetItemBase):
def forward(self, x):
return self.pe[x.size(0)]
class GetItem3(GetItemBase):
def forward(self, x):
return self.pe[4] # fx creates `self._tensor_constant0` here
self.checkGraphModule(GetItem1(), [torch.zeros(4)])
self.checkGraphModule(GetItem2(), [torch.zeros(4)])
self.checkGraphModule(GetItem3(), [torch.zeros(4)])
@unittest.skipUnless(os.environ.get("FX_PATCH_GETITEM") == "1",
"Will be checked in test_getitem_subproc")
def test_getitem(self):
self.getitem_inner()
def test_getitem_subproc(self):
# need to run this test in a subproc to work around:
# https://github.com/pytorch/pytorch/issues/50710
proc = Process(target=run_getitem_target)
proc.start()
proc.join()
self.assertEqual(proc.exitcode, 0)
def test_user_friendly_call_provenance_with_function(self):
def fn(x):
return wrapper_fn(x)
traced = torch.fx.symbolic_trace(fn)
with self.assertRaisesRegex(RuntimeError, "'wrapper_fn' is "
"being compiled since it was called"
" from 'fn.forward'"):
scripted = torch.jit.script(traced)
def test_user_friendly_call_provenance_with_module(self):
class M(torch.nn.Module):
def forward(self, x):
return wrapper_fn(x)
traced = torch.fx.symbolic_trace(M())
with self.assertRaisesRegex(RuntimeError, "'wrapper_fn' is "
"being compiled since it was called"
" from 'M.forward'"):
scripted = torch.jit.script(traced)
def test_snake_case(self):
class M(torch.nn.Module):
def __init__(self):
super(M, self).__init__()
self.activations = torch.nn.ModuleDict([
["snake_case", torch.nn.ReLU()],
["PascalCase", torch.nn.LeakyReLU()],
["ALL_CAPS", torch.nn.PReLU()]
])
def forward(self, x):
a = self.activations["snake_case"](x)
b = self.activations["PascalCase"](x)
c = self.activations["ALL_CAPS"](x)
return a, b, c
traced = symbolic_trace(M())
check = [
("activations_snake_case", "activations.snake_case"),
("activations_pascal_case", "activations.PascalCase"),
("activations_all_caps", "activations.ALL_CAPS")
]
i = 0
for node in traced.graph.nodes:
if node.op == "placeholder" or node.op == "output":
continue
name = check[i][0]
target = check[i][1]
self.assertEqual(name, node.name)
self.assertEqual(target, node.target)
i += 1
self.assertEqual(i, 3)
def test_no_mutation(self):
from torch.fx.immutable_collections import immutable_list
x = immutable_list([3, 4])
with self.assertRaisesRegex(NotImplementedError, "new_args"):
x[0] = 4
def test_partial_trace(self):
class Foo(torch.nn.Module):
def forward(self, x, y):
if y:
return 2 * x
else:
return x
mod = Foo()
mod_true = symbolic_trace(mod, concrete_args={'y': True})
mod_false = symbolic_trace(mod, concrete_args={'y': False})
self.assertEqual(mod_true(3, True), 6)
print(mod_true.code)
assert(any([i.target == torch._assert for i in mod_true.graph.nodes]))
with self.assertRaises(AssertionError):
mod_true(3, False)
self.assertEqual(mod_false(3, False), 3)
with self.assertRaises(AssertionError):
mod_false(3, True)
def f_higher(a, f):
return f(a)
nf = symbolic_trace(f_higher, concrete_args={'f': lambda x: x * 2})
self.assertEqual(nf(3, lambda x: x * 2), 6)
def test_custom_traceback_raised_when_exception_source_is_graphmodule(self):
class M(torch.nn.Module):
def __init__(self):
super(M, self).__init__()
self.W = torch.nn.Parameter(torch.randn(5))
def forward(self, x):
return torch.dot(self.W, x)
traced = torch.fx.symbolic_trace(M())
out = [n for n in traced.graph.nodes if n.op == "output"][-1]
with traced.graph.inserting_before(out):
relu_out = traced.graph.call_method(method_name='relu',
args=(out.args[0],))
out.args = (relu_out,)
traced.recompile()
with self.capture_stderr() as captured:
with self.assertRaises(TypeError):
traced(5)
self.assertRegex(captured[0],
r"Call using an FX-traced Module, line .* of the "
r"traced Module's generated forward function:")
def test_custom_traceback_not_raised_when_exception_source_is_submodule(self):
class M(torch.nn.Module):
def __init__(self):
super().__init__()
self.linear = torch.nn.Linear(3, 4)
def forward(self, x):
return self.linear(x)
traced = torch.fx.symbolic_trace(M())
# Do not change this to `capture_stderr` or another context
# manager without ensuring that the output is as expected
try:
traced(torch.rand(5, 5))
except RuntimeError:
captured = traceback.format_exc()
self.assertNotRegex(captured,
r"Call using an FX-traced Module, line .* of the "
r"traced Module's generated forward function:")
def test_graph_module_replicate_for_dp(self):
class Foo(torch.nn.Module):
def forward(self, x):
return torch.relu(x)
gm = torch.fx.symbolic_trace(Foo())
x = torch.randn(5, 3)
out = gm(x)
replica = gm._replicate_for_data_parallel()
out_replica = replica(x)
torch.testing.assert_allclose(out_replica, out)
def test_ast_rewriter_rewrites_assert(self):
class M(torch.nn.Module):
def forward(self, x: torch.Tensor, y: int, z: int):
assert y == z
return torch.add(x, x)
ast_rewriter = RewritingTracer()
graph = ast_rewriter.trace(M())
traced = GraphModule(ast_rewriter.root, graph, "gm")
traced.graph.lint()
def test_ast_rewriter_rewrites_assert_with_message(self):
class M(torch.nn.Module):
def forward(self, x: torch.Tensor, y: int, z: int):
assert y == z, "msg"
return torch.add(x, x)
ast_rewriter = RewritingTracer()
graph = ast_rewriter.trace(M())
traced = GraphModule(ast_rewriter.root, graph, "gm")
traced.graph.lint()
def test_throw_out_variant(self):
def foo(x):
y = torch.rand_like(x)
torch.sigmoid(x, out=y)
return y
class MyTracer(torch.fx.Tracer):
check_mutable_operations = True
tracer = MyTracer()
with self.assertRaisesRegex(RuntimeError, 'mutable operation aten::sigmoid.out'):
traced_graph = tracer.trace(foo)
def test_ast_rewriter_reassigns_submodules(self):
class M(torch.nn.Module):
def __init__(self):
super().__init__()
self.bn = torch.nn.BatchNorm2d(100)
def forward(self, x: torch.Tensor):
return torch.add(x, x)
ast_rewriter = RewritingTracer()
graph = ast_rewriter.trace(M())
traced = GraphModule(ast_rewriter.root, graph, "gm")
traced.graph.lint()
def test_ast_rewriter_wrap(self):
self.assertEqual(3 + 4 + 5, a_lifted_leaf((3, 4), 5))
def to_trace(y):
return (
a_lifted_leaf((4, y), 3)
+ a_lifted_leaf((3, 4), 5)
+ a_lifted_leaf((y, y), y)
)
ast_rewriter = RewritingTracer()
graph = ast_rewriter.trace(to_trace)
traced = GraphModule(ast_rewriter.root, graph, "gm")
self.assertIn("a_lifted_leaf", traced.code)
self.assertEqual(27, traced(2))
self.assertIs(a_lifted_leaf, real_a_lifed_leaf)
def test_ast_rewriter_wrap_fn_directly(self):
self.assertEqual(3 + 4 + 5, a_lifted_leaf2((3, 4), 5))
def to_trace(y):
return (
a_lifted_leaf2((4, y), 3)
+ a_lifted_leaf2((3, 4), 5)
+ a_lifted_leaf2((y, y), y)
)
ast_rewriter = RewritingTracer()
graph = ast_rewriter.trace(to_trace)
traced = GraphModule(ast_rewriter.root, graph, "gm")
self.assertIn("a_lifted_leaf2", traced.code)
self.assertEqual(27, traced(2))
self.assertIs(a_lifted_leaf2, real_a_lifed_leaf2)
def test_profiler_ranges_side_effect(self):
g = torch.fx.Graph()
handle = g.call_function(torch.ops.profiler._record_function_enter, ('test_range',))
g.call_function(torch.ops.profiler._record_function_exit, (handle,))
g.output(None)
found_targets = {}
for node in g.nodes:
if node.op == 'call_function':
found_targets.setdefault(node.target)
self.assertEqual(
list(found_targets.keys()),
[torch.ops.profiler._record_function_enter, torch.ops.profiler._record_function_exit]
)
g.eliminate_dead_code()
found_targets = {}
for node in g.nodes:
if node.op == 'call_function':
found_targets.setdefault(node.target)
self.assertEqual(
list(found_targets.keys()),
[torch.ops.profiler._record_function_enter, torch.ops.profiler._record_function_exit]
)
def test_ast_rewriter_wrapped_via_decorator(self):
class F(torch.nn.Module):
def forward(self, x):
return wrapped_via_decorator(x)
ast_rewriter = RewritingTracer()
graph = ast_rewriter.trace(F())
traced = GraphModule(ast_rewriter.root, graph, "gm")
self.assertIn("wrapped_via_decorator", traced.code)
self.assertEqual(traced(0), 1)
self.assertIs(wrapped_via_decorator, real_wrapped_via_decorator)
self.assertFalse(hasattr(wrapped_via_decorator, "__fx_already_patched"))
def test_ast_rewriter_wrapped_via_decorator_and_transformed(self):
self.assertEqual(wrapped_via_decorator(0), 1)
def to_trace(y):
return wrapped_via_decorator(y)
ast_rewriter = RewritingTracer()
graph = ast_rewriter.trace(to_trace)
traced = GraphModule(ast_rewriter.root, graph, "gm")
self.assertIn("wrapped_via_decorator", traced.code)
self.assertEqual(traced(0), 1)
self.assertIs(wrapped_via_decorator, real_wrapped_via_decorator)
self.assertFalse(hasattr(wrapped_via_decorator, "__fx_already_patched"))
transformed = torch.fx.Transformer(traced).transform()
self.assertIn("wrapped_via_decorator", transformed.code)
self.assertEqual(transformed(0), 1)
self.assertIs(wrapped_via_decorator, real_wrapped_via_decorator)
self.assertFalse(hasattr(wrapped_via_decorator, "__fx_already_patched"))
def test_ast_rewriter_wrap_with_submodule(self):
class M(torch.nn.Module):
def __init__(self):
super(M, self).__init__()
self.batchnorm1d = torch.nn.BatchNorm1d(2, affine=False)
def forward(self, x: torch.Tensor):
return wrapped_with_submodule(x, self.batchnorm1d)
ast_rewriter = RewritingTracer()
graph = ast_rewriter.trace(M())
traced = GraphModule(ast_rewriter.root, graph, "gm")
self.assertIn("wrapped_with_submodule", traced.code)
input = torch.rand(3, 2)
ref_batchnorm1d = torch.nn.BatchNorm1d(2, affine=False)
self.assertEqual(ref_batchnorm1d(input), traced(input))
def test_submodule_manipulation_API(self):
class C(torch.nn.Module):
def __init__(self):
super(C, self).__init__()
self.conv = torch.nn.Conv2d(16, 33, 3, stride=2)
self.param = torch.nn.Parameter(torch.rand(2, 3))
def forward(self, x):
return self.conv(torch.cat([self.param, x]))
class B(torch.nn.Module):
def __init__(self):
super(B, self).__init__()
self.linear = torch.nn.Linear(100, 200)
self.register_buffer("buf", torch.randn(2, 3))
self.net_c = C()
def forward(self, x):
return self.linear(torch.cat([self.buf, self.net_c(x)]))
class A(torch.nn.Module):
def __init__(self):
super(A, self).__init__()
self.net_b = B()
self.param = torch.nn.Parameter(torch.rand(2, 3))
def forward(self, x):
return self.net_b(x) + self.param
a = symbolic_trace(A())
a.add_submodule("net_b.net_c.dropout", torch.nn.Dropout(p=0.2))
conv = [n for n in a.graph.nodes if n.target == "net_b.net_c.conv"][-1]
with a.graph.inserting_before(conv):
with warnings.catch_warnings(record=True) as w:
dropout = a.graph.call_module(module_name="net_b.net_c.dropout",
args=conv.args)
self.assertEqual(len(w), 0)
conv.replace_all_uses_with(dropout)
a.graph.erase_node(conv)
a.recompile()
def module_exists(gm: GraphModule, path: str) -> bool:
return any(path == name for name, _ in gm.named_modules())
def parameter_exists(gm: GraphModule, path: str) -> bool:
return (any(path == name for name, _ in gm.named_parameters())
and any(path == name for name in gm.state_dict().keys()))
def buffer_exists(gm: GraphModule, path: str) -> bool:
return (any(path == name for name, _ in gm.named_buffers())
and any(path == name for name in gm.state_dict().keys()))
# Test that we added the "dropout" submodule
self.assertTrue(module_exists(a, "net_b.net_c.dropout"))
# Test `get_submodule` with an added submodule
self.assertIsNotNone(a.get_submodule("net_b.net_c.dropout"))
# Test that the "conv" submodule is still there
self.assertTrue(module_exists(a, "net_b.net_c.conv"))
# Test `get_submodule` with an original module
self.assertIsNotNone(a.get_submodule("net_b.net_c.conv"))
# Test that the "conv" node is NOT still there
conv = [n for n in a.graph.nodes if n.target == "net_b.net_c.conv"]
self.assertEqual(conv, [])
a.delete_submodule("net_b.net_c.conv")
# Test that the "conv" submodule is now gone
self.assertFalse(module_exists(a, "net_b.net_c.conv"))
# Test `get_submodule` with a deleted submodule
with self.assertRaisesRegex(AttributeError, "has no attribute "
"`conv`"):
self.assertIsNone(a.get_submodule("net_b.net_c.conv"))
# Test `get_attr` warnings
cat = [n for n in a.graph.nodes if n.target == torch.cat][-1]
with a.graph.inserting_before(cat):
with warnings.catch_warnings(record=True) as w:
param = a.graph.get_attr(qualified_name="net_b.net_c.param")
self.assertEqual(len(w), 0)
with self.assertWarnsRegex(UserWarning, "Attempted to "
"insert a get_attr Node with no "
"underlying reference in the "
"owning GraphModule"):
bad_param = a.graph.get_attr(qualified_name="net_b.param")
a.graph.erase_node(bad_param)
cat.args = (*cat.args, param)
a.recompile()
a.graph.lint()
# Test `get_parameter`
a.get_parameter("net_b.net_c.param")
with self.assertRaisesRegex(AttributeError, "is not an "
"nn.Parameter"):
a.get_parameter("net_b.buf")
with self.assertRaisesRegex(AttributeError, "has no attribute "
"`param`"):
a.get_parameter("net_b.param")
# Test `get_buffer`
a.get_buffer("net_b.buf")
with self.assertRaisesRegex(AttributeError, "is not a "
"buffer"):
a.get_buffer("net_b.net_c.param")
with self.assertRaisesRegex(AttributeError, "has no attribute "
"`buf`"):
a.get_buffer("net_b.net_c.buf")
# Test non-nested attributes
a.get_submodule("")
a.get_parameter("param")
# Insert some unused submodules
a.add_submodule("net_b.embedding", torch.nn.Embedding(10, 3))
a.add_submodule("net_b.net_c.embedding", torch.nn.Embedding(10, 3))
a.add_submodule("net_b.net_c.rnn", torch.nn.RNN(10, 20, 2))
a.add_submodule("batch_norm_2d", torch.nn.BatchNorm2d(100))
# Garbage collection
a.delete_all_unused_submodules()
# Test that all the unused submodules are gone
self.assertFalse(module_exists(a, "net_b.embedding"))
self.assertFalse(module_exists(a, "net_b.net_c.embedding"))
self.assertFalse(module_exists(a, "net_b.net_c.rnn"))
self.assertFalse(module_exists(a, "batch_norm_2d"))
# Test that we didn't delete any unused Parameters or buffers
self.assertTrue(parameter_exists(a, "net_b.net_c.param"))
self.assertTrue(buffer_exists(a, "net_b.buf"))
a.graph.lint()
def test_delete_unused_submodules_leaf(self):
class SubModule(torch.nn.Module):
def __init__(self):
super().__init__()
self.linear = torch.nn.Linear(10, 10)
self.relu = torch.nn.ReLU()
def forward(self, x):
x = self.linear(x)
x = self.relu(x)
return x
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
self.submod = SubModule()
def forward(self, x):
x = self.submod(x)
return x
model = Model()
class MyCustomTracer(torch.fx.Tracer):
def is_leaf_module(self, m: torch.nn.Module, module_qualified_name : str) -> bool:
return module_qualified_name == "submod"
inputs = torch.randn(1, 10)
traced_graph = MyCustomTracer().trace(model)
gm2 = torch.fx.GraphModule(model, traced_graph)
gm2.delete_all_unused_submodules()
torch.testing.assert_allclose(gm2(inputs), model(inputs))
def test_tracing_graphmodules_as_leaf_submodules(self):
class A(torch.nn.Module):
def forward(self, t):
return t + t
class B(torch.nn.Module):
def __init__(self):
super(type(self), self).__init__()
self.calling = False
self.called = False
def forward(self, t):
if self.calling:
return t - t
else:
return t + t
def __call__(self, *args):
self.called = True
self.calling = True
return super(type(self), self).__call__(*args)
self.calling = False
class M(torch.nn.Module):
def __init__(self, a, b):
super().__init__()
self.a = a
self.b = b
def forward(self, t):
x = self.a(t)
y = self.b(t)
return x + y
class LeafTracer(Tracer):
def is_leaf_module(self, module, name):
return True
class LeafTracerNotB(Tracer):
def is_leaf_module(self, module, name):
return False if "b" in name else True
# Recompile calls added "for fun", since they
# chain __call__ wrappers.
#
# Test: B as a regular, non-leaf module
#
a = symbolic_trace(A())
a.recompile()
m = M(a, B())
graph = LeafTracerNotB().trace(m)
gm = GraphModule(m, graph)
gm.recompile()
# Test graphmodule/submodule a is not inlined.
self.assertTrue(isinstance(gm.get_submodule("a"), GraphModule))
match = [n for n in gm.graph.nodes if n.op == "call_module" and n.target == "a"]
self.assertTrue(len(match) == 1)
# Test submodule b is not treated as leaf.
self.assertFalse(hasattr(gm, "b"))
# Test assert custom __call__ on submodule b was honored.
match = [
n
for n in gm.graph.nodes
if n.op == "call_function" and n.target == operator.sub
]
self.assertTrue(len(match) == 1)
#
# Test: B as a regular, leaf module
# symbolic_trace should only patch torch.nn.Module.__call__,
# which means B.__call__ should still execute
#
a = symbolic_trace(A())
a.recompile()
b = B()
m = M(a, b)
graph = LeafTracer().trace(m)
gm = GraphModule(m, graph)
gm.recompile()
# Test graphmodule/submodule a is not inlined.
self.assertTrue(isinstance(gm.get_submodule("a"), GraphModule))
match = [n for n in gm.graph.nodes if n.op == "call_module" and n.target == "a"]
self.assertTrue(len(match) == 1)
# Test submodule b is leaf:
self.assertTrue(isinstance(gm.get_submodule("b"), torch.nn.Module))
match = [n for n in gm.graph.nodes if n.op == "call_module" and n.target == "b"]
self.assertTrue(len(match) == 1)
# Test b.__call__ was run
self.assertTrue(b.called)
self.assertTrue(gm.get_submodule("b").called)
#
# Test: B as GraphModule leaf
# __call__ not honored since symbolic_trace directly invokes forward()
#
a = symbolic_trace(A())
a.recompile()
b = symbolic_trace(B())
b.recompile()
m = M(a, b)
graph = LeafTracer().trace(m)
gm = GraphModule(m, graph)
gm.recompile()
self.assertTrue(isinstance(gm.get_submodule("a"), GraphModule))
match = [n for n in gm.graph.nodes if n.op == "call_module" and n.target == "a"]
self.assertTrue(len(match) == 1)
self.assertTrue(isinstance(gm.get_submodule("b"), torch.nn.Module))
match = [n for n in gm.graph.nodes if n.op == "call_module" and n.target == "b"]
self.assertTrue(len(match) == 1)
def _test_graph_module_init_buffer_param_copied(self, use_dict_init: bool):
class MyModule(torch.nn.Module):
def __init__(self):
super().__init__()
self.register_buffer("my_buff", torch.rand(3, 4))
self.register_parameter(
"my_param", torch.nn.Parameter(torch.rand(3, 4))
)
def forward(self, x):
return x + self.my_buff + self.my_param
mod = MyModule()
mod_traced = symbolic_trace(mod)
# Create new GraphModule based on original, either w/ dict or root module.
orig_buff = mod_traced.get_buffer("my_buff")
orig_param = mod_traced.get_parameter("my_param")
mod_traced_new = GraphModule(
{"my_buff": orig_buff, "my_param": orig_param} if use_dict_init else mod,
mod_traced.graph,
)
# Check that both my_buff and my_param are found and the same.
try:
new_buff = mod_traced_new.get_buffer("my_buff")
except Exception:
self.fail("Did not find my_buff")
self.assertEqual(orig_buff, new_buff)
try:
new_param = mod_traced_new.get_parameter("my_param")
except Exception:
self.fail("Did not find my_param")
self.assertEqual(orig_param, new_param)
x = torch.rand(3, 4)
orig_out = mod_traced(x)
submodules_out = mod_traced_new(x)
self.assertEqual(orig_out, submodules_out)
def test_graph_module_init_buffer_param_copied_dict_init(self):
self._test_graph_module_init_buffer_param_copied(use_dict_init=True)
def test_graph_module_init_buffer_param_copied_mod_init(self):
self._test_graph_module_init_buffer_param_copied(use_dict_init=False)
def test_annotations_with_no_forward_references(self):
class A:
def __call__(self, x: torch.Tensor):
return torch.add(x, x)
class M(torch.nn.Module):
def forward(self, x: torch.Tensor, a: A) -> torch.Tensor:
return a(x)
self.checkGraphModule(M(), (torch.rand(2, 3), A()), kwargs=None)
def test_annotations_with_forward_references(self):
class A:
def __call__(self, x: torch.Tensor):
return torch.add(x, x)
class M(torch.nn.Module):
def forward(self, x: 'torch.Tensor', a: 'A') -> 'torch.Tensor':
return a(x)
self.checkGraphModule(M(), (torch.rand(2, 3), A()), kwargs=None)
def test_annotations_with_non_torch_reference_and_no_internal_forward_references(self):
class A:
def __call__(self, x: torch.Tensor):
return torch.add(x, x)
class M(torch.nn.Module):
def forward(self, x: List[torch.Tensor], a: A) -> torch.Tensor:
return a(x[0])
self.checkGraphModule(M(), (torch.rand(2, 3), A()), kwargs=None)
def test_annotations_with_non_torch_reference_and_internal_forward_references(self):
class A:
def __call__(self, x: torch.Tensor):
return torch.add(x, x)
class M(torch.nn.Module):
def forward(self, x: List['torch.Tensor'], a: A) -> 'torch.Tensor':
return a(x)[0]
self.checkGraphModule(M(), (torch.rand(2, 3), A()), kwargs=None)
@unittest.skipIf(sys.version_info < (3, 7), "`__future__` feature "
"`annotations` is not defined in Python <3.7")
def test_annotation_with_future(self):
try:
import fx.test_future # noqa: F401
finally:
del sys.modules["__future__"]
def test_annotations_empty_tuple(self):
class Foo(torch.nn.Module):
def forward(self, x: Tuple[()], y: Tuple[str, Tuple[()]]):
return "foo"
traced = torch.fx.symbolic_trace(Foo())
x = ()
y = ("bar", ())
traced(x, y)
FileCheck().check("_Tuple[()]") \
.check("typing_Tuple[str,typing_Tuple[()]]") \
.run(traced.code)
scripted = torch.jit.script(traced)
scripted(x, y)
FileCheck().check("Tuple[()]") \
.check("Tuple[str, Tuple[()]]") \
.run(scripted.code)
@unittest.skipIf(IS_WINDOWS, "Python Windows bug? https://bugs.python.org/issue45108")
def test_assert(self):
def f(x):
assert x > 1
return x + 1
try:
torch.fx.proxy.TracerBase.trace_asserts = True
traced = symbolic_trace(f)
finally:
torch.fx.proxy.TracerBase.trace_asserts = False
self.assertEqual(f(2), traced(2))
with self.assertRaises(AssertionError):
traced(0)
def test_pytree(self):
def f_sum(x):
return sum(x)
def f_sum_dict(x):
out = 0
for k, v in x.items():
out += v
return out
def f_dict_list_map(x):
new_dict = {}
for k, v in x.items():
new_dict[k] = [i + 1 for i in v]
return new_dict
def f_dict_add(x):
return x['a'] + sum(x['z'])
def f_namedtuple_add(x):
return x.x + x.y
pytree._register_pytree_node(
Foo,
lambda x: ([x.a, x.b], None),
lambda x, _: Foo(x[0], x[1]),
)
fx_pytree.register_pytree_flatten_spec(Foo, lambda x, _: [x.a, x.b])
def f_custom(x):
return x.a + x.b
def f_custom_dict(x):
return f_sum_dict(x.a) + x.b
def f_return_custom(x):
return Foo(x.b, x.a)
tests = [
(f_sum, [PH, PH, PH]),
(f_sum, []),
(f_sum_dict, {'a': PH, 'b': PH, 'c': PH}),
(f_dict_list_map, {'a': (PH, PH), 'b': [PH], 'c': []}),
(f_dict_list_map, {5: (PH, PH, PH)}),
(f_dict_add, {'a': PH, 'z': (PH, PH, PH)}),
(f_dict_add, {'a': PH, 'z': []}),
(f_custom, Foo(PH, PH)),
(f_custom, Foo(PH, 3)),
(f_custom_dict, Foo({'a': PH, 'b': PH}, PH)),
# (f_return_custom, Foo(PH, PH)), # Don't currently support output pytrees
(f_namedtuple_add, Point(PH, PH)),
]
def verify_pytree(f, inp):
val = pytree.tree_map(lambda x: torch.randn(3) if x == PH else x, inp)
num_flat_args = len([i == PH for i in pytree.tree_flatten(inp)[0]])
orig_out = f(val)
nf = symbolic_trace(f, concrete_args={'x': inp})
self.assertEqual(nf(val), orig_out)
bare_fx = GraphModule({}, copy.deepcopy(nf.graph))
bare_fx.graph.set_codegen(CodeGen())
bare_fx.recompile()
self.assertEqual(nf.graph.process_outputs(bare_fx(*nf.graph.process_inputs(val))), orig_out)
assert num_flat_args == 0 or "tree_flatten_spec" in nf.code
assert(sum([i.op == 'placeholder' for i in nf.graph.nodes]) == num_flat_args)
nf = symbolic_trace(nf)
self.assertEqual(nf(val), orig_out)
assert "tree_flatten_spec" not in nf.code
assert(sum([i.op == 'placeholder' for i in nf.graph.nodes]) == 1)
nf = symbolic_trace(nf, concrete_args={'x': inp})
self.assertEqual(nf(val), orig_out)
assert num_flat_args == 0 or "tree_flatten_spec" in nf.code
assert(sum([i.op == 'placeholder' for i in nf.graph.nodes]) == num_flat_args)
pickled = pickle.dumps(nf)
nf = pickle.loads(pickled)
self.assertEqual(nf(val), orig_out)
for f, inp in tests:
verify_pytree(f, inp)
def test_pytree_concrete(self):
def f(b, a):
if b:
return a['a']
else:
return a['z']
inp = {'a': {'a': PH, 'z': PH}, 'b': True}
nf = symbolic_trace(f, concrete_args=inp)
val = pytree.tree_map(lambda x: torch.randn(3) if x == PH else x, inp)
self.assertEqual(nf(**val), f(**val))
nf = symbolic_trace(nf)
self.assertEqual(nf(**val), f(**val))
def test_custom_codegen(self):
class ListCodeGen(CodeGen):
def gen_fn_def(self, free_vars, maybe_return_annotation):
lst_unpack = f"""
def forward(self, args_list: List[torch.Tensor]){maybe_return_annotation}:
{', '.join(free_vars)} = args_list"""
return lst_unpack
def additional_globals(self):
return [('List', typing.List)]
def process_inputs(self, *inputs):
assert(len(inputs) == 1)
return inputs[0]
def f(a, b):
return a + b
nf = symbolic_trace(f)
vals = [torch.randn(3), torch.randn(3)]
self.assertEqual(nf(*vals), f(*vals))
nf.graph.set_codegen(ListCodeGen())
nf.recompile()
bare_fx = GraphModule({}, copy.deepcopy(nf.graph))
bare_fx.graph.set_codegen(CodeGen())
bare_fx.recompile()
self.assertEqual(nf(vals), f(*vals))
self.assertEqual(nf.graph.process_outputs(bare_fx(*nf.graph.process_inputs(vals))), f(*vals))
ts_f = torch.jit.script(nf)
self.assertEqual(nf(vals), ts_f(vals))
def test_imul_code_print(self):
graph = torch.fx.Graph()
a = graph.placeholder("a")
b = graph.placeholder("b")
graph.call_function(operator.imul, (a, b), {})
graph.output(a)
gm = torch.fx.GraphModule({}, graph)
gm.recompile()
self.assertEqual(gm(2, 3), 6)
self.assertIn("a *= b", gm.code)
def run_getitem_target():
from torch.fx._symbolic_trace import _wrapped_methods_to_patch
_wrapped_methods_to_patch.append((torch.Tensor, "__getitem__"))
try:
TestFX().getitem_inner()
finally:
_wrapped_methods_to_patch.pop()
class TestOperatorSignatures(JitTestCase):
def setUp(self):
# Checking for mutable operations whil tracing is feature flagged
# Enable it in testing but not by default
self.orig_tracer_mutable_flag = torch.fx.proxy.TracerBase.check_mutable_operations
torch.fx.proxy.TracerBase.check_mutable_operations = True
def tearDown(self):
torch.fx.proxy.TracerBase.check_mutable_operations = self.orig_tracer_mutable_flag
@onlyCPU
@ops(op_db, allowed_dtypes=(torch.float,))
def test_get_torch_func_signature_exhaustive(self, device, dtype, op):
if not isinstance(op.op, types.BuiltinFunctionType):
raise unittest.SkipTest("This path doesn't work on Python functions")
sample_inputs_itr = op.sample_inputs(device, dtype, requires_grad=False)
schemas = get_signature_for_torch_op(op.op)
if not schemas:
raise RuntimeError('No Schemas Returned')
for sample_input in sample_inputs_itr:
# Iterate through overloads until we hit a match. If we exit this
# loop via `else`, we haven't found a match
for schema in schemas:
try:
bound_args = schema.bind(sample_input.input, *sample_input.args, **sample_input.kwargs)
bound_args.apply_defaults()
op(*bound_args.args, **bound_args.kwargs)
break
except TypeError as e:
pass
else:
raise RuntimeError(f'Did not match any schemas for op {op.name}!')
class TestFXAPIBackwardCompatibility(JitTestCase):
def setUp(self):
self.maxDiff = None
# Checking for mutable operations whil tracing is feature flagged
# Enable it in testing but not by default
self.orig_tracer_mutable_flag = torch.fx.proxy.TracerBase.check_mutable_operations
torch.fx.proxy.TracerBase.check_mutable_operations = True
def tearDown(self):
torch.fx.proxy.TracerBase.check_mutable_operations = self.orig_tracer_mutable_flag
def _fn_to_stable_annotation_str(self, obj):
"""
Unfortunately we have to serialize function signatures manually since
serialization for `inspect.Signature` objects is not stable across
python versions
"""
fn_name = torch.typename(obj)
signature = inspect.signature(obj)
sig_str = f'{fn_name}{signature}'
arg_strs = []
for k, v in signature.parameters.items():
maybe_type_annotation = f': {self._annotation_type_to_stable_str(v.annotation, sig_str)}'\
if v.annotation is not inspect.Signature.empty else ''
def default_val_str(val):
if isinstance(val, (tuple, list)):
str_pieces = ['(' if isinstance(val, tuple) else '[']
str_pieces.append(', '.join(default_val_str(v) for v in val))
if isinstance(val, tuple) and len(str_pieces) == 2:
str_pieces.append(',')
str_pieces.append(')' if isinstance(val, tuple) else ']')
return ''.join(str_pieces)
# Need to fix up some default value strings.
# First case: modules. Default module `repr` contains the FS path of the module.
# Don't leak that
if isinstance(val, types.ModuleType):
return f'<module {val.__name__}>'
# Second case: callables. Callables (such as lambdas) encode their address in
# their string repr. Don't do that
if callable(val):
return f'<function {val.__name__}>'
return str(val)
if v.default is not inspect.Signature.empty:
default_val_str = default_val_str(v.default) if not isinstance(v.default, str) else f"'{v.default}'"
maybe_default = f' = {default_val_str}'
else:
maybe_default = ''
maybe_stars = ''
if v.kind == inspect.Parameter.VAR_POSITIONAL:
maybe_stars = '*'
elif v.kind == inspect.Parameter.VAR_KEYWORD:
maybe_stars = '**'
arg_strs.append(f'{maybe_stars}{k}{maybe_type_annotation}{maybe_default}')
return_annot = f' -> {self._annotation_type_to_stable_str(signature.return_annotation, sig_str)}'\
if signature.return_annotation is not inspect.Signature.empty else ''
return f'{fn_name}({", ".join(arg_strs)}){return_annot}'
def _annotation_type_to_stable_str(self, t, sig_str):
if t is inspect.Signature.empty:
return ''
# Forward ref
if isinstance(t, str):
return f"'{t}'"
if hasattr(typing, 'ForwardRef') and isinstance(t, typing.ForwardRef):
return t.__forward_arg__
if hasattr(typing, '_ForwardRef') and isinstance(t, typing._ForwardRef):
return t.__forward_arg__
trivial_mappings = {
str : 'str',
int : 'int',
float: 'float',
bool: 'bool',
torch.dtype: 'torch.dtype',
torch.Tensor: 'torch.Tensor',
torch.device: 'torch.device',
torch.memory_format: 'torch.memory_format',
slice: 'slice',
torch.nn.Module: 'torch.nn.modules.module.Module',
torch.fx.Graph : 'torch.fx.graph.Graph',
torch.fx.Node : 'torch.fx.node.Node',
torch.fx.Proxy : 'torch.fx.proxy.Proxy',
torch.fx.node.Target : 'torch.fx.node.Target',
torch.fx.node.Argument : 'torch.fx.node.Argument',
torch.fx.graph.PythonCode : 'torch.fx.graph.PythonCode',
torch.fx.graph_module.GraphModule: 'torch.fx.graph_module.GraphModule',
torch.fx.subgraph_rewriter.Match: 'torch.fx.subgraph_rewriter.Match',
Ellipsis : '...',
typing.Any: 'Any',
type(None): 'NoneType',
None: 'None',
typing.Iterator: 'Iterator',
}
mapping = trivial_mappings.get(t, None)
if mapping:
return mapping
# Handle types with contained types
contained = getattr(t, '__args__', None) or []
# Callables contain a bare List for arguments
contained = t if isinstance(t, list) else contained
# Python 3.8 puts type vars into __args__ for unbound types such as Dict
if all(isinstance(ct, typing.TypeVar) for ct in contained):
contained = []
contained_type_annots = [self._annotation_type_to_stable_str(ct, sig_str) for ct in contained]
contained_type_str = f'[{", ".join(contained_type_annots)}]' if len(contained_type_annots) > 0 else ''
origin = getattr(t, '__origin__', None)
if origin is None:
# Unbound types don't have `__origin__` in some Python versions, so fix that up here.
origin = t if t in {typing.Tuple, typing.Union, typing.Dict, typing.List, typing.Type, typing.Callable} else origin
if origin in {tuple, typing.Tuple}:
return f'Tuple{contained_type_str}'
if origin in {typing.Union}:
# Annoying hack to detect Optional
if len(contained) == 2 and (contained[0] is type(None)) ^ (contained[1] is type(None)):
not_none_param = contained[0] if contained[0] is not type(None) else contained[1]
return f'Optional[{self._annotation_type_to_stable_str(not_none_param, sig_str)}]'
return f'Union{contained_type_str}'
if origin in {dict, typing.Dict}:
return f'Dict{contained_type_str}'
if origin in {list, typing.List}:
return f'List{contained_type_str}'
if origin in {type, typing.Type}:
return f'Type{contained_type_str}'
if isinstance(t, typing.Callable):
if len(contained) > 0 and contained[0] is not Ellipsis:
return f'Callable[[{", ".join(contained_type_annots[:-1])}], {contained_type_annots[-1]}]'
else:
return f'Callable{contained_type_str}'
raise RuntimeError(f'Unrecognized type {t} used in BC-compatible type signature {sig_str}.'
f'Please add support for this type and confirm with the '
f'FX team that your signature change is valid.')
def test_function_back_compat(self):
"""
Test backward compatibility for function signatures with
@compatibility(is_backward_compatible=True). Currently this checks for
exact signature matches, which may lead to false positives. If this
becomes too annoying, we can refine this check to actually parse out
the saved schema strings and check if the change is truly backward-
incompatible.
"""
signature_strs = []
for obj in _BACK_COMPAT_OBJECTS:
if not isinstance(obj, type):
signature_strs.append(self._fn_to_stable_annotation_str(obj))
signature_strs.sort()
try:
self.assertExpected('\n'.join(signature_strs), 'fx_backcompat_function_signatures')
except AssertionError as e:
msg = f"{e}\n****** ERROR ******\nAn FX function that has been marked " \
f"as backwards-compatible has experienced a signature change. See the " \
f"above exception context for more information. If this change was " \
f"unintended, please revert it. If it was intended, check with the FX " \
f"team to ensure that the proper deprecation protocols have been followed " \
f"and subsequently --accept the change."
raise AssertionError(msg)
def test_class_member_back_compat(self):
"""
Test backward compatibility for members of classes with
@compatibility(is_backward_compatible=True). Currently this checks for
exact matches on the publicly visible members of the class.
"""
class_method_strs = []
for obj in _BACK_COMPAT_OBJECTS:
if isinstance(obj, type):
public_members = [name for name in obj.__dict__ if not name.startswith('_')]
class_method_strs.append(f'{torch.typename(obj)} {sorted(public_members)}')
class_method_strs.sort()
try:
self.assertExpected('\n'.join(class_method_strs), 'fx_backcompat_class_members')
except AssertionError as e:
msg = f"{e}\n****** ERROR ******\nAn FX class that has been marked " \
f"as backwards-compatible has experienced change in its public members. See the " \
f"above exception context for more information. If this change was " \
f"unintended, please revert it. If it was intended, check with the FX " \
f"team to ensure that the proper deprecation protocols have been followed " \
f"and subsequently --accept the change."
raise AssertionError(msg)
def test_public_api_surface(self):
non_back_compat_objects = {}
def check_symbols_have_bc_designation(m, prefix):
if not m.__name__.startswith('torch.fx'):
return
if m.__name__.startswith('torch.fx.experimental'):
return
for k, v in m.__dict__.items():
if v is m:
continue
if k.startswith('_'):
continue
if isinstance(v, types.ModuleType):
check_symbols_have_bc_designation(v, prefix + [k])
elif isinstance(v, type) or isinstance(v, types.FunctionType):
if v not in _MARKED_WITH_COMATIBLITY:
non_back_compat_objects.setdefault(v)
check_symbols_have_bc_designation(torch.fx, ['torch', 'fx'])
check_symbols_have_bc_designation(torch.fx.passes, ['torch', 'fx', 'passes'])
non_back_compat_strs = [torch.typename(obj) for obj in non_back_compat_objects.keys()]
# Only want objects in torch.fx
non_back_compat_strs = [
s for s in non_back_compat_strs if s.startswith('torch.fx') and not s.startswith('torch.fx.experimental')]
# Only want objects in public namespaces
non_back_compat_strs = [
s for s in non_back_compat_strs if all(not atom.startswith('_') for atom in s.split('.'))]
non_back_compat_strs.sort()
if len(non_back_compat_strs) != 0:
raise AssertionError(f"Public FX API(s) {non_back_compat_strs} introduced but not given a "
f"backwards-compatibility classification! Please decorate these "
f"API(s) with `@torch.fx._compatibility.compatibility` to specify "
f"BC guarantees.")
class TestFunctionalTracing(JitTestCase):
def setUp(self):
# Checking for mutable operations whil tracing is feature flagged
# Enable it in testing but not by default
self.orig_tracer_mutable_flag = torch.fx.proxy.TracerBase.check_mutable_operations
torch.fx.proxy.TracerBase.check_mutable_operations = True
def tearDown(self):
torch.fx.proxy.TracerBase.check_mutable_operations = self.orig_tracer_mutable_flag
IGNORE_FUNCS = ("has_torch_function", "has_torch_function_unary",
"has_torch_function_variadic", "handle_torch_function",
"boolean_dispatch")
TO_PATCH = {"has_torch_function": None,
"has_torch_function_unary": None,
"has_torch_function_variadic": None}
BUILT_IN_FUNC = (AssertionError, "")
PROXY_ITERABLE = (TypeError, r"argument of type 'Proxy' is not iterable")
PROXY_ITERATED = (TraceError, r"Proxy object cannot be iterated")
LEN_ERROR = (RuntimeError, r"'len' is not supported in symbolic tracing by default")
ARG_TYPE_MISMATCH = (TypeError, r", not Proxy$")
CONTROL_FLOW = (TraceError, r"symbolically traced variables cannot be used as inputs to control flow")
INTERPOLATE_ARGS_CONFLICT = (ValueError, r"only one of size or scale_factor should be defined")
MUTABLE = (RuntimeError, r"Tried to trace mutable operation")
UNTRACEABLE_FUNCTIONALS = {
"adaptive_avg_pool1d": BUILT_IN_FUNC,
"avg_pool1d": BUILT_IN_FUNC,
"avg_pool2d": BUILT_IN_FUNC,
"avg_pool3d": BUILT_IN_FUNC,
"bilinear": BUILT_IN_FUNC,
"celu_": BUILT_IN_FUNC,
"channel_shuffle": BUILT_IN_FUNC,
"native_channel_shuffle": BUILT_IN_FUNC,
"conv1d": BUILT_IN_FUNC,
"conv2d": BUILT_IN_FUNC,
"conv3d": BUILT_IN_FUNC,
"conv_tbc": BUILT_IN_FUNC,
"conv_transpose1d": BUILT_IN_FUNC,
"conv_transpose2d": BUILT_IN_FUNC,
"conv_transpose3d": BUILT_IN_FUNC,
"cosine_similarity": BUILT_IN_FUNC,
"elu_": BUILT_IN_FUNC,
"gelu": BUILT_IN_FUNC,
"hardshrink": BUILT_IN_FUNC,
"hardtanh_": BUILT_IN_FUNC,
"leaky_relu_": BUILT_IN_FUNC,
"linear": BUILT_IN_FUNC,
"logsigmoid": BUILT_IN_FUNC,
"one_hot": BUILT_IN_FUNC,
"pairwise_distance": BUILT_IN_FUNC,
"pdist": BUILT_IN_FUNC,
"pixel_shuffle": BUILT_IN_FUNC,
"pixel_unshuffle": BUILT_IN_FUNC,
"prelu": BUILT_IN_FUNC,
"relu_": BUILT_IN_FUNC,
"rrelu_": BUILT_IN_FUNC,
"selu_": BUILT_IN_FUNC,
"softplus": BUILT_IN_FUNC,
"softshrink": BUILT_IN_FUNC,
"threshold_": BUILT_IN_FUNC,
"adaptive_avg_pool2d": LEN_ERROR,
"adaptive_avg_pool3d": LEN_ERROR,
"adaptive_max_pool2d_with_indices": LEN_ERROR,
"adaptive_max_pool3d_with_indices": LEN_ERROR,
"instance_norm": CONTROL_FLOW,
"pad": LEN_ERROR,
"adaptive_max_pool1d": PROXY_ITERABLE,
"adaptive_max_pool2d": PROXY_ITERABLE,
"adaptive_max_pool3d": PROXY_ITERABLE,
"fractional_max_pool2d": PROXY_ITERABLE,
"fractional_max_pool3d": PROXY_ITERABLE,
"max_pool1d": PROXY_ITERABLE,
"max_pool2d": PROXY_ITERABLE,
"max_pool3d": PROXY_ITERABLE,
"group_norm": PROXY_ITERATED,
"lp_pool2d": PROXY_ITERATED,
"max_unpool1d": PROXY_ITERATED,
"max_unpool2d": PROXY_ITERATED,
"max_unpool3d": PROXY_ITERATED,
"adaptive_max_pool1d_with_indices": ARG_TYPE_MISMATCH,
"fractional_max_pool2d_with_indices": ARG_TYPE_MISMATCH,
"fractional_max_pool3d_with_indices": ARG_TYPE_MISMATCH,
"layer_norm": ARG_TYPE_MISMATCH,
"lp_pool1d": ARG_TYPE_MISMATCH,
"affine_grid": CONTROL_FLOW,
"alpha_dropout": CONTROL_FLOW,
"batch_norm": CONTROL_FLOW,
"binary_cross_entropy": CONTROL_FLOW,
"binary_cross_entropy_with_logits": CONTROL_FLOW,
"celu": CONTROL_FLOW,
"cosine_embedding_loss": CONTROL_FLOW,
"cross_entropy": CONTROL_FLOW,
"ctc_loss": CONTROL_FLOW,
"dropout": CONTROL_FLOW,
"dropout2d": CONTROL_FLOW,
"dropout3d": CONTROL_FLOW,
"elu": CONTROL_FLOW,
"embedding": CONTROL_FLOW,
"embedding_bag": CONTROL_FLOW,
"feature_alpha_dropout": CONTROL_FLOW,
"fold": CONTROL_FLOW,
"gaussian_nll_loss": CONTROL_FLOW,
"glu": CONTROL_FLOW,
"grid_sample": CONTROL_FLOW,
"gumbel_softmax": CONTROL_FLOW,
"hardsigmoid": CONTROL_FLOW,
"hardswish": CONTROL_FLOW,
"hardtanh": CONTROL_FLOW,
"hinge_embedding_loss": CONTROL_FLOW,
"huber_loss": CONTROL_FLOW,
"interpolate": CONTROL_FLOW,
"kl_div": CONTROL_FLOW,
"l1_loss": CONTROL_FLOW,
"leaky_relu": CONTROL_FLOW,
"local_response_norm": CONTROL_FLOW,
"margin_ranking_loss": CONTROL_FLOW,
"max_pool1d_with_indices": CONTROL_FLOW,
"max_pool2d_with_indices": CONTROL_FLOW,
"max_pool3d_with_indices": CONTROL_FLOW,
"mse_loss": CONTROL_FLOW,
"multi_head_attention_forward": CONTROL_FLOW,
"multi_margin_loss": CONTROL_FLOW,
"multilabel_margin_loss": CONTROL_FLOW,
"multilabel_soft_margin_loss": CONTROL_FLOW,
"nll_loss": CONTROL_FLOW,
"poisson_nll_loss": CONTROL_FLOW,
"relu": CONTROL_FLOW,
"relu6": CONTROL_FLOW,
"rrelu": CONTROL_FLOW,
"selu": CONTROL_FLOW,
"silu": CONTROL_FLOW,
"mish": CONTROL_FLOW,
"smooth_l1_loss": CONTROL_FLOW,
"soft_margin_loss": CONTROL_FLOW,
"threshold": CONTROL_FLOW,
"triplet_margin_loss": CONTROL_FLOW,
"triplet_margin_with_distance_loss": CONTROL_FLOW,
"unfold": CONTROL_FLOW,
"upsample": CONTROL_FLOW,
"upsample_bilinear": INTERPOLATE_ARGS_CONFLICT,
"upsample_nearest": INTERPOLATE_ARGS_CONFLICT,
"normalize" : MUTABLE,
}
# List of nn.functionals with Tensor inputs but not with type annotation
FUNCTIONALS_WITHOUT_ANNOTATION = (
"adaptive_max_pool1d",
"adaptive_max_pool2d",
"adaptive_max_pool3d",
"fractional_max_pool2d",
"fractional_max_pool3d",
"max_pool1d",
"max_pool2d",
"max_pool3d",
"gaussian_nll_loss",
"upsample",
"upsample_bilinear",
"upsample_nearest",
)
# Inconsistent behavior between Python 3.8 and other Python versions:
# - Python 3.8+: Re-raise internal exception like `PROXY_ITERATED`
# - Other Python: Raise `argument of type 'Proxy' is not iterable` due to the same
# internal exception above
# Use the following map to override the expected exception for Python 3.8
UNTRACEABLE_FUNCTIONALS_PY38 = {
"adaptive_max_pool1d": PROXY_ITERATED,
"adaptive_max_pool2d": PROXY_ITERATED,
"adaptive_max_pool3d": PROXY_ITERATED,
"fractional_max_pool2d": PROXY_ITERATED,
"fractional_max_pool3d": PROXY_ITERATED,
"max_pool1d": PROXY_ITERATED,
"max_pool2d": PROXY_ITERATED,
"max_pool3d": PROXY_ITERATED,
"group_norm": LEN_ERROR
}
@classmethod
def _get_functional(cls):
functional_list = []
for f in dir(torch.nn.functional):
if not f.islower():
continue
# Ignore internal functions
if f.startswith('_'):
continue
# Ignore supporting functions
if f in cls.IGNORE_FUNCS:
continue
fn = getattr(torch.nn.functional, f)
# Ignore non-callable object like modules
if not isinstance(fn, Callable):
continue
if f not in cls.FUNCTIONALS_WITHOUT_ANNOTATION:
try:
sig = inspect.signature(fn)
has_tensor_arg = False
for arg, param in sig.parameters.items():
if isinstance(param.annotation, type) and issubclass(param.annotation, torch.Tensor):
has_tensor_arg = True
if not has_tensor_arg:
continue
# No signature or Object is not supported
except ValueError:
pass
functional_list.append((f, fn))
return functional_list
@classmethod
def generate_test_func(cls, func_name, fn):
def functional_test(self):
if func_name in self.UNTRACEABLE_FUNCTIONALS_PY38 and \
sys.version_info >= (3, 8) and sys.version_info < (3, 10):
exc, err = self.UNTRACEABLE_FUNCTIONALS_PY38[func_name]
with self.assertRaisesRegex(exc, err):
symbolic_trace(fn)
elif func_name in self.UNTRACEABLE_FUNCTIONALS:
exc, err = self.UNTRACEABLE_FUNCTIONALS[func_name]
with self.assertRaisesRegex(exc, err):
symbolic_trace(fn)
else:
symbolic_trace(fn)
return functional_test
@classmethod
def generate_tests(cls):
functional_list = cls._get_functional()
for func_name, fn in functional_list:
test_name = "test_nn_functional_" + func_name
functional_test = cls.generate_test_func(func_name, fn)
setattr(cls, test_name, functional_test)
@classmethod
def setUpClass(cls):
def no(*args, **kwargs):
return False
for name in cls.TO_PATCH.keys():
cls.TO_PATCH[name] = getattr(torch.nn.functional, name)
setattr(torch.nn.functional, name, no)
@classmethod
def tearDownClass(cls):
for name in cls.TO_PATCH.keys():
setattr(torch.nn.functional, name, cls.TO_PATCH[name])
TestFunctionalTracing.generate_tests()
instantiate_device_type_tests(TestOperatorSignatures, globals())
@skipIfNoTorchVision
class TestVisionTracing(JitTestCase):
def setUp(self):
# Checking for mutable operations whil tracing is feature flagged
# Enable it in testing but not by default
self.orig_tracer_mutable_flag = torch.fx.proxy.TracerBase.check_mutable_operations
torch.fx.proxy.TracerBase.check_mutable_operations = True
def tearDown(self):
torch.fx.proxy.TracerBase.check_mutable_operations = self.orig_tracer_mutable_flag
PROXY_ITERATED = (TraceError, r"Proxy object cannot be iterated")
INCONSISTENT_TYPE = (
RuntimeError,
r"Return value was annotated as having type __torch__.torchvision.models[.\w]+ but is actually of type Tensor"
)
UNTRACEABLE_MODELS = {
"fasterrcnn_resnet50_fpn": PROXY_ITERATED,
"fasterrcnn_mobilenet_v3_large_320_fpn": PROXY_ITERATED,
"fasterrcnn_mobilenet_v3_large_fpn": PROXY_ITERATED,
"maskrcnn_resnet50_fpn": PROXY_ITERATED,
"keypointrcnn_resnet50_fpn": PROXY_ITERATED,
"retinanet_resnet50_fpn": PROXY_ITERATED,
}
UNSCRIPTABLE_MODELS = {
"googlenet": INCONSISTENT_TYPE,
"inception_v3": INCONSISTENT_TYPE,
}
output_transform = {
"fcn_resnet50": lambda x: x["out"],
"fcn_resnet101": lambda x: x["out"],
"deeplabv3_resnet50": lambda x: x["out"],
"deeplabv3_resnet101": lambda x: x["out"],
"deeplabv3_mobilenet_v3_large": lambda x: x["out"],
"lraspp_mobilenet_v3_large": lambda x: x["out"],
"fasterrcnn_resnet50_fpn": lambda x: x[1],
"fasterrcnn_mobilenet_v3_large_fpn": lambda x: x[1],
"fasterrcnn_mobilenet_v3_large_320_fpn": lambda x: x[1],
"maskrcnn_resnet50_fpn": lambda x: x[1],
"keypointrcnn_resnet50_fpn": lambda x: x[1],
"retinanet_resnet50_fpn": lambda x: x[1],
}
@classmethod
def generate_test_fn(cls, name, model_fn, x, kwargs):
def run_test(self):
model = model_fn(**kwargs)
model = model.eval()
if name in self.UNTRACEABLE_MODELS:
err, exc = self.UNTRACEABLE_MODELS[name]
with self.assertRaisesRegex(err, exc):
graph = symbolic_trace(model)
else:
out_transform = self.output_transform.get(name, lambda x: x)
graph : torch.fx.GraphModule = symbolic_trace(model)
a = out_transform(model(x))
b = out_transform(graph(x))
self.assertEqual(a, b)
if name in self.UNSCRIPTABLE_MODELS:
err, exc = self.UNSCRIPTABLE_MODELS[name]
with self.assertRaisesRegex(err, exc):
script = torch.jit.script(graph)
else:
script = torch.jit.script(graph)
c = out_transform(script(x))
self.assertEqual(a, c)
return run_test
@classmethod
def generate_classification_tests(cls):
for k, v in torchvision_models.__dict__.items():
if callable(v) and k[0].lower() == k[0] and k[0] != "_":
test_name = 'test_torchvision_models_' + k
x = torch.rand(1, 3, 299, 299) if k in ['inception_v3'] else torch.rand(1, 3, 224, 224)
kwargs = dict(num_classes=50)
model_test = cls.generate_test_fn(k, v, x, kwargs)
setattr(cls, test_name, model_test)
@classmethod
def generate_segmentation_tests(cls):
for k, v in torchvision_models.segmentation.__dict__.items():
if callable(v) and k[0].lower() == k[0] and k[0] != "_":
test_name = 'test_torchvision_models_segmentation_' + k
x = torch.rand(1, 3, 32, 32)
kwargs = dict(num_classes=10, pretrained_backbone=False)
model_test = cls.generate_test_fn(k, v, x, kwargs)
setattr(cls, test_name, model_test)
@classmethod
def generate_detection_tests(cls):
for k, v in torchvision_models.detection.__dict__.items():
if callable(v) and k[0].lower() == k[0] and k[0] != "_":
test_name = 'test_torchvision_models_detection_' + k
x = [torch.rand(3, 300, 300)]
kwargs = dict(num_classes=10, pretrained_backbone=False)
model_test = cls.generate_test_fn(k, v, x, kwargs)
setattr(cls, test_name, model_test)
@classmethod
def generate_video_tests(cls):
for k, v in torchvision_models.video.__dict__.items():
if callable(v) and k[0].lower() == k[0] and k[0] != "_":
test_name = 'test_torchvision_models_video_' + k
x = torch.rand(1, 3, 4, 112, 112)
kwargs = dict(num_classes=50)
model_test = cls.generate_test_fn(k, v, x, kwargs)
setattr(cls, test_name, model_test)
@classmethod
def generate_tests(cls):
cls.generate_classification_tests()
cls.generate_detection_tests()
cls.generate_segmentation_tests()
cls.generate_video_tests()
if HAS_TORCHVISION:
TestVisionTracing.generate_tests()
if __name__ == '__main__':
run_tests() | |
test_is_valid_binary_search_tree.py | import unittest
from typing import List
from is_valid_binary_search_tree import Solution, TreeNode
class TestSolution(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def | (self):
sol = Solution()
root = sol.get_tree([1],0)
self.assertTrue(sol.isValidBST(root))
def test_isValidBST_when_tree_is_BST_should_return_true(self):
sol = Solution()
root = sol.get_tree([6,2,9,1,3,8,10],0)
self.assertTrue(sol.isValidBST(root))
if __name__ == '__main__':
unittest.main() | test_isValidBST_when_tree_has_single_node_should_return_true |
netsmf.py | import numpy as np
import networkx as nx
import scipy.sparse as sp
from sklearn import preprocessing
from sklearn.utils.extmath import randomized_svd
from multiprocessing import Pool
from tqdm import tqdm
import time
from cogdl.utils import alias_draw, alias_setup
from .. import BaseModel
class NetSMF(BaseModel):
r"""The NetSMF model from the `"NetSMF: Large-Scale Network Embedding as Sparse Matrix Factorization"
<http://arxiv.org/abs/1710.02971>`_ paper.
Args:
hidden_size (int) : The dimension of node representation.
window_size (int) : The actual context size which is considered in language model.
negative (int) : The number of nagative samples in negative sampling.
num_round (int) : The number of round in NetSMF.
worker (int) : The number of workers for NetSMF.
"""
@staticmethod
def add_args(parser):
"""Add model-specific arguments to the parser."""
# fmt: off
parser.add_argument("--window-size", type=int, default=10,
help="Window size of approximate matrix. Default is 10.")
parser.add_argument("--negative", type=int, default=1,
help="Number of negative node in sampling. Default is 1.")
parser.add_argument("--num-round", type=int, default=100,
help="Number of round in NetSMF. Default is 100.")
parser.add_argument("--worker", type=int, default=10,
help="Number of parallel workers. Default is 10.")
parser.add_argument("--hidden-size", type=int, default=128)
# fmt: on
@classmethod
def build_model_from_args(cls, args):
return cls(
args.hidden_size,
args.window_size,
args.negative,
args.num_round,
args.worker,
)
def __init__(self, dimension, window_size, negative, num_round, worker):
super(NetSMF, self).__init__()
self.dimension = dimension
self.window_size = window_size
self.negative = negative
self.worker = worker
self.num_round = num_round
def train(self, graph, return_dict=False):
return self.forward(graph, return_dict)
def forward(self, graph, return_dict=False):
self.G = graph.to_networkx()
node2id = dict([(node, vid) for vid, node in enumerate(self.G.nodes())])
self.is_directed = nx.is_directed(self.G)
self.num_node = self.G.number_of_nodes()
self.num_edge = self.G.number_of_edges()
self.edges = [[node2id[e[0]], node2id[e[1]]] for e in self.G.edges()]
id2node = dict(zip(node2id.values(), node2id.keys()))
self.num_neigh = np.asarray([len(list(self.G.neighbors(id2node[i]))) for i in range(self.num_node)])
self.neighbors = [[node2id[v] for v in self.G.neighbors(id2node[i])] for i in range(self.num_node)]
s = time.time()
self.alias_nodes = {}
self.node_weight = {}
for i in range(self.num_node):
unnormalized_probs = [self.G[id2node[i]][nbr].get("weight", 1.0) for nbr in self.G.neighbors(id2node[i])]
norm_const = sum(unnormalized_probs)
normalized_probs = [float(u_prob) / norm_const for u_prob in unnormalized_probs]
self.alias_nodes[i] = alias_setup(normalized_probs)
self.node_weight[i] = dict(
zip(
[node2id[nbr] for nbr in self.G.neighbors(id2node[i])],
unnormalized_probs,
)
)
t = time.time()
print("alias_nodes", t - s)
# run netsmf algorithm with multiprocessing and apply randomized svd
print("number of sample edges ", self.num_round * self.num_edge * self.window_size)
print("random walk start...")
t0 = time.time()
results = []
pool = Pool(processes=self.worker)
for i in range(self.worker):
results.append(pool.apply_async(func=self._random_walk_matrix, args=(i,)))
pool.close()
pool.join()
print("random walk time", time.time() - t0)
matrix = sp.csr_matrix((self.num_node, self.num_node))
A = sp.csr_matrix(nx.adjacency_matrix(self.G))
degree = sp.diags(np.array(A.sum(axis=0))[0], format="csr")
degree_inv = degree.power(-1)
t1 = time.time()
for res in results:
matrix += res.get()
t2 = time.time()
print("construct random walk matrix time", time.time() - t1)
L = sp.csgraph.laplacian(matrix, normed=False, return_diag=False)
M = degree_inv.dot(degree - L).dot(degree_inv)
M = M * A.sum() / self.negative
M.data[M.data <= 1] = 1
M.data = np.log(M.data)
M.eliminate_zeros()
print("number of nzz", M.nnz)
print("construct matrix sparsifier time", time.time() - t2)
embeddings = self._get_embedding_rand(M)
if return_dict:
features_matrix = dict()
for vid, node in enumerate(self.G.nodes()):
features_matrix[node] = embeddings[vid]
else:
features_matrix = np.zeros((graph.num_nodes, embeddings.shape[1]))
nx_nodes = self.G.nodes()
features_matrix[nx_nodes] = embeddings[np.arange(graph.num_nodes)]
return features_matrix
def _get_embedding_rand(self, matrix):
# Sparse randomized tSVD for fast embedding
|
def _path_sampling(self, u, v, r):
# sample a r-length path from edge(u, v) and return path end node
k = np.random.randint(r) + 1
zp, rand_u, rand_v = 2.0 / self.node_weight[u][v], k - 1, r - k
for i in range(rand_u):
new_u = self.neighbors[u][alias_draw(self.alias_nodes[u][0], self.alias_nodes[u][1])]
zp += 2.0 / self.node_weight[u][new_u]
u = new_u
for j in range(rand_v):
new_v = self.neighbors[v][alias_draw(self.alias_nodes[v][0], self.alias_nodes[v][1])]
zp += 2.0 / self.node_weight[v][new_v]
v = new_v
return u, v, zp
def _random_walk_matrix(self, pid):
# construct matrix based on random walk
np.random.seed(pid)
matrix = sp.lil_matrix((self.num_node, self.num_node))
for i in tqdm(range(self.num_edge * self.num_round // self.worker)):
u, v = self.edges[i % self.num_edge]
if not self.is_directed and np.random.rand() > 0.5:
v, u = u, v
for r in range(1, self.window_size + 1):
u_, v_, zp = self._path_sampling(u, v, r)
matrix[u_, v_] += 2 * r / self.window_size / self.num_round / zp
return matrix.tocsr()
| t1 = time.time()
l = matrix.shape[0] # noqa E741
smat = sp.csc_matrix(matrix)
print("svd sparse", smat.data.shape[0] * 1.0 / l ** 2)
U, Sigma, VT = randomized_svd(smat, n_components=self.dimension, n_iter=5, random_state=None)
U = U * np.sqrt(Sigma)
U = preprocessing.normalize(U, "l2")
print("sparsesvd time", time.time() - t1)
return U |
source.go | // Copyright 2020 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package importer
import (
"compress/gzip"
"net/url"
"regexp"
"strings"
"github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/common/domain"
"github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/common/utils/param"
"github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/common/utils/storage"
"github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/daisycommon"
"github.com/GoogleCloudPlatform/compute-image-tools/daisy"
)
// Source is a resource that can be imported to GCE disk images. If an instance of this
// interface exists, it is expected that validation has already occurred,
// and that the caller can safely use the resource.
//
//go:generate go run github.com/golang/mock/mockgen -package imagemocks -source $GOFILE -destination mocks/source_mocks.go
type Source interface {
Path() string
}
// SourceFactory takes the sourceFile and sourceImage specified by the user
// and determines which, if any, is importable. It is an error if both sourceFile and
// sourceImage are specified.
type SourceFactory interface {
Init(sourceFile, sourceImage string) (Source, error)
}
// NewSourceFactory returns an instance of SourceFactory.
func NewSourceFactory(storageClient domain.StorageClientInterface) SourceFactory {
return sourceFactory{storageClient: storageClient}
}
type sourceFactory struct {
storageClient domain.StorageClientInterface
}
func (factory sourceFactory) Init(sourceFile, sourceImage string) (Source, error) {
sourceFile = strings.TrimSpace(sourceFile)
sourceImage = strings.TrimSpace(sourceImage)
if sourceFile == "" && sourceImage == "" {
return nil, daisy.Errf(
"either -source_file or -source_image has to be specified")
}
if sourceFile != "" && sourceImage != "" {
return nil, daisy.Errf(
"either -source_file or -source_image has to be specified, but not both %v %v",
sourceFile, sourceImage)
}
if sourceFile != "" {
return newFileSource(sourceFile, factory.storageClient)
}
return newImageSource(sourceImage)
}
// Whether the resource is a file in GCS.
func isFile(s Source) bool {
_, ok := s.(fileSource)
return ok
}
// Whether the resource is a GCE image.
func | (s Source) bool {
_, ok := s.(imageSource)
return ok
}
// An importable source backed by a GCS object.
type fileSource struct {
gcsPath string
bucket string
object string
}
// Create a fileSource from a gcsPath to a disk image. This method uses storageClient
// to read a few bytes from the file. It is an error if the file is empty, or if
// the file is compressed with gzip.
func newFileSource(gcsPath string, storageClient domain.StorageClientInterface) (Source, error) {
sourceBucketName, sourceObjectName, err := storage.GetGCSObjectPathElements(gcsPath)
if err != nil {
return nil, err
}
source := fileSource{
gcsPath: gcsPath,
bucket: sourceBucketName,
object: sourceObjectName,
}
return source, source.validate(storageClient)
}
// The resource path for fileSource is its GCS path.
func (s fileSource) Path() string {
return s.gcsPath
}
// Performs basic validation, focusing on error cases that we've seen in the past.
// This reads a few bytes from the file in GCS. It is an error if the file
// is empty, or if the file is compressed with gzip.
func (s fileSource) validate(storageClient domain.StorageObjectCreatorInterface) error {
rc, err := storageClient.GetObject(s.bucket, s.object).NewReader()
if err != nil {
return daisy.Errf("failed to read GCS file when validating resource file: unable to open "+
"file from bucket %q, file %q: %v", s.bucket, s.object, err)
}
defer rc.Close()
byteCountingReader := daisycommon.NewByteCountingReader(rc)
// Detect whether it's a compressed file by extracting compressed file header
if _, err = gzip.NewReader(byteCountingReader); err == nil {
return daisy.Errf("the input file is a gzip file, which is not supported by " +
"image import. To import a file that was exported from Google Compute " +
"Engine, please use image create. To import a file that was exported " +
"from a different system, decompress it and run image import on the " +
"disk image file directly")
}
// By calling gzip.NewReader above, a few bytes were read from the Reader in
// an attempt to decode the compression header. If the Reader represents
// an empty file, then BytesRead will be zero.
if byteCountingReader.BytesRead <= 0 {
return daisy.Errf("cannot import an image from an empty file")
}
return nil
}
// An importable source backed by a GCE disk image.
type imageSource struct {
uri string
}
// Creates an imageSource from a reference to a GCE disk image. The syntax of the
// reference is validated, but no I/O is performed to determine whether the image
// exists or whether the calling user has access to it.
func newImageSource(imagePath string) (Source, error) {
source := imageSource{
uri: param.GetGlobalResourcePath("images", imagePath),
}
return source, source.validate()
}
var imageNamePattern = regexp.MustCompile("^[a-z]([-a-z0-9]*[a-z0-9])?$")
// Performs basic validation, focusing on error cases that
// we've seen in the past. Specifically:
// 1. Using GCS paths, eg `gs://bucket/image.vmdk`
// 2. Referencing a file, eg `image.vmdk`
//
// This method does not validate:
// 1. Whether the image exists.
// 2. Whether the calling user has access to it.
// 3. Whether the user's input is a well-formed
// [GCP resource URI](https://cloud.google.com/apis/design/resource_names)
func (s imageSource) validate() error {
parsed, err := url.Parse(s.uri)
if err != nil {
return err
}
if parsed.Scheme != "" {
return daisy.Errf(
"invalid image reference %q.", s.uri)
}
var imageName string
if slash := strings.LastIndex(s.uri, "/"); slash > -1 {
imageName = s.uri[slash+1:]
} else {
imageName = s.uri
}
if imageName == "" || len(imageName) > 63 {
return daisy.Errf(
"invalid image name %q. Image name must be 1-63 characters long, inclusive", imageName)
}
if !imageNamePattern.MatchString(imageName) {
return daisy.Errf(
"invalid image name %q. The first character must be a lowercase letter, and all "+
"following characters must be a dash, lowercase letter, or digit, except the last "+
"character, which cannot be a dash.", imageName)
}
return nil
}
// The path to an imageSource is a fully-qualified global GCP resource path.
func (s imageSource) Path() string {
return s.uri
}
| isImage |
msequence.py | #
# msequence.py
# Created by pira on 2017/07/28.
#
#coding: utf-8
u"""For M-Sequence."""
import numpy as np
def generateM(N):
u"""Create M-Sequence.
@param N : length 2**N-1
@return m : M-Sequence
"""
p = pow(2, N)
m = [0] * (p-1)
for i in np.arange(1,p,2):
f = p^i
a = p
#i = int()
for j in np.arange(N, p):
if (a&p) == p:
|
if a == 1:
break
a <<= 1
if j == p-1:
init = 1
lfsr = init & (p-1)
f >>= 1
for k in np.arange(0, p-1):
lfsr = (lfsr>>1)^(-(int)(lfsr&1) & f)
m[k] = (lfsr&1) * 2-1
return m
#test
#m = generateM(3)
#print(m) | a ^= f |
synchronizer_test.go | /*
Copyright 2021 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package docker
import (
"context"
"fmt"
"os"
"sort"
"github.com/gravitational/gravity/lib/archive"
"github.com/gravitational/gravity/lib/loc"
"github.com/gravitational/gravity/lib/utils"
. "gopkg.in/check.v1"
dockerapi "github.com/fsouza/go-dockerclient"
"github.com/sirupsen/logrus"
)
// Set up a separate Suite for this test so we can use SetUp/TearDown phases
type DockerSuite struct {
client *dockerapi.Client
helper *Synchronizer
src, dst *registryHelper
}
func (s *DockerSuite) SetUpTest(c *C) {
var err error
s.client, err = NewClientFromEnv()
c.Assert(err, IsNil)
s.helper = NewSynchronizer(logrus.New(), s.client, utils.DiscardProgress)
// Set up source and destination registries
s.src = newRegistry(c.MkDir(), s.helper, c)
s.dst = newRegistry(c.MkDir(), s.helper, c)
}
func (s *DockerSuite) TearDownTest(*C) {
s.src.r.Close()
s.dst.r.Close()
}
func (s *DockerSuite) listTags(repository string, c *C) (tags map[string]bool) {
opts := dockerapi.ListImagesOptions{Filters: map[string][]string{
"reference": {repository},
}}
images, err := s.client.ListImages(opts)
c.Assert(err, IsNil)
tags = make(map[string]bool)
for _, image := range images {
for _, imageName := range image.RepoTags {
dockerImage, err := loc.ParseDockerImage(imageName)
c.Assert(err, IsNil)
tags[dockerImage.Tag] = true
}
}
return tags
}
// newRegistry returns a new started docker registry
func newRegistry(dir string, s *Synchronizer, c *C) *registryHelper {
config := BasicConfiguration("127.0.0.1:0", dir)
r, err := NewRegistry(config)
c.Assert(err, IsNil)
c.Assert(r.Start(), IsNil)
return ®istryHelper{
r: r,
dir: dir,
info: RegistryInfo{
Address: r.Addr(),
Protocol: "http",
},
helper: s,
}
}
func generateDockerImage(client *dockerapi.Client, repoName, tag string, c *C) loc.DockerImage {
image := loc.DockerImage{
Repository: repoName,
Tag: tag,
}
imageName := image.String()
files := make([]*archive.Item, 0)
files = append(files, archive.ItemFromStringMode("version.txt", tag, 0666))
dockerFile := "FROM scratch\nCOPY version.txt .\n"
files = append(files, archive.ItemFromStringMode("Dockerfile", dockerFile, 0666))
r := archive.MustCreateMemArchive(files)
c.Assert(client.BuildImage(dockerapi.BuildImageOptions{
Name: imageName,
InputStream: r,
OutputStream: os.Stdout,
}), IsNil)
return image
}
func generateDockerImages(client *dockerapi.Client, repoName string, size int, c *C) []loc.DockerImage |
func (s *DockerSuite) removeImages(images []loc.DockerImage) {
for _, image := range images {
// Error is ignored since this is a best-effort cleanup
_ = s.client.RemoveImage(image.String())
}
}
func (s *DockerSuite) removeTaggedImages(registryAddr string, images []loc.DockerImage) {
for _, image := range images {
// Error is ignored since this is a best-effort cleanup
image.Registry = registryAddr
_ = s.client.RemoveImage(image.String())
}
}
func (r *registryHelper) push(image loc.DockerImage, c *C) {
c.Assert(r.helper.Push(image.String(), r.r.Addr()), IsNil)
}
func (r *registryHelper) pushImages(images []loc.DockerImage, c *C) {
for _, image := range images {
r.push(image, c)
}
}
type registryHelper struct {
dir string
r *Registry
info RegistryInfo
helper *Synchronizer
}
func splitAsTagsAndImages(images []loc.DockerImage, regAddr string) (tags, exportedImages []string) {
for _, image := range images {
tags = append(tags, image.Tag)
exportedImage := image
exportedImage.Registry = regAddr
exportedImages = append(exportedImages, exportedImage.String())
}
sort.Strings(tags)
return tags, exportedImages
}
const imageRepository = "test/image"
var _ = Suite(&DockerSuite{})
func (s *DockerSuite) TestPullAndPushImages(c *C) {
// Setup
const dockerImageSize = 6
dockerImages := generateDockerImages(s.client, imageRepository, dockerImageSize, c)
defer s.removeImages(dockerImages)
defer s.removeTaggedImages(s.src.info.Address, dockerImages)
// the first 3 docker images are pushed to both registries
var pushedDockerTags []string
for _, image := range dockerImages[:3] {
s.src.push(image, c)
s.dst.push(image, c)
pushedDockerTags = append(pushedDockerTags, image.Tag)
}
sort.Strings(pushedDockerTags)
// the last docker images are pushed only to the source registry
var unpushedDockerTags []string
for _, image := range dockerImages[3:] {
s.src.push(image, c)
unpushedDockerTags = append(unpushedDockerTags, image.Tag)
}
allDockerTags, exportedImages := splitAsTagsAndImages(dockerImages, s.src.r.Addr())
srcImageRepository := fmt.Sprintf("%s/%s", s.src.r.Addr(), imageRepository)
localImageTags := s.listTags(srcImageRepository, c)
// generated docker images should not be in the local docker registry
for _, tag := range allDockerTags {
if localImageTags[tag] {
c.Errorf("image %s:%s should not be in the local docker registry", imageRepository, tag)
}
}
// all docker images should be in the source docker registry
srcTags, err := s.helper.ImageTags(context.Background(), s.src.info.GetURL(), imageRepository)
c.Assert(err, IsNil)
sort.Strings(srcTags)
c.Assert(srcTags, DeepEquals, allDockerTags)
// only pushed docker images should be in the target docker registry
dstTags, err := s.helper.ImageTags(context.Background(), s.dst.info.GetURL(), imageRepository)
c.Assert(err, IsNil)
sort.Strings(dstTags)
c.Assert(dstTags, DeepEquals, pushedDockerTags)
// export images
err = s.helper.PullAndExportImages(context.Background(), exportedImages, s.dst.info, false, dockerImageSize)
c.Assert(err, IsNil)
// Validate: this is where actual validation starts
// relist tags
localImageTags = s.listTags(srcImageRepository, c)
// only unpushed docker images should not be in the local docker registry
for _, tag := range unpushedDockerTags {
if !localImageTags[tag] {
c.Errorf("image %s:%s should be in the local docker registry", srcImageRepository, tag)
}
}
for _, tag := range pushedDockerTags {
if localImageTags[tag] {
c.Errorf("image %s:%s should not be in the local docker registry", srcImageRepository, tag)
}
}
// all docker images should be in the target docker registry
dstTags, err = s.helper.ImageTags(context.Background(), s.dst.info.GetURL(), imageRepository)
c.Assert(err, IsNil)
sort.Strings(dstTags)
c.Assert(dstTags, DeepEquals, allDockerTags)
}
| {
// Use a predictable tagging scheme
imageTag := func(i int) string {
return fmt.Sprintf("v0.0.%d", i)
}
images := make([]loc.DockerImage, 0, size)
for i := 0; i < size; i++ {
image := generateDockerImage(client, repoName, imageTag(i), c)
images = append(images, image)
}
return images
} |
flat_map.rs | // Copyright Materialize, Inc. All rights reserved.
//
// Use of this software is governed by the Business Source License
// included in the LICENSE file.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.
use differential_dataflow::Collection;
use timely::dataflow::Scope;
use dataflow_types::*;
use expr::MirRelationExpr;
use repr::{Datum, Row, RowArena};
use crate::operator::StreamExt;
use crate::render::context::Context;
use crate::render::datum_vec::DatumVec;
impl<G> Context<G, MirRelationExpr, Row, repr::Timestamp>
where
G: Scope<Timestamp = repr::Timestamp>,
{
/// Renders `relation_expr` followed by `map_filter_project` if provided.
pub fn render_flat_map(
&mut self,
relation_expr: &MirRelationExpr,
map_filter_project: Option<expr::MfpPlan>,
) -> (Collection<G, Row>, Collection<G, DataflowError>) {
if let MirRelationExpr::FlatMap {
input,
func,
exprs,
demand,
} = relation_expr
{
let func = func.clone();
let exprs = exprs.clone();
// Determine for each output column if it should be replaced by a
// small default value. This information comes from the "demand"
// analysis, and is meant to allow us to avoid reproducing the
// input in each output, if at all possible.
let types = relation_expr.typ();
let arity = types.column_types.len();
let replace = (0..arity)
.map(|col| !demand.as_ref().map(|d| d.contains(&col)).unwrap_or(true))
.collect::<Vec<_>>();
let (ok_collection, err_collection) = self.collection(input).unwrap();
let (oks, errs) = ok_collection.inner.flat_map_fallible({
let mut datums = DatumVec::new();
let mut row_packer = repr::Row::default();
move |(input_row, time, diff)| {
let temp_storage = RowArena::new();
// Unpack datums and capture its length (to rewind MFP eval).
let mut datums_local = datums.borrow_with(&input_row);
let datums_len = datums_local.len();
let exprs = exprs
.iter()
.map(|e| e.eval(&datums_local, &temp_storage))
.collect::<Result<Vec<_>, _>>();
let exprs = match exprs {
Ok(exprs) => exprs,
Err(e) => return vec![(Err((e.into(), time, diff)))],
};
let output_rows = func.eval(exprs, &temp_storage);
// Blank out entries in `datum` here, for simplicity later on.
for index in 0..datums_len {
if replace[index] {
datums_local[index] = Datum::Dummy;
}
}
// Declare borrows outside the closure so that appropriately lifetimed
// borrows are moved in and used by `mfp.evaluate`.
let map_filter_project = &map_filter_project;
let row_packer = &mut row_packer;
let temp_storage = &temp_storage;
let replace = &replace;
if let Some(mfp) = map_filter_project {
output_rows
.iter()
.flat_map(move |(output_row, r)| {
// Remove any additional columns added in prior evaluation.
datums_local.truncate(datums_len);
// Extend datums with additional columns, replace some with dummy values.
datums_local.extend(output_row.iter());
for index in datums_len..datums_local.len() {
if replace[index] {
datums_local[index] = Datum::Dummy;
}
}
mfp.evaluate(&mut datums_local, temp_storage, time, diff * *r)
.map(|x| x.map_err(|(e, t, r)| (DataflowError::from(e), t, r)))
})
.collect::<Vec<_>>()
} else {
output_rows
.iter()
.map(move |(output_row, r)| {
Ok((
{
row_packer.extend(
datums_local
.iter()
.cloned()
.chain(output_row.iter())
.zip(replace.iter())
.map(
|(datum, replace)| {
if *replace {
Datum::Dummy
} else {
datum
}
},
),
);
row_packer.finish_and_reuse()
},
time,
diff * *r,
))
})
.collect::<Vec<_>>()
}
// The collection avoids the lifetime issues of the `datums` borrow,
// which allows us to avoid multiple unpackings of `input_row`. We
// could avoid this allocation with a custom iterator that understands
// the borrowing, but it probably isn't the leading order issue here.
}
});
use differential_dataflow::AsCollection;
let ok_collection = oks.as_collection(); | } else {
panic!("Non-FlatMap expression provided to `render_flat_map`");
}
}
} | let new_err_collection = errs.as_collection();
let err_collection = err_collection.concat(&new_err_collection);
(ok_collection, err_collection) |
virtual_machine_scale_set_py3.py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from .resource_py3 import Resource
class VirtualMachineScaleSet(Resource):
"""Describes a Virtual Machine Scale Set.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
:param sku: The virtual machine scale set sku.
:type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku
:param plan: Specifies information about the marketplace image used to
create the virtual machine. This element is only used for marketplace
images. Before you can use a marketplace image from an API, you must
enable the image for programmatic use. In the Azure portal, find the
marketplace image that you want to use and then click **Want to deploy
programmatically, Get Started ->**. Enter any required information and
then click **Save**.
:type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan
:param upgrade_policy: The upgrade policy.
:type upgrade_policy: ~azure.mgmt.compute.v2018_06_01.models.UpgradePolicy
:param virtual_machine_profile: The virtual machine profile.
:type virtual_machine_profile:
~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMProfile
:ivar provisioning_state: The provisioning state, which only appears in
the response.
:vartype provisioning_state: str
:param overprovision: Specifies whether the Virtual Machine Scale Set
should be overprovisioned.
:type overprovision: bool
:ivar unique_id: Specifies the ID which uniquely identifies a Virtual
Machine Scale Set.
:vartype unique_id: str
:param single_placement_group: When true this limits the scale set to a
single placement group, of max size 100 virtual machines.
:type single_placement_group: bool
:param zone_balance: Whether to force strictly even Virtual Machine
distribution cross x-zones in case there is zone outage.
:type zone_balance: bool
:param platform_fault_domain_count: Fault Domain count for each placement
group.
:type platform_fault_domain_count: int
:param identity: The identity of the virtual machine scale set, if
configured.
:type identity:
~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIdentity
:param zones: The virtual machine scale set zones.
:type zones: list[str]
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'provisioning_state': {'readonly': True},
'unique_id': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'sku', 'type': 'Sku'},
'plan': {'key': 'plan', 'type': 'Plan'},
'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'},
'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'overprovision': {'key': 'properties.overprovision', 'type': 'bool'},
'unique_id': {'key': 'properties.uniqueId', 'type': 'str'},
'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'},
'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'},
'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'},
'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'},
'zones': {'key': 'zones', 'type': '[str]'},
}
def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, zone_balance: bool=None, platform_fault_domain_count: int=None, identity=None, zones=None, **kwargs) -> None:
| super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs)
self.sku = sku
self.plan = plan
self.upgrade_policy = upgrade_policy
self.virtual_machine_profile = virtual_machine_profile
self.provisioning_state = None
self.overprovision = overprovision
self.unique_id = None
self.single_placement_group = single_placement_group
self.zone_balance = zone_balance
self.platform_fault_domain_count = platform_fault_domain_count
self.identity = identity
self.zones = zones |
|
migrate_v2.go | package cache
import (
"context"
"io"
"os"
"time"
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/leases"
"github.com/containerd/containerd/snapshots"
"github.com/moby/buildkit/cache/metadata"
"github.com/moby/buildkit/snapshot"
"github.com/moby/buildkit/util/bklog"
digest "github.com/opencontainers/go-digest"
"github.com/pkg/errors"
)
func migrateChainID(si *metadata.StorageItem, all map[string]*metadata.StorageItem) (digest.Digest, digest.Digest, error) {
diffID := digest.Digest(getDiffID(si))
if diffID == "" {
return "", "", nil
}
blobID := digest.Digest(getBlob(si))
if blobID == "" {
return "", "", nil
}
chainID := digest.Digest(getChainID(si))
blobChainID := digest.Digest(getBlobChainID(si))
if chainID != "" && blobChainID != "" {
return chainID, blobChainID, nil
}
chainID = diffID
blobChainID = digest.FromBytes([]byte(blobID + " " + diffID))
parent := getParent(si)
if parent != "" {
pChainID, pBlobChainID, err := migrateChainID(all[parent], all)
if err != nil {
return "", "", err
}
chainID = digest.FromBytes([]byte(pChainID + " " + chainID))
blobChainID = digest.FromBytes([]byte(pBlobChainID + " " + blobChainID))
}
queueChainID(si, chainID.String())
queueBlobChainID(si, blobChainID.String())
return chainID, blobChainID, si.Commit()
}
func MigrateV2(ctx context.Context, from, to string, cs content.Store, s snapshot.Snapshotter, lm leases.Manager) error {
_, err := os.Stat(to)
if err != nil {
if !errors.Is(err, os.ErrNotExist) {
return errors.WithStack(err)
}
} else {
return nil
}
_, err = os.Stat(from)
if err != nil {
if !errors.Is(err, os.ErrNotExist) {
return errors.WithStack(err)
}
return nil
}
tmpPath := to + ".tmp"
tmpFile, err := os.Create(tmpPath)
if err != nil {
return errors.WithStack(err)
}
src, err := os.Open(from)
if err != nil {
tmpFile.Close()
return errors.WithStack(err)
}
if _, err = io.Copy(tmpFile, src); err != nil {
tmpFile.Close()
src.Close()
return errors.Wrapf(err, "failed to copy db for migration")
}
src.Close()
tmpFile.Close()
md, err := metadata.NewStore(tmpPath)
if err != nil {
return err
}
items, err := md.All()
if err != nil {
return err
}
byID := map[string]*metadata.StorageItem{}
for _, item := range items {
byID[item.ID()] = item
}
// add committed, parent, snapshot
for id, item := range byID {
em := getEqualMutable(item)
if em == "" {
info, err := s.Stat(ctx, id)
if err != nil {
return err
}
if info.Kind == snapshots.KindCommitted {
queueCommitted(item)
}
if info.Parent != "" {
queueParent(item, info.Parent)
}
} else {
queueCommitted(item)
}
queueSnapshotID(item, id)
item.Commit()
}
for _, item := range byID {
em := getEqualMutable(item)
if em != "" {
if getParent(item) == "" {
queueParent(item, getParent(byID[em]))
item.Commit()
}
}
}
type diffPair struct {
Blobsum string
DiffID string
}
// move diffID, blobsum to new location
for _, item := range byID {
v := item.Get("blobmapping.blob")
if v == nil {
continue
}
var blob diffPair
if err := v.Unmarshal(&blob); err != nil {
return errors.WithStack(err)
}
if _, err := cs.Info(ctx, digest.Digest(blob.Blobsum)); err != nil {
continue
}
queueDiffID(item, blob.DiffID)
queueBlob(item, blob.Blobsum)
queueMediaType(item, images.MediaTypeDockerSchema2LayerGzip)
if err := item.Commit(); err != nil {
return err
}
}
// calculate new chainid/blobsumid
for _, item := range byID {
if _, _, err := migrateChainID(item, byID); err != nil {
return err
}
}
ctx = context.TODO() // no cancellation allowed pass this point
// add new leases
for _, item := range byID {
l, err := lm.Create(ctx, func(l *leases.Lease) error {
l.ID = item.ID()
l.Labels = map[string]string{
"containerd.io/gc.flat": time.Now().UTC().Format(time.RFC3339Nano),
}
return nil
})
if err != nil {
// if we are running the migration twice
if errors.Is(err, errdefs.ErrAlreadyExists) {
continue
}
return errors.Wrap(err, "failed to create lease")
}
if err := lm.AddResource(ctx, l, leases.Resource{
ID: getSnapshotID(item),
Type: "snapshots/" + s.Name(),
}); err != nil { |
if blobID := getBlob(item); blobID != "" {
if err := lm.AddResource(ctx, l, leases.Resource{
ID: blobID,
Type: "content",
}); err != nil {
return errors.Wrapf(err, "failed to add blob %s to lease", item.ID())
}
}
}
// remove old root labels
for _, item := range byID {
em := getEqualMutable(item)
if em == "" {
if _, err := s.Update(ctx, snapshots.Info{
Name: getSnapshotID(item),
}, "labels.containerd.io/gc.root"); err != nil {
if !errors.Is(err, errdefs.ErrNotFound) {
return err
}
}
if blob := getBlob(item); blob != "" {
if _, err := cs.Update(ctx, content.Info{
Digest: digest.Digest(blob),
}, "labels.containerd.io/gc.root"); err != nil {
return err
}
}
}
}
// previous implementation can leak views, just clean up all views
err = s.Walk(ctx, func(ctx context.Context, info snapshots.Info) error {
if info.Kind == snapshots.KindView {
if _, err := s.Update(ctx, snapshots.Info{
Name: info.Name,
}, "labels.containerd.io/gc.root"); err != nil {
if !errors.Is(err, errdefs.ErrNotFound) {
return err
}
}
}
return nil
})
if err != nil {
return err
}
// switch to new DB
if err := md.Close(); err != nil {
return err
}
if err := os.Rename(tmpPath, to); err != nil {
return err
}
for _, item := range byID {
bklog.G(ctx).Infof("migrated %s parent:%q snapshot:%v committed:%v blob:%v diffid:%v chainID:%v blobChainID:%v",
item.ID(), getParent(item), getSnapshotID(item), getCommitted(item), getBlob(item), getDiffID(item), getChainID(item), getBlobChainID(item))
}
return nil
} | return errors.Wrapf(err, "failed to add snapshot %s to lease", item.ID())
} |
firewallpolicies.go | package network
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/tracing"
"net/http"
)
// FirewallPoliciesClient is the network Client
type FirewallPoliciesClient struct {
BaseClient
}
// NewFirewallPoliciesClient creates an instance of the FirewallPoliciesClient client.
func NewFirewallPoliciesClient(subscriptionID string) FirewallPoliciesClient {
return NewFirewallPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewFirewallPoliciesClientWithBaseURI creates an instance of the FirewallPoliciesClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) FirewallPoliciesClient {
return FirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate creates or updates the specified Firewall Policy.
// Parameters:
// resourceGroupName - the name of the resource group.
// firewallPolicyName - the name of the Firewall Policy.
// parameters - parameters supplied to the create or update Firewall Policy operation.
func (client FirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy) (result FirewallPoliciesCreateOrUpdateFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, firewallPolicyName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
return
}
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
return
}
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client FirewallPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy) (*http.Request, error) {
pathParameters := map[string]interface{}{
"firewallPolicyName": autorest.Encode("path", firewallPolicyName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2019-07-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
parameters.Etag = nil
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) CreateOrUpdateSender(req *http.Request) (future FirewallPoliciesCreateOrUpdateFuture, err error) {
var resp *http.Response
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client FirewallPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result FirewallPolicy, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Delete deletes the specified Firewall Policy.
// Parameters:
// resourceGroupName - the name of the resource group.
// firewallPolicyName - the name of the Firewall Policy.
func (client FirewallPoliciesClient) Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result FirewallPoliciesDeleteFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.DeletePreparer(ctx, resourceGroupName, firewallPolicyName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Delete", nil, "Failure preparing request")
return
}
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Delete", result.Response(), "Failure sending request")
return
}
return
}
// DeletePreparer prepares the Delete request.
func (client FirewallPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"firewallPolicyName": autorest.Encode("path", firewallPolicyName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2019-07-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) DeleteSender(req *http.Request) (future FirewallPoliciesDeleteFuture, err error) {
var resp *http.Response
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client FirewallPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
return
}
// Get gets the specified Firewall Policy.
// Parameters:
// resourceGroupName - the name of the resource group.
// firewallPolicyName - the name of the Firewall Policy.
// expand - expands referenced resources.
func (client FirewallPoliciesClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, expand string) (result FirewallPolicy, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.Get")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.GetPreparer(ctx, resourceGroupName, firewallPolicyName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Get", nil, "Failure preparing request")
return
}
resp, err := client.GetSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Get", resp, "Failure sending request")
return
}
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Get", resp, "Failure responding to request")
}
return
}
// GetPreparer prepares the Get request.
func (client FirewallPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, expand string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"firewallPolicyName": autorest.Encode("path", firewallPolicyName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2019-07-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
if len(expand) > 0 {
queryParameters["$expand"] = autorest.Encode("query", expand)
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) GetSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client FirewallPoliciesClient) GetResponder(resp *http.Response) (result FirewallPolicy, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// List lists all Firewall Policies in a resource group.
// Parameters:
// resourceGroupName - the name of the resource group.
func (client FirewallPoliciesClient) List(ctx context.Context, resourceGroupName string) (result FirewallPolicyListResultPage, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.List")
defer func() {
sc := -1
if result.fplr.Response.Response != nil |
tracing.EndSpan(ctx, sc, err)
}()
}
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "List", nil, "Failure preparing request")
return
}
resp, err := client.ListSender(req)
if err != nil {
result.fplr.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "List", resp, "Failure sending request")
return
}
result.fplr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "List", resp, "Failure responding to request")
}
return
}
// ListPreparer prepares the List request.
func (client FirewallPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2019-07-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) ListSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
// closes the http.Response Body.
func (client FirewallPoliciesClient) ListResponder(resp *http.Response) (result FirewallPolicyListResult, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// listNextResults retrieves the next set of results, if any.
func (client FirewallPoliciesClient) listNextResults(ctx context.Context, lastResults FirewallPolicyListResult) (result FirewallPolicyListResult, err error) {
req, err := lastResults.firewallPolicyListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listNextResults", nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.ListSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listNextResults", resp, "Failure sending next results request")
}
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listNextResults", resp, "Failure responding to next results request")
}
return
}
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client FirewallPoliciesClient) ListComplete(ctx context.Context, resourceGroupName string) (result FirewallPolicyListResultIterator, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.List")
defer func() {
sc := -1
if result.Response().Response.Response != nil {
sc = result.page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
result.page, err = client.List(ctx, resourceGroupName)
return
}
// ListAll gets all the Firewall Policies in a subscription.
func (client FirewallPoliciesClient) ListAll(ctx context.Context) (result FirewallPolicyListResultPage, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.ListAll")
defer func() {
sc := -1
if result.fplr.Response.Response != nil {
sc = result.fplr.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "ListAll", nil, "Failure preparing request")
return
}
resp, err := client.ListAllSender(req)
if err != nil {
result.fplr.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "ListAll", resp, "Failure sending request")
return
}
result.fplr, err = client.ListAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "ListAll", resp, "Failure responding to request")
}
return
}
// ListAllPreparer prepares the ListAll request.
func (client FirewallPoliciesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
pathParameters := map[string]interface{}{
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2019-07-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/firewallPolicies", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) ListAllSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
// closes the http.Response Body.
func (client FirewallPoliciesClient) ListAllResponder(resp *http.Response) (result FirewallPolicyListResult, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// listAllNextResults retrieves the next set of results, if any.
func (client FirewallPoliciesClient) listAllNextResults(ctx context.Context, lastResults FirewallPolicyListResult) (result FirewallPolicyListResult, err error) {
req, err := lastResults.firewallPolicyListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listAllNextResults", nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.ListAllSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listAllNextResults", resp, "Failure sending next results request")
}
result, err = client.ListAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listAllNextResults", resp, "Failure responding to next results request")
}
return
}
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client FirewallPoliciesClient) ListAllComplete(ctx context.Context) (result FirewallPolicyListResultIterator, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.ListAll")
defer func() {
sc := -1
if result.Response().Response.Response != nil {
sc = result.page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
result.page, err = client.ListAll(ctx)
return
}
// UpdateTags updates a Firewall Policy Tags.
// Parameters:
// resourceGroupName - the resource group name of the Firewall Policy.
// firewallPolicyName - the name of the Firewall Policy being updated.
// firewallPolicyParameters - parameters supplied to Update Firewall Policy tags.
func (client FirewallPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, firewallPolicyName string, firewallPolicyParameters TagsObject) (result FirewallPolicy, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.UpdateTags")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, firewallPolicyName, firewallPolicyParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "UpdateTags", nil, "Failure preparing request")
return
}
resp, err := client.UpdateTagsSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "UpdateTags", resp, "Failure sending request")
return
}
result, err = client.UpdateTagsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "UpdateTags", resp, "Failure responding to request")
}
return
}
// UpdateTagsPreparer prepares the UpdateTags request.
func (client FirewallPoliciesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, firewallPolicyParameters TagsObject) (*http.Request, error) {
pathParameters := map[string]interface{}{
"firewallPolicyName": autorest.Encode("path", firewallPolicyName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2019-07-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}", pathParameters),
autorest.WithJSON(firewallPolicyParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdateTagsResponder handles the response to the UpdateTags request. The method always
// closes the http.Response Body.
func (client FirewallPoliciesClient) UpdateTagsResponder(resp *http.Response) (result FirewallPolicy, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
| {
sc = result.fplr.Response.Response.StatusCode
} |
local-data.service.ts | import { Injectable, EventEmitter } from '@angular/core';
import { DataService } from './data.service';
import { Observable } from 'rxjs';
import { catchError } from 'rxjs/operators';
import { CompleterItem } from '../model/completer-item';
@Injectable()
export class | extends DataService {
public dataSourceChange: EventEmitter<void> = new EventEmitter<void>();
protected _data: any[];
constructor() {
super();
}
public data(data: any[] | Observable<any[]>) {
this._data = <any[]>data;
this.dataSourceChange.emit();
return this;
}
public search(term: string): Observable<CompleterItem[]> {
return new Observable(subscriber => {
if (this._data != null) {
const matches: any[] = this.extractMatches(this._data, term);
subscriber.next(this.processResults(matches));
subscriber.complete();
} else {
subscriber.next([]);
subscriber.complete();
}
});
}
public convertToItem(data: any): CompleterItem {
return super.convertToItem(data);
}
}
| LocalDataService |
peers.go | package lib
import (
"container/list"
"errors"
"fmt"
"log"
)
// Container which keeps track of multiple WebRTC remote peers.
// Implements |SnowflakeCollector|.
//
// Maintaining a set of pre-connected Peers with fresh but inactive datachannels
// allows allows rapid recovery when the current WebRTC Peer disconnects.
//
// Note: For now, only one remote can be active at any given moment.
// This is a property of Tor circuits & its current multiplexing constraints,
// but could be updated if that changes.
// (Also, this constraint does not necessarily apply to the more generic PT
// version of Snowflake)
type Peers struct {
Tongue
BytesLogger BytesLogger
snowflakeChan chan *WebRTCPeer
activePeers *list.List
capacity int
melt chan struct{}
}
// Construct a fresh container of remote peers.
func NewPeers(max int) *Peers {
p := &Peers{capacity: max}
// Use buffered go channel to pass snowflakes onwards to the SOCKS handler.
p.snowflakeChan = make(chan *WebRTCPeer, max)
p.activePeers = list.New()
p.melt = make(chan struct{})
return p
}
// As part of |SnowflakeCollector| interface.
func (p *Peers) Collect() (*WebRTCPeer, error) {
cnt := p.Count()
s := fmt.Sprintf("Currently at [%d/%d]", cnt, p.capacity)
if cnt >= p.capacity {
return nil, fmt.Errorf("At capacity [%d/%d]", cnt, p.capacity)
}
log.Println("WebRTC: Collecting a new Snowflake.", s)
// Engage the Snowflake Catching interface, which must be available.
if nil == p.Tongue {
return nil, errors.New("missing Tongue to catch Snowflakes with")
}
// BUG: some broker conflict here.
connection, err := p.Tongue.Catch()
if nil != err {
return nil, err
}
// Track new valid Snowflake in internal collection and pass along.
p.activePeers.PushBack(connection)
p.snowflakeChan <- connection
return connection, nil
}
// Pop blocks until an available, valid snowflake appears. Returns nil after End
// has been called.
func (p *Peers) Pop() *WebRTCPeer {
for {
snowflake, ok := <-p.snowflakeChan
if !ok {
return nil
}
if snowflake.closed {
continue
}
// Set to use the same rate-limited traffic logger to keep consistency.
snowflake.BytesLogger = p.BytesLogger
return snowflake
}
}
// As part of |SnowflakeCollector| interface.
func (p *Peers) Melted() <-chan struct{} {
return p.melt
}
// Returns total available Snowflakes (including the active one)
// The count only reduces when connections themselves close, rather than when
// they are popped.
func (p *Peers) Count() int {
p.purgeClosedPeers()
return p.activePeers.Len()
}
func (p *Peers) purgeClosedPeers() {
for e := p.activePeers.Front(); e != nil; {
next := e.Next()
conn := e.Value.(*WebRTCPeer)
// Purge those marked for deletion.
if conn.closed |
e = next
}
}
// Close all Peers contained here.
func (p *Peers) End() {
close(p.snowflakeChan)
close(p.melt)
cnt := p.Count()
for e := p.activePeers.Front(); e != nil; {
next := e.Next()
conn := e.Value.(*WebRTCPeer)
conn.Close()
p.activePeers.Remove(e)
e = next
}
log.Printf("WebRTC: melted all %d snowflakes.", cnt)
}
| {
p.activePeers.Remove(e)
} |
index.rs | use std::collections::HashMap;
use std::convert::TryFrom;
use std::fs;
use std::path::PathBuf;
use anyhow::{anyhow, bail, Context, Result};
use serde::{Deserialize, Serialize};
use serde_json::Value;
use super::cache::Cache;
use super::codemodel::Codemodel;
use super::toolchains::Toolchains;
use super::{Query, Version};
/// CMake tool kind for [`CMake::paths`].
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Deserialize)]
pub enum PathsKey {
#[serde(rename = "cmake")]
CMake,
#[serde(rename = "ctest")]
CTest,
#[serde(rename = "cpack")]
CPack,
#[serde(rename = "root")]
Root,
}
/// The cmake generator used for the build.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Generator {
/// Whether the generator supports multiple output configurations.
pub multi_config: bool,
/// The name of the generator.
pub name: String,
/// If the generator supports `CMAKE_GENERATOR_PLATFORM`, specifies the generator
/// platform name.
pub platform: Option<String>,
}
/// Information about the instance of CMake that generated the replies.
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CMake {
pub version: Version,
pub paths: HashMap<PathsKey, String>,
pub generator: Generator,
}
/// CMake file API object kind for which cmake should generate information about.
#[derive(Debug, PartialEq, Eq, Deserialize, Serialize, Clone, Copy, Hash)]
#[serde(rename_all = "camelCase")]
pub enum ObjKind {
Codemodel,
Cache,
CmakeFiles,
Toolchains,
}
impl ObjKind {
/// Get the supported major version of this object kind.
pub(crate) const fn supported_version(self) -> u32 {
match self {
Self::Codemodel => 2,
Self::Cache => 2,
Self::CmakeFiles => 1,
Self::Toolchains => 1,
}
}
/// Check if `object_version` is supported by this library.
pub fn check_version_supported(self, object_version: u32) -> Result<()> {
let expected_version = self.supported_version();
if object_version != expected_version {
bail!(
"cmake {} object version not supported (expected {}, got {})",
self.as_str(),
expected_version,
object_version
);
} else {
Ok(())
}
}
/// Get the minimum required cmake version for this object kind.
pub fn min_cmake_version(self) -> Version {
let (major, minor) = match self {
Self::Codemodel => (3, 14),
Self::Cache => (3, 14),
Self::CmakeFiles => (3, 14),
Self::Toolchains => (3, 20),
};
Version {
major,
minor,
..Version::default()
}
}
pub fn as_str(self) -> &'static str {
match self {
Self::Codemodel => "codemodel",
Self::Cache => "cache",
Self::CmakeFiles => "cmakeFiles",
Self::Toolchains => "toolchains",
}
}
}
/// A reply for a specific object kind.
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Reply {
/// Path to the JSON file which contains the object.
pub json_file: PathBuf,
/// The kind of cmake file API object.
pub kind: ObjKind,
/// The version of the generated object.
pub version: Version,
}
impl Reply {
/// Try to load this reply as a codemodel object.
pub fn codemodel(&self) -> Result<Codemodel> {
Codemodel::try_from(self)
}
/// Try to load this reply as a cache object.
pub fn cache(&self) -> Result<Cache> |
/// Try to load this reply as a toolchains object.
pub fn toolchains(&self) -> Result<Toolchains> {
Toolchains::try_from(self)
}
}
/// Replies generated from a cmake file API query.
#[derive(Debug, Clone)]
pub struct Replies {
/// Information about the instance of CMake that generated the replies.
pub cmake: CMake,
/// All generated replies.
pub replies: HashMap<ObjKind, Reply>,
}
impl Replies {
/// Try to load the cmake file API index from the query and validate.
pub fn from_query(query: &Query) -> Result<Replies> {
let reply_dir = query.api_dir.join("reply");
let index_file = fs::read_dir(&reply_dir)
.context("Failed to list cmake-file-api reply directory")?
.filter_map(
|file| match (&file, file.as_ref().ok().and_then(|f| f.file_type().ok())) {
(Ok(f), Some(file_type))
if file_type.is_file()
&& f.file_name().to_string_lossy().starts_with("index-") =>
{
Some(f.path())
}
_ => None,
},
)
.max()
.ok_or_else(|| {
anyhow!(
"No cmake-file-api index file found in '{}' \
(cmake version must be at least 3.14)",
reply_dir.display()
)
})?;
#[derive(Deserialize)]
struct Index {
cmake: CMake,
reply: HashMap<String, Value>,
}
let base_error = || {
anyhow!(
"Failed to parse the cmake-file-api index file '{}'",
index_file.display()
)
};
let Index { cmake, reply } =
serde_json::from_reader(&fs::File::open(&index_file)?).with_context(&base_error)?;
for kind in query.kinds {
let min_cmake_version = kind.min_cmake_version();
if cmake.version.major < min_cmake_version.major
|| cmake.version.minor < min_cmake_version.minor
{
bail!(
"cmake-file-api {} object not supported: cmake version missmatch, \
expected at least version {}, got version {} instead",
kind.as_str(),
min_cmake_version,
&cmake.version
);
}
}
let client = format!("client-{}", &query.client_name);
let (_, reply) = reply
.into_iter()
.find(|(k, _)| k == &client)
.ok_or_else(|| anyhow!("Reply for client '{}' not found", &query.client_name))
.with_context(&base_error)?;
#[derive(Deserialize)]
#[serde(untagged)]
enum ReplyOrError {
Reply(Reply),
Error { error: String },
}
let mut errors = vec![];
let replies: HashMap<ObjKind, Reply> =
serde_json::from_value::<HashMap<String, ReplyOrError>>(reply)
.with_context(&base_error)?
.into_iter()
.filter_map(|(_, v)| match v {
ReplyOrError::Reply(mut r) => {
if let Err(err) = r.kind.check_version_supported(r.version.major) {
errors.push(err.to_string());
None
} else {
r.json_file = reply_dir.join(r.json_file);
Some((r.kind, r))
}
}
ReplyOrError::Error { error } => {
errors.push(error);
None
}
})
.collect();
let not_found = query
.kinds
.iter()
.filter(|k| !replies.contains_key(k))
.map(|k| k.as_str())
.collect::<Vec<_>>();
if !not_found.is_empty() {
let error = anyhow!(
"Objects {} could not be deserialized{}",
not_found.join(", "),
if errors.is_empty() {
String::new()
} else {
format!(":\n{}", errors.join(",\n"))
}
);
return Err(error
.context(format!(
"Could not deserialize all requested objects ({:?})",
query.kinds
))
.context(base_error()));
} else if !errors.is_empty() {
log::debug!(
"Errors while deserializing cmake-file-api index `{:?}`: {}",
index_file,
errors.join(",\n")
);
}
Ok(Replies { cmake, replies })
}
/// Get a reply of `kind`.
pub fn get_kind(&self, kind: ObjKind) -> Result<&Reply> {
self.replies.get(&kind).ok_or_else(|| {
anyhow!(
"Object {:?} (version {}) not fund in cmake-file-api reply index",
kind,
kind.supported_version()
)
})
}
/// Load the codemodel object from a codemodel reply.
///
/// Convenience function for `get_kind(ObjKind::Codemodel)?.codemodel()`.
pub fn get_codemodel(&self) -> Result<Codemodel> {
self.get_kind(ObjKind::Codemodel)?.codemodel()
}
/// Load the cache object from a cache reply.
///
/// Convenience function for `get_kind(ObjKind::Cache)?.cache()`.
pub fn get_cache(&self) -> Result<Cache> {
self.get_kind(ObjKind::Cache)?.cache()
}
/// Load the toolchains object from a toolchains reply.
///
/// Convenience function for `get_kind(ObjKind::Toolchains)?.toolchains()`.
pub fn get_toolchains(&self) -> Result<Toolchains> {
self.get_kind(ObjKind::Toolchains)?.toolchains()
}
}
| {
Cache::try_from(self)
} |
updater.go | // Copyright 2021 The kbrew Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package update
import (
"context"
"fmt"
"os"
"os/exec"
"path/filepath"
"github.com/kbrew-dev/kbrew/pkg/util"
"github.com/kbrew-dev/kbrew/pkg/version"
"github.com/pkg/errors"
)
const (
upgradeCmd = "curl -sfL https://raw.githubusercontent.com/kbrew-dev/kbrew/main/install.sh | sh"
)
func getBinDir() (string, error) {
path, err := os.Executable()
if err != nil {
return "", err
}
return filepath.Dir(path), nil
}
// IsAvailable checks if a new version of GitHub release available
func IsAvailable(ctx context.Context) (string, error) {
release, err := util.GetLatestVersion(ctx)
if err != nil {
return "", errors.Wrap(err, "failed to check for kbrew updates")
}
if version.Version != *release.TagName |
return "", nil
}
// CheckRelease checks for the latest release
func CheckRelease(ctx context.Context) error {
release, err := IsAvailable(ctx)
if err != nil {
return errors.Wrap(err, "failed to check for kbrew updates")
}
if release == "" {
return nil
}
fmt.Printf("kbrew %s is available, upgrading...\n", release)
return upgradeKbrew(ctx)
}
func upgradeKbrew(ctx context.Context) error {
dir, err := getBinDir()
if err != nil {
return errors.Wrap(err, "failed to get executable dir")
}
os.Setenv("BINDIR", dir)
defer os.Unsetenv("BINDIR")
return execCommand(ctx, upgradeCmd)
}
func execCommand(ctx context.Context, cmd string) error {
c := exec.CommandContext(ctx, "sh", "-c", cmd)
c.Stdout = os.Stdout
c.Stderr = os.Stderr
return c.Run()
}
| {
return *release.TagName, nil
} |
diffImpl.ts | import MetadataFiles from "../../metadata/metadataFiles";
import * as xml2js from "xml2js";
import * as path from "path";
import * as fs from "fs-extra";
import * as rimraf from "rimraf";
import {
SOURCE_EXTENSION_REGEX,
MetadataInfo,
METADATA_INFO,
UNSPLITED_METADATA,
PROFILE_PERMISSIONSET_EXTENSION
} from "../../metadata/metadataInfo";
import FileUtils from "../../../utils/fileutils";
import * as _ from "lodash";
import ProfileDiff from "./profileDiff";
import PermsetDiff from "./permsetDiff";
import WorkflowDiff from "./workflowDiff";
import SharingRuleDiff from "./sharingRuleDiff";
import CustomLabelsDiff from "./customLabelsDiff";
import DiffUtil, { DiffFile, DiffFileStatus } from "./diffUtil";
import { core } from "@salesforce/command";
import { SFPowerkit, LoggerLevel } from "../../../sfpowerkit";
import { DXProjectManifestUtils } from "../../../utils/dxProjectManifestUtils";
import simplegit from "simple-git/promise";
core.Messages.importMessagesDirectory(__dirname);
const messages = core.Messages.loadMessages("sfpowerkit", "project_diff");
const deleteNotSupported = ["RecordType"];
const git = simplegit();
const unsplitedMetadataExtensions = UNSPLITED_METADATA.map(elem => {
return elem.sourceExtension;
});
const permissionExtensions = PROFILE_PERMISSIONSET_EXTENSION.map(elem => {
return elem.sourceExtension;
});
export default class DiffImpl {
destructivePackageObjPre: any[];
destructivePackageObjPost: any[];
resultOutput: {
action: string;
metadataType: string;
componentName: string;
message: string;
path: string;
}[];
public constructor(
private revisionFrom?: string,
private revisionTo?: string,
private isDestructive?: boolean,
private pathToIgnore?: any[]
) {
if (this.revisionTo == null || this.revisionTo.trim() === "") {
this.revisionTo = "HEAD";
}
if (this.revisionFrom == null) {
this.revisionFrom = "";
}
this.destructivePackageObjPost = new Array();
this.destructivePackageObjPre = new Array();
this.resultOutput = [];
}
public async build(
outputFolder: string,
packagedirectories: string[],
apiversion: string
) {
rimraf.sync(outputFolder);
if (packagedirectories) {
SFPowerkit.setProjectDirectories(packagedirectories);
}
if (apiversion) {
SFPowerkit.setapiversion(apiversion);
}
//const sepRegex=/\t| |\n/;
const sepRegex = /\n|\r/;
let data = "";
//check if same commit
const commitFrom = await git.raw([
"rev-list",
"-n",
"1",
this.revisionFrom
]);
const commitTo = await git.raw(["rev-list", "-n", "1", this.revisionTo]);
if (commitFrom === commitTo) {
throw new Error(messages.getMessage("sameCommitErrorMessage"));
}
//Make it relative to make the command works from a project created as a subfolder in a repository
data = await git.diff([
"--raw",
this.revisionFrom,
this.revisionTo,
"--relative"
]);
SFPowerkit.log(
`Input Param: From: ${this.revisionFrom} To: ${this.revisionTo} `,
LoggerLevel.INFO
);
SFPowerkit.log(
`SHA Found From: ${commitFrom} To: ${commitTo} `,
LoggerLevel.INFO
);
SFPowerkit.log(data, LoggerLevel.TRACE);
let content = data.split(sepRegex);
let diffFile: DiffFile = await DiffUtil.parseContent(content);
await DiffUtil.fetchFileListRevisionTo(this.revisionTo);
let filesToCopy = diffFile.addedEdited;
let deletedFiles = diffFile.deleted;
deletedFiles = deletedFiles.filter(deleted => {
let found = false;
let deletedMetadata = MetadataFiles.getFullApiNameWithExtension(
deleted.path
);
for (let i = 0; i < filesToCopy.length; i++) {
let addedOrEdited = MetadataFiles.getFullApiNameWithExtension(
filesToCopy[i].path
);
if (deletedMetadata === addedOrEdited) {
found = true;
break;
}
}
return !found;
});
if (fs.existsSync(outputFolder) == false) {
fs.mkdirSync(outputFolder);
}
SFPowerkit.log("Files to be copied", LoggerLevel.DEBUG);
SFPowerkit.log(filesToCopy, LoggerLevel.DEBUG);
if (filesToCopy && filesToCopy.length > 0) {
for (var i = 0; i < filesToCopy.length; i++) {
let filePath = filesToCopy[i].path;
try {
if (DiffImpl.checkForIngore(this.pathToIgnore, filePath)) {
let matcher = filePath.match(SOURCE_EXTENSION_REGEX);
let extension = "";
if (matcher) {
extension = matcher[0];
} else {
extension = path.parse(filePath).ext;
}
if (unsplitedMetadataExtensions.includes(extension)) {
//handle unsplited files
await this.handleUnsplittedMetadata(filesToCopy[i], outputFolder);
} else {
await DiffUtil.copyFile(filePath, outputFolder);
SFPowerkit.log(
`Copied file ${filePath} to ${outputFolder}`,
LoggerLevel.DEBUG
);
}
}
} catch (ex) {
this.resultOutput.push({
action: "ERROR",
componentName: "",
metadataType: "",
message: ex.message,
path: filePath
});
}
}
}
if (this.isDestructive) {
SFPowerkit.log("Creating Destructive Manifest..", LoggerLevel.INFO);
await this.createDestructiveChanges(deletedFiles, outputFolder);
}
SFPowerkit.log(`Generating output summary`, LoggerLevel.INFO);
this.buildOutput(outputFolder);
if (this.resultOutput.length > 0) {
try {
await DiffUtil.copyFile(".forceignore", outputFolder);
} catch (e) {
SFPowerkit.log(`.forceignore not found, skipping..`, LoggerLevel.INFO);
}
try {
//check if package path is provided
if (packagedirectories) {
let sourceApiVersion = await SFPowerkit.getApiVersion(); | path: path
});
});
let sfdx_project = {
packageDirectories: packageDirectorieslist,
namespace: "",
sourceApiVersion: sourceApiVersion
};
fs.outputFileSync(
`${outputFolder}/sfdx-project.json`,
JSON.stringify(sfdx_project)
);
} else {
//Copy project manifest
await DiffUtil.copyFile("sfdx-project.json", outputFolder);
}
//Remove Project Directories that doesnt have any components in ths diff Fix #178
let dxProjectManifestUtils: DXProjectManifestUtils = new DXProjectManifestUtils(
outputFolder
);
dxProjectManifestUtils.removePackagesNotInDirectory();
} catch (e) {
SFPowerkit.log(
`sfdx-project.json not found, skipping..`,
LoggerLevel.INFO
);
}
}
return this.resultOutput;
}
private static checkForIngore(pathToIgnore: any[], filePath: string) {
pathToIgnore = pathToIgnore || [];
if (pathToIgnore.length === 0) {
return true;
}
let returnVal = true;
pathToIgnore.forEach(ignore => {
if (
path.resolve(ignore) === path.resolve(filePath) ||
path.resolve(filePath).includes(path.resolve(ignore))
) {
returnVal = false;
}
});
return returnVal;
}
private buildOutput(outputFolder) {
let metadataFiles = new MetadataFiles();
metadataFiles.loadComponents(outputFolder, false);
let keys = Object.keys(METADATA_INFO);
let excludedFiles = _.difference(
unsplitedMetadataExtensions,
permissionExtensions
);
keys.forEach(key => {
if (METADATA_INFO[key].files && METADATA_INFO[key].files.length > 0) {
METADATA_INFO[key].files.forEach(filePath => {
let matcher = filePath.match(SOURCE_EXTENSION_REGEX);
let extension = "";
if (matcher) {
extension = matcher[0];
} else {
extension = path.parse(filePath).ext;
}
if (!excludedFiles.includes(extension)) {
let name = FileUtils.getFileNameWithoutExtension(
filePath,
METADATA_INFO[key].sourceExtension
);
if (METADATA_INFO[key].isChildComponent) {
let fileParts = filePath.split(path.sep);
let parentName = fileParts[fileParts.length - 3];
name = parentName + "." + name;
}
this.resultOutput.push({
action: "Deploy",
metadataType: METADATA_INFO[key].xmlName,
componentName: name,
message: "",
path: filePath
});
}
});
}
});
return this.resultOutput;
}
private async handleUnsplittedMetadata(
diffFile: DiffFileStatus,
outputFolder: string
) {
let content1 = "";
let content2 = "";
try {
if (diffFile.revisionFrom !== "0000000") {
content1 = await git.show(["--raw", diffFile.revisionFrom]);
}
} catch (e) {}
try {
if (diffFile.revisionTo !== "0000000") {
content2 = await git.show(["--raw", diffFile.revisionTo]);
}
} catch (e) {}
FileUtils.mkDirByPathSync(
path.join(outputFolder, path.parse(diffFile.path).dir)
);
if (diffFile.path.endsWith(METADATA_INFO.Workflow.sourceExtension)) {
//Workflow
let baseName = path.parse(diffFile.path).base;
let objectName = baseName.split(".")[0];
await WorkflowDiff.generateWorkflowXml(
content1,
content2,
path.join(outputFolder, diffFile.path),
objectName,
this.destructivePackageObjPost,
this.resultOutput,
this.isDestructive
);
}
if (diffFile.path.endsWith(METADATA_INFO.SharingRules.sourceExtension)) {
let baseName = path.parse(diffFile.path).base;
let objectName = baseName.split(".")[0];
await SharingRuleDiff.generateSharingRulesXml(
content1,
content2,
path.join(outputFolder, diffFile.path),
objectName,
this.destructivePackageObjPost,
this.resultOutput,
this.isDestructive
);
}
if (diffFile.path.endsWith(METADATA_INFO.CustomLabels.sourceExtension)) {
await CustomLabelsDiff.generateCustomLabelsXml(
content1,
content2,
path.join(outputFolder, diffFile.path),
this.destructivePackageObjPost,
this.resultOutput,
this.isDestructive
);
}
if (diffFile.path.endsWith(METADATA_INFO.Profile.sourceExtension)) {
//Deploy only what changed
if (content1 === "") {
await DiffUtil.copyFile(diffFile.path, outputFolder);
SFPowerkit.log(
`Copied file ${diffFile.path} to ${outputFolder}`,
LoggerLevel.DEBUG
);
} else if (content2 === "") {
//The profile is deleted or marked as renamed.
//Delete the renamed one
let profileType: any = _.find(this.destructivePackageObjPost, function(
metaType: any
) {
return metaType.name === METADATA_INFO.Profile.xmlName;
});
if (profileType === undefined) {
profileType = {
name: METADATA_INFO.Profile.xmlName,
members: []
};
this.destructivePackageObjPost.push(profileType);
}
let baseName = path.parse(diffFile.path).base;
let profileName = baseName.split(".")[0];
profileType.members.push(profileName);
} else {
await ProfileDiff.generateProfileXml(
content1,
content2,
path.join(outputFolder, diffFile.path)
);
}
}
if (diffFile.path.endsWith(METADATA_INFO.PermissionSet.sourceExtension)) {
let sourceApiVersion = await SFPowerkit.getApiVersion();
if (content1 === "") {
await DiffUtil.copyFile(diffFile.path, outputFolder);
SFPowerkit.log(
`Copied file ${diffFile.path} to ${outputFolder}`,
LoggerLevel.DEBUG
);
} else if (sourceApiVersion <= 39.0) {
// in API 39 and erliar PermissionSet deployment are merged. deploy only what changed
if (content2 === "") {
//Deleted permissionSet
let permsetType: any = _.find(
this.destructivePackageObjPost,
function(metaType: any) {
return metaType.name === METADATA_INFO.PermissionSet.xmlName;
}
);
if (permsetType === undefined) {
permsetType = {
name: METADATA_INFO.PermissionSet.xmlName,
members: []
};
this.destructivePackageObjPost.push(permsetType);
}
let baseName = path.parse(diffFile.path).base;
let permsetName = baseName.split(".")[0];
permsetType.members.push(permsetName);
} else {
await PermsetDiff.generatePermissionsetXml(
content1,
content2,
path.join(outputFolder, diffFile.path)
);
}
} else {
//PermissionSet deployment override in the target org
//So deploy the whole file
await DiffUtil.copyFile(diffFile.path, outputFolder);
SFPowerkit.log(
`Copied file ${diffFile.path} to ${outputFolder}`,
LoggerLevel.DEBUG
);
}
}
}
private async createDestructiveChanges(
filePaths: DiffFileStatus[],
outputFolder: string
) {
if (_.isNil(this.destructivePackageObjPost)) {
this.destructivePackageObjPost = new Array();
} else {
this.destructivePackageObjPost = this.destructivePackageObjPost.filter(
metaType => {
return !_.isNil(metaType.members) && metaType.members.length > 0;
}
);
}
this.destructivePackageObjPre = new Array();
//returns root, dir, base and name
for (let i = 0; i < filePaths.length; i++) {
let filePath = filePaths[i].path;
try {
let matcher = filePath.match(SOURCE_EXTENSION_REGEX);
let extension = "";
if (matcher) {
extension = matcher[0];
} else {
extension = path.parse(filePath).ext;
}
if (unsplitedMetadataExtensions.includes(extension)) {
//handle unsplited files
await this.handleUnsplittedMetadata(filePaths[i], outputFolder);
continue;
}
let parsedPath = path.parse(filePath);
let filename = parsedPath.base;
let name = MetadataInfo.getMetadataName(filePath);
if (name) {
if (!MetadataFiles.isCustomMetadata(filePath, name)) {
// avoid to generate destructive for Standard Components
//Support on Custom Fields and Custom Objects for now
this.resultOutput.push({
action: "Skip",
componentName: MetadataFiles.getMemberNameFromFilepath(
filePath,
name
),
metadataType: "StandardField/CustomMetadata",
message: "",
path: "--"
});
continue;
}
let member = MetadataFiles.getMemberNameFromFilepath(filePath, name);
if (name === METADATA_INFO.CustomField.xmlName) {
let isFormular = await DiffUtil.isFormulaField(filePaths[i]);
if (isFormular) {
this.destructivePackageObjPre = this.buildDestructiveTypeObj(
this.destructivePackageObjPre,
name,
member
);
SFPowerkit.log(
`${filePath} ${MetadataFiles.isCustomMetadata(filePath, name)}`,
LoggerLevel.DEBUG
);
this.resultOutput.push({
action: "Delete",
componentName: member,
metadataType: name,
message: "",
path: "Manual Intervention Required"
});
} else {
this.destructivePackageObjPost = this.buildDestructiveTypeObj(
this.destructivePackageObjPost,
name,
member
);
}
SFPowerkit.log(
`${filePath} ${MetadataFiles.isCustomMetadata(filePath, name)}`,
LoggerLevel.DEBUG
);
this.resultOutput.push({
action: "Delete",
componentName: member,
metadataType: name,
message: "",
path: "destructiveChanges.xml"
});
} else {
if (!deleteNotSupported.includes(name)) {
this.destructivePackageObjPost = this.buildDestructiveTypeObj(
this.destructivePackageObjPost,
name,
member
);
this.resultOutput.push({
action: "Delete",
componentName: member,
metadataType: name,
message: "",
path: "destructiveChanges.xml"
});
} else {
//add the component in the manual action list
// TODO
}
}
}
} catch (ex) {
this.resultOutput.push({
action: "ERROR",
componentName: "",
metadataType: "",
message: ex.message,
path: filePath
});
}
}
// this.writeDestructivechanges(
// this.destructivePackageObjPre,
// outputFolder,
// "destructiveChangesPre.xml"
// );
this.writeDestructivechanges(
this.destructivePackageObjPost,
outputFolder,
"destructiveChanges.xml"
);
}
private writeDestructivechanges(
destrucObj: Array<any>,
outputFolder: string,
fileName: string
) {
//ensure unique component per type
for (let i = 0; i < destrucObj.length; i++) {
destrucObj[i].members = _.uniq(destrucObj[i].members);
}
destrucObj = destrucObj.filter(metaType => {
return metaType.members && metaType.members.length > 0;
});
if (destrucObj.length > 0) {
let dest = {
Package: {
$: {
xmlns: "http://soap.sforce.com/2006/04/metadata"
},
types: destrucObj
}
};
let destructivePackageName = fileName;
let filepath = path.join(outputFolder, destructivePackageName);
let builder = new xml2js.Builder();
let xml = builder.buildObject(dest);
fs.writeFileSync(filepath, xml);
}
}
private buildDestructiveTypeObj(destructiveObj, name, member) {
let typeIsPresent: boolean = false;
for (let i = 0; i < destructiveObj.length; i++) {
if (destructiveObj[i].name === name) {
typeIsPresent = true;
destructiveObj[i].members.push(member);
break;
}
}
let typeNode: any;
if (typeIsPresent === false) {
typeNode = {
name: name,
members: [member]
};
destructiveObj.push(typeNode);
}
return destructiveObj;
}
} | let packageDirectorieslist = [];
packagedirectories.forEach(path => {
packageDirectorieslist.push({ |
expr.rs | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
use super::relay;
use crate::runtime::String as TString;
use crate::runtime::{self, external, IsObject, IsObjectRef, Object, ObjectPtr, ObjectRef};
use crate::DataType;
use tvm_macros::Object;
#[repr(C)]
#[derive(Object)]
#[ref_name = "BaseExpr"]
#[type_key = "Expr"]
pub struct BaseExprNode {
pub base: Object,
}
impl BaseExprNode {
pub fn base<T: IsObject>() -> BaseExprNode {
BaseExprNode {
base: Object::base::<T>(),
}
}
}
#[repr(C)]
#[derive(Object)]
#[ref_name = "PrimExpr"]
#[type_key = "PrimExpr"]
pub struct PrimExprNode {
pub base: BaseExprNode,
pub datatype: DataType,
}
impl PrimExprNode {
pub fn base<T: IsObject>(datatype: DataType) -> PrimExprNode {
PrimExprNode {
base: BaseExprNode::base::<T>(),
datatype,
}
}
}
#[repr(C)]
#[derive(Object)]
#[ref_name = "GlobalVar"]
#[type_key = "GlobalVar"]
pub struct GlobalVarNode {
pub base: relay::ExprNode,
pub name_hint: TString,
}
impl GlobalVar {
pub fn | (name_hint: String, _span: ObjectRef) -> GlobalVar {
let node = GlobalVarNode {
base: relay::ExprNode::base::<GlobalVarNode>(),
name_hint: name_hint.into(),
};
GlobalVar(Some(ObjectPtr::new(node)))
}
}
// TODO(@jroesch): update to match TVM
// Move IntImm
// Define FloatImm
// Define Bool
// Define tvm::Integer?
// Define RangeNode
// TODO: figure out how to type the last argument runtime::TypedPackedFunc<String(ObjectRef)> annotate)
external! {
#[name("ir.AsText")]
fn _as_text(object: ObjectRef, show_meta_data: i32, annotate: runtime::Function) -> TString;
}
pub fn as_text<T: IsObjectRef>(object: T) -> String {
let no_func = unsafe { runtime::Function::null() };
_as_text(object.upcast(), 0, no_func)
.unwrap()
.as_str()
.unwrap()
.into()
}
| new |
index.js | const path = require('path');
const fsPromises = require('fs/promises');
//пути для копирования
const sourceFolderPath = path.join(__dirname, 'files');
const destinationFolderPath = path.join(__dirname, 'files-copy');
//промисы нужны для того, чтобы не было "конкуренции"
//(когда файл копируется и асинхронно его пытаются удалить)
async function copyAll() {
try {
//создаём папку
await fsPromises.mkdir(destinationFolderPath, {recursive: true});
const destinationFiles = await fsPromises.readdir(destinationFolderPath);
//удаляем файлы из папки, если они есть
for (const destinationFile of destinationFiles) {
let curPath = path.join(destinationFolderPath, destinationFile);
await fsPromises.unlink(curPath);
}
//читаем папку сырцов
const sourceFiles = await fsPromises.readdir(sourceFolderPath, {withFileTypes: true});
//копируем файлы
for (const sourceFile of sourceFiles) {
let sourceFilePath = path.join(sourceFolderPath, sourceFile.name);
let destinationFilePath = path.join(destinationFolderPath, sourceFile.name);
await fsPromises.copyFile(sourceFilePath, destinationFilePath);
}
} catch (err) {
console.error(err);
}
}
| copyAll().then(() => console.log('Files copy successfully')); |
|
grammar.rs |
#[derive(Debug,Clone,PartialEq)]
pub enum AddOp {
Add,
Subtract,
Start,
}
#[derive(Debug,Clone,PartialEq)]
pub enum MultOp {
Multiply,
Divide,
Modulo,
Start,
}
#[derive(Clone,Debug,PartialEq)]
pub struct AddTerm(pub AddOp, pub Expr);
#[derive(Clone,Debug,PartialEq)]
pub struct MultTerm(pub MultOp, pub Expr);
#[derive(Debug,Clone,PartialEq)]
pub enum Expr {
Variable(String),
Num(i32),
AddSub(Vec<AddTerm>), // a + b - c + d becomes [(+ a) (+ b) (- c) (+ d)]
MultDiv(Vec<MultTerm>),
}
// for now this is it's own type and not a statement
#[derive(Debug,Clone,PartialEq)]
pub struct Block(pub Vec<Statement>);
#[derive(Debug,Clone,PartialEq)]
pub enum Statement {
Assign(String, Expr),
Output(Expr),
If(Expr, Comparator, Expr, Block, Option<Block>),
While(Expr, Comparator, Expr, Block),
Loop(Expr, Block),
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub enum Comparator {
Eq, // ==
Gt, // >
Lt, // <
Neq, // !=
Geq, // >=
Leq, // <=
}
use std::ops::Not;
impl Not for Comparator{
type Output = Self;
fn not(self) -> Self::Output |
}
| {
use self::Comparator::*;
match self {
Eq => Neq,
Gt => Leq,
Lt => Geq,
Neq => Eq,
Geq => Lt,
Leq => Gt,
}
} |
lightning.pb.go | // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.6.1
// source: lightning.proto
package lnrpc
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
//
//`AddressType` has to be one of:
//
//- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)
//- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)
type AddressType int32
const (
AddressType_WITNESS_PUBKEY_HASH AddressType = 0
AddressType_NESTED_PUBKEY_HASH AddressType = 1
AddressType_UNUSED_WITNESS_PUBKEY_HASH AddressType = 2
AddressType_UNUSED_NESTED_PUBKEY_HASH AddressType = 3
)
// Enum value maps for AddressType.
var (
AddressType_name = map[int32]string{
0: "WITNESS_PUBKEY_HASH",
1: "NESTED_PUBKEY_HASH",
2: "UNUSED_WITNESS_PUBKEY_HASH",
3: "UNUSED_NESTED_PUBKEY_HASH",
}
AddressType_value = map[string]int32{
"WITNESS_PUBKEY_HASH": 0,
"NESTED_PUBKEY_HASH": 1,
"UNUSED_WITNESS_PUBKEY_HASH": 2,
"UNUSED_NESTED_PUBKEY_HASH": 3,
}
)
func (x AddressType) Enum() *AddressType {
p := new(AddressType)
*p = x
return p
}
func (x AddressType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (AddressType) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[0].Descriptor()
}
func (AddressType) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[0]
}
func (x AddressType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use AddressType.Descriptor instead.
func (AddressType) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{0}
}
type CommitmentType int32
const (
//
//Returned when the commitment type isn't known or unavailable.
CommitmentType_UNKNOWN_COMMITMENT_TYPE CommitmentType = 0
//
//A channel using the legacy commitment format having tweaked to_remote
//keys.
CommitmentType_LEGACY CommitmentType = 1
//
//A channel that uses the modern commitment format where the key in the
//output of the remote party does not change each state. This makes back
//up and recovery easier as when the channel is closed, the funds go
//directly to that key.
CommitmentType_STATIC_REMOTE_KEY CommitmentType = 2
//
//A channel that uses a commitment format that has anchor outputs on the
//commitments, allowing fee bumping after a force close transaction has
//been broadcast.
CommitmentType_ANCHORS CommitmentType = 3
//
//A channel that uses a commitment type that builds upon the anchors
//commitment format, but in addition requires a CLTV clause to spend outputs
//paying to the channel initiator. This is intended for use on leased channels
//to guarantee that the channel initiator has no incentives to close a leased
//channel before its maturity date.
CommitmentType_SCRIPT_ENFORCED_LEASE CommitmentType = 4
)
// Enum value maps for CommitmentType.
var (
CommitmentType_name = map[int32]string{
0: "UNKNOWN_COMMITMENT_TYPE",
1: "LEGACY",
2: "STATIC_REMOTE_KEY",
3: "ANCHORS",
4: "SCRIPT_ENFORCED_LEASE",
}
CommitmentType_value = map[string]int32{
"UNKNOWN_COMMITMENT_TYPE": 0,
"LEGACY": 1,
"STATIC_REMOTE_KEY": 2,
"ANCHORS": 3,
"SCRIPT_ENFORCED_LEASE": 4,
}
)
func (x CommitmentType) Enum() *CommitmentType {
p := new(CommitmentType)
*p = x
return p
}
func (x CommitmentType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CommitmentType) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[1].Descriptor()
}
func (CommitmentType) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[1]
}
func (x CommitmentType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CommitmentType.Descriptor instead.
func (CommitmentType) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{1}
}
type Initiator int32
const (
Initiator_INITIATOR_UNKNOWN Initiator = 0
Initiator_INITIATOR_LOCAL Initiator = 1
Initiator_INITIATOR_REMOTE Initiator = 2
Initiator_INITIATOR_BOTH Initiator = 3
)
// Enum value maps for Initiator.
var (
Initiator_name = map[int32]string{
0: "INITIATOR_UNKNOWN",
1: "INITIATOR_LOCAL",
2: "INITIATOR_REMOTE",
3: "INITIATOR_BOTH",
}
Initiator_value = map[string]int32{
"INITIATOR_UNKNOWN": 0,
"INITIATOR_LOCAL": 1,
"INITIATOR_REMOTE": 2,
"INITIATOR_BOTH": 3,
}
)
func (x Initiator) Enum() *Initiator {
p := new(Initiator)
*p = x
return p
}
func (x Initiator) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Initiator) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[2].Descriptor()
}
func (Initiator) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[2]
}
func (x Initiator) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Initiator.Descriptor instead.
func (Initiator) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{2}
}
type ResolutionType int32
const (
ResolutionType_TYPE_UNKNOWN ResolutionType = 0
// We resolved an anchor output.
ResolutionType_ANCHOR ResolutionType = 1
//
//We are resolving an incoming htlc on chain. This if this htlc is
//claimed, we swept the incoming htlc with the preimage. If it is timed
//out, our peer swept the timeout path.
ResolutionType_INCOMING_HTLC ResolutionType = 2
//
//We are resolving an outgoing htlc on chain. If this htlc is claimed,
//the remote party swept the htlc with the preimage. If it is timed out,
//we swept it with the timeout path.
ResolutionType_OUTGOING_HTLC ResolutionType = 3
// We force closed and need to sweep our time locked commitment output.
ResolutionType_COMMIT ResolutionType = 4
)
// Enum value maps for ResolutionType.
var (
ResolutionType_name = map[int32]string{
0: "TYPE_UNKNOWN",
1: "ANCHOR",
2: "INCOMING_HTLC",
3: "OUTGOING_HTLC",
4: "COMMIT",
}
ResolutionType_value = map[string]int32{
"TYPE_UNKNOWN": 0,
"ANCHOR": 1,
"INCOMING_HTLC": 2,
"OUTGOING_HTLC": 3,
"COMMIT": 4,
}
)
func (x ResolutionType) Enum() *ResolutionType {
p := new(ResolutionType)
*p = x
return p
}
func (x ResolutionType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ResolutionType) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[3].Descriptor()
}
func (ResolutionType) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[3]
}
func (x ResolutionType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ResolutionType.Descriptor instead.
func (ResolutionType) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{3}
}
type ResolutionOutcome int32
const (
// Outcome unknown.
ResolutionOutcome_OUTCOME_UNKNOWN ResolutionOutcome = 0
// An output was claimed on chain.
ResolutionOutcome_CLAIMED ResolutionOutcome = 1
// An output was left unclaimed on chain.
ResolutionOutcome_UNCLAIMED ResolutionOutcome = 2
//
//ResolverOutcomeAbandoned indicates that an output that we did not
//claim on chain, for example an anchor that we did not sweep and a
//third party claimed on chain, or a htlc that we could not decode
//so left unclaimed.
ResolutionOutcome_ABANDONED ResolutionOutcome = 3
//
//If we force closed our channel, our htlcs need to be claimed in two
//stages. This outcome represents the broadcast of a timeout or success
//transaction for this two stage htlc claim.
ResolutionOutcome_FIRST_STAGE ResolutionOutcome = 4
// A htlc was timed out on chain.
ResolutionOutcome_TIMEOUT ResolutionOutcome = 5
)
// Enum value maps for ResolutionOutcome.
var (
ResolutionOutcome_name = map[int32]string{
0: "OUTCOME_UNKNOWN",
1: "CLAIMED",
2: "UNCLAIMED",
3: "ABANDONED",
4: "FIRST_STAGE",
5: "TIMEOUT",
}
ResolutionOutcome_value = map[string]int32{
"OUTCOME_UNKNOWN": 0,
"CLAIMED": 1,
"UNCLAIMED": 2,
"ABANDONED": 3,
"FIRST_STAGE": 4,
"TIMEOUT": 5,
}
)
func (x ResolutionOutcome) Enum() *ResolutionOutcome {
p := new(ResolutionOutcome)
*p = x
return p
}
func (x ResolutionOutcome) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ResolutionOutcome) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[4].Descriptor()
}
func (ResolutionOutcome) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[4]
}
func (x ResolutionOutcome) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ResolutionOutcome.Descriptor instead.
func (ResolutionOutcome) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{4}
}
type NodeMetricType int32
const (
NodeMetricType_UNKNOWN NodeMetricType = 0
NodeMetricType_BETWEENNESS_CENTRALITY NodeMetricType = 1
)
// Enum value maps for NodeMetricType.
var (
NodeMetricType_name = map[int32]string{
0: "UNKNOWN",
1: "BETWEENNESS_CENTRALITY",
}
NodeMetricType_value = map[string]int32{
"UNKNOWN": 0,
"BETWEENNESS_CENTRALITY": 1,
}
)
func (x NodeMetricType) Enum() *NodeMetricType {
p := new(NodeMetricType)
*p = x
return p
}
func (x NodeMetricType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (NodeMetricType) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[5].Descriptor()
}
func (NodeMetricType) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[5]
}
func (x NodeMetricType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use NodeMetricType.Descriptor instead.
func (NodeMetricType) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{5}
}
type InvoiceHTLCState int32
const (
InvoiceHTLCState_ACCEPTED InvoiceHTLCState = 0
InvoiceHTLCState_SETTLED InvoiceHTLCState = 1
InvoiceHTLCState_CANCELED InvoiceHTLCState = 2
)
// Enum value maps for InvoiceHTLCState.
var (
InvoiceHTLCState_name = map[int32]string{
0: "ACCEPTED",
1: "SETTLED",
2: "CANCELED",
}
InvoiceHTLCState_value = map[string]int32{
"ACCEPTED": 0,
"SETTLED": 1,
"CANCELED": 2,
}
)
func (x InvoiceHTLCState) Enum() *InvoiceHTLCState {
p := new(InvoiceHTLCState)
*p = x
return p
}
func (x InvoiceHTLCState) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (InvoiceHTLCState) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[6].Descriptor()
}
func (InvoiceHTLCState) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[6]
}
func (x InvoiceHTLCState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use InvoiceHTLCState.Descriptor instead.
func (InvoiceHTLCState) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{6}
}
type PaymentFailureReason int32
const (
//
//Payment isn't failed (yet).
PaymentFailureReason_FAILURE_REASON_NONE PaymentFailureReason = 0
//
//There are more routes to try, but the payment timeout was exceeded.
PaymentFailureReason_FAILURE_REASON_TIMEOUT PaymentFailureReason = 1
//
//All possible routes were tried and failed permanently. Or were no
//routes to the destination at all.
PaymentFailureReason_FAILURE_REASON_NO_ROUTE PaymentFailureReason = 2
//
//A non-recoverable error has occured.
PaymentFailureReason_FAILURE_REASON_ERROR PaymentFailureReason = 3
//
//Payment details incorrect (unknown hash, invalid amt or
//invalid final cltv delta)
PaymentFailureReason_FAILURE_REASON_INCORRECT_PAYMENT_DETAILS PaymentFailureReason = 4
//
//Insufficient local balance.
PaymentFailureReason_FAILURE_REASON_INSUFFICIENT_BALANCE PaymentFailureReason = 5
)
// Enum value maps for PaymentFailureReason.
var (
PaymentFailureReason_name = map[int32]string{
0: "FAILURE_REASON_NONE",
1: "FAILURE_REASON_TIMEOUT",
2: "FAILURE_REASON_NO_ROUTE",
3: "FAILURE_REASON_ERROR",
4: "FAILURE_REASON_INCORRECT_PAYMENT_DETAILS",
5: "FAILURE_REASON_INSUFFICIENT_BALANCE",
}
PaymentFailureReason_value = map[string]int32{
"FAILURE_REASON_NONE": 0,
"FAILURE_REASON_TIMEOUT": 1,
"FAILURE_REASON_NO_ROUTE": 2,
"FAILURE_REASON_ERROR": 3,
"FAILURE_REASON_INCORRECT_PAYMENT_DETAILS": 4,
"FAILURE_REASON_INSUFFICIENT_BALANCE": 5,
}
)
func (x PaymentFailureReason) Enum() *PaymentFailureReason {
p := new(PaymentFailureReason)
*p = x
return p
}
func (x PaymentFailureReason) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PaymentFailureReason) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[7].Descriptor()
}
func (PaymentFailureReason) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[7]
}
func (x PaymentFailureReason) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PaymentFailureReason.Descriptor instead.
func (PaymentFailureReason) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{7}
}
type FeatureBit int32
const (
FeatureBit_DATALOSS_PROTECT_REQ FeatureBit = 0
FeatureBit_DATALOSS_PROTECT_OPT FeatureBit = 1
FeatureBit_INITIAL_ROUING_SYNC FeatureBit = 3
FeatureBit_UPFRONT_SHUTDOWN_SCRIPT_REQ FeatureBit = 4
FeatureBit_UPFRONT_SHUTDOWN_SCRIPT_OPT FeatureBit = 5
FeatureBit_GOSSIP_QUERIES_REQ FeatureBit = 6
FeatureBit_GOSSIP_QUERIES_OPT FeatureBit = 7
FeatureBit_TLV_ONION_REQ FeatureBit = 8
FeatureBit_TLV_ONION_OPT FeatureBit = 9
FeatureBit_EXT_GOSSIP_QUERIES_REQ FeatureBit = 10
FeatureBit_EXT_GOSSIP_QUERIES_OPT FeatureBit = 11
FeatureBit_STATIC_REMOTE_KEY_REQ FeatureBit = 12
FeatureBit_STATIC_REMOTE_KEY_OPT FeatureBit = 13
FeatureBit_PAYMENT_ADDR_REQ FeatureBit = 14
FeatureBit_PAYMENT_ADDR_OPT FeatureBit = 15
FeatureBit_MPP_REQ FeatureBit = 16
FeatureBit_MPP_OPT FeatureBit = 17
FeatureBit_WUMBO_CHANNELS_REQ FeatureBit = 18
FeatureBit_WUMBO_CHANNELS_OPT FeatureBit = 19
FeatureBit_ANCHORS_REQ FeatureBit = 20
FeatureBit_ANCHORS_OPT FeatureBit = 21
FeatureBit_ANCHORS_ZERO_FEE_HTLC_REQ FeatureBit = 22
FeatureBit_ANCHORS_ZERO_FEE_HTLC_OPT FeatureBit = 23
FeatureBit_AMP_REQ FeatureBit = 30
FeatureBit_AMP_OPT FeatureBit = 31
)
// Enum value maps for FeatureBit.
var (
FeatureBit_name = map[int32]string{
0: "DATALOSS_PROTECT_REQ",
1: "DATALOSS_PROTECT_OPT",
3: "INITIAL_ROUING_SYNC",
4: "UPFRONT_SHUTDOWN_SCRIPT_REQ",
5: "UPFRONT_SHUTDOWN_SCRIPT_OPT",
6: "GOSSIP_QUERIES_REQ",
7: "GOSSIP_QUERIES_OPT",
8: "TLV_ONION_REQ",
9: "TLV_ONION_OPT",
10: "EXT_GOSSIP_QUERIES_REQ",
11: "EXT_GOSSIP_QUERIES_OPT",
12: "STATIC_REMOTE_KEY_REQ",
13: "STATIC_REMOTE_KEY_OPT",
14: "PAYMENT_ADDR_REQ",
15: "PAYMENT_ADDR_OPT",
16: "MPP_REQ",
17: "MPP_OPT",
18: "WUMBO_CHANNELS_REQ",
19: "WUMBO_CHANNELS_OPT",
20: "ANCHORS_REQ",
21: "ANCHORS_OPT",
22: "ANCHORS_ZERO_FEE_HTLC_REQ",
23: "ANCHORS_ZERO_FEE_HTLC_OPT",
30: "AMP_REQ",
31: "AMP_OPT",
}
FeatureBit_value = map[string]int32{
"DATALOSS_PROTECT_REQ": 0,
"DATALOSS_PROTECT_OPT": 1,
"INITIAL_ROUING_SYNC": 3,
"UPFRONT_SHUTDOWN_SCRIPT_REQ": 4,
"UPFRONT_SHUTDOWN_SCRIPT_OPT": 5,
"GOSSIP_QUERIES_REQ": 6,
"GOSSIP_QUERIES_OPT": 7,
"TLV_ONION_REQ": 8,
"TLV_ONION_OPT": 9,
"EXT_GOSSIP_QUERIES_REQ": 10,
"EXT_GOSSIP_QUERIES_OPT": 11,
"STATIC_REMOTE_KEY_REQ": 12,
"STATIC_REMOTE_KEY_OPT": 13,
"PAYMENT_ADDR_REQ": 14,
"PAYMENT_ADDR_OPT": 15,
"MPP_REQ": 16,
"MPP_OPT": 17,
"WUMBO_CHANNELS_REQ": 18,
"WUMBO_CHANNELS_OPT": 19,
"ANCHORS_REQ": 20,
"ANCHORS_OPT": 21,
"ANCHORS_ZERO_FEE_HTLC_REQ": 22,
"ANCHORS_ZERO_FEE_HTLC_OPT": 23,
"AMP_REQ": 30,
"AMP_OPT": 31,
}
)
func (x FeatureBit) Enum() *FeatureBit {
p := new(FeatureBit)
*p = x
return p
}
func (x FeatureBit) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (FeatureBit) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[8].Descriptor()
}
func (FeatureBit) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[8]
}
func (x FeatureBit) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use FeatureBit.Descriptor instead.
func (FeatureBit) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{8}
}
type UpdateFailure int32
const (
UpdateFailure_UPDATE_FAILURE_UNKNOWN UpdateFailure = 0
UpdateFailure_UPDATE_FAILURE_PENDING UpdateFailure = 1
UpdateFailure_UPDATE_FAILURE_NOT_FOUND UpdateFailure = 2
UpdateFailure_UPDATE_FAILURE_INTERNAL_ERR UpdateFailure = 3
UpdateFailure_UPDATE_FAILURE_INVALID_PARAMETER UpdateFailure = 4
)
// Enum value maps for UpdateFailure.
var (
UpdateFailure_name = map[int32]string{
0: "UPDATE_FAILURE_UNKNOWN",
1: "UPDATE_FAILURE_PENDING",
2: "UPDATE_FAILURE_NOT_FOUND",
3: "UPDATE_FAILURE_INTERNAL_ERR",
4: "UPDATE_FAILURE_INVALID_PARAMETER",
}
UpdateFailure_value = map[string]int32{
"UPDATE_FAILURE_UNKNOWN": 0,
"UPDATE_FAILURE_PENDING": 1,
"UPDATE_FAILURE_NOT_FOUND": 2,
"UPDATE_FAILURE_INTERNAL_ERR": 3,
"UPDATE_FAILURE_INVALID_PARAMETER": 4,
}
)
func (x UpdateFailure) Enum() *UpdateFailure {
p := new(UpdateFailure)
*p = x
return p
}
func (x UpdateFailure) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (UpdateFailure) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[9].Descriptor()
}
func (UpdateFailure) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[9]
}
func (x UpdateFailure) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use UpdateFailure.Descriptor instead.
func (UpdateFailure) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{9}
}
type ChannelCloseSummary_ClosureType int32
const (
ChannelCloseSummary_COOPERATIVE_CLOSE ChannelCloseSummary_ClosureType = 0
ChannelCloseSummary_LOCAL_FORCE_CLOSE ChannelCloseSummary_ClosureType = 1
ChannelCloseSummary_REMOTE_FORCE_CLOSE ChannelCloseSummary_ClosureType = 2
ChannelCloseSummary_BREACH_CLOSE ChannelCloseSummary_ClosureType = 3
ChannelCloseSummary_FUNDING_CANCELED ChannelCloseSummary_ClosureType = 4
ChannelCloseSummary_ABANDONED ChannelCloseSummary_ClosureType = 5
)
// Enum value maps for ChannelCloseSummary_ClosureType.
var (
ChannelCloseSummary_ClosureType_name = map[int32]string{
0: "COOPERATIVE_CLOSE",
1: "LOCAL_FORCE_CLOSE",
2: "REMOTE_FORCE_CLOSE",
3: "BREACH_CLOSE",
4: "FUNDING_CANCELED",
5: "ABANDONED",
}
ChannelCloseSummary_ClosureType_value = map[string]int32{
"COOPERATIVE_CLOSE": 0,
"LOCAL_FORCE_CLOSE": 1,
"REMOTE_FORCE_CLOSE": 2,
"BREACH_CLOSE": 3,
"FUNDING_CANCELED": 4,
"ABANDONED": 5,
}
)
func (x ChannelCloseSummary_ClosureType) Enum() *ChannelCloseSummary_ClosureType {
p := new(ChannelCloseSummary_ClosureType)
*p = x
return p
}
func (x ChannelCloseSummary_ClosureType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ChannelCloseSummary_ClosureType) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[10].Descriptor()
}
func (ChannelCloseSummary_ClosureType) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[10]
}
func (x ChannelCloseSummary_ClosureType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ChannelCloseSummary_ClosureType.Descriptor instead.
func (ChannelCloseSummary_ClosureType) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{40, 0}
}
type Peer_SyncType int32
const (
//
//Denotes that we cannot determine the peer's current sync type.
Peer_UNKNOWN_SYNC Peer_SyncType = 0
//
//Denotes that we are actively receiving new graph updates from the peer.
Peer_ACTIVE_SYNC Peer_SyncType = 1
//
//Denotes that we are not receiving new graph updates from the peer.
Peer_PASSIVE_SYNC Peer_SyncType = 2
//
//Denotes that this peer is pinned into an active sync.
Peer_PINNED_SYNC Peer_SyncType = 3
)
// Enum value maps for Peer_SyncType.
var (
Peer_SyncType_name = map[int32]string{
0: "UNKNOWN_SYNC",
1: "ACTIVE_SYNC",
2: "PASSIVE_SYNC",
3: "PINNED_SYNC",
}
Peer_SyncType_value = map[string]int32{
"UNKNOWN_SYNC": 0,
"ACTIVE_SYNC": 1,
"PASSIVE_SYNC": 2,
"PINNED_SYNC": 3,
}
)
func (x Peer_SyncType) Enum() *Peer_SyncType {
p := new(Peer_SyncType)
*p = x
return p
}
func (x Peer_SyncType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Peer_SyncType) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[11].Descriptor()
}
func (Peer_SyncType) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[11]
}
func (x Peer_SyncType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Peer_SyncType.Descriptor instead.
func (Peer_SyncType) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{44, 0}
}
type PeerEvent_EventType int32
const (
PeerEvent_PEER_ONLINE PeerEvent_EventType = 0
PeerEvent_PEER_OFFLINE PeerEvent_EventType = 1
)
// Enum value maps for PeerEvent_EventType.
var (
PeerEvent_EventType_name = map[int32]string{
0: "PEER_ONLINE",
1: "PEER_OFFLINE",
}
PeerEvent_EventType_value = map[string]int32{
"PEER_ONLINE": 0,
"PEER_OFFLINE": 1,
}
)
func (x PeerEvent_EventType) Enum() *PeerEvent_EventType {
p := new(PeerEvent_EventType)
*p = x
return p
}
func (x PeerEvent_EventType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PeerEvent_EventType) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[12].Descriptor()
}
func (PeerEvent_EventType) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[12]
}
func (x PeerEvent_EventType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PeerEvent_EventType.Descriptor instead.
func (PeerEvent_EventType) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{49, 0}
}
type PendingChannelsResponse_ForceClosedChannel_AnchorState int32
const (
PendingChannelsResponse_ForceClosedChannel_LIMBO PendingChannelsResponse_ForceClosedChannel_AnchorState = 0
PendingChannelsResponse_ForceClosedChannel_RECOVERED PendingChannelsResponse_ForceClosedChannel_AnchorState = 1
PendingChannelsResponse_ForceClosedChannel_LOST PendingChannelsResponse_ForceClosedChannel_AnchorState = 2
)
// Enum value maps for PendingChannelsResponse_ForceClosedChannel_AnchorState.
var (
PendingChannelsResponse_ForceClosedChannel_AnchorState_name = map[int32]string{
0: "LIMBO",
1: "RECOVERED",
2: "LOST",
}
PendingChannelsResponse_ForceClosedChannel_AnchorState_value = map[string]int32{
"LIMBO": 0,
"RECOVERED": 1,
"LOST": 2,
}
)
func (x PendingChannelsResponse_ForceClosedChannel_AnchorState) Enum() *PendingChannelsResponse_ForceClosedChannel_AnchorState {
p := new(PendingChannelsResponse_ForceClosedChannel_AnchorState)
*p = x
return p
}
func (x PendingChannelsResponse_ForceClosedChannel_AnchorState) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PendingChannelsResponse_ForceClosedChannel_AnchorState) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[13].Descriptor()
}
func (PendingChannelsResponse_ForceClosedChannel_AnchorState) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[13]
}
func (x PendingChannelsResponse_ForceClosedChannel_AnchorState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PendingChannelsResponse_ForceClosedChannel_AnchorState.Descriptor instead.
func (PendingChannelsResponse_ForceClosedChannel_AnchorState) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{79, 5, 0}
}
type ChannelEventUpdate_UpdateType int32
const (
ChannelEventUpdate_OPEN_CHANNEL ChannelEventUpdate_UpdateType = 0
ChannelEventUpdate_CLOSED_CHANNEL ChannelEventUpdate_UpdateType = 1
ChannelEventUpdate_ACTIVE_CHANNEL ChannelEventUpdate_UpdateType = 2
ChannelEventUpdate_INACTIVE_CHANNEL ChannelEventUpdate_UpdateType = 3
ChannelEventUpdate_PENDING_OPEN_CHANNEL ChannelEventUpdate_UpdateType = 4
ChannelEventUpdate_FULLY_RESOLVED_CHANNEL ChannelEventUpdate_UpdateType = 5
)
// Enum value maps for ChannelEventUpdate_UpdateType.
var (
ChannelEventUpdate_UpdateType_name = map[int32]string{
0: "OPEN_CHANNEL",
1: "CLOSED_CHANNEL",
2: "ACTIVE_CHANNEL",
3: "INACTIVE_CHANNEL",
4: "PENDING_OPEN_CHANNEL",
5: "FULLY_RESOLVED_CHANNEL",
}
ChannelEventUpdate_UpdateType_value = map[string]int32{
"OPEN_CHANNEL": 0,
"CLOSED_CHANNEL": 1,
"ACTIVE_CHANNEL": 2,
"INACTIVE_CHANNEL": 3,
"PENDING_OPEN_CHANNEL": 4,
"FULLY_RESOLVED_CHANNEL": 5,
}
)
func (x ChannelEventUpdate_UpdateType) Enum() *ChannelEventUpdate_UpdateType {
p := new(ChannelEventUpdate_UpdateType)
*p = x
return p
}
func (x ChannelEventUpdate_UpdateType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ChannelEventUpdate_UpdateType) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[14].Descriptor()
}
func (ChannelEventUpdate_UpdateType) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[14]
}
func (x ChannelEventUpdate_UpdateType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ChannelEventUpdate_UpdateType.Descriptor instead.
func (ChannelEventUpdate_UpdateType) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{81, 0}
}
type Invoice_InvoiceState int32
const (
Invoice_OPEN Invoice_InvoiceState = 0
Invoice_SETTLED Invoice_InvoiceState = 1
Invoice_CANCELED Invoice_InvoiceState = 2
Invoice_ACCEPTED Invoice_InvoiceState = 3
)
// Enum value maps for Invoice_InvoiceState.
var (
Invoice_InvoiceState_name = map[int32]string{
0: "OPEN",
1: "SETTLED",
2: "CANCELED",
3: "ACCEPTED",
}
Invoice_InvoiceState_value = map[string]int32{
"OPEN": 0,
"SETTLED": 1,
"CANCELED": 2,
"ACCEPTED": 3,
}
)
func (x Invoice_InvoiceState) Enum() *Invoice_InvoiceState {
p := new(Invoice_InvoiceState)
*p = x
return p
}
func (x Invoice_InvoiceState) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Invoice_InvoiceState) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[15].Descriptor()
}
func (Invoice_InvoiceState) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[15]
}
func (x Invoice_InvoiceState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Invoice_InvoiceState.Descriptor instead.
func (Invoice_InvoiceState) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{121, 0}
}
type Payment_PaymentStatus int32
const (
Payment_UNKNOWN Payment_PaymentStatus = 0
Payment_IN_FLIGHT Payment_PaymentStatus = 1
Payment_SUCCEEDED Payment_PaymentStatus = 2
Payment_FAILED Payment_PaymentStatus = 3
)
// Enum value maps for Payment_PaymentStatus.
var (
Payment_PaymentStatus_name = map[int32]string{
0: "UNKNOWN",
1: "IN_FLIGHT",
2: "SUCCEEDED",
3: "FAILED",
}
Payment_PaymentStatus_value = map[string]int32{
"UNKNOWN": 0,
"IN_FLIGHT": 1,
"SUCCEEDED": 2,
"FAILED": 3,
}
)
func (x Payment_PaymentStatus) Enum() *Payment_PaymentStatus {
p := new(Payment_PaymentStatus)
*p = x
return p
}
func (x Payment_PaymentStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Payment_PaymentStatus) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[16].Descriptor()
}
func (Payment_PaymentStatus) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[16]
}
func (x Payment_PaymentStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Payment_PaymentStatus.Descriptor instead.
func (Payment_PaymentStatus) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{129, 0}
}
type HTLCAttempt_HTLCStatus int32
const (
HTLCAttempt_IN_FLIGHT HTLCAttempt_HTLCStatus = 0
HTLCAttempt_SUCCEEDED HTLCAttempt_HTLCStatus = 1
HTLCAttempt_FAILED HTLCAttempt_HTLCStatus = 2
)
// Enum value maps for HTLCAttempt_HTLCStatus.
var (
HTLCAttempt_HTLCStatus_name = map[int32]string{
0: "IN_FLIGHT",
1: "SUCCEEDED",
2: "FAILED",
}
HTLCAttempt_HTLCStatus_value = map[string]int32{
"IN_FLIGHT": 0,
"SUCCEEDED": 1,
"FAILED": 2,
}
)
func (x HTLCAttempt_HTLCStatus) Enum() *HTLCAttempt_HTLCStatus {
p := new(HTLCAttempt_HTLCStatus)
*p = x
return p
}
func (x HTLCAttempt_HTLCStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (HTLCAttempt_HTLCStatus) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[17].Descriptor()
}
func (HTLCAttempt_HTLCStatus) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[17]
}
func (x HTLCAttempt_HTLCStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use HTLCAttempt_HTLCStatus.Descriptor instead.
func (HTLCAttempt_HTLCStatus) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{130, 0}
}
type Failure_FailureCode int32
const (
//
//The numbers assigned in this enumeration match the failure codes as
//defined in BOLT #4. Because protobuf 3 requires enums to start with 0,
//a RESERVED value is added.
Failure_RESERVED Failure_FailureCode = 0
Failure_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS Failure_FailureCode = 1
Failure_INCORRECT_PAYMENT_AMOUNT Failure_FailureCode = 2
Failure_FINAL_INCORRECT_CLTV_EXPIRY Failure_FailureCode = 3
Failure_FINAL_INCORRECT_HTLC_AMOUNT Failure_FailureCode = 4
Failure_FINAL_EXPIRY_TOO_SOON Failure_FailureCode = 5
Failure_INVALID_REALM Failure_FailureCode = 6
Failure_EXPIRY_TOO_SOON Failure_FailureCode = 7
Failure_INVALID_ONION_VERSION Failure_FailureCode = 8
Failure_INVALID_ONION_HMAC Failure_FailureCode = 9
Failure_INVALID_ONION_KEY Failure_FailureCode = 10
Failure_AMOUNT_BELOW_MINIMUM Failure_FailureCode = 11
Failure_FEE_INSUFFICIENT Failure_FailureCode = 12
Failure_INCORRECT_CLTV_EXPIRY Failure_FailureCode = 13
Failure_CHANNEL_DISABLED Failure_FailureCode = 14
Failure_TEMPORARY_CHANNEL_FAILURE Failure_FailureCode = 15
Failure_REQUIRED_NODE_FEATURE_MISSING Failure_FailureCode = 16
Failure_REQUIRED_CHANNEL_FEATURE_MISSING Failure_FailureCode = 17
Failure_UNKNOWN_NEXT_PEER Failure_FailureCode = 18
Failure_TEMPORARY_NODE_FAILURE Failure_FailureCode = 19
Failure_PERMANENT_NODE_FAILURE Failure_FailureCode = 20
Failure_PERMANENT_CHANNEL_FAILURE Failure_FailureCode = 21
Failure_EXPIRY_TOO_FAR Failure_FailureCode = 22
Failure_MPP_TIMEOUT Failure_FailureCode = 23
Failure_INVALID_ONION_PAYLOAD Failure_FailureCode = 24
//
//An internal error occurred.
Failure_INTERNAL_FAILURE Failure_FailureCode = 997
//
//The error source is known, but the failure itself couldn't be decoded.
Failure_UNKNOWN_FAILURE Failure_FailureCode = 998
//
//An unreadable failure result is returned if the received failure message
//cannot be decrypted. In that case the error source is unknown.
Failure_UNREADABLE_FAILURE Failure_FailureCode = 999
)
// Enum value maps for Failure_FailureCode.
var (
Failure_FailureCode_name = map[int32]string{
0: "RESERVED",
1: "INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS",
2: "INCORRECT_PAYMENT_AMOUNT",
3: "FINAL_INCORRECT_CLTV_EXPIRY",
4: "FINAL_INCORRECT_HTLC_AMOUNT",
5: "FINAL_EXPIRY_TOO_SOON",
6: "INVALID_REALM",
7: "EXPIRY_TOO_SOON",
8: "INVALID_ONION_VERSION",
9: "INVALID_ONION_HMAC",
10: "INVALID_ONION_KEY",
11: "AMOUNT_BELOW_MINIMUM",
12: "FEE_INSUFFICIENT",
13: "INCORRECT_CLTV_EXPIRY",
14: "CHANNEL_DISABLED",
15: "TEMPORARY_CHANNEL_FAILURE",
16: "REQUIRED_NODE_FEATURE_MISSING",
17: "REQUIRED_CHANNEL_FEATURE_MISSING",
18: "UNKNOWN_NEXT_PEER",
19: "TEMPORARY_NODE_FAILURE",
20: "PERMANENT_NODE_FAILURE",
21: "PERMANENT_CHANNEL_FAILURE",
22: "EXPIRY_TOO_FAR",
23: "MPP_TIMEOUT",
24: "INVALID_ONION_PAYLOAD",
997: "INTERNAL_FAILURE",
998: "UNKNOWN_FAILURE",
999: "UNREADABLE_FAILURE",
}
Failure_FailureCode_value = map[string]int32{
"RESERVED": 0,
"INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS": 1,
"INCORRECT_PAYMENT_AMOUNT": 2,
"FINAL_INCORRECT_CLTV_EXPIRY": 3,
"FINAL_INCORRECT_HTLC_AMOUNT": 4,
"FINAL_EXPIRY_TOO_SOON": 5,
"INVALID_REALM": 6,
"EXPIRY_TOO_SOON": 7,
"INVALID_ONION_VERSION": 8,
"INVALID_ONION_HMAC": 9,
"INVALID_ONION_KEY": 10,
"AMOUNT_BELOW_MINIMUM": 11,
"FEE_INSUFFICIENT": 12,
"INCORRECT_CLTV_EXPIRY": 13,
"CHANNEL_DISABLED": 14,
"TEMPORARY_CHANNEL_FAILURE": 15,
"REQUIRED_NODE_FEATURE_MISSING": 16,
"REQUIRED_CHANNEL_FEATURE_MISSING": 17,
"UNKNOWN_NEXT_PEER": 18,
"TEMPORARY_NODE_FAILURE": 19,
"PERMANENT_NODE_FAILURE": 20,
"PERMANENT_CHANNEL_FAILURE": 21,
"EXPIRY_TOO_FAR": 22,
"MPP_TIMEOUT": 23,
"INVALID_ONION_PAYLOAD": 24,
"INTERNAL_FAILURE": 997,
"UNKNOWN_FAILURE": 998,
"UNREADABLE_FAILURE": 999,
}
)
func (x Failure_FailureCode) Enum() *Failure_FailureCode {
p := new(Failure_FailureCode)
*p = x
return p
}
func (x Failure_FailureCode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Failure_FailureCode) Descriptor() protoreflect.EnumDescriptor {
return file_lightning_proto_enumTypes[18].Descriptor()
}
func (Failure_FailureCode) Type() protoreflect.EnumType {
return &file_lightning_proto_enumTypes[18]
}
func (x Failure_FailureCode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Failure_FailureCode.Descriptor instead.
func (Failure_FailureCode) EnumDescriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{173, 0}
}
type SubscribeCustomMessagesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *SubscribeCustomMessagesRequest) Reset() {
*x = SubscribeCustomMessagesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SubscribeCustomMessagesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SubscribeCustomMessagesRequest) ProtoMessage() {}
func (x *SubscribeCustomMessagesRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SubscribeCustomMessagesRequest.ProtoReflect.Descriptor instead.
func (*SubscribeCustomMessagesRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{0}
}
type CustomMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Peer from which the message originates
Peer []byte `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"`
// Message type. This value will be in the custom range (>= 32768).
Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
// Raw message data
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *CustomMessage) Reset() {
*x = CustomMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CustomMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CustomMessage) ProtoMessage() {}
func (x *CustomMessage) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CustomMessage.ProtoReflect.Descriptor instead.
func (*CustomMessage) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{1}
}
func (x *CustomMessage) GetPeer() []byte {
if x != nil {
return x.Peer
}
return nil
}
func (x *CustomMessage) GetType() uint32 {
if x != nil {
return x.Type
}
return 0
}
func (x *CustomMessage) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
type SendCustomMessageRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Peer to send the message to
Peer []byte `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"`
// Message type. This value needs to be in the custom range (>= 32768).
Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
// Raw message data.
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *SendCustomMessageRequest) Reset() {
*x = SendCustomMessageRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SendCustomMessageRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendCustomMessageRequest) ProtoMessage() {}
func (x *SendCustomMessageRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SendCustomMessageRequest.ProtoReflect.Descriptor instead.
func (*SendCustomMessageRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{2}
}
func (x *SendCustomMessageRequest) GetPeer() []byte {
if x != nil {
return x.Peer
}
return nil
}
func (x *SendCustomMessageRequest) GetType() uint32 {
if x != nil {
return x.Type
}
return 0
}
func (x *SendCustomMessageRequest) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
type SendCustomMessageResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *SendCustomMessageResponse) Reset() {
*x = SendCustomMessageResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SendCustomMessageResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendCustomMessageResponse) ProtoMessage() {}
func (x *SendCustomMessageResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SendCustomMessageResponse.ProtoReflect.Descriptor instead.
func (*SendCustomMessageResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{3}
}
type Utxo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The type of address
AddressType AddressType `protobuf:"varint,1,opt,name=address_type,json=addressType,proto3,enum=lnrpc.AddressType" json:"address_type,omitempty"`
// The address
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
// The value of the unspent coin in satoshis
AmountSat int64 `protobuf:"varint,3,opt,name=amount_sat,json=amountSat,proto3" json:"amount_sat,omitempty"`
// The pkscript in hex
PkScript string `protobuf:"bytes,4,opt,name=pk_script,json=pkScript,proto3" json:"pk_script,omitempty"`
// The outpoint in format txid:n
Outpoint *OutPoint `protobuf:"bytes,5,opt,name=outpoint,proto3" json:"outpoint,omitempty"`
// The number of confirmations for the Utxo
Confirmations int64 `protobuf:"varint,6,opt,name=confirmations,proto3" json:"confirmations,omitempty"`
}
func (x *Utxo) Reset() {
*x = Utxo{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Utxo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Utxo) ProtoMessage() {}
func (x *Utxo) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Utxo.ProtoReflect.Descriptor instead.
func (*Utxo) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{4}
}
func (x *Utxo) GetAddressType() AddressType {
if x != nil {
return x.AddressType
}
return AddressType_WITNESS_PUBKEY_HASH
}
func (x *Utxo) GetAddress() string {
if x != nil {
return x.Address
}
return ""
}
func (x *Utxo) GetAmountSat() int64 {
if x != nil {
return x.AmountSat
}
return 0
}
func (x *Utxo) GetPkScript() string {
if x != nil {
return x.PkScript
}
return ""
}
func (x *Utxo) GetOutpoint() *OutPoint {
if x != nil {
return x.Outpoint
}
return nil
}
func (x *Utxo) GetConfirmations() int64 {
if x != nil {
return x.Confirmations
}
return 0
}
type Transaction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The transaction hash
TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
// The transaction amount, denominated in satoshis
Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
// The number of confirmations
NumConfirmations int32 `protobuf:"varint,3,opt,name=num_confirmations,json=numConfirmations,proto3" json:"num_confirmations,omitempty"`
// The hash of the block this transaction was included in
BlockHash string `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
// The height of the block this transaction was included in
BlockHeight int32 `protobuf:"varint,5,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
// Timestamp of this transaction
TimeStamp int64 `protobuf:"varint,6,opt,name=time_stamp,json=timeStamp,proto3" json:"time_stamp,omitempty"`
// Fees paid for this transaction
TotalFees int64 `protobuf:"varint,7,opt,name=total_fees,json=totalFees,proto3" json:"total_fees,omitempty"`
// Addresses that received funds for this transaction
DestAddresses []string `protobuf:"bytes,8,rep,name=dest_addresses,json=destAddresses,proto3" json:"dest_addresses,omitempty"`
// The raw transaction hex.
RawTxHex string `protobuf:"bytes,9,opt,name=raw_tx_hex,json=rawTxHex,proto3" json:"raw_tx_hex,omitempty"`
// A label that was optionally set on transaction broadcast.
Label string `protobuf:"bytes,10,opt,name=label,proto3" json:"label,omitempty"`
}
func (x *Transaction) Reset() {
*x = Transaction{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Transaction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Transaction) ProtoMessage() {}
func (x *Transaction) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{5}
}
func (x *Transaction) GetTxHash() string {
if x != nil {
return x.TxHash
}
return ""
}
func (x *Transaction) GetAmount() int64 {
if x != nil {
return x.Amount
}
return 0
}
func (x *Transaction) GetNumConfirmations() int32 {
if x != nil {
return x.NumConfirmations
}
return 0
}
func (x *Transaction) GetBlockHash() string {
if x != nil {
return x.BlockHash
}
return ""
}
func (x *Transaction) GetBlockHeight() int32 {
if x != nil {
return x.BlockHeight
}
return 0
}
func (x *Transaction) GetTimeStamp() int64 {
if x != nil {
return x.TimeStamp
}
return 0
}
func (x *Transaction) GetTotalFees() int64 {
if x != nil {
return x.TotalFees
}
return 0
}
func (x *Transaction) GetDestAddresses() []string {
if x != nil {
return x.DestAddresses
}
return nil
}
func (x *Transaction) GetRawTxHex() string {
if x != nil {
return x.RawTxHex
}
return ""
}
func (x *Transaction) GetLabel() string {
if x != nil {
return x.Label
}
return ""
}
type GetTransactionsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The height from which to list transactions, inclusive. If this value is
//greater than end_height, transactions will be read in reverse.
StartHeight int32 `protobuf:"varint,1,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"`
//
//The height until which to list transactions, inclusive. To include
//unconfirmed transactions, this value should be set to -1, which will
//return transactions from start_height until the current chain tip and
//unconfirmed transactions. If no end_height is provided, the call will
//default to this option.
EndHeight int32 `protobuf:"varint,2,opt,name=end_height,json=endHeight,proto3" json:"end_height,omitempty"`
// An optional filter to only include transactions relevant to an account.
Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"`
}
func (x *GetTransactionsRequest) Reset() {
*x = GetTransactionsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetTransactionsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetTransactionsRequest) ProtoMessage() {}
func (x *GetTransactionsRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetTransactionsRequest.ProtoReflect.Descriptor instead.
func (*GetTransactionsRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{6}
}
func (x *GetTransactionsRequest) GetStartHeight() int32 {
if x != nil {
return x.StartHeight
}
return 0
}
func (x *GetTransactionsRequest) GetEndHeight() int32 {
if x != nil {
return x.EndHeight
}
return 0
}
func (x *GetTransactionsRequest) GetAccount() string {
if x != nil {
return x.Account
}
return ""
}
type TransactionDetails struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of transactions relevant to the wallet.
Transactions []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"`
}
func (x *TransactionDetails) Reset() {
*x = TransactionDetails{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TransactionDetails) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TransactionDetails) ProtoMessage() {}
func (x *TransactionDetails) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TransactionDetails.ProtoReflect.Descriptor instead.
func (*TransactionDetails) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{7}
}
func (x *TransactionDetails) GetTransactions() []*Transaction {
if x != nil {
return x.Transactions
}
return nil
}
type FeeLimit struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Limit:
// *FeeLimit_Fixed
// *FeeLimit_FixedMsat
// *FeeLimit_Percent
Limit isFeeLimit_Limit `protobuf_oneof:"limit"`
}
func (x *FeeLimit) Reset() {
*x = FeeLimit{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FeeLimit) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FeeLimit) ProtoMessage() {}
func (x *FeeLimit) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FeeLimit.ProtoReflect.Descriptor instead.
func (*FeeLimit) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{8}
}
func (m *FeeLimit) GetLimit() isFeeLimit_Limit {
if m != nil {
return m.Limit
}
return nil
}
func (x *FeeLimit) GetFixed() int64 {
if x, ok := x.GetLimit().(*FeeLimit_Fixed); ok {
return x.Fixed
}
return 0
}
func (x *FeeLimit) GetFixedMsat() int64 {
if x, ok := x.GetLimit().(*FeeLimit_FixedMsat); ok {
return x.FixedMsat
}
return 0
}
func (x *FeeLimit) GetPercent() int64 {
if x, ok := x.GetLimit().(*FeeLimit_Percent); ok {
return x.Percent
}
return 0
}
type isFeeLimit_Limit interface {
isFeeLimit_Limit()
}
type FeeLimit_Fixed struct {
//
//The fee limit expressed as a fixed amount of satoshis.
//
//The fields fixed and fixed_msat are mutually exclusive.
Fixed int64 `protobuf:"varint,1,opt,name=fixed,proto3,oneof"`
}
type FeeLimit_FixedMsat struct {
//
//The fee limit expressed as a fixed amount of millisatoshis.
//
//The fields fixed and fixed_msat are mutually exclusive.
FixedMsat int64 `protobuf:"varint,3,opt,name=fixed_msat,json=fixedMsat,proto3,oneof"`
}
type FeeLimit_Percent struct {
// The fee limit expressed as a percentage of the payment amount.
Percent int64 `protobuf:"varint,2,opt,name=percent,proto3,oneof"`
}
func (*FeeLimit_Fixed) isFeeLimit_Limit() {}
func (*FeeLimit_FixedMsat) isFeeLimit_Limit() {}
func (*FeeLimit_Percent) isFeeLimit_Limit() {}
type SendRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The identity pubkey of the payment recipient. When using REST, this field
//must be encoded as base64.
Dest []byte `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"`
//
//The hex-encoded identity pubkey of the payment recipient. Deprecated now
//that the REST gateway supports base64 encoding of bytes fields.
//
// Deprecated: Do not use.
DestString string `protobuf:"bytes,2,opt,name=dest_string,json=destString,proto3" json:"dest_string,omitempty"`
//
//The amount to send expressed in satoshis.
//
//The fields amt and amt_msat are mutually exclusive.
Amt int64 `protobuf:"varint,3,opt,name=amt,proto3" json:"amt,omitempty"`
//
//The amount to send expressed in millisatoshis.
//
//The fields amt and amt_msat are mutually exclusive.
AmtMsat int64 `protobuf:"varint,12,opt,name=amt_msat,json=amtMsat,proto3" json:"amt_msat,omitempty"`
//
//The hash to use within the payment's HTLC. When using REST, this field
//must be encoded as base64.
PaymentHash []byte `protobuf:"bytes,4,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
//
//The hex-encoded hash to use within the payment's HTLC. Deprecated now
//that the REST gateway supports base64 encoding of bytes fields.
//
// Deprecated: Do not use.
PaymentHashString string `protobuf:"bytes,5,opt,name=payment_hash_string,json=paymentHashString,proto3" json:"payment_hash_string,omitempty"`
//
//A bare-bones invoice for a payment within the Lightning Network. With the
//details of the invoice, the sender has all the data necessary to send a
//payment to the recipient.
PaymentRequest string `protobuf:"bytes,6,opt,name=payment_request,json=paymentRequest,proto3" json:"payment_request,omitempty"`
//
//The CLTV delta from the current height that should be used to set the
//timelock for the final hop.
FinalCltvDelta int32 `protobuf:"varint,7,opt,name=final_cltv_delta,json=finalCltvDelta,proto3" json:"final_cltv_delta,omitempty"`
//
//The maximum number of satoshis that will be paid as a fee of the payment.
//This value can be represented either as a percentage of the amount being
//sent, or as a fixed amount of the maximum fee the user is willing the pay to
//send the payment.
FeeLimit *FeeLimit `protobuf:"bytes,8,opt,name=fee_limit,json=feeLimit,proto3" json:"fee_limit,omitempty"`
//
//The channel id of the channel that must be taken to the first hop. If zero,
//any channel may be used.
OutgoingChanId uint64 `protobuf:"varint,9,opt,name=outgoing_chan_id,json=outgoingChanId,proto3" json:"outgoing_chan_id,omitempty"`
//
//The pubkey of the last hop of the route. If empty, any hop may be used.
LastHopPubkey []byte `protobuf:"bytes,13,opt,name=last_hop_pubkey,json=lastHopPubkey,proto3" json:"last_hop_pubkey,omitempty"`
//
//An optional maximum total time lock for the route. This should not exceed
//lnd's `--max-cltv-expiry` setting. If zero, then the value of
//`--max-cltv-expiry` is enforced.
CltvLimit uint32 `protobuf:"varint,10,opt,name=cltv_limit,json=cltvLimit,proto3" json:"cltv_limit,omitempty"`
//
//An optional field that can be used to pass an arbitrary set of TLV records
//to a peer which understands the new records. This can be used to pass
//application specific data during the payment attempt. Record types are
//required to be in the custom range >= 65536. When using REST, the values
//must be encoded as base64.
DestCustomRecords map[uint64][]byte `protobuf:"bytes,11,rep,name=dest_custom_records,json=destCustomRecords,proto3" json:"dest_custom_records,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// If set, circular payments to self are permitted.
AllowSelfPayment bool `protobuf:"varint,14,opt,name=allow_self_payment,json=allowSelfPayment,proto3" json:"allow_self_payment,omitempty"`
//
//Features assumed to be supported by the final node. All transitive feature
//dependencies must also be set properly. For a given feature bit pair, either
//optional or remote may be set, but not both. If this field is nil or empty,
//the router will try to load destination features from the graph as a
//fallback.
DestFeatures []FeatureBit `protobuf:"varint,15,rep,packed,name=dest_features,json=destFeatures,proto3,enum=lnrpc.FeatureBit" json:"dest_features,omitempty"`
//
//The payment address of the generated invoice.
PaymentAddr []byte `protobuf:"bytes,16,opt,name=payment_addr,json=paymentAddr,proto3" json:"payment_addr,omitempty"`
}
func (x *SendRequest) Reset() {
*x = SendRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SendRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendRequest) ProtoMessage() {}
func (x *SendRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.
func (*SendRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{9}
}
func (x *SendRequest) GetDest() []byte {
if x != nil {
return x.Dest
}
return nil
}
// Deprecated: Do not use.
func (x *SendRequest) GetDestString() string {
if x != nil {
return x.DestString
}
return ""
}
func (x *SendRequest) GetAmt() int64 {
if x != nil {
return x.Amt
}
return 0
}
func (x *SendRequest) GetAmtMsat() int64 {
if x != nil {
return x.AmtMsat
}
return 0
}
func (x *SendRequest) GetPaymentHash() []byte {
if x != nil {
return x.PaymentHash
}
return nil
}
// Deprecated: Do not use.
func (x *SendRequest) GetPaymentHashString() string {
if x != nil {
return x.PaymentHashString
}
return ""
}
func (x *SendRequest) GetPaymentRequest() string {
if x != nil {
return x.PaymentRequest
}
return ""
}
func (x *SendRequest) GetFinalCltvDelta() int32 {
if x != nil {
return x.FinalCltvDelta
}
return 0
}
func (x *SendRequest) GetFeeLimit() *FeeLimit {
if x != nil {
return x.FeeLimit
}
return nil
}
func (x *SendRequest) GetOutgoingChanId() uint64 {
if x != nil {
return x.OutgoingChanId
}
return 0
}
func (x *SendRequest) GetLastHopPubkey() []byte {
if x != nil {
return x.LastHopPubkey
}
return nil
}
func (x *SendRequest) GetCltvLimit() uint32 {
if x != nil {
return x.CltvLimit
}
return 0
}
func (x *SendRequest) GetDestCustomRecords() map[uint64][]byte {
if x != nil {
return x.DestCustomRecords
}
return nil
}
func (x *SendRequest) GetAllowSelfPayment() bool {
if x != nil {
return x.AllowSelfPayment
}
return false
}
func (x *SendRequest) GetDestFeatures() []FeatureBit {
if x != nil {
return x.DestFeatures
}
return nil
}
func (x *SendRequest) GetPaymentAddr() []byte {
if x != nil {
return x.PaymentAddr
}
return nil
}
type SendResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PaymentError string `protobuf:"bytes,1,opt,name=payment_error,json=paymentError,proto3" json:"payment_error,omitempty"`
PaymentPreimage []byte `protobuf:"bytes,2,opt,name=payment_preimage,json=paymentPreimage,proto3" json:"payment_preimage,omitempty"`
PaymentRoute *Route `protobuf:"bytes,3,opt,name=payment_route,json=paymentRoute,proto3" json:"payment_route,omitempty"`
PaymentHash []byte `protobuf:"bytes,4,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
}
func (x *SendResponse) Reset() {
*x = SendResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SendResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendResponse) ProtoMessage() {}
func (x *SendResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SendResponse.ProtoReflect.Descriptor instead.
func (*SendResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{10}
}
func (x *SendResponse) GetPaymentError() string {
if x != nil {
return x.PaymentError
}
return ""
}
func (x *SendResponse) GetPaymentPreimage() []byte {
if x != nil {
return x.PaymentPreimage
}
return nil
}
func (x *SendResponse) GetPaymentRoute() *Route {
if x != nil {
return x.PaymentRoute
}
return nil
}
func (x *SendResponse) GetPaymentHash() []byte {
if x != nil {
return x.PaymentHash
}
return nil
}
type SendToRouteRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The payment hash to use for the HTLC. When using REST, this field must be
//encoded as base64.
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
//
//An optional hex-encoded payment hash to be used for the HTLC. Deprecated now
//that the REST gateway supports base64 encoding of bytes fields.
//
// Deprecated: Do not use.
PaymentHashString string `protobuf:"bytes,2,opt,name=payment_hash_string,json=paymentHashString,proto3" json:"payment_hash_string,omitempty"`
// Route that should be used to attempt to complete the payment.
Route *Route `protobuf:"bytes,4,opt,name=route,proto3" json:"route,omitempty"`
}
func (x *SendToRouteRequest) Reset() {
*x = SendToRouteRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SendToRouteRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendToRouteRequest) ProtoMessage() {}
func (x *SendToRouteRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SendToRouteRequest.ProtoReflect.Descriptor instead.
func (*SendToRouteRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{11}
}
func (x *SendToRouteRequest) GetPaymentHash() []byte {
if x != nil {
return x.PaymentHash
}
return nil
}
// Deprecated: Do not use.
func (x *SendToRouteRequest) GetPaymentHashString() string {
if x != nil {
return x.PaymentHashString
}
return ""
}
func (x *SendToRouteRequest) GetRoute() *Route {
if x != nil {
return x.Route
}
return nil
}
type ChannelAcceptRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The pubkey of the node that wishes to open an inbound channel.
NodePubkey []byte `protobuf:"bytes,1,opt,name=node_pubkey,json=nodePubkey,proto3" json:"node_pubkey,omitempty"`
// The hash of the genesis block that the proposed channel resides in.
ChainHash []byte `protobuf:"bytes,2,opt,name=chain_hash,json=chainHash,proto3" json:"chain_hash,omitempty"`
// The pending channel id.
PendingChanId []byte `protobuf:"bytes,3,opt,name=pending_chan_id,json=pendingChanId,proto3" json:"pending_chan_id,omitempty"`
// The funding amount in satoshis that initiator wishes to use in the
// channel.
FundingAmt uint64 `protobuf:"varint,4,opt,name=funding_amt,json=fundingAmt,proto3" json:"funding_amt,omitempty"`
// The push amount of the proposed channel in millisatoshis.
PushAmt uint64 `protobuf:"varint,5,opt,name=push_amt,json=pushAmt,proto3" json:"push_amt,omitempty"`
// The dust limit of the initiator's commitment tx.
DustLimit uint64 `protobuf:"varint,6,opt,name=dust_limit,json=dustLimit,proto3" json:"dust_limit,omitempty"`
// The maximum amount of coins in millisatoshis that can be pending in this
// channel.
MaxValueInFlight uint64 `protobuf:"varint,7,opt,name=max_value_in_flight,json=maxValueInFlight,proto3" json:"max_value_in_flight,omitempty"`
// The minimum amount of satoshis the initiator requires us to have at all
// times.
ChannelReserve uint64 `protobuf:"varint,8,opt,name=channel_reserve,json=channelReserve,proto3" json:"channel_reserve,omitempty"`
// The smallest HTLC in millisatoshis that the initiator will accept.
MinHtlc uint64 `protobuf:"varint,9,opt,name=min_htlc,json=minHtlc,proto3" json:"min_htlc,omitempty"`
// The initial fee rate that the initiator suggests for both commitment
// transactions.
FeePerKw uint64 `protobuf:"varint,10,opt,name=fee_per_kw,json=feePerKw,proto3" json:"fee_per_kw,omitempty"`
//
//The number of blocks to use for the relative time lock in the pay-to-self
//output of both commitment transactions.
CsvDelay uint32 `protobuf:"varint,11,opt,name=csv_delay,json=csvDelay,proto3" json:"csv_delay,omitempty"`
// The total number of incoming HTLC's that the initiator will accept.
MaxAcceptedHtlcs uint32 `protobuf:"varint,12,opt,name=max_accepted_htlcs,json=maxAcceptedHtlcs,proto3" json:"max_accepted_htlcs,omitempty"`
// A bit-field which the initiator uses to specify proposed channel
// behavior.
ChannelFlags uint32 `protobuf:"varint,13,opt,name=channel_flags,json=channelFlags,proto3" json:"channel_flags,omitempty"`
// The commitment type the initiator wishes to use for the proposed channel.
CommitmentType CommitmentType `protobuf:"varint,14,opt,name=commitment_type,json=commitmentType,proto3,enum=lnrpc.CommitmentType" json:"commitment_type,omitempty"`
}
func (x *ChannelAcceptRequest) Reset() {
*x = ChannelAcceptRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelAcceptRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelAcceptRequest) ProtoMessage() {}
func (x *ChannelAcceptRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelAcceptRequest.ProtoReflect.Descriptor instead.
func (*ChannelAcceptRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{12}
}
func (x *ChannelAcceptRequest) GetNodePubkey() []byte {
if x != nil {
return x.NodePubkey
}
return nil
}
func (x *ChannelAcceptRequest) GetChainHash() []byte {
if x != nil {
return x.ChainHash
}
return nil
}
func (x *ChannelAcceptRequest) GetPendingChanId() []byte {
if x != nil {
return x.PendingChanId
}
return nil
}
func (x *ChannelAcceptRequest) GetFundingAmt() uint64 {
if x != nil {
return x.FundingAmt
}
return 0
}
func (x *ChannelAcceptRequest) GetPushAmt() uint64 {
if x != nil {
return x.PushAmt
}
return 0
}
func (x *ChannelAcceptRequest) GetDustLimit() uint64 {
if x != nil {
return x.DustLimit
}
return 0
}
func (x *ChannelAcceptRequest) GetMaxValueInFlight() uint64 {
if x != nil {
return x.MaxValueInFlight
}
return 0
}
func (x *ChannelAcceptRequest) GetChannelReserve() uint64 {
if x != nil {
return x.ChannelReserve
}
return 0
}
func (x *ChannelAcceptRequest) GetMinHtlc() uint64 {
if x != nil {
return x.MinHtlc
}
return 0
}
func (x *ChannelAcceptRequest) GetFeePerKw() uint64 {
if x != nil {
return x.FeePerKw
}
return 0
}
func (x *ChannelAcceptRequest) GetCsvDelay() uint32 {
if x != nil {
return x.CsvDelay
}
return 0
}
func (x *ChannelAcceptRequest) GetMaxAcceptedHtlcs() uint32 {
if x != nil {
return x.MaxAcceptedHtlcs
}
return 0
}
func (x *ChannelAcceptRequest) GetChannelFlags() uint32 {
if x != nil {
return x.ChannelFlags
}
return 0
}
func (x *ChannelAcceptRequest) GetCommitmentType() CommitmentType {
if x != nil {
return x.CommitmentType
}
return CommitmentType_UNKNOWN_COMMITMENT_TYPE
}
type ChannelAcceptResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether or not the client accepts the channel.
Accept bool `protobuf:"varint,1,opt,name=accept,proto3" json:"accept,omitempty"`
// The pending channel id to which this response applies.
PendingChanId []byte `protobuf:"bytes,2,opt,name=pending_chan_id,json=pendingChanId,proto3" json:"pending_chan_id,omitempty"`
//
//An optional error to send the initiating party to indicate why the channel
//was rejected. This field *should not* contain sensitive information, it will
//be sent to the initiating party. This field should only be set if accept is
//false, the channel will be rejected if an error is set with accept=true
//because the meaning of this response is ambiguous. Limited to 500
//characters.
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
//
//The upfront shutdown address to use if the initiating peer supports option
//upfront shutdown script (see ListPeers for the features supported). Note
//that the channel open will fail if this value is set for a peer that does
//not support this feature bit.
UpfrontShutdown string `protobuf:"bytes,4,opt,name=upfront_shutdown,json=upfrontShutdown,proto3" json:"upfront_shutdown,omitempty"`
//
//The csv delay (in blocks) that we require for the remote party.
CsvDelay uint32 `protobuf:"varint,5,opt,name=csv_delay,json=csvDelay,proto3" json:"csv_delay,omitempty"`
//
//The reserve amount in satoshis that we require the remote peer to adhere to.
//We require that the remote peer always have some reserve amount allocated to
//them so that there is always a disincentive to broadcast old state (if they
//hold 0 sats on their side of the channel, there is nothing to lose).
ReserveSat uint64 `protobuf:"varint,6,opt,name=reserve_sat,json=reserveSat,proto3" json:"reserve_sat,omitempty"`
//
//The maximum amount of funds in millisatoshis that we allow the remote peer
//to have in outstanding htlcs.
InFlightMaxMsat uint64 `protobuf:"varint,7,opt,name=in_flight_max_msat,json=inFlightMaxMsat,proto3" json:"in_flight_max_msat,omitempty"`
//
//The maximum number of htlcs that the remote peer can offer us.
MaxHtlcCount uint32 `protobuf:"varint,8,opt,name=max_htlc_count,json=maxHtlcCount,proto3" json:"max_htlc_count,omitempty"`
//
//The minimum value in millisatoshis for incoming htlcs on the channel.
MinHtlcIn uint64 `protobuf:"varint,9,opt,name=min_htlc_in,json=minHtlcIn,proto3" json:"min_htlc_in,omitempty"`
//
//The number of confirmations we require before we consider the channel open.
MinAcceptDepth uint32 `protobuf:"varint,10,opt,name=min_accept_depth,json=minAcceptDepth,proto3" json:"min_accept_depth,omitempty"`
}
func (x *ChannelAcceptResponse) Reset() {
*x = ChannelAcceptResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelAcceptResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelAcceptResponse) ProtoMessage() {}
func (x *ChannelAcceptResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelAcceptResponse.ProtoReflect.Descriptor instead.
func (*ChannelAcceptResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{13}
}
func (x *ChannelAcceptResponse) GetAccept() bool {
if x != nil {
return x.Accept
}
return false
}
func (x *ChannelAcceptResponse) GetPendingChanId() []byte {
if x != nil {
return x.PendingChanId
}
return nil
}
func (x *ChannelAcceptResponse) GetError() string {
if x != nil {
return x.Error
}
return ""
}
func (x *ChannelAcceptResponse) GetUpfrontShutdown() string {
if x != nil {
return x.UpfrontShutdown
}
return ""
}
func (x *ChannelAcceptResponse) GetCsvDelay() uint32 {
if x != nil {
return x.CsvDelay
}
return 0
}
func (x *ChannelAcceptResponse) GetReserveSat() uint64 {
if x != nil {
return x.ReserveSat
}
return 0
}
func (x *ChannelAcceptResponse) GetInFlightMaxMsat() uint64 {
if x != nil {
return x.InFlightMaxMsat
}
return 0
}
func (x *ChannelAcceptResponse) GetMaxHtlcCount() uint32 {
if x != nil {
return x.MaxHtlcCount
}
return 0
}
func (x *ChannelAcceptResponse) GetMinHtlcIn() uint64 {
if x != nil {
return x.MinHtlcIn
}
return 0
}
func (x *ChannelAcceptResponse) GetMinAcceptDepth() uint32 {
if x != nil {
return x.MinAcceptDepth
}
return 0
}
type ChannelPoint struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to FundingTxid:
// *ChannelPoint_FundingTxidBytes
// *ChannelPoint_FundingTxidStr
FundingTxid isChannelPoint_FundingTxid `protobuf_oneof:"funding_txid"`
// The index of the output of the funding transaction
OutputIndex uint32 `protobuf:"varint,3,opt,name=output_index,json=outputIndex,proto3" json:"output_index,omitempty"`
}
func (x *ChannelPoint) Reset() {
*x = ChannelPoint{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelPoint) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelPoint) ProtoMessage() {}
func (x *ChannelPoint) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelPoint.ProtoReflect.Descriptor instead.
func (*ChannelPoint) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{14}
}
func (m *ChannelPoint) GetFundingTxid() isChannelPoint_FundingTxid {
if m != nil {
return m.FundingTxid
}
return nil
}
func (x *ChannelPoint) GetFundingTxidBytes() []byte {
if x, ok := x.GetFundingTxid().(*ChannelPoint_FundingTxidBytes); ok {
return x.FundingTxidBytes
}
return nil
}
func (x *ChannelPoint) GetFundingTxidStr() string {
if x, ok := x.GetFundingTxid().(*ChannelPoint_FundingTxidStr); ok {
return x.FundingTxidStr
}
return ""
}
func (x *ChannelPoint) GetOutputIndex() uint32 {
if x != nil {
return x.OutputIndex
}
return 0
}
type isChannelPoint_FundingTxid interface {
isChannelPoint_FundingTxid()
}
type ChannelPoint_FundingTxidBytes struct {
//
//Txid of the funding transaction. When using REST, this field must be
//encoded as base64.
FundingTxidBytes []byte `protobuf:"bytes,1,opt,name=funding_txid_bytes,json=fundingTxidBytes,proto3,oneof"`
}
type ChannelPoint_FundingTxidStr struct {
//
//Hex-encoded string representing the byte-reversed hash of the funding
//transaction.
FundingTxidStr string `protobuf:"bytes,2,opt,name=funding_txid_str,json=fundingTxidStr,proto3,oneof"`
}
func (*ChannelPoint_FundingTxidBytes) isChannelPoint_FundingTxid() {}
func (*ChannelPoint_FundingTxidStr) isChannelPoint_FundingTxid() {}
type OutPoint struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Raw bytes representing the transaction id.
TxidBytes []byte `protobuf:"bytes,1,opt,name=txid_bytes,json=txidBytes,proto3" json:"txid_bytes,omitempty"`
// Reversed, hex-encoded string representing the transaction id.
TxidStr string `protobuf:"bytes,2,opt,name=txid_str,json=txidStr,proto3" json:"txid_str,omitempty"`
// The index of the output on the transaction.
OutputIndex uint32 `protobuf:"varint,3,opt,name=output_index,json=outputIndex,proto3" json:"output_index,omitempty"`
}
func (x *OutPoint) Reset() {
*x = OutPoint{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OutPoint) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OutPoint) ProtoMessage() {}
func (x *OutPoint) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OutPoint.ProtoReflect.Descriptor instead.
func (*OutPoint) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{15}
}
func (x *OutPoint) GetTxidBytes() []byte {
if x != nil {
return x.TxidBytes
}
return nil
}
func (x *OutPoint) GetTxidStr() string {
if x != nil {
return x.TxidStr
}
return ""
}
func (x *OutPoint) GetOutputIndex() uint32 {
if x != nil {
return x.OutputIndex
}
return 0
}
type LightningAddress struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The identity pubkey of the Lightning node
Pubkey string `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
// The network location of the lightning node, e.g. `69.69.69.69:1337` or
// `localhost:10011`
Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"`
}
func (x *LightningAddress) Reset() {
*x = LightningAddress{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LightningAddress) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LightningAddress) ProtoMessage() {}
func (x *LightningAddress) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LightningAddress.ProtoReflect.Descriptor instead.
func (*LightningAddress) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{16}
}
func (x *LightningAddress) GetPubkey() string {
if x != nil {
return x.Pubkey
}
return ""
}
func (x *LightningAddress) GetHost() string {
if x != nil {
return x.Host
}
return ""
}
type EstimateFeeRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The map from addresses to amounts for the transaction.
AddrToAmount map[string]int64 `protobuf:"bytes,1,rep,name=AddrToAmount,proto3" json:"AddrToAmount,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
// The target number of blocks that this transaction should be confirmed
// by.
TargetConf int32 `protobuf:"varint,2,opt,name=target_conf,json=targetConf,proto3" json:"target_conf,omitempty"`
// The minimum number of confirmations each one of your outputs used for
// the transaction must satisfy.
MinConfs int32 `protobuf:"varint,3,opt,name=min_confs,json=minConfs,proto3" json:"min_confs,omitempty"`
// Whether unconfirmed outputs should be used as inputs for the transaction.
SpendUnconfirmed bool `protobuf:"varint,4,opt,name=spend_unconfirmed,json=spendUnconfirmed,proto3" json:"spend_unconfirmed,omitempty"`
}
func (x *EstimateFeeRequest) Reset() {
*x = EstimateFeeRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EstimateFeeRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EstimateFeeRequest) ProtoMessage() {}
func (x *EstimateFeeRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EstimateFeeRequest.ProtoReflect.Descriptor instead.
func (*EstimateFeeRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{17}
}
func (x *EstimateFeeRequest) GetAddrToAmount() map[string]int64 {
if x != nil {
return x.AddrToAmount
}
return nil
}
func (x *EstimateFeeRequest) GetTargetConf() int32 {
if x != nil {
return x.TargetConf
}
return 0
}
func (x *EstimateFeeRequest) GetMinConfs() int32 {
if x != nil {
return x.MinConfs
}
return 0
}
func (x *EstimateFeeRequest) GetSpendUnconfirmed() bool {
if x != nil {
return x.SpendUnconfirmed
}
return false
}
type EstimateFeeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The total fee in satoshis.
FeeSat int64 `protobuf:"varint,1,opt,name=fee_sat,json=feeSat,proto3" json:"fee_sat,omitempty"`
// Deprecated, use sat_per_vbyte.
// The fee rate in satoshi/vbyte.
//
// Deprecated: Do not use.
FeerateSatPerByte int64 `protobuf:"varint,2,opt,name=feerate_sat_per_byte,json=feerateSatPerByte,proto3" json:"feerate_sat_per_byte,omitempty"`
// The fee rate in satoshi/vbyte.
SatPerVbyte uint64 `protobuf:"varint,3,opt,name=sat_per_vbyte,json=satPerVbyte,proto3" json:"sat_per_vbyte,omitempty"`
}
func (x *EstimateFeeResponse) Reset() {
*x = EstimateFeeResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EstimateFeeResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EstimateFeeResponse) ProtoMessage() {}
func (x *EstimateFeeResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EstimateFeeResponse.ProtoReflect.Descriptor instead.
func (*EstimateFeeResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{18}
}
func (x *EstimateFeeResponse) GetFeeSat() int64 {
if x != nil {
return x.FeeSat
}
return 0
}
// Deprecated: Do not use.
func (x *EstimateFeeResponse) GetFeerateSatPerByte() int64 {
if x != nil {
return x.FeerateSatPerByte
}
return 0
}
func (x *EstimateFeeResponse) GetSatPerVbyte() uint64 {
if x != nil {
return x.SatPerVbyte
}
return 0
}
type SendManyRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The map from addresses to amounts
AddrToAmount map[string]int64 `protobuf:"bytes,1,rep,name=AddrToAmount,proto3" json:"AddrToAmount,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
// The target number of blocks that this transaction should be confirmed
// by.
TargetConf int32 `protobuf:"varint,3,opt,name=target_conf,json=targetConf,proto3" json:"target_conf,omitempty"`
// A manual fee rate set in sat/vbyte that should be used when crafting the
// transaction.
SatPerVbyte uint64 `protobuf:"varint,4,opt,name=sat_per_vbyte,json=satPerVbyte,proto3" json:"sat_per_vbyte,omitempty"`
// Deprecated, use sat_per_vbyte.
// A manual fee rate set in sat/vbyte that should be used when crafting the
// transaction.
//
// Deprecated: Do not use.
SatPerByte int64 `protobuf:"varint,5,opt,name=sat_per_byte,json=satPerByte,proto3" json:"sat_per_byte,omitempty"`
// An optional label for the transaction, limited to 500 characters.
Label string `protobuf:"bytes,6,opt,name=label,proto3" json:"label,omitempty"`
// The minimum number of confirmations each one of your outputs used for
// the transaction must satisfy.
MinConfs int32 `protobuf:"varint,7,opt,name=min_confs,json=minConfs,proto3" json:"min_confs,omitempty"`
// Whether unconfirmed outputs should be used as inputs for the transaction.
SpendUnconfirmed bool `protobuf:"varint,8,opt,name=spend_unconfirmed,json=spendUnconfirmed,proto3" json:"spend_unconfirmed,omitempty"`
}
func (x *SendManyRequest) Reset() {
*x = SendManyRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SendManyRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendManyRequest) ProtoMessage() {}
func (x *SendManyRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SendManyRequest.ProtoReflect.Descriptor instead.
func (*SendManyRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{19}
}
func (x *SendManyRequest) GetAddrToAmount() map[string]int64 {
if x != nil {
return x.AddrToAmount
}
return nil
}
func (x *SendManyRequest) GetTargetConf() int32 {
if x != nil {
return x.TargetConf
}
return 0
}
func (x *SendManyRequest) GetSatPerVbyte() uint64 {
if x != nil {
return x.SatPerVbyte
}
return 0
}
// Deprecated: Do not use.
func (x *SendManyRequest) GetSatPerByte() int64 {
if x != nil {
return x.SatPerByte
}
return 0
}
func (x *SendManyRequest) GetLabel() string {
if x != nil {
return x.Label
}
return ""
}
func (x *SendManyRequest) GetMinConfs() int32 {
if x != nil {
return x.MinConfs
}
return 0
}
func (x *SendManyRequest) GetSpendUnconfirmed() bool {
if x != nil {
return x.SpendUnconfirmed
}
return false
}
type SendManyResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The id of the transaction
Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"`
}
func (x *SendManyResponse) Reset() {
*x = SendManyResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SendManyResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendManyResponse) ProtoMessage() {}
func (x *SendManyResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SendManyResponse.ProtoReflect.Descriptor instead.
func (*SendManyResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{20}
}
func (x *SendManyResponse) GetTxid() string {
if x != nil {
return x.Txid
}
return ""
}
type SendCoinsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The address to send coins to
Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
// The amount in satoshis to send
Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
// The target number of blocks that this transaction should be confirmed
// by.
TargetConf int32 `protobuf:"varint,3,opt,name=target_conf,json=targetConf,proto3" json:"target_conf,omitempty"`
// A manual fee rate set in sat/vbyte that should be used when crafting the
// transaction.
SatPerVbyte uint64 `protobuf:"varint,4,opt,name=sat_per_vbyte,json=satPerVbyte,proto3" json:"sat_per_vbyte,omitempty"`
// Deprecated, use sat_per_vbyte.
// A manual fee rate set in sat/vbyte that should be used when crafting the
// transaction.
//
// Deprecated: Do not use.
SatPerByte int64 `protobuf:"varint,5,opt,name=sat_per_byte,json=satPerByte,proto3" json:"sat_per_byte,omitempty"`
//
//If set, then the amount field will be ignored, and lnd will attempt to
//send all the coins under control of the internal wallet to the specified
//address.
SendAll bool `protobuf:"varint,6,opt,name=send_all,json=sendAll,proto3" json:"send_all,omitempty"`
// An optional label for the transaction, limited to 500 characters.
Label string `protobuf:"bytes,7,opt,name=label,proto3" json:"label,omitempty"`
// The minimum number of confirmations each one of your outputs used for
// the transaction must satisfy.
MinConfs int32 `protobuf:"varint,8,opt,name=min_confs,json=minConfs,proto3" json:"min_confs,omitempty"`
// Whether unconfirmed outputs should be used as inputs for the transaction.
SpendUnconfirmed bool `protobuf:"varint,9,opt,name=spend_unconfirmed,json=spendUnconfirmed,proto3" json:"spend_unconfirmed,omitempty"`
}
func (x *SendCoinsRequest) Reset() {
*x = SendCoinsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SendCoinsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendCoinsRequest) ProtoMessage() {}
func (x *SendCoinsRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SendCoinsRequest.ProtoReflect.Descriptor instead.
func (*SendCoinsRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{21}
}
func (x *SendCoinsRequest) GetAddr() string {
if x != nil {
return x.Addr
}
return ""
}
func (x *SendCoinsRequest) GetAmount() int64 {
if x != nil {
return x.Amount
}
return 0
}
func (x *SendCoinsRequest) GetTargetConf() int32 {
if x != nil {
return x.TargetConf
}
return 0
}
func (x *SendCoinsRequest) GetSatPerVbyte() uint64 {
if x != nil {
return x.SatPerVbyte
}
return 0
}
// Deprecated: Do not use.
func (x *SendCoinsRequest) GetSatPerByte() int64 {
if x != nil {
return x.SatPerByte
}
return 0
}
func (x *SendCoinsRequest) GetSendAll() bool {
if x != nil {
return x.SendAll
}
return false
}
func (x *SendCoinsRequest) GetLabel() string {
if x != nil {
return x.Label
}
return ""
}
func (x *SendCoinsRequest) GetMinConfs() int32 {
if x != nil {
return x.MinConfs
}
return 0
}
func (x *SendCoinsRequest) GetSpendUnconfirmed() bool {
if x != nil {
return x.SpendUnconfirmed
}
return false
}
type SendCoinsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The transaction ID of the transaction
Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"`
}
func (x *SendCoinsResponse) Reset() {
*x = SendCoinsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SendCoinsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendCoinsResponse) ProtoMessage() {}
func (x *SendCoinsResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SendCoinsResponse.ProtoReflect.Descriptor instead.
func (*SendCoinsResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{22}
}
func (x *SendCoinsResponse) GetTxid() string {
if x != nil {
return x.Txid
}
return ""
}
type ListUnspentRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The minimum number of confirmations to be included.
MinConfs int32 `protobuf:"varint,1,opt,name=min_confs,json=minConfs,proto3" json:"min_confs,omitempty"`
// The maximum number of confirmations to be included.
MaxConfs int32 `protobuf:"varint,2,opt,name=max_confs,json=maxConfs,proto3" json:"max_confs,omitempty"`
// An optional filter to only include outputs belonging to an account.
Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"`
}
func (x *ListUnspentRequest) Reset() {
*x = ListUnspentRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListUnspentRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListUnspentRequest) ProtoMessage() {}
func (x *ListUnspentRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListUnspentRequest.ProtoReflect.Descriptor instead.
func (*ListUnspentRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{23}
}
func (x *ListUnspentRequest) GetMinConfs() int32 {
if x != nil {
return x.MinConfs
}
return 0
}
func (x *ListUnspentRequest) GetMaxConfs() int32 {
if x != nil {
return x.MaxConfs
}
return 0
}
func (x *ListUnspentRequest) GetAccount() string {
if x != nil {
return x.Account
}
return ""
}
type ListUnspentResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A list of utxos
Utxos []*Utxo `protobuf:"bytes,1,rep,name=utxos,proto3" json:"utxos,omitempty"`
}
func (x *ListUnspentResponse) Reset() {
*x = ListUnspentResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListUnspentResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListUnspentResponse) ProtoMessage() {}
func (x *ListUnspentResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListUnspentResponse.ProtoReflect.Descriptor instead.
func (*ListUnspentResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{24}
}
func (x *ListUnspentResponse) GetUtxos() []*Utxo {
if x != nil {
return x.Utxos
}
return nil
}
type NewAddressRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The type of address to generate.
Type AddressType `protobuf:"varint,1,opt,name=type,proto3,enum=lnrpc.AddressType" json:"type,omitempty"`
//
//The name of the account to generate a new address for. If empty, the
//default wallet account is used.
Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"`
}
func (x *NewAddressRequest) Reset() {
*x = NewAddressRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NewAddressRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NewAddressRequest) ProtoMessage() {}
func (x *NewAddressRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NewAddressRequest.ProtoReflect.Descriptor instead.
func (*NewAddressRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{25}
}
func (x *NewAddressRequest) GetType() AddressType {
if x != nil {
return x.Type
}
return AddressType_WITNESS_PUBKEY_HASH
}
func (x *NewAddressRequest) GetAccount() string {
if x != nil {
return x.Account
}
return ""
}
type NewAddressResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The newly generated wallet address
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}
func (x *NewAddressResponse) Reset() {
*x = NewAddressResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NewAddressResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NewAddressResponse) ProtoMessage() {}
func (x *NewAddressResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NewAddressResponse.ProtoReflect.Descriptor instead.
func (*NewAddressResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{26}
}
func (x *NewAddressResponse) GetAddress() string {
if x != nil {
return x.Address
}
return ""
}
type SignMessageRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The message to be signed. When using REST, this field must be encoded as
//base64.
Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
//
//Instead of the default double-SHA256 hashing of the message before signing,
//only use one round of hashing instead.
SingleHash bool `protobuf:"varint,2,opt,name=single_hash,json=singleHash,proto3" json:"single_hash,omitempty"`
}
func (x *SignMessageRequest) Reset() {
*x = SignMessageRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignMessageRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignMessageRequest) ProtoMessage() {}
func (x *SignMessageRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SignMessageRequest.ProtoReflect.Descriptor instead.
func (*SignMessageRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{27}
}
func (x *SignMessageRequest) GetMsg() []byte {
if x != nil {
return x.Msg
}
return nil
}
func (x *SignMessageRequest) GetSingleHash() bool {
if x != nil {
return x.SingleHash
}
return false
}
type SignMessageResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The signature for the given message
Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
}
func (x *SignMessageResponse) Reset() {
*x = SignMessageResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignMessageResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignMessageResponse) ProtoMessage() {}
func (x *SignMessageResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SignMessageResponse.ProtoReflect.Descriptor instead.
func (*SignMessageResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{28}
}
func (x *SignMessageResponse) GetSignature() string {
if x != nil {
return x.Signature
}
return ""
}
type VerifyMessageRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The message over which the signature is to be verified. When using REST,
//this field must be encoded as base64.
Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
// The signature to be verified over the given message
Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
}
func (x *VerifyMessageRequest) Reset() {
*x = VerifyMessageRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VerifyMessageRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VerifyMessageRequest) ProtoMessage() {}
func (x *VerifyMessageRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VerifyMessageRequest.ProtoReflect.Descriptor instead.
func (*VerifyMessageRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{29}
}
func (x *VerifyMessageRequest) GetMsg() []byte {
if x != nil {
return x.Msg
}
return nil
}
func (x *VerifyMessageRequest) GetSignature() string {
if x != nil {
return x.Signature
}
return ""
}
type VerifyMessageResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether the signature was valid over the given message
Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
// The pubkey recovered from the signature
Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
}
func (x *VerifyMessageResponse) Reset() {
*x = VerifyMessageResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VerifyMessageResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VerifyMessageResponse) ProtoMessage() {}
func (x *VerifyMessageResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VerifyMessageResponse.ProtoReflect.Descriptor instead.
func (*VerifyMessageResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{30}
}
func (x *VerifyMessageResponse) GetValid() bool {
if x != nil {
return x.Valid
}
return false
}
func (x *VerifyMessageResponse) GetPubkey() string {
if x != nil {
return x.Pubkey
}
return ""
}
type ConnectPeerRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Lightning address of the peer, in the format `<pubkey>@host`
Addr *LightningAddress `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
// If set, the daemon will attempt to persistently connect to the target
// peer. Otherwise, the call will be synchronous.
Perm bool `protobuf:"varint,2,opt,name=perm,proto3" json:"perm,omitempty"`
//
//The connection timeout value (in seconds) for this request. It won't affect
//other requests.
Timeout uint64 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
}
func (x *ConnectPeerRequest) Reset() {
*x = ConnectPeerRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ConnectPeerRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ConnectPeerRequest) ProtoMessage() {}
func (x *ConnectPeerRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ConnectPeerRequest.ProtoReflect.Descriptor instead.
func (*ConnectPeerRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{31}
}
func (x *ConnectPeerRequest) GetAddr() *LightningAddress {
if x != nil {
return x.Addr
}
return nil
}
func (x *ConnectPeerRequest) GetPerm() bool {
if x != nil {
return x.Perm
}
return false
}
func (x *ConnectPeerRequest) GetTimeout() uint64 {
if x != nil {
return x.Timeout
}
return 0
}
type ConnectPeerResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ConnectPeerResponse) Reset() {
*x = ConnectPeerResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ConnectPeerResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ConnectPeerResponse) ProtoMessage() {}
func (x *ConnectPeerResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ConnectPeerResponse.ProtoReflect.Descriptor instead.
func (*ConnectPeerResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{32}
}
type DisconnectPeerRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The pubkey of the node to disconnect from
PubKey string `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
}
func (x *DisconnectPeerRequest) Reset() {
*x = DisconnectPeerRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DisconnectPeerRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DisconnectPeerRequest) ProtoMessage() {}
func (x *DisconnectPeerRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DisconnectPeerRequest.ProtoReflect.Descriptor instead.
func (*DisconnectPeerRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{33}
}
func (x *DisconnectPeerRequest) GetPubKey() string {
if x != nil {
return x.PubKey
}
return ""
}
type DisconnectPeerResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DisconnectPeerResponse) Reset() {
*x = DisconnectPeerResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DisconnectPeerResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DisconnectPeerResponse) ProtoMessage() {}
func (x *DisconnectPeerResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DisconnectPeerResponse.ProtoReflect.Descriptor instead.
func (*DisconnectPeerResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{34}
}
type HTLC struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Incoming bool `protobuf:"varint,1,opt,name=incoming,proto3" json:"incoming,omitempty"`
Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
HashLock []byte `protobuf:"bytes,3,opt,name=hash_lock,json=hashLock,proto3" json:"hash_lock,omitempty"`
ExpirationHeight uint32 `protobuf:"varint,4,opt,name=expiration_height,json=expirationHeight,proto3" json:"expiration_height,omitempty"`
// Index identifying the htlc on the channel.
HtlcIndex uint64 `protobuf:"varint,5,opt,name=htlc_index,json=htlcIndex,proto3" json:"htlc_index,omitempty"`
// If this HTLC is involved in a forwarding operation, this field indicates
// the forwarding channel. For an outgoing htlc, it is the incoming channel.
// For an incoming htlc, it is the outgoing channel. When the htlc
// originates from this node or this node is the final destination,
// forwarding_channel will be zero. The forwarding channel will also be zero
// for htlcs that need to be forwarded but don't have a forwarding decision
// persisted yet.
ForwardingChannel uint64 `protobuf:"varint,6,opt,name=forwarding_channel,json=forwardingChannel,proto3" json:"forwarding_channel,omitempty"`
// Index identifying the htlc on the forwarding channel.
ForwardingHtlcIndex uint64 `protobuf:"varint,7,opt,name=forwarding_htlc_index,json=forwardingHtlcIndex,proto3" json:"forwarding_htlc_index,omitempty"`
}
func (x *HTLC) Reset() {
*x = HTLC{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HTLC) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HTLC) ProtoMessage() {}
func (x *HTLC) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HTLC.ProtoReflect.Descriptor instead.
func (*HTLC) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{35}
}
func (x *HTLC) GetIncoming() bool {
if x != nil {
return x.Incoming
}
return false
}
func (x *HTLC) GetAmount() int64 {
if x != nil {
return x.Amount
}
return 0
}
func (x *HTLC) GetHashLock() []byte {
if x != nil {
return x.HashLock
}
return nil
}
func (x *HTLC) GetExpirationHeight() uint32 {
if x != nil {
return x.ExpirationHeight
}
return 0
}
func (x *HTLC) GetHtlcIndex() uint64 {
if x != nil {
return x.HtlcIndex
}
return 0
}
func (x *HTLC) GetForwardingChannel() uint64 {
if x != nil {
return x.ForwardingChannel
}
return 0
}
func (x *HTLC) GetForwardingHtlcIndex() uint64 {
if x != nil {
return x.ForwardingHtlcIndex
}
return 0
}
type ChannelConstraints struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The CSV delay expressed in relative blocks. If the channel is force closed,
//we will need to wait for this many blocks before we can regain our funds.
CsvDelay uint32 `protobuf:"varint,1,opt,name=csv_delay,json=csvDelay,proto3" json:"csv_delay,omitempty"`
// The minimum satoshis this node is required to reserve in its balance.
ChanReserveSat uint64 `protobuf:"varint,2,opt,name=chan_reserve_sat,json=chanReserveSat,proto3" json:"chan_reserve_sat,omitempty"`
// The dust limit (in satoshis) of the initiator's commitment tx.
DustLimitSat uint64 `protobuf:"varint,3,opt,name=dust_limit_sat,json=dustLimitSat,proto3" json:"dust_limit_sat,omitempty"`
// The maximum amount of coins in millisatoshis that can be pending in this
// channel.
MaxPendingAmtMsat uint64 `protobuf:"varint,4,opt,name=max_pending_amt_msat,json=maxPendingAmtMsat,proto3" json:"max_pending_amt_msat,omitempty"`
// The smallest HTLC in millisatoshis that the initiator will accept.
MinHtlcMsat uint64 `protobuf:"varint,5,opt,name=min_htlc_msat,json=minHtlcMsat,proto3" json:"min_htlc_msat,omitempty"`
// The total number of incoming HTLC's that the initiator will accept.
MaxAcceptedHtlcs uint32 `protobuf:"varint,6,opt,name=max_accepted_htlcs,json=maxAcceptedHtlcs,proto3" json:"max_accepted_htlcs,omitempty"`
}
func (x *ChannelConstraints) Reset() {
*x = ChannelConstraints{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelConstraints) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelConstraints) ProtoMessage() {}
func (x *ChannelConstraints) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[36]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelConstraints.ProtoReflect.Descriptor instead.
func (*ChannelConstraints) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{36}
}
func (x *ChannelConstraints) GetCsvDelay() uint32 {
if x != nil {
return x.CsvDelay
}
return 0
}
func (x *ChannelConstraints) GetChanReserveSat() uint64 {
if x != nil {
return x.ChanReserveSat
}
return 0
}
func (x *ChannelConstraints) GetDustLimitSat() uint64 {
if x != nil {
return x.DustLimitSat
}
return 0
}
func (x *ChannelConstraints) GetMaxPendingAmtMsat() uint64 {
if x != nil {
return x.MaxPendingAmtMsat
}
return 0
}
func (x *ChannelConstraints) GetMinHtlcMsat() uint64 {
if x != nil {
return x.MinHtlcMsat
}
return 0
}
func (x *ChannelConstraints) GetMaxAcceptedHtlcs() uint32 {
if x != nil {
return x.MaxAcceptedHtlcs
}
return 0
}
type Channel struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether this channel is active or not
Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"`
// The identity pubkey of the remote node
RemotePubkey string `protobuf:"bytes,2,opt,name=remote_pubkey,json=remotePubkey,proto3" json:"remote_pubkey,omitempty"`
//
//The outpoint (txid:index) of the funding transaction. With this value, Bob
//will be able to generate a signature for Alice's version of the commitment
//transaction.
ChannelPoint string `protobuf:"bytes,3,opt,name=channel_point,json=channelPoint,proto3" json:"channel_point,omitempty"`
//
//The unique channel ID for the channel. The first 3 bytes are the block
//height, the next 3 the index within the block, and the last 2 bytes are the
//output index for the channel.
ChanId uint64 `protobuf:"varint,4,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"`
// The total amount of funds held in this channel
Capacity int64 `protobuf:"varint,5,opt,name=capacity,proto3" json:"capacity,omitempty"`
// This node's current balance in this channel
LocalBalance int64 `protobuf:"varint,6,opt,name=local_balance,json=localBalance,proto3" json:"local_balance,omitempty"`
// The counterparty's current balance in this channel
RemoteBalance int64 `protobuf:"varint,7,opt,name=remote_balance,json=remoteBalance,proto3" json:"remote_balance,omitempty"`
//
//The amount calculated to be paid in fees for the current set of commitment
//transactions. The fee amount is persisted with the channel in order to
//allow the fee amount to be removed and recalculated with each channel state
//update, including updates that happen after a system restart.
CommitFee int64 `protobuf:"varint,8,opt,name=commit_fee,json=commitFee,proto3" json:"commit_fee,omitempty"`
// The weight of the commitment transaction
CommitWeight int64 `protobuf:"varint,9,opt,name=commit_weight,json=commitWeight,proto3" json:"commit_weight,omitempty"`
//
//The required number of satoshis per kilo-weight that the requester will pay
//at all times, for both the funding transaction and commitment transaction.
//This value can later be updated once the channel is open.
FeePerKw int64 `protobuf:"varint,10,opt,name=fee_per_kw,json=feePerKw,proto3" json:"fee_per_kw,omitempty"`
// The unsettled balance in this channel
UnsettledBalance int64 `protobuf:"varint,11,opt,name=unsettled_balance,json=unsettledBalance,proto3" json:"unsettled_balance,omitempty"`
//
//The total number of satoshis we've sent within this channel.
TotalSatoshisSent int64 `protobuf:"varint,12,opt,name=total_satoshis_sent,json=totalSatoshisSent,proto3" json:"total_satoshis_sent,omitempty"`
//
//The total number of satoshis we've received within this channel.
TotalSatoshisReceived int64 `protobuf:"varint,13,opt,name=total_satoshis_received,json=totalSatoshisReceived,proto3" json:"total_satoshis_received,omitempty"`
//
//The total number of updates conducted within this channel.
NumUpdates uint64 `protobuf:"varint,14,opt,name=num_updates,json=numUpdates,proto3" json:"num_updates,omitempty"`
//
//The list of active, uncleared HTLCs currently pending within the channel.
PendingHtlcs []*HTLC `protobuf:"bytes,15,rep,name=pending_htlcs,json=pendingHtlcs,proto3" json:"pending_htlcs,omitempty"`
//
//Deprecated. The CSV delay expressed in relative blocks. If the channel is
//force closed, we will need to wait for this many blocks before we can regain
//our funds.
//
// Deprecated: Do not use.
CsvDelay uint32 `protobuf:"varint,16,opt,name=csv_delay,json=csvDelay,proto3" json:"csv_delay,omitempty"`
// Whether this channel is advertised to the network or not.
Private bool `protobuf:"varint,17,opt,name=private,proto3" json:"private,omitempty"`
// True if we were the ones that created the channel.
Initiator bool `protobuf:"varint,18,opt,name=initiator,proto3" json:"initiator,omitempty"`
// A set of flags showing the current state of the channel.
ChanStatusFlags string `protobuf:"bytes,19,opt,name=chan_status_flags,json=chanStatusFlags,proto3" json:"chan_status_flags,omitempty"`
// Deprecated. The minimum satoshis this node is required to reserve in its
// balance.
//
// Deprecated: Do not use.
LocalChanReserveSat int64 `protobuf:"varint,20,opt,name=local_chan_reserve_sat,json=localChanReserveSat,proto3" json:"local_chan_reserve_sat,omitempty"`
//
//Deprecated. The minimum satoshis the other node is required to reserve in
//its balance.
//
// Deprecated: Do not use.
RemoteChanReserveSat int64 `protobuf:"varint,21,opt,name=remote_chan_reserve_sat,json=remoteChanReserveSat,proto3" json:"remote_chan_reserve_sat,omitempty"`
// Deprecated. Use commitment_type.
//
// Deprecated: Do not use.
StaticRemoteKey bool `protobuf:"varint,22,opt,name=static_remote_key,json=staticRemoteKey,proto3" json:"static_remote_key,omitempty"`
// The commitment type used by this channel.
CommitmentType CommitmentType `protobuf:"varint,26,opt,name=commitment_type,json=commitmentType,proto3,enum=lnrpc.CommitmentType" json:"commitment_type,omitempty"`
//
//The number of seconds that the channel has been monitored by the channel
//scoring system. Scores are currently not persisted, so this value may be
//less than the lifetime of the channel [EXPERIMENTAL].
Lifetime int64 `protobuf:"varint,23,opt,name=lifetime,proto3" json:"lifetime,omitempty"`
//
//The number of seconds that the remote peer has been observed as being online
//by the channel scoring system over the lifetime of the channel
//[EXPERIMENTAL].
Uptime int64 `protobuf:"varint,24,opt,name=uptime,proto3" json:"uptime,omitempty"`
//
//Close address is the address that we will enforce payout to on cooperative
//close if the channel was opened utilizing option upfront shutdown. This
//value can be set on channel open by setting close_address in an open channel
//request. If this value is not set, you can still choose a payout address by
//cooperatively closing with the delivery_address field set.
CloseAddress string `protobuf:"bytes,25,opt,name=close_address,json=closeAddress,proto3" json:"close_address,omitempty"`
//
//The amount that the initiator of the channel optionally pushed to the remote
//party on channel open. This amount will be zero if the channel initiator did
//not push any funds to the remote peer. If the initiator field is true, we
//pushed this amount to our peer, if it is false, the remote peer pushed this
//amount to us.
PushAmountSat uint64 `protobuf:"varint,27,opt,name=push_amount_sat,json=pushAmountSat,proto3" json:"push_amount_sat,omitempty"`
//
//This uint32 indicates if this channel is to be considered 'frozen'. A
//frozen channel doest not allow a cooperative channel close by the
//initiator. The thaw_height is the height that this restriction stops
//applying to the channel. This field is optional, not setting it or using a
//value of zero will mean the channel has no additional restrictions. The
//height can be interpreted in two ways: as a relative height if the value is
//less than 500,000, or as an absolute height otherwise.
ThawHeight uint32 `protobuf:"varint,28,opt,name=thaw_height,json=thawHeight,proto3" json:"thaw_height,omitempty"`
// List constraints for the local node.
LocalConstraints *ChannelConstraints `protobuf:"bytes,29,opt,name=local_constraints,json=localConstraints,proto3" json:"local_constraints,omitempty"`
// List constraints for the remote node.
RemoteConstraints *ChannelConstraints `protobuf:"bytes,30,opt,name=remote_constraints,json=remoteConstraints,proto3" json:"remote_constraints,omitempty"`
}
func (x *Channel) Reset() {
*x = Channel{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Channel) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Channel) ProtoMessage() {}
func (x *Channel) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[37]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Channel.ProtoReflect.Descriptor instead.
func (*Channel) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{37}
}
func (x *Channel) GetActive() bool {
if x != nil {
return x.Active
}
return false
}
func (x *Channel) GetRemotePubkey() string {
if x != nil {
return x.RemotePubkey
}
return ""
}
func (x *Channel) GetChannelPoint() string {
if x != nil {
return x.ChannelPoint
}
return ""
}
func (x *Channel) GetChanId() uint64 {
if x != nil {
return x.ChanId
}
return 0
}
func (x *Channel) GetCapacity() int64 {
if x != nil {
return x.Capacity
}
return 0
}
func (x *Channel) GetLocalBalance() int64 {
if x != nil {
return x.LocalBalance
}
return 0
}
func (x *Channel) GetRemoteBalance() int64 {
if x != nil {
return x.RemoteBalance
}
return 0
}
func (x *Channel) GetCommitFee() int64 {
if x != nil {
return x.CommitFee
}
return 0
}
func (x *Channel) GetCommitWeight() int64 {
if x != nil {
return x.CommitWeight
}
return 0
}
func (x *Channel) GetFeePerKw() int64 {
if x != nil {
return x.FeePerKw
}
return 0
}
func (x *Channel) GetUnsettledBalance() int64 {
if x != nil {
return x.UnsettledBalance
}
return 0
}
func (x *Channel) GetTotalSatoshisSent() int64 {
if x != nil {
return x.TotalSatoshisSent
}
return 0
}
func (x *Channel) GetTotalSatoshisReceived() int64 {
if x != nil {
return x.TotalSatoshisReceived
}
return 0
}
func (x *Channel) GetNumUpdates() uint64 {
if x != nil {
return x.NumUpdates
}
return 0
}
func (x *Channel) GetPendingHtlcs() []*HTLC {
if x != nil {
return x.PendingHtlcs
}
return nil
}
// Deprecated: Do not use.
func (x *Channel) GetCsvDelay() uint32 {
if x != nil {
return x.CsvDelay
}
return 0
}
func (x *Channel) GetPrivate() bool {
if x != nil {
return x.Private
}
return false
}
func (x *Channel) GetInitiator() bool {
if x != nil {
return x.Initiator
}
return false
}
func (x *Channel) GetChanStatusFlags() string {
if x != nil {
return x.ChanStatusFlags
}
return ""
}
// Deprecated: Do not use.
func (x *Channel) GetLocalChanReserveSat() int64 {
if x != nil {
return x.LocalChanReserveSat
}
return 0
}
// Deprecated: Do not use.
func (x *Channel) GetRemoteChanReserveSat() int64 {
if x != nil {
return x.RemoteChanReserveSat
}
return 0
}
// Deprecated: Do not use.
func (x *Channel) GetStaticRemoteKey() bool {
if x != nil {
return x.StaticRemoteKey
}
return false
}
func (x *Channel) GetCommitmentType() CommitmentType {
if x != nil {
return x.CommitmentType
}
return CommitmentType_UNKNOWN_COMMITMENT_TYPE
}
func (x *Channel) GetLifetime() int64 {
if x != nil {
return x.Lifetime
}
return 0
}
func (x *Channel) GetUptime() int64 {
if x != nil {
return x.Uptime
}
return 0
}
func (x *Channel) GetCloseAddress() string {
if x != nil {
return x.CloseAddress
}
return ""
}
func (x *Channel) GetPushAmountSat() uint64 {
if x != nil {
return x.PushAmountSat
}
return 0
}
func (x *Channel) GetThawHeight() uint32 {
if x != nil {
return x.ThawHeight
}
return 0
}
func (x *Channel) GetLocalConstraints() *ChannelConstraints {
if x != nil {
return x.LocalConstraints
}
return nil
}
func (x *Channel) GetRemoteConstraints() *ChannelConstraints {
if x != nil {
return x.RemoteConstraints
}
return nil
}
type ListChannelsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ActiveOnly bool `protobuf:"varint,1,opt,name=active_only,json=activeOnly,proto3" json:"active_only,omitempty"`
InactiveOnly bool `protobuf:"varint,2,opt,name=inactive_only,json=inactiveOnly,proto3" json:"inactive_only,omitempty"`
PublicOnly bool `protobuf:"varint,3,opt,name=public_only,json=publicOnly,proto3" json:"public_only,omitempty"`
PrivateOnly bool `protobuf:"varint,4,opt,name=private_only,json=privateOnly,proto3" json:"private_only,omitempty"`
//
//Filters the response for channels with a target peer's pubkey. If peer is
//empty, all channels will be returned.
Peer []byte `protobuf:"bytes,5,opt,name=peer,proto3" json:"peer,omitempty"`
}
func (x *ListChannelsRequest) Reset() {
*x = ListChannelsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListChannelsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListChannelsRequest) ProtoMessage() {}
func (x *ListChannelsRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[38]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListChannelsRequest.ProtoReflect.Descriptor instead.
func (*ListChannelsRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{38}
}
func (x *ListChannelsRequest) GetActiveOnly() bool {
if x != nil {
return x.ActiveOnly
}
return false
}
func (x *ListChannelsRequest) GetInactiveOnly() bool {
if x != nil {
return x.InactiveOnly
}
return false
}
func (x *ListChannelsRequest) GetPublicOnly() bool {
if x != nil {
return x.PublicOnly
}
return false
}
func (x *ListChannelsRequest) GetPrivateOnly() bool {
if x != nil {
return x.PrivateOnly
}
return false
}
func (x *ListChannelsRequest) GetPeer() []byte {
if x != nil {
return x.Peer
}
return nil
}
type ListChannelsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of active channels
Channels []*Channel `protobuf:"bytes,11,rep,name=channels,proto3" json:"channels,omitempty"`
}
func (x *ListChannelsResponse) Reset() {
*x = ListChannelsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListChannelsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListChannelsResponse) ProtoMessage() {}
func (x *ListChannelsResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[39]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListChannelsResponse.ProtoReflect.Descriptor instead.
func (*ListChannelsResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{39}
}
func (x *ListChannelsResponse) GetChannels() []*Channel {
if x != nil {
return x.Channels
}
return nil
}
type ChannelCloseSummary struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The outpoint (txid:index) of the funding transaction.
ChannelPoint string `protobuf:"bytes,1,opt,name=channel_point,json=channelPoint,proto3" json:"channel_point,omitempty"`
// The unique channel ID for the channel.
ChanId uint64 `protobuf:"varint,2,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"`
// The hash of the genesis block that this channel resides within.
ChainHash string `protobuf:"bytes,3,opt,name=chain_hash,json=chainHash,proto3" json:"chain_hash,omitempty"`
// The txid of the transaction which ultimately closed this channel.
ClosingTxHash string `protobuf:"bytes,4,opt,name=closing_tx_hash,json=closingTxHash,proto3" json:"closing_tx_hash,omitempty"`
// Public key of the remote peer that we formerly had a channel with.
RemotePubkey string `protobuf:"bytes,5,opt,name=remote_pubkey,json=remotePubkey,proto3" json:"remote_pubkey,omitempty"`
// Total capacity of the channel.
Capacity int64 `protobuf:"varint,6,opt,name=capacity,proto3" json:"capacity,omitempty"`
// Height at which the funding transaction was spent.
CloseHeight uint32 `protobuf:"varint,7,opt,name=close_height,json=closeHeight,proto3" json:"close_height,omitempty"`
// Settled balance at the time of channel closure
SettledBalance int64 `protobuf:"varint,8,opt,name=settled_balance,json=settledBalance,proto3" json:"settled_balance,omitempty"`
// The sum of all the time-locked outputs at the time of channel closure
TimeLockedBalance int64 `protobuf:"varint,9,opt,name=time_locked_balance,json=timeLockedBalance,proto3" json:"time_locked_balance,omitempty"`
// Details on how the channel was closed.
CloseType ChannelCloseSummary_ClosureType `protobuf:"varint,10,opt,name=close_type,json=closeType,proto3,enum=lnrpc.ChannelCloseSummary_ClosureType" json:"close_type,omitempty"`
//
//Open initiator is the party that initiated opening the channel. Note that
//this value may be unknown if the channel was closed before we migrated to
//store open channel information after close.
OpenInitiator Initiator `protobuf:"varint,11,opt,name=open_initiator,json=openInitiator,proto3,enum=lnrpc.Initiator" json:"open_initiator,omitempty"`
//
//Close initiator indicates which party initiated the close. This value will
//be unknown for channels that were cooperatively closed before we started
//tracking cooperative close initiators. Note that this indicates which party
//initiated a close, and it is possible for both to initiate cooperative or
//force closes, although only one party's close will be confirmed on chain.
CloseInitiator Initiator `protobuf:"varint,12,opt,name=close_initiator,json=closeInitiator,proto3,enum=lnrpc.Initiator" json:"close_initiator,omitempty"`
Resolutions []*Resolution `protobuf:"bytes,13,rep,name=resolutions,proto3" json:"resolutions,omitempty"`
}
func (x *ChannelCloseSummary) Reset() {
*x = ChannelCloseSummary{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelCloseSummary) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelCloseSummary) ProtoMessage() {}
func (x *ChannelCloseSummary) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[40]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelCloseSummary.ProtoReflect.Descriptor instead.
func (*ChannelCloseSummary) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{40}
}
func (x *ChannelCloseSummary) GetChannelPoint() string {
if x != nil {
return x.ChannelPoint
}
return ""
}
func (x *ChannelCloseSummary) GetChanId() uint64 {
if x != nil {
return x.ChanId
}
return 0
}
func (x *ChannelCloseSummary) GetChainHash() string {
if x != nil {
return x.ChainHash
}
return ""
}
func (x *ChannelCloseSummary) GetClosingTxHash() string {
if x != nil {
return x.ClosingTxHash
}
return ""
}
func (x *ChannelCloseSummary) GetRemotePubkey() string {
if x != nil {
return x.RemotePubkey
}
return ""
}
func (x *ChannelCloseSummary) GetCapacity() int64 {
if x != nil {
return x.Capacity
}
return 0
}
func (x *ChannelCloseSummary) GetCloseHeight() uint32 {
if x != nil {
return x.CloseHeight
}
return 0
}
func (x *ChannelCloseSummary) GetSettledBalance() int64 {
if x != nil {
return x.SettledBalance
}
return 0
}
func (x *ChannelCloseSummary) GetTimeLockedBalance() int64 {
if x != nil {
return x.TimeLockedBalance
}
return 0
}
func (x *ChannelCloseSummary) GetCloseType() ChannelCloseSummary_ClosureType {
if x != nil {
return x.CloseType
}
return ChannelCloseSummary_COOPERATIVE_CLOSE
}
func (x *ChannelCloseSummary) GetOpenInitiator() Initiator {
if x != nil {
return x.OpenInitiator
}
return Initiator_INITIATOR_UNKNOWN
}
func (x *ChannelCloseSummary) GetCloseInitiator() Initiator {
if x != nil {
return x.CloseInitiator
}
return Initiator_INITIATOR_UNKNOWN
}
func (x *ChannelCloseSummary) GetResolutions() []*Resolution {
if x != nil {
return x.Resolutions
}
return nil
}
type Resolution struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The type of output we are resolving.
ResolutionType ResolutionType `protobuf:"varint,1,opt,name=resolution_type,json=resolutionType,proto3,enum=lnrpc.ResolutionType" json:"resolution_type,omitempty"`
// The outcome of our on chain action that resolved the outpoint.
Outcome ResolutionOutcome `protobuf:"varint,2,opt,name=outcome,proto3,enum=lnrpc.ResolutionOutcome" json:"outcome,omitempty"`
// The outpoint that was spent by the resolution.
Outpoint *OutPoint `protobuf:"bytes,3,opt,name=outpoint,proto3" json:"outpoint,omitempty"`
// The amount that was claimed by the resolution.
AmountSat uint64 `protobuf:"varint,4,opt,name=amount_sat,json=amountSat,proto3" json:"amount_sat,omitempty"`
// The hex-encoded transaction ID of the sweep transaction that spent the
// output.
SweepTxid string `protobuf:"bytes,5,opt,name=sweep_txid,json=sweepTxid,proto3" json:"sweep_txid,omitempty"`
}
func (x *Resolution) Reset() {
*x = Resolution{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Resolution) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Resolution) ProtoMessage() {}
func (x *Resolution) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[41]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Resolution.ProtoReflect.Descriptor instead.
func (*Resolution) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{41}
}
func (x *Resolution) GetResolutionType() ResolutionType {
if x != nil {
return x.ResolutionType
}
return ResolutionType_TYPE_UNKNOWN
}
func (x *Resolution) GetOutcome() ResolutionOutcome {
if x != nil {
return x.Outcome
}
return ResolutionOutcome_OUTCOME_UNKNOWN
}
func (x *Resolution) GetOutpoint() *OutPoint {
if x != nil {
return x.Outpoint
}
return nil
}
func (x *Resolution) GetAmountSat() uint64 {
if x != nil {
return x.AmountSat
}
return 0
}
func (x *Resolution) GetSweepTxid() string {
if x != nil {
return x.SweepTxid
}
return ""
}
type ClosedChannelsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Cooperative bool `protobuf:"varint,1,opt,name=cooperative,proto3" json:"cooperative,omitempty"`
LocalForce bool `protobuf:"varint,2,opt,name=local_force,json=localForce,proto3" json:"local_force,omitempty"`
RemoteForce bool `protobuf:"varint,3,opt,name=remote_force,json=remoteForce,proto3" json:"remote_force,omitempty"`
Breach bool `protobuf:"varint,4,opt,name=breach,proto3" json:"breach,omitempty"`
FundingCanceled bool `protobuf:"varint,5,opt,name=funding_canceled,json=fundingCanceled,proto3" json:"funding_canceled,omitempty"`
Abandoned bool `protobuf:"varint,6,opt,name=abandoned,proto3" json:"abandoned,omitempty"`
}
func (x *ClosedChannelsRequest) Reset() {
*x = ClosedChannelsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ClosedChannelsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ClosedChannelsRequest) ProtoMessage() {}
func (x *ClosedChannelsRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[42]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ClosedChannelsRequest.ProtoReflect.Descriptor instead.
func (*ClosedChannelsRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{42}
}
func (x *ClosedChannelsRequest) GetCooperative() bool {
if x != nil {
return x.Cooperative
}
return false
}
func (x *ClosedChannelsRequest) GetLocalForce() bool {
if x != nil {
return x.LocalForce
}
return false
}
func (x *ClosedChannelsRequest) GetRemoteForce() bool {
if x != nil {
return x.RemoteForce
}
return false
}
func (x *ClosedChannelsRequest) GetBreach() bool {
if x != nil {
return x.Breach
}
return false
}
func (x *ClosedChannelsRequest) GetFundingCanceled() bool {
if x != nil {
return x.FundingCanceled
}
return false
}
func (x *ClosedChannelsRequest) GetAbandoned() bool {
if x != nil {
return x.Abandoned
}
return false
}
type ClosedChannelsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Channels []*ChannelCloseSummary `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"`
}
func (x *ClosedChannelsResponse) Reset() {
*x = ClosedChannelsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ClosedChannelsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ClosedChannelsResponse) ProtoMessage() {}
func (x *ClosedChannelsResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[43]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ClosedChannelsResponse.ProtoReflect.Descriptor instead.
func (*ClosedChannelsResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{43}
}
func (x *ClosedChannelsResponse) GetChannels() []*ChannelCloseSummary {
if x != nil {
return x.Channels
}
return nil
}
type Peer struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The identity pubkey of the peer
PubKey string `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
// Network address of the peer; eg `127.0.0.1:10011`
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
// Bytes of data transmitted to this peer
BytesSent uint64 `protobuf:"varint,4,opt,name=bytes_sent,json=bytesSent,proto3" json:"bytes_sent,omitempty"`
// Bytes of data transmitted from this peer
BytesRecv uint64 `protobuf:"varint,5,opt,name=bytes_recv,json=bytesRecv,proto3" json:"bytes_recv,omitempty"`
// Satoshis sent to this peer
SatSent int64 `protobuf:"varint,6,opt,name=sat_sent,json=satSent,proto3" json:"sat_sent,omitempty"`
// Satoshis received from this peer
SatRecv int64 `protobuf:"varint,7,opt,name=sat_recv,json=satRecv,proto3" json:"sat_recv,omitempty"`
// A channel is inbound if the counterparty initiated the channel
Inbound bool `protobuf:"varint,8,opt,name=inbound,proto3" json:"inbound,omitempty"`
// Ping time to this peer
PingTime int64 `protobuf:"varint,9,opt,name=ping_time,json=pingTime,proto3" json:"ping_time,omitempty"`
// The type of sync we are currently performing with this peer.
SyncType Peer_SyncType `protobuf:"varint,10,opt,name=sync_type,json=syncType,proto3,enum=lnrpc.Peer_SyncType" json:"sync_type,omitempty"`
// Features advertised by the remote peer in their init message.
Features map[uint32]*Feature `protobuf:"bytes,11,rep,name=features,proto3" json:"features,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
//
//The latest errors received from our peer with timestamps, limited to the 10
//most recent errors. These errors are tracked across peer connections, but
//are not persisted across lnd restarts. Note that these errors are only
//stored for peers that we have channels open with, to prevent peers from
//spamming us with errors at no cost.
Errors []*TimestampedError `protobuf:"bytes,12,rep,name=errors,proto3" json:"errors,omitempty"`
//
//The number of times we have recorded this peer going offline or coming
//online, recorded across restarts. Note that this value is decreased over
//time if the peer has not recently flapped, so that we can forgive peers
//with historically high flap counts.
FlapCount int32 `protobuf:"varint,13,opt,name=flap_count,json=flapCount,proto3" json:"flap_count,omitempty"`
//
//The timestamp of the last flap we observed for this peer. If this value is
//zero, we have not observed any flaps for this peer.
LastFlapNs int64 `protobuf:"varint,14,opt,name=last_flap_ns,json=lastFlapNs,proto3" json:"last_flap_ns,omitempty"`
//
//The last ping payload the peer has sent to us.
LastPingPayload []byte `protobuf:"bytes,15,opt,name=last_ping_payload,json=lastPingPayload,proto3" json:"last_ping_payload,omitempty"`
}
func (x *Peer) Reset() {
*x = Peer{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Peer) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Peer) ProtoMessage() {}
func (x *Peer) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[44]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Peer.ProtoReflect.Descriptor instead.
func (*Peer) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{44}
}
func (x *Peer) GetPubKey() string {
if x != nil {
return x.PubKey
}
return ""
}
func (x *Peer) GetAddress() string {
if x != nil {
return x.Address
}
return ""
}
func (x *Peer) GetBytesSent() uint64 {
if x != nil {
return x.BytesSent
}
return 0
}
func (x *Peer) GetBytesRecv() uint64 {
if x != nil {
return x.BytesRecv
}
return 0
}
func (x *Peer) GetSatSent() int64 {
if x != nil {
return x.SatSent
}
return 0
}
func (x *Peer) GetSatRecv() int64 {
if x != nil {
return x.SatRecv
}
return 0
}
func (x *Peer) GetInbound() bool {
if x != nil {
return x.Inbound
}
return false
}
func (x *Peer) GetPingTime() int64 {
if x != nil {
return x.PingTime
}
return 0
}
func (x *Peer) GetSyncType() Peer_SyncType {
if x != nil {
return x.SyncType
}
return Peer_UNKNOWN_SYNC
}
func (x *Peer) GetFeatures() map[uint32]*Feature {
if x != nil {
return x.Features
}
return nil
}
func (x *Peer) GetErrors() []*TimestampedError {
if x != nil {
return x.Errors
}
return nil
}
func (x *Peer) GetFlapCount() int32 {
if x != nil {
return x.FlapCount
}
return 0
}
func (x *Peer) GetLastFlapNs() int64 {
if x != nil {
return x.LastFlapNs
}
return 0
}
func (x *Peer) GetLastPingPayload() []byte {
if x != nil {
return x.LastPingPayload
}
return nil
}
type TimestampedError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The unix timestamp in seconds when the error occurred.
Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// The string representation of the error sent by our peer.
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *TimestampedError) Reset() {
*x = TimestampedError{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TimestampedError) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TimestampedError) ProtoMessage() {}
func (x *TimestampedError) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[45]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TimestampedError.ProtoReflect.Descriptor instead.
func (*TimestampedError) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{45}
}
func (x *TimestampedError) GetTimestamp() uint64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *TimestampedError) GetError() string {
if x != nil {
return x.Error
}
return ""
}
type ListPeersRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//If true, only the last error that our peer sent us will be returned with
//the peer's information, rather than the full set of historic errors we have
//stored.
LatestError bool `protobuf:"varint,1,opt,name=latest_error,json=latestError,proto3" json:"latest_error,omitempty"`
}
func (x *ListPeersRequest) Reset() {
*x = ListPeersRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPeersRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPeersRequest) ProtoMessage() {}
func (x *ListPeersRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[46]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPeersRequest.ProtoReflect.Descriptor instead.
func (*ListPeersRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{46}
}
func (x *ListPeersRequest) GetLatestError() bool {
if x != nil {
return x.LatestError
}
return false
}
type ListPeersResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of currently connected peers
Peers []*Peer `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
}
func (x *ListPeersResponse) Reset() {
*x = ListPeersResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPeersResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPeersResponse) ProtoMessage() {}
func (x *ListPeersResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[47]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPeersResponse.ProtoReflect.Descriptor instead.
func (*ListPeersResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{47}
}
func (x *ListPeersResponse) GetPeers() []*Peer {
if x != nil {
return x.Peers
}
return nil
}
type PeerEventSubscription struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *PeerEventSubscription) Reset() {
*x = PeerEventSubscription{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[48]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PeerEventSubscription) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PeerEventSubscription) ProtoMessage() {}
func (x *PeerEventSubscription) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[48]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PeerEventSubscription.ProtoReflect.Descriptor instead.
func (*PeerEventSubscription) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{48}
}
type PeerEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The identity pubkey of the peer.
PubKey string `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
Type PeerEvent_EventType `protobuf:"varint,2,opt,name=type,proto3,enum=lnrpc.PeerEvent_EventType" json:"type,omitempty"`
}
func (x *PeerEvent) Reset() {
*x = PeerEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[49]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PeerEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PeerEvent) ProtoMessage() {}
func (x *PeerEvent) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[49]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PeerEvent.ProtoReflect.Descriptor instead.
func (*PeerEvent) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{49}
}
func (x *PeerEvent) GetPubKey() string {
if x != nil {
return x.PubKey
}
return ""
}
func (x *PeerEvent) GetType() PeerEvent_EventType {
if x != nil {
return x.Type
}
return PeerEvent_PEER_ONLINE
}
type GetInfoRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetInfoRequest) Reset() {
*x = GetInfoRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[50]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetInfoRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetInfoRequest) ProtoMessage() {}
func (x *GetInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[50]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetInfoRequest.ProtoReflect.Descriptor instead.
func (*GetInfoRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{50}
}
type GetInfoResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The version of the LND software that the node is running.
Version string `protobuf:"bytes,14,opt,name=version,proto3" json:"version,omitempty"`
// The SHA1 commit hash that the daemon is compiled with.
CommitHash string `protobuf:"bytes,20,opt,name=commit_hash,json=commitHash,proto3" json:"commit_hash,omitempty"`
// The identity pubkey of the current node.
IdentityPubkey string `protobuf:"bytes,1,opt,name=identity_pubkey,json=identityPubkey,proto3" json:"identity_pubkey,omitempty"`
// If applicable, the alias of the current node, e.g. "bob"
Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"`
// The color of the current node in hex code format
Color string `protobuf:"bytes,17,opt,name=color,proto3" json:"color,omitempty"`
// Number of pending channels
NumPendingChannels uint32 `protobuf:"varint,3,opt,name=num_pending_channels,json=numPendingChannels,proto3" json:"num_pending_channels,omitempty"`
// Number of active channels
NumActiveChannels uint32 `protobuf:"varint,4,opt,name=num_active_channels,json=numActiveChannels,proto3" json:"num_active_channels,omitempty"`
// Number of inactive channels
NumInactiveChannels uint32 `protobuf:"varint,15,opt,name=num_inactive_channels,json=numInactiveChannels,proto3" json:"num_inactive_channels,omitempty"`
// Number of peers
NumPeers uint32 `protobuf:"varint,5,opt,name=num_peers,json=numPeers,proto3" json:"num_peers,omitempty"`
// The node's current view of the height of the best block
BlockHeight uint32 `protobuf:"varint,6,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
// The node's current view of the hash of the best block
BlockHash string `protobuf:"bytes,8,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
// Timestamp of the block best known to the wallet
BestHeaderTimestamp int64 `protobuf:"varint,13,opt,name=best_header_timestamp,json=bestHeaderTimestamp,proto3" json:"best_header_timestamp,omitempty"`
// Whether the wallet's view is synced to the main chain
SyncedToChain bool `protobuf:"varint,9,opt,name=synced_to_chain,json=syncedToChain,proto3" json:"synced_to_chain,omitempty"`
// Whether we consider ourselves synced with the public channel graph.
SyncedToGraph bool `protobuf:"varint,18,opt,name=synced_to_graph,json=syncedToGraph,proto3" json:"synced_to_graph,omitempty"`
//
//Whether the current node is connected to testnet. This field is
//deprecated and the network field should be used instead
//
// Deprecated: Do not use.
Testnet bool `protobuf:"varint,10,opt,name=testnet,proto3" json:"testnet,omitempty"`
// A list of active chains the node is connected to
Chains []*Chain `protobuf:"bytes,16,rep,name=chains,proto3" json:"chains,omitempty"`
// The URIs of the current node.
Uris []string `protobuf:"bytes,12,rep,name=uris,proto3" json:"uris,omitempty"`
//
//Features that our node has advertised in our init message, node
//announcements and invoices.
Features map[uint32]*Feature `protobuf:"bytes,19,rep,name=features,proto3" json:"features,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *GetInfoResponse) Reset() {
*x = GetInfoResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[51]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetInfoResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetInfoResponse) ProtoMessage() {}
func (x *GetInfoResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[51]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetInfoResponse.ProtoReflect.Descriptor instead.
func (*GetInfoResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{51}
}
func (x *GetInfoResponse) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *GetInfoResponse) GetCommitHash() string {
if x != nil {
return x.CommitHash
}
return ""
}
func (x *GetInfoResponse) GetIdentityPubkey() string {
if x != nil {
return x.IdentityPubkey
}
return ""
}
func (x *GetInfoResponse) GetAlias() string {
if x != nil {
return x.Alias
}
return ""
}
func (x *GetInfoResponse) GetColor() string {
if x != nil {
return x.Color
}
return ""
}
func (x *GetInfoResponse) GetNumPendingChannels() uint32 {
if x != nil {
return x.NumPendingChannels
}
return 0
}
func (x *GetInfoResponse) GetNumActiveChannels() uint32 {
if x != nil {
return x.NumActiveChannels
}
return 0
}
func (x *GetInfoResponse) GetNumInactiveChannels() uint32 {
if x != nil {
return x.NumInactiveChannels
}
return 0
}
func (x *GetInfoResponse) GetNumPeers() uint32 {
if x != nil {
return x.NumPeers
}
return 0
}
func (x *GetInfoResponse) GetBlockHeight() uint32 {
if x != nil {
return x.BlockHeight
}
return 0
}
func (x *GetInfoResponse) GetBlockHash() string {
if x != nil {
return x.BlockHash
}
return ""
}
func (x *GetInfoResponse) GetBestHeaderTimestamp() int64 {
if x != nil {
return x.BestHeaderTimestamp
}
return 0
}
func (x *GetInfoResponse) GetSyncedToChain() bool {
if x != nil {
return x.SyncedToChain
}
return false
}
func (x *GetInfoResponse) GetSyncedToGraph() bool {
if x != nil {
return x.SyncedToGraph
}
return false
}
// Deprecated: Do not use.
func (x *GetInfoResponse) GetTestnet() bool {
if x != nil {
return x.Testnet
}
return false
}
func (x *GetInfoResponse) GetChains() []*Chain {
if x != nil {
return x.Chains
}
return nil
}
func (x *GetInfoResponse) GetUris() []string {
if x != nil {
return x.Uris
}
return nil
}
func (x *GetInfoResponse) GetFeatures() map[uint32]*Feature {
if x != nil {
return x.Features
}
return nil
}
type GetRecoveryInfoRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetRecoveryInfoRequest) Reset() {
*x = GetRecoveryInfoRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[52]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetRecoveryInfoRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetRecoveryInfoRequest) ProtoMessage() {}
func (x *GetRecoveryInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[52]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetRecoveryInfoRequest.ProtoReflect.Descriptor instead.
func (*GetRecoveryInfoRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{52}
}
type GetRecoveryInfoResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether the wallet is in recovery mode
RecoveryMode bool `protobuf:"varint,1,opt,name=recovery_mode,json=recoveryMode,proto3" json:"recovery_mode,omitempty"`
// Whether the wallet recovery progress is finished
RecoveryFinished bool `protobuf:"varint,2,opt,name=recovery_finished,json=recoveryFinished,proto3" json:"recovery_finished,omitempty"`
// The recovery progress, ranging from 0 to 1.
Progress float64 `protobuf:"fixed64,3,opt,name=progress,proto3" json:"progress,omitempty"`
}
func (x *GetRecoveryInfoResponse) Reset() {
*x = GetRecoveryInfoResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[53]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetRecoveryInfoResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetRecoveryInfoResponse) ProtoMessage() {}
func (x *GetRecoveryInfoResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[53]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetRecoveryInfoResponse.ProtoReflect.Descriptor instead.
func (*GetRecoveryInfoResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{53}
}
func (x *GetRecoveryInfoResponse) GetRecoveryMode() bool {
if x != nil {
return x.RecoveryMode
}
return false
}
func (x *GetRecoveryInfoResponse) GetRecoveryFinished() bool {
if x != nil {
return x.RecoveryFinished
}
return false
}
func (x *GetRecoveryInfoResponse) GetProgress() float64 {
if x != nil {
return x.Progress
}
return 0
}
type Chain struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The blockchain the node is on (eg bitcoin, litecoin)
Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"`
// The network the node is on (eg regtest, testnet, mainnet)
Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"`
}
func (x *Chain) Reset() {
*x = Chain{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[54]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Chain) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Chain) ProtoMessage() {}
func (x *Chain) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[54]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Chain.ProtoReflect.Descriptor instead.
func (*Chain) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{54}
}
func (x *Chain) GetChain() string {
if x != nil {
return x.Chain
}
return ""
}
func (x *Chain) GetNetwork() string {
if x != nil {
return x.Network
}
return ""
}
type ConfirmationUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
BlockSha []byte `protobuf:"bytes,1,opt,name=block_sha,json=blockSha,proto3" json:"block_sha,omitempty"`
BlockHeight int32 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
NumConfsLeft uint32 `protobuf:"varint,3,opt,name=num_confs_left,json=numConfsLeft,proto3" json:"num_confs_left,omitempty"`
}
func (x *ConfirmationUpdate) Reset() {
*x = ConfirmationUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[55]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ConfirmationUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ConfirmationUpdate) ProtoMessage() {}
func (x *ConfirmationUpdate) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[55]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ConfirmationUpdate.ProtoReflect.Descriptor instead.
func (*ConfirmationUpdate) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{55}
}
func (x *ConfirmationUpdate) GetBlockSha() []byte {
if x != nil {
return x.BlockSha
}
return nil
}
func (x *ConfirmationUpdate) GetBlockHeight() int32 {
if x != nil {
return x.BlockHeight
}
return 0
}
func (x *ConfirmationUpdate) GetNumConfsLeft() uint32 {
if x != nil {
return x.NumConfsLeft
}
return 0
}
type ChannelOpenUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChannelPoint *ChannelPoint `protobuf:"bytes,1,opt,name=channel_point,json=channelPoint,proto3" json:"channel_point,omitempty"`
}
func (x *ChannelOpenUpdate) Reset() {
*x = ChannelOpenUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[56]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelOpenUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelOpenUpdate) ProtoMessage() {}
func (x *ChannelOpenUpdate) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[56]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelOpenUpdate.ProtoReflect.Descriptor instead.
func (*ChannelOpenUpdate) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{56}
}
func (x *ChannelOpenUpdate) GetChannelPoint() *ChannelPoint {
if x != nil {
return x.ChannelPoint
}
return nil
}
type ChannelCloseUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ClosingTxid []byte `protobuf:"bytes,1,opt,name=closing_txid,json=closingTxid,proto3" json:"closing_txid,omitempty"`
Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
}
func (x *ChannelCloseUpdate) Reset() {
*x = ChannelCloseUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[57]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelCloseUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelCloseUpdate) ProtoMessage() {}
func (x *ChannelCloseUpdate) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[57]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelCloseUpdate.ProtoReflect.Descriptor instead.
func (*ChannelCloseUpdate) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{57}
}
func (x *ChannelCloseUpdate) GetClosingTxid() []byte {
if x != nil {
return x.ClosingTxid
}
return nil
}
func (x *ChannelCloseUpdate) GetSuccess() bool {
if x != nil {
return x.Success
}
return false
}
type CloseChannelRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The outpoint (txid:index) of the funding transaction. With this value, Bob
//will be able to generate a signature for Alice's version of the commitment
//transaction.
ChannelPoint *ChannelPoint `protobuf:"bytes,1,opt,name=channel_point,json=channelPoint,proto3" json:"channel_point,omitempty"`
// If true, then the channel will be closed forcibly. This means the
// current commitment transaction will be signed and broadcast.
Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"`
// The target number of blocks that the closure transaction should be
// confirmed by.
TargetConf int32 `protobuf:"varint,3,opt,name=target_conf,json=targetConf,proto3" json:"target_conf,omitempty"`
// Deprecated, use sat_per_vbyte.
// A manual fee rate set in sat/vbyte that should be used when crafting the
// closure transaction.
//
// Deprecated: Do not use.
SatPerByte int64 `protobuf:"varint,4,opt,name=sat_per_byte,json=satPerByte,proto3" json:"sat_per_byte,omitempty"`
//
//An optional address to send funds to in the case of a cooperative close.
//If the channel was opened with an upfront shutdown script and this field
//is set, the request to close will fail because the channel must pay out
//to the upfront shutdown addresss.
DeliveryAddress string `protobuf:"bytes,5,opt,name=delivery_address,json=deliveryAddress,proto3" json:"delivery_address,omitempty"`
// A manual fee rate set in sat/vbyte that should be used when crafting the
// closure transaction.
SatPerVbyte uint64 `protobuf:"varint,6,opt,name=sat_per_vbyte,json=satPerVbyte,proto3" json:"sat_per_vbyte,omitempty"`
}
func (x *CloseChannelRequest) Reset() {
*x = CloseChannelRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[58]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CloseChannelRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CloseChannelRequest) ProtoMessage() {}
func (x *CloseChannelRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[58]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CloseChannelRequest.ProtoReflect.Descriptor instead.
func (*CloseChannelRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{58}
}
func (x *CloseChannelRequest) GetChannelPoint() *ChannelPoint {
if x != nil {
return x.ChannelPoint
}
return nil
}
func (x *CloseChannelRequest) GetForce() bool {
if x != nil {
return x.Force
}
return false
}
func (x *CloseChannelRequest) GetTargetConf() int32 {
if x != nil {
return x.TargetConf
}
return 0
}
// Deprecated: Do not use.
func (x *CloseChannelRequest) GetSatPerByte() int64 {
if x != nil {
return x.SatPerByte
}
return 0
}
func (x *CloseChannelRequest) GetDeliveryAddress() string {
if x != nil {
return x.DeliveryAddress
}
return ""
}
func (x *CloseChannelRequest) GetSatPerVbyte() uint64 {
if x != nil {
return x.SatPerVbyte
}
return 0
}
type CloseStatusUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Update:
// *CloseStatusUpdate_ClosePending
// *CloseStatusUpdate_ChanClose
Update isCloseStatusUpdate_Update `protobuf_oneof:"update"`
}
func (x *CloseStatusUpdate) Reset() {
*x = CloseStatusUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[59]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CloseStatusUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CloseStatusUpdate) ProtoMessage() {}
func (x *CloseStatusUpdate) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[59]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CloseStatusUpdate.ProtoReflect.Descriptor instead.
func (*CloseStatusUpdate) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{59}
}
func (m *CloseStatusUpdate) GetUpdate() isCloseStatusUpdate_Update {
if m != nil {
return m.Update
}
return nil
}
func (x *CloseStatusUpdate) GetClosePending() *PendingUpdate {
if x, ok := x.GetUpdate().(*CloseStatusUpdate_ClosePending); ok {
return x.ClosePending
}
return nil
}
func (x *CloseStatusUpdate) GetChanClose() *ChannelCloseUpdate {
if x, ok := x.GetUpdate().(*CloseStatusUpdate_ChanClose); ok {
return x.ChanClose
}
return nil
}
type isCloseStatusUpdate_Update interface {
isCloseStatusUpdate_Update()
}
type CloseStatusUpdate_ClosePending struct {
ClosePending *PendingUpdate `protobuf:"bytes,1,opt,name=close_pending,json=closePending,proto3,oneof"`
}
type CloseStatusUpdate_ChanClose struct {
ChanClose *ChannelCloseUpdate `protobuf:"bytes,3,opt,name=chan_close,json=chanClose,proto3,oneof"`
}
func (*CloseStatusUpdate_ClosePending) isCloseStatusUpdate_Update() {}
func (*CloseStatusUpdate_ChanClose) isCloseStatusUpdate_Update() {}
type PendingUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Txid []byte `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"`
OutputIndex uint32 `protobuf:"varint,2,opt,name=output_index,json=outputIndex,proto3" json:"output_index,omitempty"`
}
func (x *PendingUpdate) Reset() {
*x = PendingUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[60]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PendingUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PendingUpdate) ProtoMessage() {}
func (x *PendingUpdate) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[60]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PendingUpdate.ProtoReflect.Descriptor instead.
func (*PendingUpdate) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{60}
}
func (x *PendingUpdate) GetTxid() []byte {
if x != nil {
return x.Txid
}
return nil
}
func (x *PendingUpdate) GetOutputIndex() uint32 {
if x != nil {
return x.OutputIndex
}
return 0
}
type ReadyForPsbtFunding struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The P2WSH address of the channel funding multisig address that the below
//specified amount in satoshis needs to be sent to.
FundingAddress string `protobuf:"bytes,1,opt,name=funding_address,json=fundingAddress,proto3" json:"funding_address,omitempty"`
//
//The exact amount in satoshis that needs to be sent to the above address to
//fund the pending channel.
FundingAmount int64 `protobuf:"varint,2,opt,name=funding_amount,json=fundingAmount,proto3" json:"funding_amount,omitempty"`
//
//A raw PSBT that contains the pending channel output. If a base PSBT was
//provided in the PsbtShim, this is the base PSBT with one additional output.
//If no base PSBT was specified, this is an otherwise empty PSBT with exactly
//one output.
Psbt []byte `protobuf:"bytes,3,opt,name=psbt,proto3" json:"psbt,omitempty"`
}
func (x *ReadyForPsbtFunding) Reset() {
*x = ReadyForPsbtFunding{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[61]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReadyForPsbtFunding) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReadyForPsbtFunding) ProtoMessage() {}
func (x *ReadyForPsbtFunding) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[61]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ReadyForPsbtFunding.ProtoReflect.Descriptor instead.
func (*ReadyForPsbtFunding) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{61}
}
func (x *ReadyForPsbtFunding) GetFundingAddress() string {
if x != nil {
return x.FundingAddress
}
return ""
}
func (x *ReadyForPsbtFunding) GetFundingAmount() int64 {
if x != nil {
return x.FundingAmount
}
return 0
}
func (x *ReadyForPsbtFunding) GetPsbt() []byte {
if x != nil {
return x.Psbt
}
return nil
}
type BatchOpenChannelRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of channels to open.
Channels []*BatchOpenChannel `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"`
// The target number of blocks that the funding transaction should be
// confirmed by.
TargetConf int32 `protobuf:"varint,2,opt,name=target_conf,json=targetConf,proto3" json:"target_conf,omitempty"`
// A manual fee rate set in sat/vByte that should be used when crafting the
// funding transaction.
SatPerVbyte int64 `protobuf:"varint,3,opt,name=sat_per_vbyte,json=satPerVbyte,proto3" json:"sat_per_vbyte,omitempty"`
// The minimum number of confirmations each one of your outputs used for
// the funding transaction must satisfy.
MinConfs int32 `protobuf:"varint,4,opt,name=min_confs,json=minConfs,proto3" json:"min_confs,omitempty"`
// Whether unconfirmed outputs should be used as inputs for the funding
// transaction.
SpendUnconfirmed bool `protobuf:"varint,5,opt,name=spend_unconfirmed,json=spendUnconfirmed,proto3" json:"spend_unconfirmed,omitempty"`
// An optional label for the batch transaction, limited to 500 characters.
Label string `protobuf:"bytes,6,opt,name=label,proto3" json:"label,omitempty"`
}
func (x *BatchOpenChannelRequest) Reset() {
*x = BatchOpenChannelRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[62]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchOpenChannelRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchOpenChannelRequest) ProtoMessage() {}
func (x *BatchOpenChannelRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[62]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BatchOpenChannelRequest.ProtoReflect.Descriptor instead.
func (*BatchOpenChannelRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{62}
}
func (x *BatchOpenChannelRequest) GetChannels() []*BatchOpenChannel {
if x != nil {
return x.Channels
}
return nil
}
func (x *BatchOpenChannelRequest) GetTargetConf() int32 {
if x != nil {
return x.TargetConf
}
return 0
}
func (x *BatchOpenChannelRequest) GetSatPerVbyte() int64 {
if x != nil {
return x.SatPerVbyte
}
return 0
}
func (x *BatchOpenChannelRequest) GetMinConfs() int32 {
if x != nil {
return x.MinConfs
}
return 0
}
func (x *BatchOpenChannelRequest) GetSpendUnconfirmed() bool {
if x != nil {
return x.SpendUnconfirmed
}
return false
}
func (x *BatchOpenChannelRequest) GetLabel() string {
if x != nil {
return x.Label
}
return ""
}
type BatchOpenChannel struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The pubkey of the node to open a channel with. When using REST, this
// field must be encoded as base64.
NodePubkey []byte `protobuf:"bytes,1,opt,name=node_pubkey,json=nodePubkey,proto3" json:"node_pubkey,omitempty"`
// The number of satoshis the wallet should commit to the channel.
LocalFundingAmount int64 `protobuf:"varint,2,opt,name=local_funding_amount,json=localFundingAmount,proto3" json:"local_funding_amount,omitempty"`
// The number of satoshis to push to the remote side as part of the initial
// commitment state.
PushSat int64 `protobuf:"varint,3,opt,name=push_sat,json=pushSat,proto3" json:"push_sat,omitempty"`
// Whether this channel should be private, not announced to the greater
// network.
Private bool `protobuf:"varint,4,opt,name=private,proto3" json:"private,omitempty"`
// The minimum value in millisatoshi we will require for incoming HTLCs on
// the channel.
MinHtlcMsat int64 `protobuf:"varint,5,opt,name=min_htlc_msat,json=minHtlcMsat,proto3" json:"min_htlc_msat,omitempty"`
// The delay we require on the remote's commitment transaction. If this is
// not set, it will be scaled automatically with the channel size.
RemoteCsvDelay uint32 `protobuf:"varint,6,opt,name=remote_csv_delay,json=remoteCsvDelay,proto3" json:"remote_csv_delay,omitempty"`
//
//Close address is an optional address which specifies the address to which
//funds should be paid out to upon cooperative close. This field may only be
//set if the peer supports the option upfront feature bit (call listpeers
//to check). The remote peer will only accept cooperative closes to this
//address if it is set.
//
//Note: If this value is set on channel creation, you will *not* be able to
//cooperatively close out to a different address.
CloseAddress string `protobuf:"bytes,7,opt,name=close_address,json=closeAddress,proto3" json:"close_address,omitempty"`
//
//An optional, unique identifier of 32 random bytes that will be used as the
//pending channel ID to identify the channel while it is in the pre-pending
//state.
PendingChanId []byte `protobuf:"bytes,8,opt,name=pending_chan_id,json=pendingChanId,proto3" json:"pending_chan_id,omitempty"`
//
//The explicit commitment type to use. Note this field will only be used if
//the remote peer supports explicit channel negotiation.
CommitmentType CommitmentType `protobuf:"varint,9,opt,name=commitment_type,json=commitmentType,proto3,enum=lnrpc.CommitmentType" json:"commitment_type,omitempty"`
}
func (x *BatchOpenChannel) Reset() {
*x = BatchOpenChannel{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[63]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchOpenChannel) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchOpenChannel) ProtoMessage() {}
func (x *BatchOpenChannel) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[63]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BatchOpenChannel.ProtoReflect.Descriptor instead.
func (*BatchOpenChannel) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{63}
}
func (x *BatchOpenChannel) GetNodePubkey() []byte {
if x != nil {
return x.NodePubkey
}
return nil
}
func (x *BatchOpenChannel) GetLocalFundingAmount() int64 {
if x != nil {
return x.LocalFundingAmount
}
return 0
}
func (x *BatchOpenChannel) GetPushSat() int64 {
if x != nil {
return x.PushSat
}
return 0
}
func (x *BatchOpenChannel) GetPrivate() bool {
if x != nil {
return x.Private
}
return false
}
func (x *BatchOpenChannel) GetMinHtlcMsat() int64 {
if x != nil {
return x.MinHtlcMsat
}
return 0
}
func (x *BatchOpenChannel) GetRemoteCsvDelay() uint32 {
if x != nil {
return x.RemoteCsvDelay
}
return 0
}
func (x *BatchOpenChannel) GetCloseAddress() string {
if x != nil {
return x.CloseAddress
}
return ""
}
func (x *BatchOpenChannel) GetPendingChanId() []byte {
if x != nil {
return x.PendingChanId
}
return nil
}
func (x *BatchOpenChannel) GetCommitmentType() CommitmentType {
if x != nil {
return x.CommitmentType
}
return CommitmentType_UNKNOWN_COMMITMENT_TYPE
}
type BatchOpenChannelResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PendingChannels []*PendingUpdate `protobuf:"bytes,1,rep,name=pending_channels,json=pendingChannels,proto3" json:"pending_channels,omitempty"`
}
func (x *BatchOpenChannelResponse) Reset() {
*x = BatchOpenChannelResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[64]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchOpenChannelResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchOpenChannelResponse) ProtoMessage() {}
func (x *BatchOpenChannelResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[64]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BatchOpenChannelResponse.ProtoReflect.Descriptor instead.
func (*BatchOpenChannelResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{64}
}
func (x *BatchOpenChannelResponse) GetPendingChannels() []*PendingUpdate {
if x != nil {
return x.PendingChannels
}
return nil
}
type OpenChannelRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A manual fee rate set in sat/vbyte that should be used when crafting the
// funding transaction.
SatPerVbyte uint64 `protobuf:"varint,1,opt,name=sat_per_vbyte,json=satPerVbyte,proto3" json:"sat_per_vbyte,omitempty"`
//
//The pubkey of the node to open a channel with. When using REST, this field
//must be encoded as base64.
NodePubkey []byte `protobuf:"bytes,2,opt,name=node_pubkey,json=nodePubkey,proto3" json:"node_pubkey,omitempty"`
//
//The hex encoded pubkey of the node to open a channel with. Deprecated now
//that the REST gateway supports base64 encoding of bytes fields.
//
// Deprecated: Do not use.
NodePubkeyString string `protobuf:"bytes,3,opt,name=node_pubkey_string,json=nodePubkeyString,proto3" json:"node_pubkey_string,omitempty"`
// The number of satoshis the wallet should commit to the channel
LocalFundingAmount int64 `protobuf:"varint,4,opt,name=local_funding_amount,json=localFundingAmount,proto3" json:"local_funding_amount,omitempty"`
// The number of satoshis to push to the remote side as part of the initial
// commitment state
PushSat int64 `protobuf:"varint,5,opt,name=push_sat,json=pushSat,proto3" json:"push_sat,omitempty"`
// The target number of blocks that the funding transaction should be
// confirmed by.
TargetConf int32 `protobuf:"varint,6,opt,name=target_conf,json=targetConf,proto3" json:"target_conf,omitempty"`
// Deprecated, use sat_per_vbyte.
// A manual fee rate set in sat/vbyte that should be used when crafting the
// funding transaction.
//
// Deprecated: Do not use.
SatPerByte int64 `protobuf:"varint,7,opt,name=sat_per_byte,json=satPerByte,proto3" json:"sat_per_byte,omitempty"`
// Whether this channel should be private, not announced to the greater
// network.
Private bool `protobuf:"varint,8,opt,name=private,proto3" json:"private,omitempty"`
// The minimum value in millisatoshi we will require for incoming HTLCs on
// the channel.
MinHtlcMsat int64 `protobuf:"varint,9,opt,name=min_htlc_msat,json=minHtlcMsat,proto3" json:"min_htlc_msat,omitempty"`
// The delay we require on the remote's commitment transaction. If this is
// not set, it will be scaled automatically with the channel size.
RemoteCsvDelay uint32 `protobuf:"varint,10,opt,name=remote_csv_delay,json=remoteCsvDelay,proto3" json:"remote_csv_delay,omitempty"`
// The minimum number of confirmations each one of your outputs used for
// the funding transaction must satisfy.
MinConfs int32 `protobuf:"varint,11,opt,name=min_confs,json=minConfs,proto3" json:"min_confs,omitempty"`
// Whether unconfirmed outputs should be used as inputs for the funding
// transaction.
SpendUnconfirmed bool `protobuf:"varint,12,opt,name=spend_unconfirmed,json=spendUnconfirmed,proto3" json:"spend_unconfirmed,omitempty"`
//
//Close address is an optional address which specifies the address to which
//funds should be paid out to upon cooperative close. This field may only be
//set if the peer supports the option upfront feature bit (call listpeers
//to check). The remote peer will only accept cooperative closes to this
//address if it is set.
//
//Note: If this value is set on channel creation, you will *not* be able to
//cooperatively close out to a different address.
CloseAddress string `protobuf:"bytes,13,opt,name=close_address,json=closeAddress,proto3" json:"close_address,omitempty"`
//
//Funding shims are an optional argument that allow the caller to intercept
//certain funding functionality. For example, a shim can be provided to use a
//particular key for the commitment key (ideally cold) rather than use one
//that is generated by the wallet as normal, or signal that signing will be
//carried out in an interactive manner (PSBT based).
FundingShim *FundingShim `protobuf:"bytes,14,opt,name=funding_shim,json=fundingShim,proto3" json:"funding_shim,omitempty"`
//
//The maximum amount of coins in millisatoshi that can be pending within
//the channel. It only applies to the remote party.
RemoteMaxValueInFlightMsat uint64 `protobuf:"varint,15,opt,name=remote_max_value_in_flight_msat,json=remoteMaxValueInFlightMsat,proto3" json:"remote_max_value_in_flight_msat,omitempty"`
//
//The maximum number of concurrent HTLCs we will allow the remote party to add
//to the commitment transaction.
RemoteMaxHtlcs uint32 `protobuf:"varint,16,opt,name=remote_max_htlcs,json=remoteMaxHtlcs,proto3" json:"remote_max_htlcs,omitempty"`
//
//Max local csv is the maximum csv delay we will allow for our own commitment
//transaction.
MaxLocalCsv uint32 `protobuf:"varint,17,opt,name=max_local_csv,json=maxLocalCsv,proto3" json:"max_local_csv,omitempty"`
//
//The explicit commitment type to use. Note this field will only be used if
//the remote peer supports explicit channel negotiation.
CommitmentType CommitmentType `protobuf:"varint,18,opt,name=commitment_type,json=commitmentType,proto3,enum=lnrpc.CommitmentType" json:"commitment_type,omitempty"`
}
func (x *OpenChannelRequest) Reset() {
*x = OpenChannelRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[65]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OpenChannelRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OpenChannelRequest) ProtoMessage() {}
func (x *OpenChannelRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[65]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OpenChannelRequest.ProtoReflect.Descriptor instead.
func (*OpenChannelRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{65}
}
func (x *OpenChannelRequest) GetSatPerVbyte() uint64 {
if x != nil {
return x.SatPerVbyte
}
return 0
}
func (x *OpenChannelRequest) GetNodePubkey() []byte {
if x != nil {
return x.NodePubkey
}
return nil
}
// Deprecated: Do not use.
func (x *OpenChannelRequest) GetNodePubkeyString() string {
if x != nil {
return x.NodePubkeyString
}
return ""
}
func (x *OpenChannelRequest) GetLocalFundingAmount() int64 {
if x != nil {
return x.LocalFundingAmount
}
return 0
}
func (x *OpenChannelRequest) GetPushSat() int64 {
if x != nil {
return x.PushSat
}
return 0
}
func (x *OpenChannelRequest) GetTargetConf() int32 {
if x != nil {
return x.TargetConf
}
return 0
}
// Deprecated: Do not use.
func (x *OpenChannelRequest) GetSatPerByte() int64 {
if x != nil {
return x.SatPerByte
}
return 0
}
func (x *OpenChannelRequest) GetPrivate() bool {
if x != nil {
return x.Private
}
return false
}
func (x *OpenChannelRequest) GetMinHtlcMsat() int64 {
if x != nil {
return x.MinHtlcMsat
}
return 0
}
func (x *OpenChannelRequest) GetRemoteCsvDelay() uint32 {
if x != nil {
return x.RemoteCsvDelay
}
return 0
}
func (x *OpenChannelRequest) GetMinConfs() int32 {
if x != nil {
return x.MinConfs
}
return 0
}
func (x *OpenChannelRequest) GetSpendUnconfirmed() bool {
if x != nil {
return x.SpendUnconfirmed
}
return false
}
func (x *OpenChannelRequest) GetCloseAddress() string {
if x != nil {
return x.CloseAddress
}
return ""
}
func (x *OpenChannelRequest) GetFundingShim() *FundingShim {
if x != nil {
return x.FundingShim
}
return nil
}
func (x *OpenChannelRequest) GetRemoteMaxValueInFlightMsat() uint64 {
if x != nil {
return x.RemoteMaxValueInFlightMsat
}
return 0
}
func (x *OpenChannelRequest) GetRemoteMaxHtlcs() uint32 {
if x != nil {
return x.RemoteMaxHtlcs
}
return 0
}
func (x *OpenChannelRequest) GetMaxLocalCsv() uint32 {
if x != nil {
return x.MaxLocalCsv
}
return 0
}
func (x *OpenChannelRequest) GetCommitmentType() CommitmentType {
if x != nil {
return x.CommitmentType
}
return CommitmentType_UNKNOWN_COMMITMENT_TYPE
}
type OpenStatusUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Update:
// *OpenStatusUpdate_ChanPending
// *OpenStatusUpdate_ChanOpen
// *OpenStatusUpdate_PsbtFund
Update isOpenStatusUpdate_Update `protobuf_oneof:"update"`
//
//The pending channel ID of the created channel. This value may be used to
//further the funding flow manually via the FundingStateStep method.
PendingChanId []byte `protobuf:"bytes,4,opt,name=pending_chan_id,json=pendingChanId,proto3" json:"pending_chan_id,omitempty"`
}
func (x *OpenStatusUpdate) Reset() {
*x = OpenStatusUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[66]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OpenStatusUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OpenStatusUpdate) ProtoMessage() {}
func (x *OpenStatusUpdate) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[66]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OpenStatusUpdate.ProtoReflect.Descriptor instead.
func (*OpenStatusUpdate) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{66}
}
func (m *OpenStatusUpdate) GetUpdate() isOpenStatusUpdate_Update {
if m != nil {
return m.Update
}
return nil
}
func (x *OpenStatusUpdate) GetChanPending() *PendingUpdate {
if x, ok := x.GetUpdate().(*OpenStatusUpdate_ChanPending); ok {
return x.ChanPending
}
return nil
}
func (x *OpenStatusUpdate) GetChanOpen() *ChannelOpenUpdate {
if x, ok := x.GetUpdate().(*OpenStatusUpdate_ChanOpen); ok {
return x.ChanOpen
}
return nil
}
func (x *OpenStatusUpdate) GetPsbtFund() *ReadyForPsbtFunding {
if x, ok := x.GetUpdate().(*OpenStatusUpdate_PsbtFund); ok {
return x.PsbtFund
}
return nil
}
func (x *OpenStatusUpdate) GetPendingChanId() []byte {
if x != nil {
return x.PendingChanId
}
return nil
}
type isOpenStatusUpdate_Update interface {
isOpenStatusUpdate_Update()
}
type OpenStatusUpdate_ChanPending struct {
//
//Signals that the channel is now fully negotiated and the funding
//transaction published.
ChanPending *PendingUpdate `protobuf:"bytes,1,opt,name=chan_pending,json=chanPending,proto3,oneof"`
}
type OpenStatusUpdate_ChanOpen struct {
//
//Signals that the channel's funding transaction has now reached the
//required number of confirmations on chain and can be used.
ChanOpen *ChannelOpenUpdate `protobuf:"bytes,3,opt,name=chan_open,json=chanOpen,proto3,oneof"`
}
type OpenStatusUpdate_PsbtFund struct {
//
//Signals that the funding process has been suspended and the construction
//of a PSBT that funds the channel PK script is now required.
PsbtFund *ReadyForPsbtFunding `protobuf:"bytes,5,opt,name=psbt_fund,json=psbtFund,proto3,oneof"`
}
func (*OpenStatusUpdate_ChanPending) isOpenStatusUpdate_Update() {}
func (*OpenStatusUpdate_ChanOpen) isOpenStatusUpdate_Update() {}
func (*OpenStatusUpdate_PsbtFund) isOpenStatusUpdate_Update() {}
type KeyLocator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The family of key being identified.
KeyFamily int32 `protobuf:"varint,1,opt,name=key_family,json=keyFamily,proto3" json:"key_family,omitempty"`
// The precise index of the key being identified.
KeyIndex int32 `protobuf:"varint,2,opt,name=key_index,json=keyIndex,proto3" json:"key_index,omitempty"`
}
func (x *KeyLocator) Reset() {
*x = KeyLocator{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[67]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KeyLocator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KeyLocator) ProtoMessage() {}
func (x *KeyLocator) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[67]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use KeyLocator.ProtoReflect.Descriptor instead.
func (*KeyLocator) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{67}
}
func (x *KeyLocator) GetKeyFamily() int32 {
if x != nil {
return x.KeyFamily
}
return 0
}
func (x *KeyLocator) GetKeyIndex() int32 {
if x != nil {
return x.KeyIndex
}
return 0
}
type KeyDescriptor struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The raw bytes of the key being identified.
RawKeyBytes []byte `protobuf:"bytes,1,opt,name=raw_key_bytes,json=rawKeyBytes,proto3" json:"raw_key_bytes,omitempty"`
//
//The key locator that identifies which key to use for signing.
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
}
func (x *KeyDescriptor) Reset() {
*x = KeyDescriptor{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[68]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KeyDescriptor) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KeyDescriptor) ProtoMessage() {}
func (x *KeyDescriptor) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[68]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use KeyDescriptor.ProtoReflect.Descriptor instead.
func (*KeyDescriptor) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{68}
}
func (x *KeyDescriptor) GetRawKeyBytes() []byte {
if x != nil {
return x.RawKeyBytes
}
return nil
}
func (x *KeyDescriptor) GetKeyLoc() *KeyLocator {
if x != nil {
return x.KeyLoc
}
return nil
}
type ChanPointShim struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The size of the pre-crafted output to be used as the channel point for this
//channel funding.
Amt int64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
// The target channel point to refrence in created commitment transactions.
ChanPoint *ChannelPoint `protobuf:"bytes,2,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"`
// Our local key to use when creating the multi-sig output.
LocalKey *KeyDescriptor `protobuf:"bytes,3,opt,name=local_key,json=localKey,proto3" json:"local_key,omitempty"`
// The key of the remote party to use when creating the multi-sig output.
RemoteKey []byte `protobuf:"bytes,4,opt,name=remote_key,json=remoteKey,proto3" json:"remote_key,omitempty"`
//
//If non-zero, then this will be used as the pending channel ID on the wire
//protocol to initate the funding request. This is an optional field, and
//should only be set if the responder is already expecting a specific pending
//channel ID.
PendingChanId []byte `protobuf:"bytes,5,opt,name=pending_chan_id,json=pendingChanId,proto3" json:"pending_chan_id,omitempty"`
//
//This uint32 indicates if this channel is to be considered 'frozen'. A frozen
//channel does not allow a cooperative channel close by the initiator. The
//thaw_height is the height that this restriction stops applying to the
//channel. The height can be interpreted in two ways: as a relative height if
//the value is less than 500,000, or as an absolute height otherwise.
ThawHeight uint32 `protobuf:"varint,6,opt,name=thaw_height,json=thawHeight,proto3" json:"thaw_height,omitempty"`
}
func (x *ChanPointShim) Reset() {
*x = ChanPointShim{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[69]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChanPointShim) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChanPointShim) ProtoMessage() {}
func (x *ChanPointShim) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[69]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChanPointShim.ProtoReflect.Descriptor instead.
func (*ChanPointShim) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{69}
}
func (x *ChanPointShim) GetAmt() int64 {
if x != nil {
return x.Amt
}
return 0
}
func (x *ChanPointShim) GetChanPoint() *ChannelPoint {
if x != nil {
return x.ChanPoint
}
return nil
}
func (x *ChanPointShim) GetLocalKey() *KeyDescriptor {
if x != nil {
return x.LocalKey
}
return nil
}
func (x *ChanPointShim) GetRemoteKey() []byte {
if x != nil {
return x.RemoteKey
}
return nil
}
func (x *ChanPointShim) GetPendingChanId() []byte {
if x != nil {
return x.PendingChanId
}
return nil
}
func (x *ChanPointShim) GetThawHeight() uint32 {
if x != nil {
return x.ThawHeight
}
return 0
}
type PsbtShim struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//A unique identifier of 32 random bytes that will be used as the pending
//channel ID to identify the PSBT state machine when interacting with it and
//on the wire protocol to initiate the funding request.
PendingChanId []byte `protobuf:"bytes,1,opt,name=pending_chan_id,json=pendingChanId,proto3" json:"pending_chan_id,omitempty"`
//
//An optional base PSBT the new channel output will be added to. If this is
//non-empty, it must be a binary serialized PSBT.
BasePsbt []byte `protobuf:"bytes,2,opt,name=base_psbt,json=basePsbt,proto3" json:"base_psbt,omitempty"`
//
//If a channel should be part of a batch (multiple channel openings in one
//transaction), it can be dangerous if the whole batch transaction is
//published too early before all channel opening negotiations are completed.
//This flag prevents this particular channel from broadcasting the transaction
//after the negotiation with the remote peer. In a batch of channel openings
//this flag should be set to true for every channel but the very last.
NoPublish bool `protobuf:"varint,3,opt,name=no_publish,json=noPublish,proto3" json:"no_publish,omitempty"`
}
func (x *PsbtShim) Reset() {
*x = PsbtShim{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[70]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PsbtShim) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PsbtShim) ProtoMessage() {}
func (x *PsbtShim) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[70]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PsbtShim.ProtoReflect.Descriptor instead.
func (*PsbtShim) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{70}
}
func (x *PsbtShim) GetPendingChanId() []byte {
if x != nil {
return x.PendingChanId
}
return nil
}
func (x *PsbtShim) GetBasePsbt() []byte {
if x != nil {
return x.BasePsbt
}
return nil
}
func (x *PsbtShim) GetNoPublish() bool {
if x != nil {
return x.NoPublish
}
return false
}
type FundingShim struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Shim:
// *FundingShim_ChanPointShim
// *FundingShim_PsbtShim
Shim isFundingShim_Shim `protobuf_oneof:"shim"`
}
func (x *FundingShim) Reset() {
*x = FundingShim{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[71]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FundingShim) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FundingShim) ProtoMessage() {}
func (x *FundingShim) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[71]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FundingShim.ProtoReflect.Descriptor instead.
func (*FundingShim) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{71}
}
func (m *FundingShim) GetShim() isFundingShim_Shim {
if m != nil {
return m.Shim
}
return nil
}
func (x *FundingShim) GetChanPointShim() *ChanPointShim {
if x, ok := x.GetShim().(*FundingShim_ChanPointShim); ok {
return x.ChanPointShim
}
return nil
}
func (x *FundingShim) GetPsbtShim() *PsbtShim {
if x, ok := x.GetShim().(*FundingShim_PsbtShim); ok {
return x.PsbtShim
}
return nil
}
type isFundingShim_Shim interface {
isFundingShim_Shim()
}
type FundingShim_ChanPointShim struct {
//
//A channel shim where the channel point was fully constructed outside
//of lnd's wallet and the transaction might already be published.
ChanPointShim *ChanPointShim `protobuf:"bytes,1,opt,name=chan_point_shim,json=chanPointShim,proto3,oneof"`
}
type FundingShim_PsbtShim struct {
//
//A channel shim that uses a PSBT to fund and sign the channel funding
//transaction.
PsbtShim *PsbtShim `protobuf:"bytes,2,opt,name=psbt_shim,json=psbtShim,proto3,oneof"`
}
func (*FundingShim_ChanPointShim) isFundingShim_Shim() {}
func (*FundingShim_PsbtShim) isFundingShim_Shim() {}
type FundingShimCancel struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The pending channel ID of the channel to cancel the funding shim for.
PendingChanId []byte `protobuf:"bytes,1,opt,name=pending_chan_id,json=pendingChanId,proto3" json:"pending_chan_id,omitempty"`
}
func (x *FundingShimCancel) Reset() {
*x = FundingShimCancel{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[72]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FundingShimCancel) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FundingShimCancel) ProtoMessage() {}
func (x *FundingShimCancel) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[72]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FundingShimCancel.ProtoReflect.Descriptor instead.
func (*FundingShimCancel) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{72}
}
func (x *FundingShimCancel) GetPendingChanId() []byte {
if x != nil {
return x.PendingChanId
}
return nil
}
type FundingPsbtVerify struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The funded but not yet signed PSBT that sends the exact channel capacity
//amount to the PK script returned in the open channel message in a previous
//step.
FundedPsbt []byte `protobuf:"bytes,1,opt,name=funded_psbt,json=fundedPsbt,proto3" json:"funded_psbt,omitempty"`
// The pending channel ID of the channel to get the PSBT for.
PendingChanId []byte `protobuf:"bytes,2,opt,name=pending_chan_id,json=pendingChanId,proto3" json:"pending_chan_id,omitempty"`
//
//Can only be used if the no_publish flag was set to true in the OpenChannel
//call meaning that the caller is solely responsible for publishing the final
//funding transaction. If skip_finalize is set to true then lnd will not wait
//for a FundingPsbtFinalize state step and instead assumes that a transaction
//with the same TXID as the passed in PSBT will eventually confirm.
//IT IS ABSOLUTELY IMPERATIVE that the TXID of the transaction that is
//eventually published does have the _same TXID_ as the verified PSBT. That
//means no inputs or outputs can change, only signatures can be added. If the
//TXID changes between this call and the publish step then the channel will
//never be created and the funds will be in limbo.
SkipFinalize bool `protobuf:"varint,3,opt,name=skip_finalize,json=skipFinalize,proto3" json:"skip_finalize,omitempty"`
}
func (x *FundingPsbtVerify) Reset() {
*x = FundingPsbtVerify{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[73]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FundingPsbtVerify) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FundingPsbtVerify) ProtoMessage() {}
func (x *FundingPsbtVerify) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[73]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FundingPsbtVerify.ProtoReflect.Descriptor instead.
func (*FundingPsbtVerify) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{73}
}
func (x *FundingPsbtVerify) GetFundedPsbt() []byte {
if x != nil {
return x.FundedPsbt
}
return nil
}
func (x *FundingPsbtVerify) GetPendingChanId() []byte {
if x != nil {
return x.PendingChanId
}
return nil
}
func (x *FundingPsbtVerify) GetSkipFinalize() bool {
if x != nil {
return x.SkipFinalize
}
return false
}
type FundingPsbtFinalize struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The funded PSBT that contains all witness data to send the exact channel
//capacity amount to the PK script returned in the open channel message in a
//previous step. Cannot be set at the same time as final_raw_tx.
SignedPsbt []byte `protobuf:"bytes,1,opt,name=signed_psbt,json=signedPsbt,proto3" json:"signed_psbt,omitempty"`
// The pending channel ID of the channel to get the PSBT for.
PendingChanId []byte `protobuf:"bytes,2,opt,name=pending_chan_id,json=pendingChanId,proto3" json:"pending_chan_id,omitempty"`
//
//As an alternative to the signed PSBT with all witness data, the final raw
//wire format transaction can also be specified directly. Cannot be set at the
//same time as signed_psbt.
FinalRawTx []byte `protobuf:"bytes,3,opt,name=final_raw_tx,json=finalRawTx,proto3" json:"final_raw_tx,omitempty"`
}
func (x *FundingPsbtFinalize) Reset() {
*x = FundingPsbtFinalize{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[74]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FundingPsbtFinalize) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FundingPsbtFinalize) ProtoMessage() {}
func (x *FundingPsbtFinalize) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[74]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FundingPsbtFinalize.ProtoReflect.Descriptor instead.
func (*FundingPsbtFinalize) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{74}
}
func (x *FundingPsbtFinalize) GetSignedPsbt() []byte {
if x != nil {
return x.SignedPsbt
}
return nil
}
func (x *FundingPsbtFinalize) GetPendingChanId() []byte {
if x != nil {
return x.PendingChanId
}
return nil
}
func (x *FundingPsbtFinalize) GetFinalRawTx() []byte {
if x != nil {
return x.FinalRawTx
}
return nil
}
type FundingTransitionMsg struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Trigger:
// *FundingTransitionMsg_ShimRegister
// *FundingTransitionMsg_ShimCancel
// *FundingTransitionMsg_PsbtVerify
// *FundingTransitionMsg_PsbtFinalize
Trigger isFundingTransitionMsg_Trigger `protobuf_oneof:"trigger"`
}
func (x *FundingTransitionMsg) Reset() {
*x = FundingTransitionMsg{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[75]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FundingTransitionMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FundingTransitionMsg) ProtoMessage() {}
func (x *FundingTransitionMsg) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[75]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FundingTransitionMsg.ProtoReflect.Descriptor instead.
func (*FundingTransitionMsg) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{75}
}
func (m *FundingTransitionMsg) GetTrigger() isFundingTransitionMsg_Trigger {
if m != nil {
return m.Trigger
}
return nil
}
func (x *FundingTransitionMsg) GetShimRegister() *FundingShim {
if x, ok := x.GetTrigger().(*FundingTransitionMsg_ShimRegister); ok {
return x.ShimRegister
}
return nil
}
func (x *FundingTransitionMsg) GetShimCancel() *FundingShimCancel {
if x, ok := x.GetTrigger().(*FundingTransitionMsg_ShimCancel); ok {
return x.ShimCancel
}
return nil
}
func (x *FundingTransitionMsg) GetPsbtVerify() *FundingPsbtVerify {
if x, ok := x.GetTrigger().(*FundingTransitionMsg_PsbtVerify); ok {
return x.PsbtVerify
}
return nil
}
func (x *FundingTransitionMsg) GetPsbtFinalize() *FundingPsbtFinalize {
if x, ok := x.GetTrigger().(*FundingTransitionMsg_PsbtFinalize); ok {
return x.PsbtFinalize
}
return nil
}
type isFundingTransitionMsg_Trigger interface {
isFundingTransitionMsg_Trigger()
}
type FundingTransitionMsg_ShimRegister struct {
//
//The funding shim to register. This should be used before any
//channel funding has began by the remote party, as it is intended as a
//preparatory step for the full channel funding.
ShimRegister *FundingShim `protobuf:"bytes,1,opt,name=shim_register,json=shimRegister,proto3,oneof"`
}
type FundingTransitionMsg_ShimCancel struct {
// Used to cancel an existing registered funding shim.
ShimCancel *FundingShimCancel `protobuf:"bytes,2,opt,name=shim_cancel,json=shimCancel,proto3,oneof"`
}
type FundingTransitionMsg_PsbtVerify struct {
//
//Used to continue a funding flow that was initiated to be executed
//through a PSBT. This step verifies that the PSBT contains the correct
//outputs to fund the channel.
PsbtVerify *FundingPsbtVerify `protobuf:"bytes,3,opt,name=psbt_verify,json=psbtVerify,proto3,oneof"`
}
type FundingTransitionMsg_PsbtFinalize struct {
//
//Used to continue a funding flow that was initiated to be executed
//through a PSBT. This step finalizes the funded and signed PSBT, finishes
//negotiation with the peer and finally publishes the resulting funding
//transaction.
PsbtFinalize *FundingPsbtFinalize `protobuf:"bytes,4,opt,name=psbt_finalize,json=psbtFinalize,proto3,oneof"`
}
func (*FundingTransitionMsg_ShimRegister) isFundingTransitionMsg_Trigger() {}
func (*FundingTransitionMsg_ShimCancel) isFundingTransitionMsg_Trigger() {}
func (*FundingTransitionMsg_PsbtVerify) isFundingTransitionMsg_Trigger() {}
func (*FundingTransitionMsg_PsbtFinalize) isFundingTransitionMsg_Trigger() {}
type FundingStateStepResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *FundingStateStepResp) Reset() {
*x = FundingStateStepResp{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[76]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FundingStateStepResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FundingStateStepResp) ProtoMessage() {}
func (x *FundingStateStepResp) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[76]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FundingStateStepResp.ProtoReflect.Descriptor instead.
func (*FundingStateStepResp) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{76}
}
type PendingHTLC struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The direction within the channel that the htlc was sent
Incoming bool `protobuf:"varint,1,opt,name=incoming,proto3" json:"incoming,omitempty"`
// The total value of the htlc
Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
// The final output to be swept back to the user's wallet
Outpoint string `protobuf:"bytes,3,opt,name=outpoint,proto3" json:"outpoint,omitempty"`
// The next block height at which we can spend the current stage
MaturityHeight uint32 `protobuf:"varint,4,opt,name=maturity_height,json=maturityHeight,proto3" json:"maturity_height,omitempty"`
//
//The number of blocks remaining until the current stage can be swept.
//Negative values indicate how many blocks have passed since becoming
//mature.
BlocksTilMaturity int32 `protobuf:"varint,5,opt,name=blocks_til_maturity,json=blocksTilMaturity,proto3" json:"blocks_til_maturity,omitempty"`
// Indicates whether the htlc is in its first or second stage of recovery
Stage uint32 `protobuf:"varint,6,opt,name=stage,proto3" json:"stage,omitempty"`
}
func (x *PendingHTLC) Reset() {
*x = PendingHTLC{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[77]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PendingHTLC) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PendingHTLC) ProtoMessage() {}
func (x *PendingHTLC) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[77]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PendingHTLC.ProtoReflect.Descriptor instead.
func (*PendingHTLC) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{77}
}
func (x *PendingHTLC) GetIncoming() bool {
if x != nil {
return x.Incoming
}
return false
}
func (x *PendingHTLC) GetAmount() int64 {
if x != nil {
return x.Amount
}
return 0
}
func (x *PendingHTLC) GetOutpoint() string {
if x != nil {
return x.Outpoint
}
return ""
}
func (x *PendingHTLC) GetMaturityHeight() uint32 {
if x != nil {
return x.MaturityHeight
}
return 0
}
func (x *PendingHTLC) GetBlocksTilMaturity() int32 {
if x != nil {
return x.BlocksTilMaturity
}
return 0
}
func (x *PendingHTLC) GetStage() uint32 {
if x != nil {
return x.Stage
}
return 0
}
type PendingChannelsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *PendingChannelsRequest) Reset() {
*x = PendingChannelsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[78]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PendingChannelsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PendingChannelsRequest) ProtoMessage() {}
func (x *PendingChannelsRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[78]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PendingChannelsRequest.ProtoReflect.Descriptor instead.
func (*PendingChannelsRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{78}
}
type PendingChannelsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The balance in satoshis encumbered in pending channels
TotalLimboBalance int64 `protobuf:"varint,1,opt,name=total_limbo_balance,json=totalLimboBalance,proto3" json:"total_limbo_balance,omitempty"`
// Channels pending opening
PendingOpenChannels []*PendingChannelsResponse_PendingOpenChannel `protobuf:"bytes,2,rep,name=pending_open_channels,json=pendingOpenChannels,proto3" json:"pending_open_channels,omitempty"`
//
//Deprecated: Channels pending closing previously contained cooperatively
//closed channels with a single confirmation. These channels are now
//considered closed from the time we see them on chain.
//
// Deprecated: Do not use.
PendingClosingChannels []*PendingChannelsResponse_ClosedChannel `protobuf:"bytes,3,rep,name=pending_closing_channels,json=pendingClosingChannels,proto3" json:"pending_closing_channels,omitempty"`
// Channels pending force closing
PendingForceClosingChannels []*PendingChannelsResponse_ForceClosedChannel `protobuf:"bytes,4,rep,name=pending_force_closing_channels,json=pendingForceClosingChannels,proto3" json:"pending_force_closing_channels,omitempty"`
// Channels waiting for closing tx to confirm
WaitingCloseChannels []*PendingChannelsResponse_WaitingCloseChannel `protobuf:"bytes,5,rep,name=waiting_close_channels,json=waitingCloseChannels,proto3" json:"waiting_close_channels,omitempty"`
}
func (x *PendingChannelsResponse) Reset() {
*x = PendingChannelsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[79]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PendingChannelsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PendingChannelsResponse) ProtoMessage() {}
func (x *PendingChannelsResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[79]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PendingChannelsResponse.ProtoReflect.Descriptor instead.
func (*PendingChannelsResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{79}
}
func (x *PendingChannelsResponse) GetTotalLimboBalance() int64 {
if x != nil {
return x.TotalLimboBalance
}
return 0
}
func (x *PendingChannelsResponse) GetPendingOpenChannels() []*PendingChannelsResponse_PendingOpenChannel {
if x != nil {
return x.PendingOpenChannels
}
return nil
}
// Deprecated: Do not use.
func (x *PendingChannelsResponse) GetPendingClosingChannels() []*PendingChannelsResponse_ClosedChannel {
if x != nil {
return x.PendingClosingChannels
}
return nil
}
func (x *PendingChannelsResponse) GetPendingForceClosingChannels() []*PendingChannelsResponse_ForceClosedChannel {
if x != nil {
return x.PendingForceClosingChannels
}
return nil
}
func (x *PendingChannelsResponse) GetWaitingCloseChannels() []*PendingChannelsResponse_WaitingCloseChannel {
if x != nil {
return x.WaitingCloseChannels
}
return nil
}
type ChannelEventSubscription struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ChannelEventSubscription) Reset() {
*x = ChannelEventSubscription{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[80]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelEventSubscription) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelEventSubscription) ProtoMessage() {}
func (x *ChannelEventSubscription) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[80]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelEventSubscription.ProtoReflect.Descriptor instead.
func (*ChannelEventSubscription) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{80}
}
type ChannelEventUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Channel:
// *ChannelEventUpdate_OpenChannel
// *ChannelEventUpdate_ClosedChannel
// *ChannelEventUpdate_ActiveChannel
// *ChannelEventUpdate_InactiveChannel
// *ChannelEventUpdate_PendingOpenChannel
// *ChannelEventUpdate_FullyResolvedChannel
Channel isChannelEventUpdate_Channel `protobuf_oneof:"channel"`
Type ChannelEventUpdate_UpdateType `protobuf:"varint,5,opt,name=type,proto3,enum=lnrpc.ChannelEventUpdate_UpdateType" json:"type,omitempty"`
}
func (x *ChannelEventUpdate) Reset() {
*x = ChannelEventUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[81]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelEventUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelEventUpdate) ProtoMessage() {}
func (x *ChannelEventUpdate) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[81]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelEventUpdate.ProtoReflect.Descriptor instead.
func (*ChannelEventUpdate) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{81}
}
func (m *ChannelEventUpdate) GetChannel() isChannelEventUpdate_Channel {
if m != nil {
return m.Channel
}
return nil
}
func (x *ChannelEventUpdate) GetOpenChannel() *Channel {
if x, ok := x.GetChannel().(*ChannelEventUpdate_OpenChannel); ok {
return x.OpenChannel
}
return nil
}
func (x *ChannelEventUpdate) GetClosedChannel() *ChannelCloseSummary {
if x, ok := x.GetChannel().(*ChannelEventUpdate_ClosedChannel); ok {
return x.ClosedChannel
}
return nil
}
func (x *ChannelEventUpdate) GetActiveChannel() *ChannelPoint {
if x, ok := x.GetChannel().(*ChannelEventUpdate_ActiveChannel); ok {
return x.ActiveChannel
}
return nil
}
func (x *ChannelEventUpdate) GetInactiveChannel() *ChannelPoint {
if x, ok := x.GetChannel().(*ChannelEventUpdate_InactiveChannel); ok {
return x.InactiveChannel
}
return nil
}
func (x *ChannelEventUpdate) GetPendingOpenChannel() *PendingUpdate {
if x, ok := x.GetChannel().(*ChannelEventUpdate_PendingOpenChannel); ok {
return x.PendingOpenChannel
}
return nil
}
func (x *ChannelEventUpdate) GetFullyResolvedChannel() *ChannelPoint {
if x, ok := x.GetChannel().(*ChannelEventUpdate_FullyResolvedChannel); ok {
return x.FullyResolvedChannel
}
return nil
}
func (x *ChannelEventUpdate) GetType() ChannelEventUpdate_UpdateType {
if x != nil {
return x.Type
}
return ChannelEventUpdate_OPEN_CHANNEL
}
type isChannelEventUpdate_Channel interface {
isChannelEventUpdate_Channel()
}
type ChannelEventUpdate_OpenChannel struct {
OpenChannel *Channel `protobuf:"bytes,1,opt,name=open_channel,json=openChannel,proto3,oneof"`
}
type ChannelEventUpdate_ClosedChannel struct {
ClosedChannel *ChannelCloseSummary `protobuf:"bytes,2,opt,name=closed_channel,json=closedChannel,proto3,oneof"`
}
type ChannelEventUpdate_ActiveChannel struct {
ActiveChannel *ChannelPoint `protobuf:"bytes,3,opt,name=active_channel,json=activeChannel,proto3,oneof"`
}
type ChannelEventUpdate_InactiveChannel struct {
InactiveChannel *ChannelPoint `protobuf:"bytes,4,opt,name=inactive_channel,json=inactiveChannel,proto3,oneof"`
}
type ChannelEventUpdate_PendingOpenChannel struct {
PendingOpenChannel *PendingUpdate `protobuf:"bytes,6,opt,name=pending_open_channel,json=pendingOpenChannel,proto3,oneof"`
}
type ChannelEventUpdate_FullyResolvedChannel struct {
FullyResolvedChannel *ChannelPoint `protobuf:"bytes,7,opt,name=fully_resolved_channel,json=fullyResolvedChannel,proto3,oneof"`
}
func (*ChannelEventUpdate_OpenChannel) isChannelEventUpdate_Channel() {}
func (*ChannelEventUpdate_ClosedChannel) isChannelEventUpdate_Channel() {}
func (*ChannelEventUpdate_ActiveChannel) isChannelEventUpdate_Channel() {}
func (*ChannelEventUpdate_InactiveChannel) isChannelEventUpdate_Channel() {}
func (*ChannelEventUpdate_PendingOpenChannel) isChannelEventUpdate_Channel() {}
func (*ChannelEventUpdate_FullyResolvedChannel) isChannelEventUpdate_Channel() {}
type WalletAccountBalance struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The confirmed balance of the account (with >= 1 confirmations).
ConfirmedBalance int64 `protobuf:"varint,1,opt,name=confirmed_balance,json=confirmedBalance,proto3" json:"confirmed_balance,omitempty"`
// The unconfirmed balance of the account (with 0 confirmations).
UnconfirmedBalance int64 `protobuf:"varint,2,opt,name=unconfirmed_balance,json=unconfirmedBalance,proto3" json:"unconfirmed_balance,omitempty"`
}
func (x *WalletAccountBalance) Reset() {
*x = WalletAccountBalance{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[82]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WalletAccountBalance) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WalletAccountBalance) ProtoMessage() {}
func (x *WalletAccountBalance) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[82]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WalletAccountBalance.ProtoReflect.Descriptor instead.
func (*WalletAccountBalance) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{82}
}
func (x *WalletAccountBalance) GetConfirmedBalance() int64 {
if x != nil {
return x.ConfirmedBalance
}
return 0
}
func (x *WalletAccountBalance) GetUnconfirmedBalance() int64 {
if x != nil {
return x.UnconfirmedBalance
}
return 0
}
type WalletBalanceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *WalletBalanceRequest) Reset() {
*x = WalletBalanceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[83]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WalletBalanceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WalletBalanceRequest) ProtoMessage() {}
func (x *WalletBalanceRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[83]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WalletBalanceRequest.ProtoReflect.Descriptor instead.
func (*WalletBalanceRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{83}
}
type WalletBalanceResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The balance of the wallet
TotalBalance int64 `protobuf:"varint,1,opt,name=total_balance,json=totalBalance,proto3" json:"total_balance,omitempty"`
// The confirmed balance of a wallet(with >= 1 confirmations)
ConfirmedBalance int64 `protobuf:"varint,2,opt,name=confirmed_balance,json=confirmedBalance,proto3" json:"confirmed_balance,omitempty"`
// The unconfirmed balance of a wallet(with 0 confirmations)
UnconfirmedBalance int64 `protobuf:"varint,3,opt,name=unconfirmed_balance,json=unconfirmedBalance,proto3" json:"unconfirmed_balance,omitempty"`
// A mapping of each wallet account's name to its balance.
AccountBalance map[string]*WalletAccountBalance `protobuf:"bytes,4,rep,name=account_balance,json=accountBalance,proto3" json:"account_balance,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *WalletBalanceResponse) Reset() {
*x = WalletBalanceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[84]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WalletBalanceResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WalletBalanceResponse) ProtoMessage() {}
func (x *WalletBalanceResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[84]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WalletBalanceResponse.ProtoReflect.Descriptor instead.
func (*WalletBalanceResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{84}
}
func (x *WalletBalanceResponse) GetTotalBalance() int64 {
if x != nil {
return x.TotalBalance
}
return 0
}
func (x *WalletBalanceResponse) GetConfirmedBalance() int64 {
if x != nil {
return x.ConfirmedBalance
}
return 0
}
func (x *WalletBalanceResponse) GetUnconfirmedBalance() int64 {
if x != nil {
return x.UnconfirmedBalance
}
return 0
}
func (x *WalletBalanceResponse) GetAccountBalance() map[string]*WalletAccountBalance {
if x != nil {
return x.AccountBalance
}
return nil
}
type Amount struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Value denominated in satoshis.
Sat uint64 `protobuf:"varint,1,opt,name=sat,proto3" json:"sat,omitempty"`
// Value denominated in milli-satoshis.
Msat uint64 `protobuf:"varint,2,opt,name=msat,proto3" json:"msat,omitempty"`
}
func (x *Amount) Reset() {
*x = Amount{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[85]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Amount) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Amount) ProtoMessage() {}
func (x *Amount) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[85]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Amount.ProtoReflect.Descriptor instead.
func (*Amount) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{85}
}
func (x *Amount) GetSat() uint64 {
if x != nil {
return x.Sat
}
return 0
}
func (x *Amount) GetMsat() uint64 {
if x != nil {
return x.Msat
}
return 0
}
type ChannelBalanceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ChannelBalanceRequest) Reset() {
*x = ChannelBalanceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[86]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelBalanceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelBalanceRequest) ProtoMessage() {}
func (x *ChannelBalanceRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[86]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelBalanceRequest.ProtoReflect.Descriptor instead.
func (*ChannelBalanceRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{86}
}
type ChannelBalanceResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Deprecated. Sum of channels balances denominated in satoshis
//
// Deprecated: Do not use.
Balance int64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"`
// Deprecated. Sum of channels pending balances denominated in satoshis
//
// Deprecated: Do not use.
PendingOpenBalance int64 `protobuf:"varint,2,opt,name=pending_open_balance,json=pendingOpenBalance,proto3" json:"pending_open_balance,omitempty"`
// Sum of channels local balances.
LocalBalance *Amount `protobuf:"bytes,3,opt,name=local_balance,json=localBalance,proto3" json:"local_balance,omitempty"`
// Sum of channels remote balances.
RemoteBalance *Amount `protobuf:"bytes,4,opt,name=remote_balance,json=remoteBalance,proto3" json:"remote_balance,omitempty"`
// Sum of channels local unsettled balances.
UnsettledLocalBalance *Amount `protobuf:"bytes,5,opt,name=unsettled_local_balance,json=unsettledLocalBalance,proto3" json:"unsettled_local_balance,omitempty"`
// Sum of channels remote unsettled balances.
UnsettledRemoteBalance *Amount `protobuf:"bytes,6,opt,name=unsettled_remote_balance,json=unsettledRemoteBalance,proto3" json:"unsettled_remote_balance,omitempty"`
// Sum of channels pending local balances.
PendingOpenLocalBalance *Amount `protobuf:"bytes,7,opt,name=pending_open_local_balance,json=pendingOpenLocalBalance,proto3" json:"pending_open_local_balance,omitempty"`
// Sum of channels pending remote balances.
PendingOpenRemoteBalance *Amount `protobuf:"bytes,8,opt,name=pending_open_remote_balance,json=pendingOpenRemoteBalance,proto3" json:"pending_open_remote_balance,omitempty"`
}
func (x *ChannelBalanceResponse) Reset() {
*x = ChannelBalanceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[87]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelBalanceResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelBalanceResponse) ProtoMessage() {}
func (x *ChannelBalanceResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[87]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelBalanceResponse.ProtoReflect.Descriptor instead.
func (*ChannelBalanceResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{87}
}
// Deprecated: Do not use.
func (x *ChannelBalanceResponse) GetBalance() int64 {
if x != nil {
return x.Balance
}
return 0
}
// Deprecated: Do not use.
func (x *ChannelBalanceResponse) GetPendingOpenBalance() int64 {
if x != nil {
return x.PendingOpenBalance
}
return 0
}
func (x *ChannelBalanceResponse) GetLocalBalance() *Amount {
if x != nil {
return x.LocalBalance
}
return nil
}
func (x *ChannelBalanceResponse) GetRemoteBalance() *Amount {
if x != nil {
return x.RemoteBalance
}
return nil
}
func (x *ChannelBalanceResponse) GetUnsettledLocalBalance() *Amount {
if x != nil {
return x.UnsettledLocalBalance
}
return nil
}
func (x *ChannelBalanceResponse) GetUnsettledRemoteBalance() *Amount {
if x != nil {
return x.UnsettledRemoteBalance
}
return nil
}
func (x *ChannelBalanceResponse) GetPendingOpenLocalBalance() *Amount {
if x != nil {
return x.PendingOpenLocalBalance
}
return nil
}
func (x *ChannelBalanceResponse) GetPendingOpenRemoteBalance() *Amount {
if x != nil {
return x.PendingOpenRemoteBalance
}
return nil
}
type QueryRoutesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The 33-byte hex-encoded public key for the payment destination
PubKey string `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
//
//The amount to send expressed in satoshis.
//
//The fields amt and amt_msat are mutually exclusive.
Amt int64 `protobuf:"varint,2,opt,name=amt,proto3" json:"amt,omitempty"`
//
//The amount to send expressed in millisatoshis.
//
//The fields amt and amt_msat are mutually exclusive.
AmtMsat int64 `protobuf:"varint,12,opt,name=amt_msat,json=amtMsat,proto3" json:"amt_msat,omitempty"`
//
//An optional CLTV delta from the current height that should be used for the
//timelock of the final hop. Note that unlike SendPayment, QueryRoutes does
//not add any additional block padding on top of final_ctlv_delta. This
//padding of a few blocks needs to be added manually or otherwise failures may
//happen when a block comes in while the payment is in flight.
FinalCltvDelta int32 `protobuf:"varint,4,opt,name=final_cltv_delta,json=finalCltvDelta,proto3" json:"final_cltv_delta,omitempty"`
//
//The maximum number of satoshis that will be paid as a fee of the payment.
//This value can be represented either as a percentage of the amount being
//sent, or as a fixed amount of the maximum fee the user is willing the pay to
//send the payment.
FeeLimit *FeeLimit `protobuf:"bytes,5,opt,name=fee_limit,json=feeLimit,proto3" json:"fee_limit,omitempty"`
//
//A list of nodes to ignore during path finding. When using REST, these fields
//must be encoded as base64.
IgnoredNodes [][]byte `protobuf:"bytes,6,rep,name=ignored_nodes,json=ignoredNodes,proto3" json:"ignored_nodes,omitempty"`
//
//Deprecated. A list of edges to ignore during path finding.
//
// Deprecated: Do not use.
IgnoredEdges []*EdgeLocator `protobuf:"bytes,7,rep,name=ignored_edges,json=ignoredEdges,proto3" json:"ignored_edges,omitempty"`
//
//The source node where the request route should originated from. If empty,
//self is assumed.
SourcePubKey string `protobuf:"bytes,8,opt,name=source_pub_key,json=sourcePubKey,proto3" json:"source_pub_key,omitempty"`
//
//If set to true, edge probabilities from mission control will be used to get
//the optimal route.
UseMissionControl bool `protobuf:"varint,9,opt,name=use_mission_control,json=useMissionControl,proto3" json:"use_mission_control,omitempty"`
//
//A list of directed node pairs that will be ignored during path finding.
IgnoredPairs []*NodePair `protobuf:"bytes,10,rep,name=ignored_pairs,json=ignoredPairs,proto3" json:"ignored_pairs,omitempty"`
//
//An optional maximum total time lock for the route. If the source is empty or
//ourselves, this should not exceed lnd's `--max-cltv-expiry` setting. If
//zero, then the value of `--max-cltv-expiry` is used as the limit.
CltvLimit uint32 `protobuf:"varint,11,opt,name=cltv_limit,json=cltvLimit,proto3" json:"cltv_limit,omitempty"`
//
//An optional field that can be used to pass an arbitrary set of TLV records
//to a peer which understands the new records. This can be used to pass
//application specific data during the payment attempt. If the destination
//does not support the specified records, an error will be returned.
//Record types are required to be in the custom range >= 65536. When using
//REST, the values must be encoded as base64.
DestCustomRecords map[uint64][]byte `protobuf:"bytes,13,rep,name=dest_custom_records,json=destCustomRecords,proto3" json:"dest_custom_records,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
//
//The channel id of the channel that must be taken to the first hop. If zero,
//any channel may be used.
OutgoingChanId uint64 `protobuf:"varint,14,opt,name=outgoing_chan_id,json=outgoingChanId,proto3" json:"outgoing_chan_id,omitempty"`
//
//The pubkey of the last hop of the route. If empty, any hop may be used.
LastHopPubkey []byte `protobuf:"bytes,15,opt,name=last_hop_pubkey,json=lastHopPubkey,proto3" json:"last_hop_pubkey,omitempty"`
//
//Optional route hints to reach the destination through private channels.
RouteHints []*RouteHint `protobuf:"bytes,16,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"`
//
//Features assumed to be supported by the final node. All transitive feature
//dependencies must also be set properly. For a given feature bit pair, either
//optional or remote may be set, but not both. If this field is nil or empty,
//the router will try to load destination features from the graph as a
//fallback.
DestFeatures []FeatureBit `protobuf:"varint,17,rep,packed,name=dest_features,json=destFeatures,proto3,enum=lnrpc.FeatureBit" json:"dest_features,omitempty"`
}
func (x *QueryRoutesRequest) Reset() {
*x = QueryRoutesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[88]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryRoutesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryRoutesRequest) ProtoMessage() {}
func (x *QueryRoutesRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[88]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryRoutesRequest.ProtoReflect.Descriptor instead.
func (*QueryRoutesRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{88}
}
func (x *QueryRoutesRequest) GetPubKey() string {
if x != nil {
return x.PubKey
}
return ""
}
func (x *QueryRoutesRequest) GetAmt() int64 {
if x != nil {
return x.Amt
}
return 0
}
func (x *QueryRoutesRequest) GetAmtMsat() int64 {
if x != nil {
return x.AmtMsat
}
return 0
}
func (x *QueryRoutesRequest) GetFinalCltvDelta() int32 {
if x != nil {
return x.FinalCltvDelta
}
return 0
}
func (x *QueryRoutesRequest) GetFeeLimit() *FeeLimit {
if x != nil {
return x.FeeLimit
}
return nil
}
func (x *QueryRoutesRequest) GetIgnoredNodes() [][]byte {
if x != nil {
return x.IgnoredNodes
}
return nil
}
// Deprecated: Do not use.
func (x *QueryRoutesRequest) GetIgnoredEdges() []*EdgeLocator {
if x != nil {
return x.IgnoredEdges
}
return nil
}
func (x *QueryRoutesRequest) GetSourcePubKey() string {
if x != nil {
return x.SourcePubKey
}
return ""
}
func (x *QueryRoutesRequest) GetUseMissionControl() bool {
if x != nil {
return x.UseMissionControl
}
return false
}
func (x *QueryRoutesRequest) GetIgnoredPairs() []*NodePair {
if x != nil {
return x.IgnoredPairs
}
return nil
}
func (x *QueryRoutesRequest) GetCltvLimit() uint32 {
if x != nil {
return x.CltvLimit
}
return 0
}
func (x *QueryRoutesRequest) GetDestCustomRecords() map[uint64][]byte {
if x != nil {
return x.DestCustomRecords
}
return nil
}
func (x *QueryRoutesRequest) GetOutgoingChanId() uint64 {
if x != nil {
return x.OutgoingChanId
}
return 0
}
func (x *QueryRoutesRequest) GetLastHopPubkey() []byte {
if x != nil {
return x.LastHopPubkey
}
return nil
}
func (x *QueryRoutesRequest) GetRouteHints() []*RouteHint {
if x != nil {
return x.RouteHints
}
return nil
}
func (x *QueryRoutesRequest) GetDestFeatures() []FeatureBit {
if x != nil {
return x.DestFeatures
}
return nil
}
type NodePair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The sending node of the pair. When using REST, this field must be encoded as
//base64.
From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
//
//The receiving node of the pair. When using REST, this field must be encoded
//as base64.
To []byte `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
}
func (x *NodePair) Reset() {
*x = NodePair{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[89]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodePair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodePair) ProtoMessage() {}
func (x *NodePair) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[89]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodePair.ProtoReflect.Descriptor instead.
func (*NodePair) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{89}
}
func (x *NodePair) GetFrom() []byte {
if x != nil {
return x.From
}
return nil
}
func (x *NodePair) GetTo() []byte {
if x != nil {
return x.To
}
return nil
}
type EdgeLocator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The short channel id of this edge.
ChannelId uint64 `protobuf:"varint,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
//
//The direction of this edge. If direction_reverse is false, the direction
//of this edge is from the channel endpoint with the lexicographically smaller
//pub key to the endpoint with the larger pub key. If direction_reverse is
//is true, the edge goes the other way.
DirectionReverse bool `protobuf:"varint,2,opt,name=direction_reverse,json=directionReverse,proto3" json:"direction_reverse,omitempty"`
}
func (x *EdgeLocator) Reset() {
*x = EdgeLocator{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[90]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EdgeLocator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EdgeLocator) ProtoMessage() {}
func (x *EdgeLocator) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[90]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EdgeLocator.ProtoReflect.Descriptor instead.
func (*EdgeLocator) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{90}
}
func (x *EdgeLocator) GetChannelId() uint64 {
if x != nil {
return x.ChannelId
}
return 0
}
func (x *EdgeLocator) GetDirectionReverse() bool {
if x != nil {
return x.DirectionReverse
}
return false
}
type QueryRoutesResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The route that results from the path finding operation. This is still a
//repeated field to retain backwards compatibility.
Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
//
//The success probability of the returned route based on the current mission
//control state. [EXPERIMENTAL]
SuccessProb float64 `protobuf:"fixed64,2,opt,name=success_prob,json=successProb,proto3" json:"success_prob,omitempty"`
}
func (x *QueryRoutesResponse) Reset() {
*x = QueryRoutesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[91]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryRoutesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryRoutesResponse) ProtoMessage() {}
func (x *QueryRoutesResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[91]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryRoutesResponse.ProtoReflect.Descriptor instead.
func (*QueryRoutesResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{91}
}
func (x *QueryRoutesResponse) GetRoutes() []*Route {
if x != nil {
return x.Routes
}
return nil
}
func (x *QueryRoutesResponse) GetSuccessProb() float64 {
if x != nil {
return x.SuccessProb
}
return 0
}
type Hop struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The unique channel ID for the channel. The first 3 bytes are the block
//height, the next 3 the index within the block, and the last 2 bytes are the
//output index for the channel.
ChanId uint64 `protobuf:"varint,1,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"`
// Deprecated: Do not use.
ChanCapacity int64 `protobuf:"varint,2,opt,name=chan_capacity,json=chanCapacity,proto3" json:"chan_capacity,omitempty"`
// Deprecated: Do not use.
AmtToForward int64 `protobuf:"varint,3,opt,name=amt_to_forward,json=amtToForward,proto3" json:"amt_to_forward,omitempty"`
// Deprecated: Do not use.
Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"`
Expiry uint32 `protobuf:"varint,5,opt,name=expiry,proto3" json:"expiry,omitempty"`
AmtToForwardMsat int64 `protobuf:"varint,6,opt,name=amt_to_forward_msat,json=amtToForwardMsat,proto3" json:"amt_to_forward_msat,omitempty"`
FeeMsat int64 `protobuf:"varint,7,opt,name=fee_msat,json=feeMsat,proto3" json:"fee_msat,omitempty"`
//
//An optional public key of the hop. If the public key is given, the payment
//can be executed without relying on a copy of the channel graph.
PubKey string `protobuf:"bytes,8,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
//
//If set to true, then this hop will be encoded using the new variable length
//TLV format. Note that if any custom tlv_records below are specified, then
//this field MUST be set to true for them to be encoded properly.
TlvPayload bool `protobuf:"varint,9,opt,name=tlv_payload,json=tlvPayload,proto3" json:"tlv_payload,omitempty"`
//
//An optional TLV record that signals the use of an MPP payment. If present,
//the receiver will enforce that the same mpp_record is included in the final
//hop payload of all non-zero payments in the HTLC set. If empty, a regular
//single-shot payment is or was attempted.
MppRecord *MPPRecord `protobuf:"bytes,10,opt,name=mpp_record,json=mppRecord,proto3" json:"mpp_record,omitempty"`
//
//An optional TLV record that signals the use of an AMP payment. If present,
//the receiver will treat all received payments including the same
//(payment_addr, set_id) pair as being part of one logical payment. The
//payment will be settled by XORing the root_share's together and deriving the
//child hashes and preimages according to BOLT XX. Must be used in conjunction
//with mpp_record.
AmpRecord *AMPRecord `protobuf:"bytes,12,opt,name=amp_record,json=ampRecord,proto3" json:"amp_record,omitempty"`
//
//An optional set of key-value TLV records. This is useful within the context
//of the SendToRoute call as it allows callers to specify arbitrary K-V pairs
//to drop off at each hop within the onion.
CustomRecords map[uint64][]byte `protobuf:"bytes,11,rep,name=custom_records,json=customRecords,proto3" json:"custom_records,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Hop) Reset() {
*x = Hop{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[92]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Hop) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Hop) ProtoMessage() {}
func (x *Hop) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[92]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Hop.ProtoReflect.Descriptor instead.
func (*Hop) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{92}
}
func (x *Hop) GetChanId() uint64 {
if x != nil {
return x.ChanId
}
return 0
}
// Deprecated: Do not use.
func (x *Hop) GetChanCapacity() int64 {
if x != nil {
return x.ChanCapacity
}
return 0
}
// Deprecated: Do not use.
func (x *Hop) GetAmtToForward() int64 {
if x != nil {
return x.AmtToForward
}
return 0
}
// Deprecated: Do not use.
func (x *Hop) GetFee() int64 {
if x != nil {
return x.Fee
}
return 0
}
func (x *Hop) GetExpiry() uint32 {
if x != nil {
return x.Expiry
}
return 0
}
func (x *Hop) GetAmtToForwardMsat() int64 {
if x != nil {
return x.AmtToForwardMsat
}
return 0
}
func (x *Hop) GetFeeMsat() int64 {
if x != nil {
return x.FeeMsat
}
return 0
}
func (x *Hop) GetPubKey() string {
if x != nil {
return x.PubKey
}
return ""
}
func (x *Hop) GetTlvPayload() bool {
if x != nil {
return x.TlvPayload
}
return false
}
func (x *Hop) GetMppRecord() *MPPRecord {
if x != nil {
return x.MppRecord
}
return nil
}
func (x *Hop) GetAmpRecord() *AMPRecord {
if x != nil {
return x.AmpRecord
}
return nil
}
func (x *Hop) GetCustomRecords() map[uint64][]byte {
if x != nil {
return x.CustomRecords
}
return nil
}
type MPPRecord struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//A unique, random identifier used to authenticate the sender as the intended
//payer of a multi-path payment. The payment_addr must be the same for all
//subpayments, and match the payment_addr provided in the receiver's invoice.
//The same payment_addr must be used on all subpayments.
PaymentAddr []byte `protobuf:"bytes,11,opt,name=payment_addr,json=paymentAddr,proto3" json:"payment_addr,omitempty"`
//
//The total amount in milli-satoshis being sent as part of a larger multi-path
//payment. The caller is responsible for ensuring subpayments to the same node
//and payment_hash sum exactly to total_amt_msat. The same
//total_amt_msat must be used on all subpayments.
TotalAmtMsat int64 `protobuf:"varint,10,opt,name=total_amt_msat,json=totalAmtMsat,proto3" json:"total_amt_msat,omitempty"`
}
func (x *MPPRecord) Reset() {
*x = MPPRecord{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[93]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MPPRecord) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MPPRecord) ProtoMessage() {}
func (x *MPPRecord) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[93]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MPPRecord.ProtoReflect.Descriptor instead.
func (*MPPRecord) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{93}
}
func (x *MPPRecord) GetPaymentAddr() []byte {
if x != nil {
return x.PaymentAddr
}
return nil
}
func (x *MPPRecord) GetTotalAmtMsat() int64 {
if x != nil {
return x.TotalAmtMsat
}
return 0
}
type AMPRecord struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RootShare []byte `protobuf:"bytes,1,opt,name=root_share,json=rootShare,proto3" json:"root_share,omitempty"`
SetId []byte `protobuf:"bytes,2,opt,name=set_id,json=setId,proto3" json:"set_id,omitempty"`
ChildIndex uint32 `protobuf:"varint,3,opt,name=child_index,json=childIndex,proto3" json:"child_index,omitempty"`
}
func (x *AMPRecord) Reset() {
*x = AMPRecord{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[94]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AMPRecord) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AMPRecord) ProtoMessage() {}
func (x *AMPRecord) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[94]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AMPRecord.ProtoReflect.Descriptor instead.
func (*AMPRecord) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{94}
}
func (x *AMPRecord) GetRootShare() []byte {
if x != nil {
return x.RootShare
}
return nil
}
func (x *AMPRecord) GetSetId() []byte {
if x != nil {
return x.SetId
}
return nil
}
func (x *AMPRecord) GetChildIndex() uint32 {
if x != nil {
return x.ChildIndex
}
return 0
}
//
//A path through the channel graph which runs over one or more channels in
//succession. This struct carries all the information required to craft the
//Sphinx onion packet, and send the payment along the first hop in the path. A
//route is only selected as valid if all the channels have sufficient capacity to
//carry the initial payment amount after fees are accounted for.
type Route struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The cumulative (final) time lock across the entire route. This is the CLTV
//value that should be extended to the first hop in the route. All other hops
//will decrement the time-lock as advertised, leaving enough time for all
//hops to wait for or present the payment preimage to complete the payment.
TotalTimeLock uint32 `protobuf:"varint,1,opt,name=total_time_lock,json=totalTimeLock,proto3" json:"total_time_lock,omitempty"`
//
//The sum of the fees paid at each hop within the final route. In the case
//of a one-hop payment, this value will be zero as we don't need to pay a fee
//to ourselves.
//
// Deprecated: Do not use.
TotalFees int64 `protobuf:"varint,2,opt,name=total_fees,json=totalFees,proto3" json:"total_fees,omitempty"`
//
//The total amount of funds required to complete a payment over this route.
//This value includes the cumulative fees at each hop. As a result, the HTLC
//extended to the first-hop in the route will need to have at least this many
//satoshis, otherwise the route will fail at an intermediate node due to an
//insufficient amount of fees.
//
// Deprecated: Do not use.
TotalAmt int64 `protobuf:"varint,3,opt,name=total_amt,json=totalAmt,proto3" json:"total_amt,omitempty"`
//
//Contains details concerning the specific forwarding details at each hop.
Hops []*Hop `protobuf:"bytes,4,rep,name=hops,proto3" json:"hops,omitempty"`
//
//The total fees in millisatoshis.
TotalFeesMsat int64 `protobuf:"varint,5,opt,name=total_fees_msat,json=totalFeesMsat,proto3" json:"total_fees_msat,omitempty"`
//
//The total amount in millisatoshis.
TotalAmtMsat int64 `protobuf:"varint,6,opt,name=total_amt_msat,json=totalAmtMsat,proto3" json:"total_amt_msat,omitempty"`
}
func (x *Route) Reset() {
*x = Route{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[95]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Route) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Route) ProtoMessage() {}
func (x *Route) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[95]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Route.ProtoReflect.Descriptor instead.
func (*Route) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{95}
}
func (x *Route) GetTotalTimeLock() uint32 {
if x != nil {
return x.TotalTimeLock
}
return 0
}
// Deprecated: Do not use.
func (x *Route) GetTotalFees() int64 {
if x != nil {
return x.TotalFees
}
return 0
}
// Deprecated: Do not use.
func (x *Route) GetTotalAmt() int64 {
if x != nil {
return x.TotalAmt
}
return 0
}
func (x *Route) GetHops() []*Hop {
if x != nil {
return x.Hops
}
return nil
}
func (x *Route) GetTotalFeesMsat() int64 {
if x != nil {
return x.TotalFeesMsat
}
return 0
}
func (x *Route) GetTotalAmtMsat() int64 {
if x != nil {
return x.TotalAmtMsat
}
return 0
}
type NodeInfoRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The 33-byte hex-encoded compressed public of the target node
PubKey string `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
// If true, will include all known channels associated with the node.
IncludeChannels bool `protobuf:"varint,2,opt,name=include_channels,json=includeChannels,proto3" json:"include_channels,omitempty"`
}
func (x *NodeInfoRequest) Reset() {
*x = NodeInfoRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[96]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodeInfoRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeInfoRequest) ProtoMessage() {}
func (x *NodeInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[96]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodeInfoRequest.ProtoReflect.Descriptor instead.
func (*NodeInfoRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{96}
}
func (x *NodeInfoRequest) GetPubKey() string {
if x != nil {
return x.PubKey
}
return ""
}
func (x *NodeInfoRequest) GetIncludeChannels() bool {
if x != nil {
return x.IncludeChannels
}
return false
}
type NodeInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//An individual vertex/node within the channel graph. A node is
//connected to other nodes by one or more channel edges emanating from it. As
//the graph is directed, a node will also have an incoming edge attached to
//it for each outgoing edge.
Node *LightningNode `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
// The total number of channels for the node.
NumChannels uint32 `protobuf:"varint,2,opt,name=num_channels,json=numChannels,proto3" json:"num_channels,omitempty"`
// The sum of all channels capacity for the node, denominated in satoshis.
TotalCapacity int64 `protobuf:"varint,3,opt,name=total_capacity,json=totalCapacity,proto3" json:"total_capacity,omitempty"`
// A list of all public channels for the node.
Channels []*ChannelEdge `protobuf:"bytes,4,rep,name=channels,proto3" json:"channels,omitempty"`
}
func (x *NodeInfo) Reset() {
*x = NodeInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[97]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodeInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeInfo) ProtoMessage() {}
func (x *NodeInfo) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[97]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodeInfo.ProtoReflect.Descriptor instead.
func (*NodeInfo) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{97}
}
func (x *NodeInfo) GetNode() *LightningNode {
if x != nil {
return x.Node
}
return nil
}
func (x *NodeInfo) GetNumChannels() uint32 {
if x != nil {
return x.NumChannels
}
return 0
}
func (x *NodeInfo) GetTotalCapacity() int64 {
if x != nil {
return x.TotalCapacity
}
return 0
}
func (x *NodeInfo) GetChannels() []*ChannelEdge {
if x != nil {
return x.Channels
}
return nil
}
//
//An individual vertex/node within the channel graph. A node is
//connected to other nodes by one or more channel edges emanating from it. As the
//graph is directed, a node will also have an incoming edge attached to it for
//each outgoing edge.
type LightningNode struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
LastUpdate uint32 `protobuf:"varint,1,opt,name=last_update,json=lastUpdate,proto3" json:"last_update,omitempty"`
PubKey string `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
Alias string `protobuf:"bytes,3,opt,name=alias,proto3" json:"alias,omitempty"`
Addresses []*NodeAddress `protobuf:"bytes,4,rep,name=addresses,proto3" json:"addresses,omitempty"`
Color string `protobuf:"bytes,5,opt,name=color,proto3" json:"color,omitempty"`
Features map[uint32]*Feature `protobuf:"bytes,6,rep,name=features,proto3" json:"features,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *LightningNode) Reset() {
*x = LightningNode{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[98]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LightningNode) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LightningNode) ProtoMessage() {}
func (x *LightningNode) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[98]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LightningNode.ProtoReflect.Descriptor instead.
func (*LightningNode) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{98}
}
func (x *LightningNode) GetLastUpdate() uint32 {
if x != nil {
return x.LastUpdate
}
return 0
}
func (x *LightningNode) GetPubKey() string {
if x != nil {
return x.PubKey
}
return ""
}
func (x *LightningNode) GetAlias() string {
if x != nil {
return x.Alias
}
return ""
}
func (x *LightningNode) GetAddresses() []*NodeAddress {
if x != nil {
return x.Addresses
}
return nil
}
func (x *LightningNode) GetColor() string {
if x != nil {
return x.Color
}
return ""
}
func (x *LightningNode) GetFeatures() map[uint32]*Feature {
if x != nil {
return x.Features
}
return nil
}
type NodeAddress struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
}
func (x *NodeAddress) Reset() {
*x = NodeAddress{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[99]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodeAddress) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeAddress) ProtoMessage() {}
func (x *NodeAddress) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[99]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodeAddress.ProtoReflect.Descriptor instead.
func (*NodeAddress) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{99}
}
func (x *NodeAddress) GetNetwork() string {
if x != nil {
return x.Network
}
return ""
}
func (x *NodeAddress) GetAddr() string {
if x != nil {
return x.Addr
}
return ""
}
type RoutingPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TimeLockDelta uint32 `protobuf:"varint,1,opt,name=time_lock_delta,json=timeLockDelta,proto3" json:"time_lock_delta,omitempty"`
MinHtlc int64 `protobuf:"varint,2,opt,name=min_htlc,json=minHtlc,proto3" json:"min_htlc,omitempty"`
FeeBaseMsat int64 `protobuf:"varint,3,opt,name=fee_base_msat,json=feeBaseMsat,proto3" json:"fee_base_msat,omitempty"`
FeeRateMilliMsat int64 `protobuf:"varint,4,opt,name=fee_rate_milli_msat,json=feeRateMilliMsat,proto3" json:"fee_rate_milli_msat,omitempty"`
Disabled bool `protobuf:"varint,5,opt,name=disabled,proto3" json:"disabled,omitempty"`
MaxHtlcMsat uint64 `protobuf:"varint,6,opt,name=max_htlc_msat,json=maxHtlcMsat,proto3" json:"max_htlc_msat,omitempty"`
LastUpdate uint32 `protobuf:"varint,7,opt,name=last_update,json=lastUpdate,proto3" json:"last_update,omitempty"`
}
func (x *RoutingPolicy) Reset() {
*x = RoutingPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[100]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RoutingPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RoutingPolicy) ProtoMessage() {}
func (x *RoutingPolicy) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[100]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RoutingPolicy.ProtoReflect.Descriptor instead.
func (*RoutingPolicy) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{100}
}
func (x *RoutingPolicy) GetTimeLockDelta() uint32 {
if x != nil {
return x.TimeLockDelta
}
return 0
}
func (x *RoutingPolicy) GetMinHtlc() int64 {
if x != nil {
return x.MinHtlc
}
return 0
}
func (x *RoutingPolicy) GetFeeBaseMsat() int64 {
if x != nil {
return x.FeeBaseMsat
}
return 0
}
func (x *RoutingPolicy) GetFeeRateMilliMsat() int64 {
if x != nil {
return x.FeeRateMilliMsat
}
return 0
}
func (x *RoutingPolicy) GetDisabled() bool {
if x != nil {
return x.Disabled
}
return false
}
func (x *RoutingPolicy) GetMaxHtlcMsat() uint64 {
if x != nil {
return x.MaxHtlcMsat
}
return 0
}
func (x *RoutingPolicy) GetLastUpdate() uint32 {
if x != nil {
return x.LastUpdate
}
return 0
}
//
//A fully authenticated channel along with all its unique attributes.
//Once an authenticated channel announcement has been processed on the network,
//then an instance of ChannelEdgeInfo encapsulating the channels attributes is
//stored. The other portions relevant to routing policy of a channel are stored
//within a ChannelEdgePolicy for each direction of the channel.
type ChannelEdge struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The unique channel ID for the channel. The first 3 bytes are the block
//height, the next 3 the index within the block, and the last 2 bytes are the
//output index for the channel.
ChannelId uint64 `protobuf:"varint,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
ChanPoint string `protobuf:"bytes,2,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"`
// Deprecated: Do not use.
LastUpdate uint32 `protobuf:"varint,3,opt,name=last_update,json=lastUpdate,proto3" json:"last_update,omitempty"`
Node1Pub string `protobuf:"bytes,4,opt,name=node1_pub,json=node1Pub,proto3" json:"node1_pub,omitempty"`
Node2Pub string `protobuf:"bytes,5,opt,name=node2_pub,json=node2Pub,proto3" json:"node2_pub,omitempty"`
Capacity int64 `protobuf:"varint,6,opt,name=capacity,proto3" json:"capacity,omitempty"`
Node1Policy *RoutingPolicy `protobuf:"bytes,7,opt,name=node1_policy,json=node1Policy,proto3" json:"node1_policy,omitempty"`
Node2Policy *RoutingPolicy `protobuf:"bytes,8,opt,name=node2_policy,json=node2Policy,proto3" json:"node2_policy,omitempty"`
}
func (x *ChannelEdge) Reset() {
*x = ChannelEdge{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[101]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelEdge) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelEdge) ProtoMessage() {}
func (x *ChannelEdge) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[101]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelEdge.ProtoReflect.Descriptor instead.
func (*ChannelEdge) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{101}
}
func (x *ChannelEdge) GetChannelId() uint64 {
if x != nil {
return x.ChannelId
}
return 0
}
func (x *ChannelEdge) GetChanPoint() string {
if x != nil {
return x.ChanPoint
}
return ""
}
// Deprecated: Do not use.
func (x *ChannelEdge) GetLastUpdate() uint32 {
if x != nil {
return x.LastUpdate
}
return 0
}
func (x *ChannelEdge) GetNode1Pub() string {
if x != nil {
return x.Node1Pub
}
return ""
}
func (x *ChannelEdge) GetNode2Pub() string {
if x != nil {
return x.Node2Pub
}
return ""
}
func (x *ChannelEdge) GetCapacity() int64 {
if x != nil {
return x.Capacity
}
return 0
}
func (x *ChannelEdge) GetNode1Policy() *RoutingPolicy {
if x != nil {
return x.Node1Policy
}
return nil
}
func (x *ChannelEdge) GetNode2Policy() *RoutingPolicy {
if x != nil {
return x.Node2Policy
}
return nil
}
type ChannelGraphRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//Whether unannounced channels are included in the response or not. If set,
//unannounced channels are included. Unannounced channels are both private
//channels, and public channels that are not yet announced to the network.
IncludeUnannounced bool `protobuf:"varint,1,opt,name=include_unannounced,json=includeUnannounced,proto3" json:"include_unannounced,omitempty"`
}
func (x *ChannelGraphRequest) Reset() {
*x = ChannelGraphRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[102]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelGraphRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelGraphRequest) ProtoMessage() {}
func (x *ChannelGraphRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[102]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelGraphRequest.ProtoReflect.Descriptor instead.
func (*ChannelGraphRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{102}
}
func (x *ChannelGraphRequest) GetIncludeUnannounced() bool {
if x != nil {
return x.IncludeUnannounced
}
return false
}
// Returns a new instance of the directed channel graph.
type ChannelGraph struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of `LightningNode`s in this channel graph
Nodes []*LightningNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
// The list of `ChannelEdge`s in this channel graph
Edges []*ChannelEdge `protobuf:"bytes,2,rep,name=edges,proto3" json:"edges,omitempty"`
}
func (x *ChannelGraph) Reset() {
*x = ChannelGraph{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[103]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelGraph) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelGraph) ProtoMessage() {}
func (x *ChannelGraph) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[103]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelGraph.ProtoReflect.Descriptor instead.
func (*ChannelGraph) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{103}
}
func (x *ChannelGraph) GetNodes() []*LightningNode {
if x != nil {
return x.Nodes
}
return nil
}
func (x *ChannelGraph) GetEdges() []*ChannelEdge {
if x != nil {
return x.Edges
}
return nil
}
type NodeMetricsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The requested node metrics.
Types []NodeMetricType `protobuf:"varint,1,rep,packed,name=types,proto3,enum=lnrpc.NodeMetricType" json:"types,omitempty"`
}
func (x *NodeMetricsRequest) Reset() {
*x = NodeMetricsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[104]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodeMetricsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeMetricsRequest) ProtoMessage() {}
func (x *NodeMetricsRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[104]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodeMetricsRequest.ProtoReflect.Descriptor instead.
func (*NodeMetricsRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{104}
}
func (x *NodeMetricsRequest) GetTypes() []NodeMetricType {
if x != nil {
return x.Types
}
return nil
}
type NodeMetricsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//Betweenness centrality is the sum of the ratio of shortest paths that pass
//through the node for each pair of nodes in the graph (not counting paths
//starting or ending at this node).
//Map of node pubkey to betweenness centrality of the node. Normalized
//values are in the [0,1] closed interval.
BetweennessCentrality map[string]*FloatMetric `protobuf:"bytes,1,rep,name=betweenness_centrality,json=betweennessCentrality,proto3" json:"betweenness_centrality,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *NodeMetricsResponse) Reset() {
*x = NodeMetricsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[105]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodeMetricsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeMetricsResponse) ProtoMessage() {}
func (x *NodeMetricsResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[105]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodeMetricsResponse.ProtoReflect.Descriptor instead.
func (*NodeMetricsResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{105}
}
func (x *NodeMetricsResponse) GetBetweennessCentrality() map[string]*FloatMetric {
if x != nil {
return x.BetweennessCentrality
}
return nil
}
type FloatMetric struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Arbitrary float value.
Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
// The value normalized to [0,1] or [-1,1].
NormalizedValue float64 `protobuf:"fixed64,2,opt,name=normalized_value,json=normalizedValue,proto3" json:"normalized_value,omitempty"`
}
func (x *FloatMetric) Reset() {
*x = FloatMetric{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[106]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FloatMetric) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FloatMetric) ProtoMessage() {}
func (x *FloatMetric) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[106]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FloatMetric.ProtoReflect.Descriptor instead.
func (*FloatMetric) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{106}
}
func (x *FloatMetric) GetValue() float64 {
if x != nil {
return x.Value
}
return 0
}
func (x *FloatMetric) GetNormalizedValue() float64 {
if x != nil {
return x.NormalizedValue
}
return 0
}
type ChanInfoRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The unique channel ID for the channel. The first 3 bytes are the block
//height, the next 3 the index within the block, and the last 2 bytes are the
//output index for the channel.
ChanId uint64 `protobuf:"varint,1,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"`
}
func (x *ChanInfoRequest) Reset() {
*x = ChanInfoRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[107]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChanInfoRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChanInfoRequest) ProtoMessage() {}
func (x *ChanInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[107]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChanInfoRequest.ProtoReflect.Descriptor instead.
func (*ChanInfoRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{107}
}
func (x *ChanInfoRequest) GetChanId() uint64 {
if x != nil {
return x.ChanId
}
return 0
}
type NetworkInfoRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *NetworkInfoRequest) Reset() {
*x = NetworkInfoRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[108]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NetworkInfoRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NetworkInfoRequest) ProtoMessage() {}
func (x *NetworkInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[108]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NetworkInfoRequest.ProtoReflect.Descriptor instead.
func (*NetworkInfoRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{108}
}
type NetworkInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GraphDiameter uint32 `protobuf:"varint,1,opt,name=graph_diameter,json=graphDiameter,proto3" json:"graph_diameter,omitempty"`
AvgOutDegree float64 `protobuf:"fixed64,2,opt,name=avg_out_degree,json=avgOutDegree,proto3" json:"avg_out_degree,omitempty"`
MaxOutDegree uint32 `protobuf:"varint,3,opt,name=max_out_degree,json=maxOutDegree,proto3" json:"max_out_degree,omitempty"`
NumNodes uint32 `protobuf:"varint,4,opt,name=num_nodes,json=numNodes,proto3" json:"num_nodes,omitempty"`
NumChannels uint32 `protobuf:"varint,5,opt,name=num_channels,json=numChannels,proto3" json:"num_channels,omitempty"`
TotalNetworkCapacity int64 `protobuf:"varint,6,opt,name=total_network_capacity,json=totalNetworkCapacity,proto3" json:"total_network_capacity,omitempty"`
AvgChannelSize float64 `protobuf:"fixed64,7,opt,name=avg_channel_size,json=avgChannelSize,proto3" json:"avg_channel_size,omitempty"`
MinChannelSize int64 `protobuf:"varint,8,opt,name=min_channel_size,json=minChannelSize,proto3" json:"min_channel_size,omitempty"`
MaxChannelSize int64 `protobuf:"varint,9,opt,name=max_channel_size,json=maxChannelSize,proto3" json:"max_channel_size,omitempty"`
MedianChannelSizeSat int64 `protobuf:"varint,10,opt,name=median_channel_size_sat,json=medianChannelSizeSat,proto3" json:"median_channel_size_sat,omitempty"`
// The number of edges marked as zombies.
NumZombieChans uint64 `protobuf:"varint,11,opt,name=num_zombie_chans,json=numZombieChans,proto3" json:"num_zombie_chans,omitempty"`
}
func (x *NetworkInfo) Reset() {
*x = NetworkInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[109]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NetworkInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NetworkInfo) ProtoMessage() {}
func (x *NetworkInfo) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[109]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NetworkInfo.ProtoReflect.Descriptor instead.
func (*NetworkInfo) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{109}
}
func (x *NetworkInfo) GetGraphDiameter() uint32 {
if x != nil {
return x.GraphDiameter
}
return 0
}
func (x *NetworkInfo) GetAvgOutDegree() float64 {
if x != nil {
return x.AvgOutDegree
}
return 0
}
func (x *NetworkInfo) GetMaxOutDegree() uint32 {
if x != nil {
return x.MaxOutDegree
}
return 0
}
func (x *NetworkInfo) GetNumNodes() uint32 {
if x != nil {
return x.NumNodes
}
return 0
}
func (x *NetworkInfo) GetNumChannels() uint32 {
if x != nil {
return x.NumChannels
}
return 0
}
func (x *NetworkInfo) GetTotalNetworkCapacity() int64 {
if x != nil {
return x.TotalNetworkCapacity
}
return 0
}
func (x *NetworkInfo) GetAvgChannelSize() float64 {
if x != nil {
return x.AvgChannelSize
}
return 0
}
func (x *NetworkInfo) GetMinChannelSize() int64 {
if x != nil {
return x.MinChannelSize
}
return 0
}
func (x *NetworkInfo) GetMaxChannelSize() int64 {
if x != nil {
return x.MaxChannelSize
}
return 0
}
func (x *NetworkInfo) GetMedianChannelSizeSat() int64 {
if x != nil {
return x.MedianChannelSizeSat
}
return 0
}
func (x *NetworkInfo) GetNumZombieChans() uint64 {
if x != nil {
return x.NumZombieChans
}
return 0
}
type StopRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *StopRequest) Reset() {
*x = StopRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[110]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StopRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StopRequest) ProtoMessage() {}
func (x *StopRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[110]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.
func (*StopRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{110}
}
type StopResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *StopResponse) Reset() {
*x = StopResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[111]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StopResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StopResponse) ProtoMessage() {}
func (x *StopResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[111]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StopResponse.ProtoReflect.Descriptor instead.
func (*StopResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{111}
}
type GraphTopologySubscription struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GraphTopologySubscription) Reset() {
*x = GraphTopologySubscription{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[112]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GraphTopologySubscription) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GraphTopologySubscription) ProtoMessage() {}
func (x *GraphTopologySubscription) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[112]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GraphTopologySubscription.ProtoReflect.Descriptor instead.
func (*GraphTopologySubscription) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{112}
}
type GraphTopologyUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeUpdates []*NodeUpdate `protobuf:"bytes,1,rep,name=node_updates,json=nodeUpdates,proto3" json:"node_updates,omitempty"`
ChannelUpdates []*ChannelEdgeUpdate `protobuf:"bytes,2,rep,name=channel_updates,json=channelUpdates,proto3" json:"channel_updates,omitempty"`
ClosedChans []*ClosedChannelUpdate `protobuf:"bytes,3,rep,name=closed_chans,json=closedChans,proto3" json:"closed_chans,omitempty"`
}
func (x *GraphTopologyUpdate) Reset() {
*x = GraphTopologyUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[113]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GraphTopologyUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GraphTopologyUpdate) ProtoMessage() {}
func (x *GraphTopologyUpdate) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[113]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GraphTopologyUpdate.ProtoReflect.Descriptor instead.
func (*GraphTopologyUpdate) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{113}
}
func (x *GraphTopologyUpdate) GetNodeUpdates() []*NodeUpdate {
if x != nil {
return x.NodeUpdates
}
return nil
}
func (x *GraphTopologyUpdate) GetChannelUpdates() []*ChannelEdgeUpdate {
if x != nil {
return x.ChannelUpdates
}
return nil
}
func (x *GraphTopologyUpdate) GetClosedChans() []*ClosedChannelUpdate {
if x != nil {
return x.ClosedChans
}
return nil
}
type NodeUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//Deprecated, use node_addresses.
//
// Deprecated: Do not use.
Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
IdentityKey string `protobuf:"bytes,2,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"`
//
//Deprecated, use features.
//
// Deprecated: Do not use.
GlobalFeatures []byte `protobuf:"bytes,3,opt,name=global_features,json=globalFeatures,proto3" json:"global_features,omitempty"`
Alias string `protobuf:"bytes,4,opt,name=alias,proto3" json:"alias,omitempty"`
Color string `protobuf:"bytes,5,opt,name=color,proto3" json:"color,omitempty"`
NodeAddresses []*NodeAddress `protobuf:"bytes,7,rep,name=node_addresses,json=nodeAddresses,proto3" json:"node_addresses,omitempty"`
//
//Features that the node has advertised in the init message, node
//announcements and invoices.
Features map[uint32]*Feature `protobuf:"bytes,6,rep,name=features,proto3" json:"features,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *NodeUpdate) Reset() {
*x = NodeUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[114]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodeUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeUpdate) ProtoMessage() {}
func (x *NodeUpdate) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[114]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodeUpdate.ProtoReflect.Descriptor instead.
func (*NodeUpdate) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{114}
}
// Deprecated: Do not use.
func (x *NodeUpdate) GetAddresses() []string {
if x != nil {
return x.Addresses
}
return nil
}
func (x *NodeUpdate) GetIdentityKey() string {
if x != nil {
return x.IdentityKey
}
return ""
}
// Deprecated: Do not use.
func (x *NodeUpdate) GetGlobalFeatures() []byte {
if x != nil {
return x.GlobalFeatures
}
return nil
}
func (x *NodeUpdate) GetAlias() string {
if x != nil {
return x.Alias
}
return ""
}
func (x *NodeUpdate) GetColor() string {
if x != nil {
return x.Color
}
return ""
}
func (x *NodeUpdate) GetNodeAddresses() []*NodeAddress {
if x != nil {
return x.NodeAddresses
}
return nil
}
func (x *NodeUpdate) GetFeatures() map[uint32]*Feature {
if x != nil {
return x.Features
}
return nil
}
type ChannelEdgeUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The unique channel ID for the channel. The first 3 bytes are the block
//height, the next 3 the index within the block, and the last 2 bytes are the
//output index for the channel.
ChanId uint64 `protobuf:"varint,1,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"`
ChanPoint *ChannelPoint `protobuf:"bytes,2,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"`
Capacity int64 `protobuf:"varint,3,opt,name=capacity,proto3" json:"capacity,omitempty"`
RoutingPolicy *RoutingPolicy `protobuf:"bytes,4,opt,name=routing_policy,json=routingPolicy,proto3" json:"routing_policy,omitempty"`
AdvertisingNode string `protobuf:"bytes,5,opt,name=advertising_node,json=advertisingNode,proto3" json:"advertising_node,omitempty"`
ConnectingNode string `protobuf:"bytes,6,opt,name=connecting_node,json=connectingNode,proto3" json:"connecting_node,omitempty"`
}
func (x *ChannelEdgeUpdate) Reset() {
*x = ChannelEdgeUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[115]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelEdgeUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelEdgeUpdate) ProtoMessage() {}
func (x *ChannelEdgeUpdate) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[115]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelEdgeUpdate.ProtoReflect.Descriptor instead.
func (*ChannelEdgeUpdate) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{115}
}
func (x *ChannelEdgeUpdate) GetChanId() uint64 {
if x != nil {
return x.ChanId
}
return 0
}
func (x *ChannelEdgeUpdate) GetChanPoint() *ChannelPoint {
if x != nil {
return x.ChanPoint
}
return nil
}
func (x *ChannelEdgeUpdate) GetCapacity() int64 {
if x != nil {
return x.Capacity
}
return 0
}
func (x *ChannelEdgeUpdate) GetRoutingPolicy() *RoutingPolicy {
if x != nil {
return x.RoutingPolicy
}
return nil
}
func (x *ChannelEdgeUpdate) GetAdvertisingNode() string {
if x != nil {
return x.AdvertisingNode
}
return ""
}
func (x *ChannelEdgeUpdate) GetConnectingNode() string {
if x != nil {
return x.ConnectingNode
}
return ""
}
type ClosedChannelUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The unique channel ID for the channel. The first 3 bytes are the block
//height, the next 3 the index within the block, and the last 2 bytes are the
//output index for the channel.
ChanId uint64 `protobuf:"varint,1,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"`
Capacity int64 `protobuf:"varint,2,opt,name=capacity,proto3" json:"capacity,omitempty"`
ClosedHeight uint32 `protobuf:"varint,3,opt,name=closed_height,json=closedHeight,proto3" json:"closed_height,omitempty"`
ChanPoint *ChannelPoint `protobuf:"bytes,4,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"`
}
func (x *ClosedChannelUpdate) Reset() {
*x = ClosedChannelUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[116]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ClosedChannelUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ClosedChannelUpdate) ProtoMessage() {}
func (x *ClosedChannelUpdate) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[116]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ClosedChannelUpdate.ProtoReflect.Descriptor instead.
func (*ClosedChannelUpdate) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{116}
}
func (x *ClosedChannelUpdate) GetChanId() uint64 {
if x != nil {
return x.ChanId
}
return 0
}
func (x *ClosedChannelUpdate) GetCapacity() int64 {
if x != nil {
return x.Capacity
}
return 0
}
func (x *ClosedChannelUpdate) GetClosedHeight() uint32 {
if x != nil {
return x.ClosedHeight
}
return 0
}
func (x *ClosedChannelUpdate) GetChanPoint() *ChannelPoint {
if x != nil {
return x.ChanPoint
}
return nil
}
type HopHint struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The public key of the node at the start of the channel.
NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
// The unique identifier of the channel.
ChanId uint64 `protobuf:"varint,2,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"`
// The base fee of the channel denominated in millisatoshis.
FeeBaseMsat uint32 `protobuf:"varint,3,opt,name=fee_base_msat,json=feeBaseMsat,proto3" json:"fee_base_msat,omitempty"`
//
//The fee rate of the channel for sending one satoshi across it denominated in
//millionths of a satoshi.
FeeProportionalMillionths uint32 `protobuf:"varint,4,opt,name=fee_proportional_millionths,json=feeProportionalMillionths,proto3" json:"fee_proportional_millionths,omitempty"`
// The time-lock delta of the channel.
CltvExpiryDelta uint32 `protobuf:"varint,5,opt,name=cltv_expiry_delta,json=cltvExpiryDelta,proto3" json:"cltv_expiry_delta,omitempty"`
}
func (x *HopHint) Reset() {
*x = HopHint{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[117]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HopHint) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HopHint) ProtoMessage() {}
func (x *HopHint) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[117]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HopHint.ProtoReflect.Descriptor instead.
func (*HopHint) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{117}
}
func (x *HopHint) GetNodeId() string {
if x != nil {
return x.NodeId
}
return ""
}
func (x *HopHint) GetChanId() uint64 {
if x != nil {
return x.ChanId
}
return 0
}
func (x *HopHint) GetFeeBaseMsat() uint32 {
if x != nil {
return x.FeeBaseMsat
}
return 0
}
func (x *HopHint) GetFeeProportionalMillionths() uint32 {
if x != nil {
return x.FeeProportionalMillionths
}
return 0
}
func (x *HopHint) GetCltvExpiryDelta() uint32 {
if x != nil {
return x.CltvExpiryDelta
}
return 0
}
type SetID struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SetId []byte `protobuf:"bytes,1,opt,name=set_id,json=setId,proto3" json:"set_id,omitempty"`
}
func (x *SetID) Reset() {
*x = SetID{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[118]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SetID) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SetID) ProtoMessage() {}
func (x *SetID) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[118]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SetID.ProtoReflect.Descriptor instead.
func (*SetID) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{118}
}
func (x *SetID) GetSetId() []byte {
if x != nil {
return x.SetId
}
return nil
}
type RouteHint struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//A list of hop hints that when chained together can assist in reaching a
//specific destination.
HopHints []*HopHint `protobuf:"bytes,1,rep,name=hop_hints,json=hopHints,proto3" json:"hop_hints,omitempty"`
}
func (x *RouteHint) Reset() {
*x = RouteHint{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[119]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RouteHint) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RouteHint) ProtoMessage() {}
func (x *RouteHint) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[119]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RouteHint.ProtoReflect.Descriptor instead.
func (*RouteHint) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{119}
}
func (x *RouteHint) GetHopHints() []*HopHint {
if x != nil {
return x.HopHints
}
return nil
}
type AMPInvoiceState struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The state the HTLCs associated with this setID are in.
State InvoiceHTLCState `protobuf:"varint,1,opt,name=state,proto3,enum=lnrpc.InvoiceHTLCState" json:"state,omitempty"`
// The settle index of this HTLC set, if the invoice state is settled.
SettleIndex uint64 `protobuf:"varint,2,opt,name=settle_index,json=settleIndex,proto3" json:"settle_index,omitempty"`
// The time this HTLC set was settled expressed in unix epoch.
SettleTime int64 `protobuf:"varint,3,opt,name=settle_time,json=settleTime,proto3" json:"settle_time,omitempty"`
// The total amount paid for the sub-invoice expressed in milli satoshis.
AmtPaidMsat int64 `protobuf:"varint,5,opt,name=amt_paid_msat,json=amtPaidMsat,proto3" json:"amt_paid_msat,omitempty"`
}
func (x *AMPInvoiceState) Reset() {
*x = AMPInvoiceState{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[120]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AMPInvoiceState) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AMPInvoiceState) ProtoMessage() {}
func (x *AMPInvoiceState) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[120]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AMPInvoiceState.ProtoReflect.Descriptor instead.
func (*AMPInvoiceState) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{120}
}
func (x *AMPInvoiceState) GetState() InvoiceHTLCState {
if x != nil {
return x.State
}
return InvoiceHTLCState_ACCEPTED
}
func (x *AMPInvoiceState) GetSettleIndex() uint64 {
if x != nil {
return x.SettleIndex
}
return 0
}
func (x *AMPInvoiceState) GetSettleTime() int64 {
if x != nil {
return x.SettleTime
}
return 0
}
func (x *AMPInvoiceState) GetAmtPaidMsat() int64 {
if x != nil {
return x.AmtPaidMsat
}
return 0
}
type Invoice struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//An optional memo to attach along with the invoice. Used for record keeping
//purposes for the invoice's creator, and will also be set in the description
//field of the encoded payment request if the description_hash field is not
//being used.
Memo string `protobuf:"bytes,1,opt,name=memo,proto3" json:"memo,omitempty"`
//
//The hex-encoded preimage (32 byte) which will allow settling an incoming
//HTLC payable to this preimage. When using REST, this field must be encoded
//as base64.
RPreimage []byte `protobuf:"bytes,3,opt,name=r_preimage,json=rPreimage,proto3" json:"r_preimage,omitempty"`
//
//The hash of the preimage. When using REST, this field must be encoded as
//base64.
RHash []byte `protobuf:"bytes,4,opt,name=r_hash,json=rHash,proto3" json:"r_hash,omitempty"`
//
//The value of this invoice in satoshis
//
//The fields value and value_msat are mutually exclusive.
Value int64 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"`
//
//The value of this invoice in millisatoshis
//
//The fields value and value_msat are mutually exclusive.
ValueMsat int64 `protobuf:"varint,23,opt,name=value_msat,json=valueMsat,proto3" json:"value_msat,omitempty"`
// Whether this invoice has been fulfilled
//
// Deprecated: Do not use.
Settled bool `protobuf:"varint,6,opt,name=settled,proto3" json:"settled,omitempty"`
// When this invoice was created
CreationDate int64 `protobuf:"varint,7,opt,name=creation_date,json=creationDate,proto3" json:"creation_date,omitempty"`
// When this invoice was settled
SettleDate int64 `protobuf:"varint,8,opt,name=settle_date,json=settleDate,proto3" json:"settle_date,omitempty"`
//
//A bare-bones invoice for a payment within the Lightning Network. With the
//details of the invoice, the sender has all the data necessary to send a
//payment to the recipient.
PaymentRequest string `protobuf:"bytes,9,opt,name=payment_request,json=paymentRequest,proto3" json:"payment_request,omitempty"`
//
//Hash (SHA-256) of a description of the payment. Used if the description of
//payment (memo) is too long to naturally fit within the description field
//of an encoded payment request. When using REST, this field must be encoded
//as base64.
DescriptionHash []byte `protobuf:"bytes,10,opt,name=description_hash,json=descriptionHash,proto3" json:"description_hash,omitempty"`
// Payment request expiry time in seconds. Default is 3600 (1 hour).
Expiry int64 `protobuf:"varint,11,opt,name=expiry,proto3" json:"expiry,omitempty"`
// Fallback on-chain address.
FallbackAddr string `protobuf:"bytes,12,opt,name=fallback_addr,json=fallbackAddr,proto3" json:"fallback_addr,omitempty"`
// Delta to use for the time-lock of the CLTV extended to the final hop.
CltvExpiry uint64 `protobuf:"varint,13,opt,name=cltv_expiry,json=cltvExpiry,proto3" json:"cltv_expiry,omitempty"`
//
//Route hints that can each be individually used to assist in reaching the
//invoice's destination.
RouteHints []*RouteHint `protobuf:"bytes,14,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"`
// Whether this invoice should include routing hints for private channels.
Private bool `protobuf:"varint,15,opt,name=private,proto3" json:"private,omitempty"`
//
//The "add" index of this invoice. Each newly created invoice will increment
//this index making it monotonically increasing. Callers to the
//SubscribeInvoices call can use this to instantly get notified of all added
//invoices with an add_index greater than this one.
AddIndex uint64 `protobuf:"varint,16,opt,name=add_index,json=addIndex,proto3" json:"add_index,omitempty"`
//
//The "settle" index of this invoice. Each newly settled invoice will
//increment this index making it monotonically increasing. Callers to the
//SubscribeInvoices call can use this to instantly get notified of all
//settled invoices with an settle_index greater than this one.
SettleIndex uint64 `protobuf:"varint,17,opt,name=settle_index,json=settleIndex,proto3" json:"settle_index,omitempty"`
// Deprecated, use amt_paid_sat or amt_paid_msat.
//
// Deprecated: Do not use.
AmtPaid int64 `protobuf:"varint,18,opt,name=amt_paid,json=amtPaid,proto3" json:"amt_paid,omitempty"`
//
//The amount that was accepted for this invoice, in satoshis. This will ONLY
//be set if this invoice has been settled. We provide this field as if the
//invoice was created with a zero value, then we need to record what amount
//was ultimately accepted. Additionally, it's possible that the sender paid
//MORE that was specified in the original invoice. So we'll record that here
//as well.
AmtPaidSat int64 `protobuf:"varint,19,opt,name=amt_paid_sat,json=amtPaidSat,proto3" json:"amt_paid_sat,omitempty"`
//
//The amount that was accepted for this invoice, in millisatoshis. This will
//ONLY be set if this invoice has been settled. We provide this field as if
//the invoice was created with a zero value, then we need to record what
//amount was ultimately accepted. Additionally, it's possible that the sender
//paid MORE that was specified in the original invoice. So we'll record that
//here as well.
AmtPaidMsat int64 `protobuf:"varint,20,opt,name=amt_paid_msat,json=amtPaidMsat,proto3" json:"amt_paid_msat,omitempty"`
//
//The state the invoice is in.
State Invoice_InvoiceState `protobuf:"varint,21,opt,name=state,proto3,enum=lnrpc.Invoice_InvoiceState" json:"state,omitempty"`
// List of HTLCs paying to this invoice [EXPERIMENTAL].
Htlcs []*InvoiceHTLC `protobuf:"bytes,22,rep,name=htlcs,proto3" json:"htlcs,omitempty"`
// List of features advertised on the invoice.
Features map[uint32]*Feature `protobuf:"bytes,24,rep,name=features,proto3" json:"features,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
//
//Indicates if this invoice was a spontaneous payment that arrived via keysend
//[EXPERIMENTAL].
IsKeysend bool `protobuf:"varint,25,opt,name=is_keysend,json=isKeysend,proto3" json:"is_keysend,omitempty"`
//
//The payment address of this invoice. This value will be used in MPP
//payments, and also for newer invoices that always require the MPP payload
//for added end-to-end security.
PaymentAddr []byte `protobuf:"bytes,26,opt,name=payment_addr,json=paymentAddr,proto3" json:"payment_addr,omitempty"`
//
//Signals whether or not this is an AMP invoice.
IsAmp bool `protobuf:"varint,27,opt,name=is_amp,json=isAmp,proto3" json:"is_amp,omitempty"`
//
//[EXPERIMENTAL]:
//
//Maps a 32-byte hex-encoded set ID to the sub-invoice AMP state for the
//given set ID. This field is always populated for AMP invoices, and can be
//used along side LookupInvoice to obtain the HTLC information related to a
//given sub-invoice.
AmpInvoiceState map[string]*AMPInvoiceState `protobuf:"bytes,28,rep,name=amp_invoice_state,json=ampInvoiceState,proto3" json:"amp_invoice_state,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Invoice) Reset() {
*x = Invoice{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[121]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Invoice) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Invoice) ProtoMessage() {}
func (x *Invoice) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[121]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Invoice.ProtoReflect.Descriptor instead.
func (*Invoice) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{121}
}
func (x *Invoice) GetMemo() string {
if x != nil {
return x.Memo
}
return ""
}
func (x *Invoice) GetRPreimage() []byte {
if x != nil {
return x.RPreimage
}
return nil
}
func (x *Invoice) GetRHash() []byte {
if x != nil {
return x.RHash
}
return nil
}
func (x *Invoice) GetValue() int64 {
if x != nil {
return x.Value
}
return 0
}
func (x *Invoice) GetValueMsat() int64 {
if x != nil {
return x.ValueMsat
}
return 0
}
// Deprecated: Do not use.
func (x *Invoice) GetSettled() bool {
if x != nil {
return x.Settled
}
return false
}
func (x *Invoice) GetCreationDate() int64 {
if x != nil {
return x.CreationDate
}
return 0
}
func (x *Invoice) GetSettleDate() int64 {
if x != nil {
return x.SettleDate
}
return 0
}
func (x *Invoice) GetPaymentRequest() string {
if x != nil {
return x.PaymentRequest
}
return ""
}
func (x *Invoice) GetDescriptionHash() []byte {
if x != nil {
return x.DescriptionHash
}
return nil
}
func (x *Invoice) GetExpiry() int64 {
if x != nil {
return x.Expiry
}
return 0
}
func (x *Invoice) GetFallbackAddr() string {
if x != nil {
return x.FallbackAddr
}
return ""
}
func (x *Invoice) GetCltvExpiry() uint64 {
if x != nil {
return x.CltvExpiry
}
return 0
}
func (x *Invoice) GetRouteHints() []*RouteHint {
if x != nil {
return x.RouteHints
}
return nil
}
func (x *Invoice) GetPrivate() bool {
if x != nil {
return x.Private
}
return false
}
func (x *Invoice) GetAddIndex() uint64 {
if x != nil {
return x.AddIndex
}
return 0
}
func (x *Invoice) GetSettleIndex() uint64 {
if x != nil {
return x.SettleIndex
}
return 0
}
// Deprecated: Do not use.
func (x *Invoice) GetAmtPaid() int64 {
if x != nil {
return x.AmtPaid
}
return 0
}
func (x *Invoice) GetAmtPaidSat() int64 {
if x != nil {
return x.AmtPaidSat
}
return 0
}
func (x *Invoice) GetAmtPaidMsat() int64 {
if x != nil {
return x.AmtPaidMsat
}
return 0
}
func (x *Invoice) GetState() Invoice_InvoiceState {
if x != nil {
return x.State
}
return Invoice_OPEN
}
func (x *Invoice) GetHtlcs() []*InvoiceHTLC {
if x != nil {
return x.Htlcs
}
return nil
}
func (x *Invoice) GetFeatures() map[uint32]*Feature {
if x != nil {
return x.Features
}
return nil
}
func (x *Invoice) GetIsKeysend() bool {
if x != nil {
return x.IsKeysend
}
return false
}
func (x *Invoice) GetPaymentAddr() []byte {
if x != nil {
return x.PaymentAddr
}
return nil
}
func (x *Invoice) GetIsAmp() bool {
if x != nil {
return x.IsAmp
}
return false
}
func (x *Invoice) GetAmpInvoiceState() map[string]*AMPInvoiceState {
if x != nil {
return x.AmpInvoiceState
}
return nil
}
// Details of an HTLC that paid to an invoice
type InvoiceHTLC struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Short channel id over which the htlc was received.
ChanId uint64 `protobuf:"varint,1,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"`
// Index identifying the htlc on the channel.
HtlcIndex uint64 `protobuf:"varint,2,opt,name=htlc_index,json=htlcIndex,proto3" json:"htlc_index,omitempty"`
// The amount of the htlc in msat.
AmtMsat uint64 `protobuf:"varint,3,opt,name=amt_msat,json=amtMsat,proto3" json:"amt_msat,omitempty"`
// Block height at which this htlc was accepted.
AcceptHeight int32 `protobuf:"varint,4,opt,name=accept_height,json=acceptHeight,proto3" json:"accept_height,omitempty"`
// Time at which this htlc was accepted.
AcceptTime int64 `protobuf:"varint,5,opt,name=accept_time,json=acceptTime,proto3" json:"accept_time,omitempty"`
// Time at which this htlc was settled or canceled.
ResolveTime int64 `protobuf:"varint,6,opt,name=resolve_time,json=resolveTime,proto3" json:"resolve_time,omitempty"`
// Block height at which this htlc expires.
ExpiryHeight int32 `protobuf:"varint,7,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"`
// Current state the htlc is in.
State InvoiceHTLCState `protobuf:"varint,8,opt,name=state,proto3,enum=lnrpc.InvoiceHTLCState" json:"state,omitempty"`
// Custom tlv records.
CustomRecords map[uint64][]byte `protobuf:"bytes,9,rep,name=custom_records,json=customRecords,proto3" json:"custom_records,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// The total amount of the mpp payment in msat.
MppTotalAmtMsat uint64 `protobuf:"varint,10,opt,name=mpp_total_amt_msat,json=mppTotalAmtMsat,proto3" json:"mpp_total_amt_msat,omitempty"`
// Details relevant to AMP HTLCs, only populated if this is an AMP HTLC.
Amp *AMP `protobuf:"bytes,11,opt,name=amp,proto3" json:"amp,omitempty"`
}
func (x *InvoiceHTLC) Reset() {
*x = InvoiceHTLC{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[122]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InvoiceHTLC) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InvoiceHTLC) ProtoMessage() {}
func (x *InvoiceHTLC) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[122]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InvoiceHTLC.ProtoReflect.Descriptor instead.
func (*InvoiceHTLC) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{122}
}
func (x *InvoiceHTLC) GetChanId() uint64 {
if x != nil {
return x.ChanId
}
return 0
}
func (x *InvoiceHTLC) GetHtlcIndex() uint64 {
if x != nil {
return x.HtlcIndex
}
return 0
}
func (x *InvoiceHTLC) GetAmtMsat() uint64 {
if x != nil {
return x.AmtMsat
}
return 0
}
func (x *InvoiceHTLC) GetAcceptHeight() int32 {
if x != nil {
return x.AcceptHeight
}
return 0
}
func (x *InvoiceHTLC) GetAcceptTime() int64 {
if x != nil {
return x.AcceptTime
}
return 0
}
func (x *InvoiceHTLC) GetResolveTime() int64 {
if x != nil {
return x.ResolveTime
}
return 0
}
func (x *InvoiceHTLC) GetExpiryHeight() int32 {
if x != nil {
return x.ExpiryHeight
}
return 0
}
func (x *InvoiceHTLC) GetState() InvoiceHTLCState {
if x != nil {
return x.State
}
return InvoiceHTLCState_ACCEPTED
}
func (x *InvoiceHTLC) GetCustomRecords() map[uint64][]byte {
if x != nil {
return x.CustomRecords
}
return nil
}
func (x *InvoiceHTLC) GetMppTotalAmtMsat() uint64 {
if x != nil {
return x.MppTotalAmtMsat
}
return 0
}
func (x *InvoiceHTLC) GetAmp() *AMP {
if x != nil {
return x.Amp
}
return nil
}
// Details specific to AMP HTLCs.
type AMP struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// An n-of-n secret share of the root seed from which child payment hashes
// and preimages are derived.
RootShare []byte `protobuf:"bytes,1,opt,name=root_share,json=rootShare,proto3" json:"root_share,omitempty"`
// An identifier for the HTLC set that this HTLC belongs to.
SetId []byte `protobuf:"bytes,2,opt,name=set_id,json=setId,proto3" json:"set_id,omitempty"`
// A nonce used to randomize the child preimage and child hash from a given
// root_share.
ChildIndex uint32 `protobuf:"varint,3,opt,name=child_index,json=childIndex,proto3" json:"child_index,omitempty"`
// The payment hash of the AMP HTLC.
Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
// The preimage used to settle this AMP htlc. This field will only be
// populated if the invoice is in InvoiceState_ACCEPTED or
// InvoiceState_SETTLED.
Preimage []byte `protobuf:"bytes,5,opt,name=preimage,proto3" json:"preimage,omitempty"`
}
func (x *AMP) Reset() {
*x = AMP{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[123]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AMP) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AMP) ProtoMessage() {}
func (x *AMP) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[123]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AMP.ProtoReflect.Descriptor instead.
func (*AMP) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{123}
}
func (x *AMP) GetRootShare() []byte {
if x != nil {
return x.RootShare
}
return nil
}
func (x *AMP) GetSetId() []byte {
if x != nil {
return x.SetId
}
return nil
}
func (x *AMP) GetChildIndex() uint32 {
if x != nil {
return x.ChildIndex
}
return 0
}
func (x *AMP) GetHash() []byte {
if x != nil {
return x.Hash
}
return nil
}
func (x *AMP) GetPreimage() []byte {
if x != nil {
return x.Preimage
}
return nil
}
type AddInvoiceResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RHash []byte `protobuf:"bytes,1,opt,name=r_hash,json=rHash,proto3" json:"r_hash,omitempty"`
//
//A bare-bones invoice for a payment within the Lightning Network. With the
//details of the invoice, the sender has all the data necessary to send a
//payment to the recipient.
PaymentRequest string `protobuf:"bytes,2,opt,name=payment_request,json=paymentRequest,proto3" json:"payment_request,omitempty"`
//
//The "add" index of this invoice. Each newly created invoice will increment
//this index making it monotonically increasing. Callers to the
//SubscribeInvoices call can use this to instantly get notified of all added
//invoices with an add_index greater than this one.
AddIndex uint64 `protobuf:"varint,16,opt,name=add_index,json=addIndex,proto3" json:"add_index,omitempty"`
//
//The payment address of the generated invoice. This value should be used
//in all payments for this invoice as we require it for end to end
//security.
PaymentAddr []byte `protobuf:"bytes,17,opt,name=payment_addr,json=paymentAddr,proto3" json:"payment_addr,omitempty"`
}
func (x *AddInvoiceResponse) Reset() {
*x = AddInvoiceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[124]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AddInvoiceResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddInvoiceResponse) ProtoMessage() {}
func (x *AddInvoiceResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[124]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddInvoiceResponse.ProtoReflect.Descriptor instead.
func (*AddInvoiceResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{124}
}
func (x *AddInvoiceResponse) GetRHash() []byte {
if x != nil {
return x.RHash
}
return nil
}
func (x *AddInvoiceResponse) GetPaymentRequest() string {
if x != nil {
return x.PaymentRequest
}
return ""
}
func (x *AddInvoiceResponse) GetAddIndex() uint64 {
if x != nil {
return x.AddIndex
}
return 0
}
func (x *AddInvoiceResponse) GetPaymentAddr() []byte {
if x != nil {
return x.PaymentAddr
}
return nil
}
type PaymentHash struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The hex-encoded payment hash of the invoice to be looked up. The passed
//payment hash must be exactly 32 bytes, otherwise an error is returned.
//Deprecated now that the REST gateway supports base64 encoding of bytes
//fields.
//
// Deprecated: Do not use.
RHashStr string `protobuf:"bytes,1,opt,name=r_hash_str,json=rHashStr,proto3" json:"r_hash_str,omitempty"`
//
//The payment hash of the invoice to be looked up. When using REST, this field
//must be encoded as base64.
RHash []byte `protobuf:"bytes,2,opt,name=r_hash,json=rHash,proto3" json:"r_hash,omitempty"`
}
func (x *PaymentHash) Reset() {
*x = PaymentHash{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[125]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PaymentHash) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PaymentHash) ProtoMessage() {}
func (x *PaymentHash) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[125]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PaymentHash.ProtoReflect.Descriptor instead.
func (*PaymentHash) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{125}
}
// Deprecated: Do not use.
func (x *PaymentHash) GetRHashStr() string {
if x != nil {
return x.RHashStr
}
return ""
}
func (x *PaymentHash) GetRHash() []byte {
if x != nil {
return x.RHash
}
return nil
}
type ListInvoiceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//If set, only invoices that are not settled and not canceled will be returned
//in the response.
PendingOnly bool `protobuf:"varint,1,opt,name=pending_only,json=pendingOnly,proto3" json:"pending_only,omitempty"`
//
//The index of an invoice that will be used as either the start or end of a
//query to determine which invoices should be returned in the response.
IndexOffset uint64 `protobuf:"varint,4,opt,name=index_offset,json=indexOffset,proto3" json:"index_offset,omitempty"`
// The max number of invoices to return in the response to this query.
NumMaxInvoices uint64 `protobuf:"varint,5,opt,name=num_max_invoices,json=numMaxInvoices,proto3" json:"num_max_invoices,omitempty"`
//
//If set, the invoices returned will result from seeking backwards from the
//specified index offset. This can be used to paginate backwards.
Reversed bool `protobuf:"varint,6,opt,name=reversed,proto3" json:"reversed,omitempty"`
}
func (x *ListInvoiceRequest) Reset() {
*x = ListInvoiceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[126]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListInvoiceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListInvoiceRequest) ProtoMessage() {}
func (x *ListInvoiceRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[126]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListInvoiceRequest.ProtoReflect.Descriptor instead.
func (*ListInvoiceRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{126}
}
func (x *ListInvoiceRequest) GetPendingOnly() bool {
if x != nil {
return x.PendingOnly
}
return false
}
func (x *ListInvoiceRequest) GetIndexOffset() uint64 {
if x != nil {
return x.IndexOffset
}
return 0
}
func (x *ListInvoiceRequest) GetNumMaxInvoices() uint64 {
if x != nil {
return x.NumMaxInvoices
}
return 0
}
func (x *ListInvoiceRequest) GetReversed() bool {
if x != nil {
return x.Reversed
}
return false
}
type ListInvoiceResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//A list of invoices from the time slice of the time series specified in the
//request.
Invoices []*Invoice `protobuf:"bytes,1,rep,name=invoices,proto3" json:"invoices,omitempty"`
//
//The index of the last item in the set of returned invoices. This can be used
//to seek further, pagination style.
LastIndexOffset uint64 `protobuf:"varint,2,opt,name=last_index_offset,json=lastIndexOffset,proto3" json:"last_index_offset,omitempty"`
//
//The index of the last item in the set of returned invoices. This can be used
//to seek backwards, pagination style.
FirstIndexOffset uint64 `protobuf:"varint,3,opt,name=first_index_offset,json=firstIndexOffset,proto3" json:"first_index_offset,omitempty"`
}
func (x *ListInvoiceResponse) Reset() {
*x = ListInvoiceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[127]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListInvoiceResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListInvoiceResponse) ProtoMessage() {}
func (x *ListInvoiceResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[127]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListInvoiceResponse.ProtoReflect.Descriptor instead.
func (*ListInvoiceResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{127}
}
func (x *ListInvoiceResponse) GetInvoices() []*Invoice {
if x != nil {
return x.Invoices
}
return nil
}
func (x *ListInvoiceResponse) GetLastIndexOffset() uint64 {
if x != nil {
return x.LastIndexOffset
}
return 0
}
func (x *ListInvoiceResponse) GetFirstIndexOffset() uint64 {
if x != nil {
return x.FirstIndexOffset
}
return 0
}
type InvoiceSubscription struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//If specified (non-zero), then we'll first start by sending out
//notifications for all added indexes with an add_index greater than this
//value. This allows callers to catch up on any events they missed while they
//weren't connected to the streaming RPC.
AddIndex uint64 `protobuf:"varint,1,opt,name=add_index,json=addIndex,proto3" json:"add_index,omitempty"`
//
//If specified (non-zero), then we'll first start by sending out
//notifications for all settled indexes with an settle_index greater than
//this value. This allows callers to catch up on any events they missed while
//they weren't connected to the streaming RPC.
SettleIndex uint64 `protobuf:"varint,2,opt,name=settle_index,json=settleIndex,proto3" json:"settle_index,omitempty"`
}
func (x *InvoiceSubscription) Reset() {
*x = InvoiceSubscription{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[128]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InvoiceSubscription) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InvoiceSubscription) ProtoMessage() {}
func (x *InvoiceSubscription) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[128]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InvoiceSubscription.ProtoReflect.Descriptor instead.
func (*InvoiceSubscription) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{128}
}
func (x *InvoiceSubscription) GetAddIndex() uint64 {
if x != nil {
return x.AddIndex
}
return 0
}
func (x *InvoiceSubscription) GetSettleIndex() uint64 {
if x != nil {
return x.SettleIndex
}
return 0
}
type Payment struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The payment hash
PaymentHash string `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
// Deprecated, use value_sat or value_msat.
//
// Deprecated: Do not use.
Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
// Deprecated, use creation_time_ns
//
// Deprecated: Do not use.
CreationDate int64 `protobuf:"varint,3,opt,name=creation_date,json=creationDate,proto3" json:"creation_date,omitempty"`
// Deprecated, use fee_sat or fee_msat.
//
// Deprecated: Do not use.
Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"`
// The payment preimage
PaymentPreimage string `protobuf:"bytes,6,opt,name=payment_preimage,json=paymentPreimage,proto3" json:"payment_preimage,omitempty"`
// The value of the payment in satoshis
ValueSat int64 `protobuf:"varint,7,opt,name=value_sat,json=valueSat,proto3" json:"value_sat,omitempty"`
// The value of the payment in milli-satoshis
ValueMsat int64 `protobuf:"varint,8,opt,name=value_msat,json=valueMsat,proto3" json:"value_msat,omitempty"`
// The optional payment request being fulfilled.
PaymentRequest string `protobuf:"bytes,9,opt,name=payment_request,json=paymentRequest,proto3" json:"payment_request,omitempty"`
// The status of the payment.
Status Payment_PaymentStatus `protobuf:"varint,10,opt,name=status,proto3,enum=lnrpc.Payment_PaymentStatus" json:"status,omitempty"`
// The fee paid for this payment in satoshis
FeeSat int64 `protobuf:"varint,11,opt,name=fee_sat,json=feeSat,proto3" json:"fee_sat,omitempty"`
// The fee paid for this payment in milli-satoshis
FeeMsat int64 `protobuf:"varint,12,opt,name=fee_msat,json=feeMsat,proto3" json:"fee_msat,omitempty"`
// The time in UNIX nanoseconds at which the payment was created.
CreationTimeNs int64 `protobuf:"varint,13,opt,name=creation_time_ns,json=creationTimeNs,proto3" json:"creation_time_ns,omitempty"`
// The HTLCs made in attempt to settle the payment.
Htlcs []*HTLCAttempt `protobuf:"bytes,14,rep,name=htlcs,proto3" json:"htlcs,omitempty"`
//
//The creation index of this payment. Each payment can be uniquely identified
//by this index, which may not strictly increment by 1 for payments made in
//older versions of lnd.
PaymentIndex uint64 `protobuf:"varint,15,opt,name=payment_index,json=paymentIndex,proto3" json:"payment_index,omitempty"`
FailureReason PaymentFailureReason `protobuf:"varint,16,opt,name=failure_reason,json=failureReason,proto3,enum=lnrpc.PaymentFailureReason" json:"failure_reason,omitempty"`
}
func (x *Payment) Reset() {
*x = Payment{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[129]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Payment) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Payment) ProtoMessage() {}
func (x *Payment) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[129]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Payment.ProtoReflect.Descriptor instead.
func (*Payment) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{129}
}
func (x *Payment) GetPaymentHash() string {
if x != nil {
return x.PaymentHash
}
return ""
}
// Deprecated: Do not use.
func (x *Payment) GetValue() int64 {
if x != nil {
return x.Value
}
return 0
}
// Deprecated: Do not use.
func (x *Payment) GetCreationDate() int64 {
if x != nil {
return x.CreationDate
}
return 0
}
// Deprecated: Do not use.
func (x *Payment) GetFee() int64 {
if x != nil {
return x.Fee
}
return 0
}
func (x *Payment) GetPaymentPreimage() string {
if x != nil {
return x.PaymentPreimage
}
return ""
}
func (x *Payment) GetValueSat() int64 {
if x != nil {
return x.ValueSat
}
return 0
}
func (x *Payment) GetValueMsat() int64 {
if x != nil {
return x.ValueMsat
}
return 0
}
func (x *Payment) GetPaymentRequest() string {
if x != nil {
return x.PaymentRequest
}
return ""
}
func (x *Payment) GetStatus() Payment_PaymentStatus {
if x != nil {
return x.Status
}
return Payment_UNKNOWN
}
func (x *Payment) GetFeeSat() int64 {
if x != nil {
return x.FeeSat
}
return 0
}
func (x *Payment) GetFeeMsat() int64 {
if x != nil {
return x.FeeMsat
}
return 0
}
func (x *Payment) GetCreationTimeNs() int64 {
if x != nil {
return x.CreationTimeNs
}
return 0
}
func (x *Payment) GetHtlcs() []*HTLCAttempt {
if x != nil {
return x.Htlcs
}
return nil
}
func (x *Payment) GetPaymentIndex() uint64 {
if x != nil {
return x.PaymentIndex
}
return 0
}
func (x *Payment) GetFailureReason() PaymentFailureReason {
if x != nil {
return x.FailureReason
}
return PaymentFailureReason_FAILURE_REASON_NONE
}
type HTLCAttempt struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The unique ID that is used for this attempt.
AttemptId uint64 `protobuf:"varint,7,opt,name=attempt_id,json=attemptId,proto3" json:"attempt_id,omitempty"`
// The status of the HTLC.
Status HTLCAttempt_HTLCStatus `protobuf:"varint,1,opt,name=status,proto3,enum=lnrpc.HTLCAttempt_HTLCStatus" json:"status,omitempty"`
// The route taken by this HTLC.
Route *Route `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"`
// The time in UNIX nanoseconds at which this HTLC was sent.
AttemptTimeNs int64 `protobuf:"varint,3,opt,name=attempt_time_ns,json=attemptTimeNs,proto3" json:"attempt_time_ns,omitempty"`
//
//The time in UNIX nanoseconds at which this HTLC was settled or failed.
//This value will not be set if the HTLC is still IN_FLIGHT.
ResolveTimeNs int64 `protobuf:"varint,4,opt,name=resolve_time_ns,json=resolveTimeNs,proto3" json:"resolve_time_ns,omitempty"`
// Detailed htlc failure info.
Failure *Failure `protobuf:"bytes,5,opt,name=failure,proto3" json:"failure,omitempty"`
// The preimage that was used to settle the HTLC.
Preimage []byte `protobuf:"bytes,6,opt,name=preimage,proto3" json:"preimage,omitempty"`
}
func (x *HTLCAttempt) Reset() {
*x = HTLCAttempt{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[130]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HTLCAttempt) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HTLCAttempt) ProtoMessage() {}
func (x *HTLCAttempt) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[130]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HTLCAttempt.ProtoReflect.Descriptor instead.
func (*HTLCAttempt) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{130}
}
func (x *HTLCAttempt) GetAttemptId() uint64 {
if x != nil {
return x.AttemptId
}
return 0
}
func (x *HTLCAttempt) GetStatus() HTLCAttempt_HTLCStatus {
if x != nil {
return x.Status
}
return HTLCAttempt_IN_FLIGHT
}
func (x *HTLCAttempt) GetRoute() *Route {
if x != nil {
return x.Route
}
return nil
}
func (x *HTLCAttempt) GetAttemptTimeNs() int64 {
if x != nil {
return x.AttemptTimeNs
}
return 0
}
func (x *HTLCAttempt) GetResolveTimeNs() int64 {
if x != nil {
return x.ResolveTimeNs
}
return 0
}
func (x *HTLCAttempt) GetFailure() *Failure {
if x != nil {
return x.Failure
}
return nil
}
func (x *HTLCAttempt) GetPreimage() []byte {
if x != nil {
return x.Preimage
}
return nil
}
type ListPaymentsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//If true, then return payments that have not yet fully completed. This means
//that pending payments, as well as failed payments will show up if this
//field is set to true. This flag doesn't change the meaning of the indices,
//which are tied to individual payments.
IncludeIncomplete bool `protobuf:"varint,1,opt,name=include_incomplete,json=includeIncomplete,proto3" json:"include_incomplete,omitempty"`
//
//The index of a payment that will be used as either the start or end of a
//query to determine which payments should be returned in the response. The
//index_offset is exclusive. In the case of a zero index_offset, the query
//will start with the oldest payment when paginating forwards, or will end
//with the most recent payment when paginating backwards.
IndexOffset uint64 `protobuf:"varint,2,opt,name=index_offset,json=indexOffset,proto3" json:"index_offset,omitempty"`
// The maximal number of payments returned in the response to this query.
MaxPayments uint64 `protobuf:"varint,3,opt,name=max_payments,json=maxPayments,proto3" json:"max_payments,omitempty"`
//
//If set, the payments returned will result from seeking backwards from the
//specified index offset. This can be used to paginate backwards. The order
//of the returned payments is always oldest first (ascending index order).
Reversed bool `protobuf:"varint,4,opt,name=reversed,proto3" json:"reversed,omitempty"`
}
func (x *ListPaymentsRequest) Reset() {
*x = ListPaymentsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[131]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPaymentsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPaymentsRequest) ProtoMessage() {}
func (x *ListPaymentsRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[131]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPaymentsRequest.ProtoReflect.Descriptor instead.
func (*ListPaymentsRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{131}
}
func (x *ListPaymentsRequest) GetIncludeIncomplete() bool {
if x != nil {
return x.IncludeIncomplete
}
return false
}
func (x *ListPaymentsRequest) GetIndexOffset() uint64 {
if x != nil {
return x.IndexOffset
}
return 0
}
func (x *ListPaymentsRequest) GetMaxPayments() uint64 {
if x != nil {
return x.MaxPayments
}
return 0
}
func (x *ListPaymentsRequest) GetReversed() bool {
if x != nil {
return x.Reversed
}
return false
}
type ListPaymentsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of payments
Payments []*Payment `protobuf:"bytes,1,rep,name=payments,proto3" json:"payments,omitempty"`
//
//The index of the first item in the set of returned payments. This can be
//used as the index_offset to continue seeking backwards in the next request.
FirstIndexOffset uint64 `protobuf:"varint,2,opt,name=first_index_offset,json=firstIndexOffset,proto3" json:"first_index_offset,omitempty"`
//
//The index of the last item in the set of returned payments. This can be used
//as the index_offset to continue seeking forwards in the next request.
LastIndexOffset uint64 `protobuf:"varint,3,opt,name=last_index_offset,json=lastIndexOffset,proto3" json:"last_index_offset,omitempty"`
}
func (x *ListPaymentsResponse) Reset() {
*x = ListPaymentsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[132]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPaymentsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPaymentsResponse) ProtoMessage() {}
func (x *ListPaymentsResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[132]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPaymentsResponse.ProtoReflect.Descriptor instead.
func (*ListPaymentsResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{132}
}
func (x *ListPaymentsResponse) GetPayments() []*Payment {
if x != nil {
return x.Payments
}
return nil
}
func (x *ListPaymentsResponse) GetFirstIndexOffset() uint64 {
if x != nil {
return x.FirstIndexOffset
}
return 0
}
func (x *ListPaymentsResponse) GetLastIndexOffset() uint64 {
if x != nil {
return x.LastIndexOffset
}
return 0
}
type DeletePaymentRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Payment hash to delete.
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
//
//Only delete failed HTLCs from the payment, not the payment itself.
FailedHtlcsOnly bool `protobuf:"varint,2,opt,name=failed_htlcs_only,json=failedHtlcsOnly,proto3" json:"failed_htlcs_only,omitempty"`
}
func (x *DeletePaymentRequest) Reset() {
*x = DeletePaymentRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[133]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeletePaymentRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeletePaymentRequest) ProtoMessage() {}
func (x *DeletePaymentRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[133]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeletePaymentRequest.ProtoReflect.Descriptor instead.
func (*DeletePaymentRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{133}
}
func (x *DeletePaymentRequest) GetPaymentHash() []byte {
if x != nil {
return x.PaymentHash
}
return nil
}
func (x *DeletePaymentRequest) GetFailedHtlcsOnly() bool {
if x != nil {
return x.FailedHtlcsOnly
}
return false
}
type DeleteAllPaymentsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Only delete failed payments.
FailedPaymentsOnly bool `protobuf:"varint,1,opt,name=failed_payments_only,json=failedPaymentsOnly,proto3" json:"failed_payments_only,omitempty"`
//
//Only delete failed HTLCs from payments, not the payment itself.
FailedHtlcsOnly bool `protobuf:"varint,2,opt,name=failed_htlcs_only,json=failedHtlcsOnly,proto3" json:"failed_htlcs_only,omitempty"`
}
func (x *DeleteAllPaymentsRequest) Reset() {
*x = DeleteAllPaymentsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[134]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteAllPaymentsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteAllPaymentsRequest) ProtoMessage() {}
func (x *DeleteAllPaymentsRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[134]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteAllPaymentsRequest.ProtoReflect.Descriptor instead.
func (*DeleteAllPaymentsRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{134}
}
func (x *DeleteAllPaymentsRequest) GetFailedPaymentsOnly() bool {
if x != nil {
return x.FailedPaymentsOnly
}
return false
}
func (x *DeleteAllPaymentsRequest) GetFailedHtlcsOnly() bool {
if x != nil {
return x.FailedHtlcsOnly
}
return false
}
type DeletePaymentResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DeletePaymentResponse) Reset() {
*x = DeletePaymentResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[135]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeletePaymentResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeletePaymentResponse) ProtoMessage() {}
func (x *DeletePaymentResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[135]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeletePaymentResponse.ProtoReflect.Descriptor instead.
func (*DeletePaymentResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{135}
}
type DeleteAllPaymentsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DeleteAllPaymentsResponse) Reset() {
*x = DeleteAllPaymentsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[136]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteAllPaymentsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteAllPaymentsResponse) ProtoMessage() {}
func (x *DeleteAllPaymentsResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[136]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteAllPaymentsResponse.ProtoReflect.Descriptor instead.
func (*DeleteAllPaymentsResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{136}
}
type AbandonChannelRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChannelPoint *ChannelPoint `protobuf:"bytes,1,opt,name=channel_point,json=channelPoint,proto3" json:"channel_point,omitempty"`
PendingFundingShimOnly bool `protobuf:"varint,2,opt,name=pending_funding_shim_only,json=pendingFundingShimOnly,proto3" json:"pending_funding_shim_only,omitempty"`
//
//Override the requirement for being in dev mode by setting this to true and
//confirming the user knows what they are doing and this is a potential foot
//gun to lose funds if used on active channels.
IKnowWhatIAmDoing bool `protobuf:"varint,3,opt,name=i_know_what_i_am_doing,json=iKnowWhatIAmDoing,proto3" json:"i_know_what_i_am_doing,omitempty"`
}
func (x *AbandonChannelRequest) Reset() {
*x = AbandonChannelRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[137]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AbandonChannelRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AbandonChannelRequest) ProtoMessage() {}
func (x *AbandonChannelRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[137]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AbandonChannelRequest.ProtoReflect.Descriptor instead.
func (*AbandonChannelRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{137}
}
func (x *AbandonChannelRequest) GetChannelPoint() *ChannelPoint {
if x != nil {
return x.ChannelPoint
}
return nil
}
func (x *AbandonChannelRequest) GetPendingFundingShimOnly() bool {
if x != nil {
return x.PendingFundingShimOnly
}
return false
}
func (x *AbandonChannelRequest) GetIKnowWhatIAmDoing() bool {
if x != nil {
return x.IKnowWhatIAmDoing
}
return false
}
type AbandonChannelResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *AbandonChannelResponse) Reset() {
*x = AbandonChannelResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[138]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AbandonChannelResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AbandonChannelResponse) ProtoMessage() {}
func (x *AbandonChannelResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[138]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AbandonChannelResponse.ProtoReflect.Descriptor instead.
func (*AbandonChannelResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{138}
}
type DebugLevelRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Show bool `protobuf:"varint,1,opt,name=show,proto3" json:"show,omitempty"`
LevelSpec string `protobuf:"bytes,2,opt,name=level_spec,json=levelSpec,proto3" json:"level_spec,omitempty"`
}
func (x *DebugLevelRequest) Reset() {
*x = DebugLevelRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[139]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DebugLevelRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DebugLevelRequest) ProtoMessage() {}
func (x *DebugLevelRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[139]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DebugLevelRequest.ProtoReflect.Descriptor instead.
func (*DebugLevelRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{139}
}
func (x *DebugLevelRequest) GetShow() bool {
if x != nil {
return x.Show
}
return false
}
func (x *DebugLevelRequest) GetLevelSpec() string {
if x != nil {
return x.LevelSpec
}
return ""
}
type DebugLevelResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SubSystems string `protobuf:"bytes,1,opt,name=sub_systems,json=subSystems,proto3" json:"sub_systems,omitempty"`
}
func (x *DebugLevelResponse) Reset() {
*x = DebugLevelResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[140]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DebugLevelResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DebugLevelResponse) ProtoMessage() {}
func (x *DebugLevelResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[140]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DebugLevelResponse.ProtoReflect.Descriptor instead.
func (*DebugLevelResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{140}
}
func (x *DebugLevelResponse) GetSubSystems() string {
if x != nil {
return x.SubSystems
}
return ""
}
type PayReqString struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The payment request string to be decoded
PayReq string `protobuf:"bytes,1,opt,name=pay_req,json=payReq,proto3" json:"pay_req,omitempty"`
}
func (x *PayReqString) Reset() {
*x = PayReqString{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[141]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PayReqString) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PayReqString) ProtoMessage() {}
func (x *PayReqString) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[141]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PayReqString.ProtoReflect.Descriptor instead.
func (*PayReqString) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{141}
}
func (x *PayReqString) GetPayReq() string {
if x != nil {
return x.PayReq
}
return ""
}
type PayReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
PaymentHash string `protobuf:"bytes,2,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
NumSatoshis int64 `protobuf:"varint,3,opt,name=num_satoshis,json=numSatoshis,proto3" json:"num_satoshis,omitempty"`
Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Expiry int64 `protobuf:"varint,5,opt,name=expiry,proto3" json:"expiry,omitempty"`
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
DescriptionHash string `protobuf:"bytes,7,opt,name=description_hash,json=descriptionHash,proto3" json:"description_hash,omitempty"`
FallbackAddr string `protobuf:"bytes,8,opt,name=fallback_addr,json=fallbackAddr,proto3" json:"fallback_addr,omitempty"`
CltvExpiry int64 `protobuf:"varint,9,opt,name=cltv_expiry,json=cltvExpiry,proto3" json:"cltv_expiry,omitempty"`
RouteHints []*RouteHint `protobuf:"bytes,10,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"`
PaymentAddr []byte `protobuf:"bytes,11,opt,name=payment_addr,json=paymentAddr,proto3" json:"payment_addr,omitempty"`
NumMsat int64 `protobuf:"varint,12,opt,name=num_msat,json=numMsat,proto3" json:"num_msat,omitempty"`
Features map[uint32]*Feature `protobuf:"bytes,13,rep,name=features,proto3" json:"features,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *PayReq) Reset() {
*x = PayReq{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[142]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PayReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PayReq) ProtoMessage() {}
func (x *PayReq) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[142]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PayReq.ProtoReflect.Descriptor instead.
func (*PayReq) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{142}
}
func (x *PayReq) GetDestination() string {
if x != nil {
return x.Destination
}
return ""
}
func (x *PayReq) GetPaymentHash() string {
if x != nil {
return x.PaymentHash
}
return ""
}
func (x *PayReq) GetNumSatoshis() int64 {
if x != nil {
return x.NumSatoshis
}
return 0
}
func (x *PayReq) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *PayReq) GetExpiry() int64 {
if x != nil {
return x.Expiry
}
return 0
}
func (x *PayReq) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *PayReq) GetDescriptionHash() string {
if x != nil {
return x.DescriptionHash
}
return ""
}
func (x *PayReq) GetFallbackAddr() string {
if x != nil {
return x.FallbackAddr
}
return ""
}
func (x *PayReq) GetCltvExpiry() int64 {
if x != nil {
return x.CltvExpiry
}
return 0
}
func (x *PayReq) GetRouteHints() []*RouteHint {
if x != nil {
return x.RouteHints
}
return nil
}
func (x *PayReq) GetPaymentAddr() []byte {
if x != nil {
return x.PaymentAddr
}
return nil
}
func (x *PayReq) GetNumMsat() int64 {
if x != nil {
return x.NumMsat
}
return 0
}
func (x *PayReq) GetFeatures() map[uint32]*Feature {
if x != nil {
return x.Features
}
return nil
}
type Feature struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
IsRequired bool `protobuf:"varint,3,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"`
IsKnown bool `protobuf:"varint,4,opt,name=is_known,json=isKnown,proto3" json:"is_known,omitempty"`
}
func (x *Feature) Reset() {
*x = Feature{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[143]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Feature) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Feature) ProtoMessage() {}
func (x *Feature) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[143]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Feature.ProtoReflect.Descriptor instead.
func (*Feature) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{143}
}
func (x *Feature) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Feature) GetIsRequired() bool {
if x != nil {
return x.IsRequired
}
return false
}
func (x *Feature) GetIsKnown() bool {
if x != nil {
return x.IsKnown
}
return false
}
type FeeReportRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *FeeReportRequest) Reset() {
*x = FeeReportRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[144]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FeeReportRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FeeReportRequest) ProtoMessage() {}
func (x *FeeReportRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[144]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FeeReportRequest.ProtoReflect.Descriptor instead.
func (*FeeReportRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{144}
}
type ChannelFeeReport struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The short channel id that this fee report belongs to.
ChanId uint64 `protobuf:"varint,5,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"`
// The channel that this fee report belongs to.
ChannelPoint string `protobuf:"bytes,1,opt,name=channel_point,json=channelPoint,proto3" json:"channel_point,omitempty"`
// The base fee charged regardless of the number of milli-satoshis sent.
BaseFeeMsat int64 `protobuf:"varint,2,opt,name=base_fee_msat,json=baseFeeMsat,proto3" json:"base_fee_msat,omitempty"`
// The amount charged per milli-satoshis transferred expressed in
// millionths of a satoshi.
FeePerMil int64 `protobuf:"varint,3,opt,name=fee_per_mil,json=feePerMil,proto3" json:"fee_per_mil,omitempty"`
// The effective fee rate in milli-satoshis. Computed by dividing the
// fee_per_mil value by 1 million.
FeeRate float64 `protobuf:"fixed64,4,opt,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"`
}
func (x *ChannelFeeReport) Reset() {
*x = ChannelFeeReport{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[145]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelFeeReport) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelFeeReport) ProtoMessage() {}
func (x *ChannelFeeReport) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[145]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelFeeReport.ProtoReflect.Descriptor instead.
func (*ChannelFeeReport) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{145}
}
func (x *ChannelFeeReport) GetChanId() uint64 {
if x != nil {
return x.ChanId
}
return 0
}
func (x *ChannelFeeReport) GetChannelPoint() string {
if x != nil {
return x.ChannelPoint
}
return ""
}
func (x *ChannelFeeReport) GetBaseFeeMsat() int64 {
if x != nil {
return x.BaseFeeMsat
}
return 0
}
func (x *ChannelFeeReport) GetFeePerMil() int64 {
if x != nil {
return x.FeePerMil
}
return 0
}
func (x *ChannelFeeReport) GetFeeRate() float64 {
if x != nil {
return x.FeeRate
}
return 0
}
type FeeReportResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// An array of channel fee reports which describes the current fee schedule
// for each channel.
ChannelFees []*ChannelFeeReport `protobuf:"bytes,1,rep,name=channel_fees,json=channelFees,proto3" json:"channel_fees,omitempty"`
// The total amount of fee revenue (in satoshis) the switch has collected
// over the past 24 hrs.
DayFeeSum uint64 `protobuf:"varint,2,opt,name=day_fee_sum,json=dayFeeSum,proto3" json:"day_fee_sum,omitempty"`
// The total amount of fee revenue (in satoshis) the switch has collected
// over the past 1 week.
WeekFeeSum uint64 `protobuf:"varint,3,opt,name=week_fee_sum,json=weekFeeSum,proto3" json:"week_fee_sum,omitempty"`
// The total amount of fee revenue (in satoshis) the switch has collected
// over the past 1 month.
MonthFeeSum uint64 `protobuf:"varint,4,opt,name=month_fee_sum,json=monthFeeSum,proto3" json:"month_fee_sum,omitempty"`
}
func (x *FeeReportResponse) Reset() {
*x = FeeReportResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[146]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FeeReportResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FeeReportResponse) ProtoMessage() {}
func (x *FeeReportResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[146]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FeeReportResponse.ProtoReflect.Descriptor instead.
func (*FeeReportResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{146}
}
func (x *FeeReportResponse) GetChannelFees() []*ChannelFeeReport {
if x != nil {
return x.ChannelFees
}
return nil
}
func (x *FeeReportResponse) GetDayFeeSum() uint64 {
if x != nil {
return x.DayFeeSum
}
return 0
}
func (x *FeeReportResponse) GetWeekFeeSum() uint64 {
if x != nil {
return x.WeekFeeSum
}
return 0
}
func (x *FeeReportResponse) GetMonthFeeSum() uint64 {
if x != nil {
return x.MonthFeeSum
}
return 0
}
type PolicyUpdateRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Scope:
// *PolicyUpdateRequest_Global
// *PolicyUpdateRequest_ChanPoint
Scope isPolicyUpdateRequest_Scope `protobuf_oneof:"scope"`
// The base fee charged regardless of the number of milli-satoshis sent.
BaseFeeMsat int64 `protobuf:"varint,3,opt,name=base_fee_msat,json=baseFeeMsat,proto3" json:"base_fee_msat,omitempty"`
// The effective fee rate in milli-satoshis. The precision of this value
// goes up to 6 decimal places, so 1e-6.
FeeRate float64 `protobuf:"fixed64,4,opt,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"`
// The required timelock delta for HTLCs forwarded over the channel.
TimeLockDelta uint32 `protobuf:"varint,5,opt,name=time_lock_delta,json=timeLockDelta,proto3" json:"time_lock_delta,omitempty"`
// If set, the maximum HTLC size in milli-satoshis. If unset, the maximum
// HTLC will be unchanged.
MaxHtlcMsat uint64 `protobuf:"varint,6,opt,name=max_htlc_msat,json=maxHtlcMsat,proto3" json:"max_htlc_msat,omitempty"`
// The minimum HTLC size in milli-satoshis. Only applied if
// min_htlc_msat_specified is true.
MinHtlcMsat uint64 `protobuf:"varint,7,opt,name=min_htlc_msat,json=minHtlcMsat,proto3" json:"min_htlc_msat,omitempty"`
// If true, min_htlc_msat is applied.
MinHtlcMsatSpecified bool `protobuf:"varint,8,opt,name=min_htlc_msat_specified,json=minHtlcMsatSpecified,proto3" json:"min_htlc_msat_specified,omitempty"`
}
func (x *PolicyUpdateRequest) Reset() {
*x = PolicyUpdateRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[147]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PolicyUpdateRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PolicyUpdateRequest) ProtoMessage() {}
func (x *PolicyUpdateRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[147]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PolicyUpdateRequest.ProtoReflect.Descriptor instead.
func (*PolicyUpdateRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{147}
}
func (m *PolicyUpdateRequest) GetScope() isPolicyUpdateRequest_Scope {
if m != nil {
return m.Scope
}
return nil
}
func (x *PolicyUpdateRequest) GetGlobal() bool {
if x, ok := x.GetScope().(*PolicyUpdateRequest_Global); ok {
return x.Global
}
return false
}
func (x *PolicyUpdateRequest) GetChanPoint() *ChannelPoint {
if x, ok := x.GetScope().(*PolicyUpdateRequest_ChanPoint); ok {
return x.ChanPoint
}
return nil
}
func (x *PolicyUpdateRequest) GetBaseFeeMsat() int64 {
if x != nil {
return x.BaseFeeMsat
}
return 0
}
func (x *PolicyUpdateRequest) GetFeeRate() float64 {
if x != nil {
return x.FeeRate
}
return 0
}
func (x *PolicyUpdateRequest) GetTimeLockDelta() uint32 {
if x != nil {
return x.TimeLockDelta
}
return 0
}
func (x *PolicyUpdateRequest) GetMaxHtlcMsat() uint64 {
if x != nil {
return x.MaxHtlcMsat
}
return 0
}
func (x *PolicyUpdateRequest) GetMinHtlcMsat() uint64 {
if x != nil {
return x.MinHtlcMsat
}
return 0
}
func (x *PolicyUpdateRequest) GetMinHtlcMsatSpecified() bool {
if x != nil {
return x.MinHtlcMsatSpecified
}
return false
}
type isPolicyUpdateRequest_Scope interface {
isPolicyUpdateRequest_Scope()
}
type PolicyUpdateRequest_Global struct {
// If set, then this update applies to all currently active channels.
Global bool `protobuf:"varint,1,opt,name=global,proto3,oneof"`
}
type PolicyUpdateRequest_ChanPoint struct {
// If set, this update will target a specific channel.
ChanPoint *ChannelPoint `protobuf:"bytes,2,opt,name=chan_point,json=chanPoint,proto3,oneof"`
}
func (*PolicyUpdateRequest_Global) isPolicyUpdateRequest_Scope() {}
func (*PolicyUpdateRequest_ChanPoint) isPolicyUpdateRequest_Scope() {}
type FailedUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The outpoint in format txid:n
Outpoint *OutPoint `protobuf:"bytes,1,opt,name=outpoint,proto3" json:"outpoint,omitempty"`
// Reason for the policy update failure.
Reason UpdateFailure `protobuf:"varint,2,opt,name=reason,proto3,enum=lnrpc.UpdateFailure" json:"reason,omitempty"`
// A string representation of the policy update error.
UpdateError string `protobuf:"bytes,3,opt,name=update_error,json=updateError,proto3" json:"update_error,omitempty"`
}
func (x *FailedUpdate) Reset() {
*x = FailedUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[148]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FailedUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FailedUpdate) ProtoMessage() {}
func (x *FailedUpdate) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[148]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FailedUpdate.ProtoReflect.Descriptor instead.
func (*FailedUpdate) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{148}
}
func (x *FailedUpdate) GetOutpoint() *OutPoint {
if x != nil {
return x.Outpoint
}
return nil
}
func (x *FailedUpdate) GetReason() UpdateFailure {
if x != nil {
return x.Reason
}
return UpdateFailure_UPDATE_FAILURE_UNKNOWN
}
func (x *FailedUpdate) GetUpdateError() string {
if x != nil {
return x.UpdateError
}
return ""
}
type PolicyUpdateResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// List of failed policy updates.
FailedUpdates []*FailedUpdate `protobuf:"bytes,1,rep,name=failed_updates,json=failedUpdates,proto3" json:"failed_updates,omitempty"`
}
func (x *PolicyUpdateResponse) Reset() {
*x = PolicyUpdateResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[149]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PolicyUpdateResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PolicyUpdateResponse) ProtoMessage() {}
func (x *PolicyUpdateResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[149]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PolicyUpdateResponse.ProtoReflect.Descriptor instead.
func (*PolicyUpdateResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{149}
}
func (x *PolicyUpdateResponse) GetFailedUpdates() []*FailedUpdate {
if x != nil {
return x.FailedUpdates
}
return nil
}
type ForwardingHistoryRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Start time is the starting point of the forwarding history request. All
// records beyond this point will be included, respecting the end time, and
// the index offset.
StartTime uint64 `protobuf:"varint,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
// End time is the end point of the forwarding history request. The
// response will carry at most 50k records between the start time and the
// end time. The index offset can be used to implement pagination.
EndTime uint64 `protobuf:"varint,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
// Index offset is the offset in the time series to start at. As each
// response can only contain 50k records, callers can use this to skip
// around within a packed time series.
IndexOffset uint32 `protobuf:"varint,3,opt,name=index_offset,json=indexOffset,proto3" json:"index_offset,omitempty"`
// The max number of events to return in the response to this query.
NumMaxEvents uint32 `protobuf:"varint,4,opt,name=num_max_events,json=numMaxEvents,proto3" json:"num_max_events,omitempty"`
}
func (x *ForwardingHistoryRequest) Reset() {
*x = ForwardingHistoryRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[150]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ForwardingHistoryRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ForwardingHistoryRequest) ProtoMessage() {}
func (x *ForwardingHistoryRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[150]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ForwardingHistoryRequest.ProtoReflect.Descriptor instead.
func (*ForwardingHistoryRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{150}
}
func (x *ForwardingHistoryRequest) GetStartTime() uint64 {
if x != nil {
return x.StartTime
}
return 0
}
func (x *ForwardingHistoryRequest) GetEndTime() uint64 {
if x != nil {
return x.EndTime
}
return 0
}
func (x *ForwardingHistoryRequest) GetIndexOffset() uint32 {
if x != nil {
return x.IndexOffset
}
return 0
}
func (x *ForwardingHistoryRequest) GetNumMaxEvents() uint32 {
if x != nil {
return x.NumMaxEvents
}
return 0
}
type ForwardingEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Timestamp is the time (unix epoch offset) that this circuit was
// completed. Deprecated by timestamp_ns.
//
// Deprecated: Do not use.
Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// The incoming channel ID that carried the HTLC that created the circuit.
ChanIdIn uint64 `protobuf:"varint,2,opt,name=chan_id_in,json=chanIdIn,proto3" json:"chan_id_in,omitempty"`
// The outgoing channel ID that carried the preimage that completed the
// circuit.
ChanIdOut uint64 `protobuf:"varint,4,opt,name=chan_id_out,json=chanIdOut,proto3" json:"chan_id_out,omitempty"`
// The total amount (in satoshis) of the incoming HTLC that created half
// the circuit.
AmtIn uint64 `protobuf:"varint,5,opt,name=amt_in,json=amtIn,proto3" json:"amt_in,omitempty"`
// The total amount (in satoshis) of the outgoing HTLC that created the
// second half of the circuit.
AmtOut uint64 `protobuf:"varint,6,opt,name=amt_out,json=amtOut,proto3" json:"amt_out,omitempty"`
// The total fee (in satoshis) that this payment circuit carried.
Fee uint64 `protobuf:"varint,7,opt,name=fee,proto3" json:"fee,omitempty"`
// The total fee (in milli-satoshis) that this payment circuit carried.
FeeMsat uint64 `protobuf:"varint,8,opt,name=fee_msat,json=feeMsat,proto3" json:"fee_msat,omitempty"`
// The total amount (in milli-satoshis) of the incoming HTLC that created
// half the circuit.
AmtInMsat uint64 `protobuf:"varint,9,opt,name=amt_in_msat,json=amtInMsat,proto3" json:"amt_in_msat,omitempty"`
// The total amount (in milli-satoshis) of the outgoing HTLC that created
// the second half of the circuit.
AmtOutMsat uint64 `protobuf:"varint,10,opt,name=amt_out_msat,json=amtOutMsat,proto3" json:"amt_out_msat,omitempty"`
// The number of nanoseconds elapsed since January 1, 1970 UTC when this
// circuit was completed.
TimestampNs uint64 `protobuf:"varint,11,opt,name=timestamp_ns,json=timestampNs,proto3" json:"timestamp_ns,omitempty"`
}
func (x *ForwardingEvent) Reset() {
*x = ForwardingEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[151]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ForwardingEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ForwardingEvent) ProtoMessage() {}
func (x *ForwardingEvent) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[151]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ForwardingEvent.ProtoReflect.Descriptor instead.
func (*ForwardingEvent) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{151}
}
// Deprecated: Do not use.
func (x *ForwardingEvent) GetTimestamp() uint64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *ForwardingEvent) GetChanIdIn() uint64 {
if x != nil {
return x.ChanIdIn
}
return 0
}
func (x *ForwardingEvent) GetChanIdOut() uint64 {
if x != nil {
return x.ChanIdOut
}
return 0
}
func (x *ForwardingEvent) GetAmtIn() uint64 {
if x != nil {
return x.AmtIn
}
return 0
}
func (x *ForwardingEvent) GetAmtOut() uint64 {
if x != nil {
return x.AmtOut
}
return 0
}
func (x *ForwardingEvent) GetFee() uint64 {
if x != nil {
return x.Fee
}
return 0
}
func (x *ForwardingEvent) GetFeeMsat() uint64 {
if x != nil {
return x.FeeMsat
}
return 0
}
func (x *ForwardingEvent) GetAmtInMsat() uint64 {
if x != nil {
return x.AmtInMsat
}
return 0
}
func (x *ForwardingEvent) GetAmtOutMsat() uint64 {
if x != nil {
return x.AmtOutMsat
}
return 0
}
func (x *ForwardingEvent) GetTimestampNs() uint64 {
if x != nil {
return x.TimestampNs
}
return 0
}
type ForwardingHistoryResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A list of forwarding events from the time slice of the time series
// specified in the request.
ForwardingEvents []*ForwardingEvent `protobuf:"bytes,1,rep,name=forwarding_events,json=forwardingEvents,proto3" json:"forwarding_events,omitempty"`
// The index of the last time in the set of returned forwarding events. Can
// be used to seek further, pagination style.
LastOffsetIndex uint32 `protobuf:"varint,2,opt,name=last_offset_index,json=lastOffsetIndex,proto3" json:"last_offset_index,omitempty"`
}
func (x *ForwardingHistoryResponse) Reset() {
*x = ForwardingHistoryResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[152]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ForwardingHistoryResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ForwardingHistoryResponse) ProtoMessage() {}
func (x *ForwardingHistoryResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[152]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ForwardingHistoryResponse.ProtoReflect.Descriptor instead.
func (*ForwardingHistoryResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{152}
}
func (x *ForwardingHistoryResponse) GetForwardingEvents() []*ForwardingEvent {
if x != nil {
return x.ForwardingEvents
}
return nil
}
func (x *ForwardingHistoryResponse) GetLastOffsetIndex() uint32 {
if x != nil {
return x.LastOffsetIndex
}
return 0
}
type ExportChannelBackupRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The target channel point to obtain a back up for.
ChanPoint *ChannelPoint `protobuf:"bytes,1,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"`
}
func (x *ExportChannelBackupRequest) Reset() {
*x = ExportChannelBackupRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[153]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExportChannelBackupRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExportChannelBackupRequest) ProtoMessage() {}
func (x *ExportChannelBackupRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[153]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExportChannelBackupRequest.ProtoReflect.Descriptor instead.
func (*ExportChannelBackupRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{153}
}
func (x *ExportChannelBackupRequest) GetChanPoint() *ChannelPoint {
if x != nil {
return x.ChanPoint
}
return nil
}
type ChannelBackup struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//Identifies the channel that this backup belongs to.
ChanPoint *ChannelPoint `protobuf:"bytes,1,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"`
//
//Is an encrypted single-chan backup. this can be passed to
//RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in
//order to trigger the recovery protocol. When using REST, this field must be
//encoded as base64.
ChanBackup []byte `protobuf:"bytes,2,opt,name=chan_backup,json=chanBackup,proto3" json:"chan_backup,omitempty"`
}
func (x *ChannelBackup) Reset() {
*x = ChannelBackup{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[154]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelBackup) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelBackup) ProtoMessage() {}
func (x *ChannelBackup) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[154]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelBackup.ProtoReflect.Descriptor instead.
func (*ChannelBackup) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{154}
}
func (x *ChannelBackup) GetChanPoint() *ChannelPoint {
if x != nil {
return x.ChanPoint
}
return nil
}
func (x *ChannelBackup) GetChanBackup() []byte {
if x != nil {
return x.ChanBackup
}
return nil
}
type MultiChanBackup struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//Is the set of all channels that are included in this multi-channel backup.
ChanPoints []*ChannelPoint `protobuf:"bytes,1,rep,name=chan_points,json=chanPoints,proto3" json:"chan_points,omitempty"`
//
//A single encrypted blob containing all the static channel backups of the
//channel listed above. This can be stored as a single file or blob, and
//safely be replaced with any prior/future versions. When using REST, this
//field must be encoded as base64.
MultiChanBackup []byte `protobuf:"bytes,2,opt,name=multi_chan_backup,json=multiChanBackup,proto3" json:"multi_chan_backup,omitempty"`
}
func (x *MultiChanBackup) Reset() {
*x = MultiChanBackup{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[155]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiChanBackup) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiChanBackup) ProtoMessage() {}
func (x *MultiChanBackup) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[155]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MultiChanBackup.ProtoReflect.Descriptor instead.
func (*MultiChanBackup) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{155}
}
func (x *MultiChanBackup) GetChanPoints() []*ChannelPoint {
if x != nil {
return x.ChanPoints
}
return nil
}
func (x *MultiChanBackup) GetMultiChanBackup() []byte {
if x != nil {
return x.MultiChanBackup
}
return nil
}
type ChanBackupExportRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ChanBackupExportRequest) Reset() {
*x = ChanBackupExportRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[156]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChanBackupExportRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChanBackupExportRequest) ProtoMessage() {}
func (x *ChanBackupExportRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[156]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChanBackupExportRequest.ProtoReflect.Descriptor instead.
func (*ChanBackupExportRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{156}
}
type ChanBackupSnapshot struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The set of new channels that have been added since the last channel backup
//snapshot was requested.
SingleChanBackups *ChannelBackups `protobuf:"bytes,1,opt,name=single_chan_backups,json=singleChanBackups,proto3" json:"single_chan_backups,omitempty"`
//
//A multi-channel backup that covers all open channels currently known to
//lnd.
MultiChanBackup *MultiChanBackup `protobuf:"bytes,2,opt,name=multi_chan_backup,json=multiChanBackup,proto3" json:"multi_chan_backup,omitempty"`
}
func (x *ChanBackupSnapshot) Reset() {
*x = ChanBackupSnapshot{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[157]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChanBackupSnapshot) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChanBackupSnapshot) ProtoMessage() {}
func (x *ChanBackupSnapshot) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[157]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChanBackupSnapshot.ProtoReflect.Descriptor instead.
func (*ChanBackupSnapshot) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{157}
}
func (x *ChanBackupSnapshot) GetSingleChanBackups() *ChannelBackups {
if x != nil {
return x.SingleChanBackups
}
return nil
}
func (x *ChanBackupSnapshot) GetMultiChanBackup() *MultiChanBackup {
if x != nil {
return x.MultiChanBackup
}
return nil
}
type ChannelBackups struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//A set of single-chan static channel backups.
ChanBackups []*ChannelBackup `protobuf:"bytes,1,rep,name=chan_backups,json=chanBackups,proto3" json:"chan_backups,omitempty"`
}
func (x *ChannelBackups) Reset() {
*x = ChannelBackups{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[158]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelBackups) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelBackups) ProtoMessage() {}
func (x *ChannelBackups) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[158]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelBackups.ProtoReflect.Descriptor instead.
func (*ChannelBackups) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{158}
}
func (x *ChannelBackups) GetChanBackups() []*ChannelBackup {
if x != nil {
return x.ChanBackups
}
return nil
}
type RestoreChanBackupRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Backup:
// *RestoreChanBackupRequest_ChanBackups
// *RestoreChanBackupRequest_MultiChanBackup
Backup isRestoreChanBackupRequest_Backup `protobuf_oneof:"backup"`
}
func (x *RestoreChanBackupRequest) Reset() {
*x = RestoreChanBackupRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[159]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RestoreChanBackupRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RestoreChanBackupRequest) ProtoMessage() {}
func (x *RestoreChanBackupRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[159]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RestoreChanBackupRequest.ProtoReflect.Descriptor instead.
func (*RestoreChanBackupRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{159}
}
func (m *RestoreChanBackupRequest) GetBackup() isRestoreChanBackupRequest_Backup {
if m != nil {
return m.Backup
}
return nil
}
func (x *RestoreChanBackupRequest) GetChanBackups() *ChannelBackups {
if x, ok := x.GetBackup().(*RestoreChanBackupRequest_ChanBackups); ok {
return x.ChanBackups
}
return nil
}
func (x *RestoreChanBackupRequest) GetMultiChanBackup() []byte {
if x, ok := x.GetBackup().(*RestoreChanBackupRequest_MultiChanBackup); ok {
return x.MultiChanBackup
}
return nil
}
type isRestoreChanBackupRequest_Backup interface {
isRestoreChanBackupRequest_Backup()
}
type RestoreChanBackupRequest_ChanBackups struct {
//
//The channels to restore as a list of channel/backup pairs.
ChanBackups *ChannelBackups `protobuf:"bytes,1,opt,name=chan_backups,json=chanBackups,proto3,oneof"`
}
type RestoreChanBackupRequest_MultiChanBackup struct {
//
//The channels to restore in the packed multi backup format. When using
//REST, this field must be encoded as base64.
MultiChanBackup []byte `protobuf:"bytes,2,opt,name=multi_chan_backup,json=multiChanBackup,proto3,oneof"`
}
func (*RestoreChanBackupRequest_ChanBackups) isRestoreChanBackupRequest_Backup() {}
func (*RestoreChanBackupRequest_MultiChanBackup) isRestoreChanBackupRequest_Backup() {}
type RestoreBackupResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *RestoreBackupResponse) Reset() {
*x = RestoreBackupResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[160]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RestoreBackupResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RestoreBackupResponse) ProtoMessage() {}
func (x *RestoreBackupResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[160]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RestoreBackupResponse.ProtoReflect.Descriptor instead.
func (*RestoreBackupResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{160}
}
type ChannelBackupSubscription struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ChannelBackupSubscription) Reset() {
*x = ChannelBackupSubscription{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[161]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelBackupSubscription) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelBackupSubscription) ProtoMessage() {}
func (x *ChannelBackupSubscription) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[161]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelBackupSubscription.ProtoReflect.Descriptor instead.
func (*ChannelBackupSubscription) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{161}
}
type VerifyChanBackupResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *VerifyChanBackupResponse) Reset() {
*x = VerifyChanBackupResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[162]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VerifyChanBackupResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VerifyChanBackupResponse) ProtoMessage() {}
func (x *VerifyChanBackupResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[162]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VerifyChanBackupResponse.ProtoReflect.Descriptor instead.
func (*VerifyChanBackupResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{162}
}
type MacaroonPermission struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The entity a permission grants access to.
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
// The action that is granted.
Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
}
func (x *MacaroonPermission) Reset() {
*x = MacaroonPermission{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[163]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MacaroonPermission) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MacaroonPermission) ProtoMessage() {}
func (x *MacaroonPermission) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[163]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MacaroonPermission.ProtoReflect.Descriptor instead.
func (*MacaroonPermission) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{163}
}
func (x *MacaroonPermission) GetEntity() string {
if x != nil {
return x.Entity
}
return ""
}
func (x *MacaroonPermission) GetAction() string {
if x != nil {
return x.Action
}
return ""
}
type BakeMacaroonRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of permissions the new macaroon should grant.
Permissions []*MacaroonPermission `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"`
// The root key ID used to create the macaroon, must be a positive integer.
RootKeyId uint64 `protobuf:"varint,2,opt,name=root_key_id,json=rootKeyId,proto3" json:"root_key_id,omitempty"`
//
//Informs the RPC on whether to allow external permissions that LND is not
//aware of.
AllowExternalPermissions bool `protobuf:"varint,3,opt,name=allow_external_permissions,json=allowExternalPermissions,proto3" json:"allow_external_permissions,omitempty"`
}
func (x *BakeMacaroonRequest) Reset() {
*x = BakeMacaroonRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[164]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BakeMacaroonRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BakeMacaroonRequest) ProtoMessage() {}
func (x *BakeMacaroonRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[164]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BakeMacaroonRequest.ProtoReflect.Descriptor instead.
func (*BakeMacaroonRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{164}
}
func (x *BakeMacaroonRequest) GetPermissions() []*MacaroonPermission {
if x != nil {
return x.Permissions
}
return nil
}
func (x *BakeMacaroonRequest) GetRootKeyId() uint64 {
if x != nil {
return x.RootKeyId
}
return 0
}
func (x *BakeMacaroonRequest) GetAllowExternalPermissions() bool {
if x != nil {
return x.AllowExternalPermissions
}
return false
}
type BakeMacaroonResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The hex encoded macaroon, serialized in binary format.
Macaroon string `protobuf:"bytes,1,opt,name=macaroon,proto3" json:"macaroon,omitempty"`
}
func (x *BakeMacaroonResponse) Reset() {
*x = BakeMacaroonResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[165]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BakeMacaroonResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BakeMacaroonResponse) ProtoMessage() {}
func (x *BakeMacaroonResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[165]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BakeMacaroonResponse.ProtoReflect.Descriptor instead.
func (*BakeMacaroonResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{165}
}
func (x *BakeMacaroonResponse) GetMacaroon() string {
if x != nil {
return x.Macaroon
}
return ""
}
type ListMacaroonIDsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ListMacaroonIDsRequest) Reset() {
*x = ListMacaroonIDsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[166]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListMacaroonIDsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListMacaroonIDsRequest) ProtoMessage() {}
func (x *ListMacaroonIDsRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[166]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListMacaroonIDsRequest.ProtoReflect.Descriptor instead.
func (*ListMacaroonIDsRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{166}
}
type ListMacaroonIDsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of root key IDs that are in use.
RootKeyIds []uint64 `protobuf:"varint,1,rep,packed,name=root_key_ids,json=rootKeyIds,proto3" json:"root_key_ids,omitempty"`
}
func (x *ListMacaroonIDsResponse) Reset() {
*x = ListMacaroonIDsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[167]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListMacaroonIDsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListMacaroonIDsResponse) ProtoMessage() {}
func (x *ListMacaroonIDsResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[167]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListMacaroonIDsResponse.ProtoReflect.Descriptor instead.
func (*ListMacaroonIDsResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{167}
}
func (x *ListMacaroonIDsResponse) GetRootKeyIds() []uint64 {
if x != nil {
return x.RootKeyIds
}
return nil
}
type DeleteMacaroonIDRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The root key ID to be removed.
RootKeyId uint64 `protobuf:"varint,1,opt,name=root_key_id,json=rootKeyId,proto3" json:"root_key_id,omitempty"`
}
func (x *DeleteMacaroonIDRequest) Reset() {
*x = DeleteMacaroonIDRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[168]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteMacaroonIDRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteMacaroonIDRequest) ProtoMessage() {}
func (x *DeleteMacaroonIDRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[168]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteMacaroonIDRequest.ProtoReflect.Descriptor instead.
func (*DeleteMacaroonIDRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{168}
}
func (x *DeleteMacaroonIDRequest) GetRootKeyId() uint64 {
if x != nil {
return x.RootKeyId
}
return 0
}
type DeleteMacaroonIDResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A boolean indicates that the deletion is successful.
Deleted bool `protobuf:"varint,1,opt,name=deleted,proto3" json:"deleted,omitempty"`
}
func (x *DeleteMacaroonIDResponse) Reset() {
*x = DeleteMacaroonIDResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[169]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteMacaroonIDResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteMacaroonIDResponse) ProtoMessage() {}
func (x *DeleteMacaroonIDResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[169]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteMacaroonIDResponse.ProtoReflect.Descriptor instead.
func (*DeleteMacaroonIDResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{169}
}
func (x *DeleteMacaroonIDResponse) GetDeleted() bool {
if x != nil {
return x.Deleted
}
return false
}
type MacaroonPermissionList struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A list of macaroon permissions.
Permissions []*MacaroonPermission `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"`
}
func (x *MacaroonPermissionList) Reset() {
*x = MacaroonPermissionList{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[170]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MacaroonPermissionList) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MacaroonPermissionList) ProtoMessage() {}
func (x *MacaroonPermissionList) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[170]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MacaroonPermissionList.ProtoReflect.Descriptor instead.
func (*MacaroonPermissionList) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{170}
}
func (x *MacaroonPermissionList) GetPermissions() []*MacaroonPermission {
if x != nil {
return x.Permissions
}
return nil
}
type ListPermissionsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ListPermissionsRequest) Reset() {
*x = ListPermissionsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[171]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPermissionsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPermissionsRequest) ProtoMessage() {}
func (x *ListPermissionsRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[171]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPermissionsRequest.ProtoReflect.Descriptor instead.
func (*ListPermissionsRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{171}
}
type ListPermissionsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//A map between all RPC method URIs and their required macaroon permissions to
//access them.
MethodPermissions map[string]*MacaroonPermissionList `protobuf:"bytes,1,rep,name=method_permissions,json=methodPermissions,proto3" json:"method_permissions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *ListPermissionsResponse) Reset() {
*x = ListPermissionsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[172]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPermissionsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPermissionsResponse) ProtoMessage() {}
func (x *ListPermissionsResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[172]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPermissionsResponse.ProtoReflect.Descriptor instead.
func (*ListPermissionsResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{172}
}
func (x *ListPermissionsResponse) GetMethodPermissions() map[string]*MacaroonPermissionList {
if x != nil {
return x.MethodPermissions
}
return nil
}
type Failure struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Failure code as defined in the Lightning spec
Code Failure_FailureCode `protobuf:"varint,1,opt,name=code,proto3,enum=lnrpc.Failure_FailureCode" json:"code,omitempty"`
// An optional channel update message.
ChannelUpdate *ChannelUpdate `protobuf:"bytes,3,opt,name=channel_update,json=channelUpdate,proto3" json:"channel_update,omitempty"`
// A failure type-dependent htlc value.
HtlcMsat uint64 `protobuf:"varint,4,opt,name=htlc_msat,json=htlcMsat,proto3" json:"htlc_msat,omitempty"`
// The sha256 sum of the onion payload.
OnionSha_256 []byte `protobuf:"bytes,5,opt,name=onion_sha_256,json=onionSha256,proto3" json:"onion_sha_256,omitempty"`
// A failure type-dependent cltv expiry value.
CltvExpiry uint32 `protobuf:"varint,6,opt,name=cltv_expiry,json=cltvExpiry,proto3" json:"cltv_expiry,omitempty"`
// A failure type-dependent flags value.
Flags uint32 `protobuf:"varint,7,opt,name=flags,proto3" json:"flags,omitempty"`
//
//The position in the path of the intermediate or final node that generated
//the failure message. Position zero is the sender node.
FailureSourceIndex uint32 `protobuf:"varint,8,opt,name=failure_source_index,json=failureSourceIndex,proto3" json:"failure_source_index,omitempty"`
// A failure type-dependent block height.
Height uint32 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"`
}
func (x *Failure) Reset() {
*x = Failure{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[173]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Failure) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Failure) ProtoMessage() {}
func (x *Failure) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[173]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Failure.ProtoReflect.Descriptor instead.
func (*Failure) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{173}
}
func (x *Failure) GetCode() Failure_FailureCode {
if x != nil {
return x.Code
}
return Failure_RESERVED
}
func (x *Failure) GetChannelUpdate() *ChannelUpdate {
if x != nil {
return x.ChannelUpdate
}
return nil
}
func (x *Failure) GetHtlcMsat() uint64 {
if x != nil {
return x.HtlcMsat
}
return 0
}
func (x *Failure) GetOnionSha_256() []byte {
if x != nil {
return x.OnionSha_256
}
return nil
}
func (x *Failure) GetCltvExpiry() uint32 {
if x != nil {
return x.CltvExpiry
}
return 0
}
func (x *Failure) GetFlags() uint32 {
if x != nil {
return x.Flags
}
return 0
}
func (x *Failure) GetFailureSourceIndex() uint32 {
if x != nil {
return x.FailureSourceIndex
}
return 0
}
func (x *Failure) GetHeight() uint32 {
if x != nil {
return x.Height
}
return 0
}
type ChannelUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The signature that validates the announced data and proves the ownership
//of node id.
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
//
//The target chain that this channel was opened within. This value
//should be the genesis hash of the target chain. Along with the short
//channel ID, this uniquely identifies the channel globally in a
//blockchain.
ChainHash []byte `protobuf:"bytes,2,opt,name=chain_hash,json=chainHash,proto3" json:"chain_hash,omitempty"`
//
//The unique description of the funding transaction.
ChanId uint64 `protobuf:"varint,3,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"`
//
//A timestamp that allows ordering in the case of multiple announcements.
//We should ignore the message if timestamp is not greater than the
//last-received.
Timestamp uint32 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
//
//The bitfield that describes whether optional fields are present in this
//update. Currently, the least-significant bit must be set to 1 if the
//optional field MaxHtlc is present.
MessageFlags uint32 `protobuf:"varint,10,opt,name=message_flags,json=messageFlags,proto3" json:"message_flags,omitempty"`
//
//The bitfield that describes additional meta-data concerning how the
//update is to be interpreted. Currently, the least-significant bit must be
//set to 0 if the creating node corresponds to the first node in the
//previously sent channel announcement and 1 otherwise. If the second bit
//is set, then the channel is set to be disabled.
ChannelFlags uint32 `protobuf:"varint,5,opt,name=channel_flags,json=channelFlags,proto3" json:"channel_flags,omitempty"`
//
//The minimum number of blocks this node requires to be added to the expiry
//of HTLCs. This is a security parameter determined by the node operator.
//This value represents the required gap between the time locks of the
//incoming and outgoing HTLC's set to this node.
TimeLockDelta uint32 `protobuf:"varint,6,opt,name=time_lock_delta,json=timeLockDelta,proto3" json:"time_lock_delta,omitempty"`
//
//The minimum HTLC value which will be accepted.
HtlcMinimumMsat uint64 `protobuf:"varint,7,opt,name=htlc_minimum_msat,json=htlcMinimumMsat,proto3" json:"htlc_minimum_msat,omitempty"`
//
//The base fee that must be used for incoming HTLC's to this particular
//channel. This value will be tacked onto the required for a payment
//independent of the size of the payment.
BaseFee uint32 `protobuf:"varint,8,opt,name=base_fee,json=baseFee,proto3" json:"base_fee,omitempty"`
//
//The fee rate that will be charged per millionth of a satoshi.
FeeRate uint32 `protobuf:"varint,9,opt,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"`
//
//The maximum HTLC value which will be accepted.
HtlcMaximumMsat uint64 `protobuf:"varint,11,opt,name=htlc_maximum_msat,json=htlcMaximumMsat,proto3" json:"htlc_maximum_msat,omitempty"`
//
//The set of data that was appended to this message, some of which we may
//not actually know how to iterate or parse. By holding onto this data, we
//ensure that we're able to properly validate the set of signatures that
//cover these new fields, and ensure we're able to make upgrades to the
//network in a forwards compatible manner.
ExtraOpaqueData []byte `protobuf:"bytes,12,opt,name=extra_opaque_data,json=extraOpaqueData,proto3" json:"extra_opaque_data,omitempty"`
}
func (x *ChannelUpdate) Reset() {
*x = ChannelUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[174]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelUpdate) ProtoMessage() {}
func (x *ChannelUpdate) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[174]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelUpdate.ProtoReflect.Descriptor instead.
func (*ChannelUpdate) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{174}
}
func (x *ChannelUpdate) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
func (x *ChannelUpdate) GetChainHash() []byte {
if x != nil {
return x.ChainHash
}
return nil
}
func (x *ChannelUpdate) GetChanId() uint64 {
if x != nil {
return x.ChanId
}
return 0
}
func (x *ChannelUpdate) GetTimestamp() uint32 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *ChannelUpdate) GetMessageFlags() uint32 {
if x != nil {
return x.MessageFlags
}
return 0
}
func (x *ChannelUpdate) GetChannelFlags() uint32 {
if x != nil {
return x.ChannelFlags
}
return 0
}
func (x *ChannelUpdate) GetTimeLockDelta() uint32 {
if x != nil {
return x.TimeLockDelta
}
return 0
}
func (x *ChannelUpdate) GetHtlcMinimumMsat() uint64 {
if x != nil {
return x.HtlcMinimumMsat
}
return 0
}
func (x *ChannelUpdate) GetBaseFee() uint32 {
if x != nil {
return x.BaseFee
}
return 0
}
func (x *ChannelUpdate) GetFeeRate() uint32 {
if x != nil {
return x.FeeRate
}
return 0
}
func (x *ChannelUpdate) GetHtlcMaximumMsat() uint64 {
if x != nil {
return x.HtlcMaximumMsat
}
return 0
}
func (x *ChannelUpdate) GetExtraOpaqueData() []byte {
if x != nil {
return x.ExtraOpaqueData
}
return nil
}
type MacaroonId struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"`
StorageId []byte `protobuf:"bytes,2,opt,name=storageId,proto3" json:"storageId,omitempty"`
Ops []*Op `protobuf:"bytes,3,rep,name=ops,proto3" json:"ops,omitempty"`
}
func (x *MacaroonId) Reset() {
*x = MacaroonId{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[175]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MacaroonId) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MacaroonId) ProtoMessage() {}
func (x *MacaroonId) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[175]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MacaroonId.ProtoReflect.Descriptor instead.
func (*MacaroonId) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{175}
}
func (x *MacaroonId) GetNonce() []byte {
if x != nil {
return x.Nonce
}
return nil
}
func (x *MacaroonId) GetStorageId() []byte {
if x != nil {
return x.StorageId
}
return nil
}
func (x *MacaroonId) GetOps() []*Op {
if x != nil {
return x.Ops
}
return nil
}
type Op struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
Actions []string `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"`
}
func (x *Op) Reset() {
*x = Op{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[176]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Op) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Op) ProtoMessage() {}
func (x *Op) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[176]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Op.ProtoReflect.Descriptor instead.
func (*Op) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{176}
}
func (x *Op) GetEntity() string {
if x != nil {
return x.Entity
}
return ""
}
func (x *Op) GetActions() []string {
if x != nil {
return x.Actions
}
return nil
}
type CheckMacPermRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Macaroon []byte `protobuf:"bytes,1,opt,name=macaroon,proto3" json:"macaroon,omitempty"`
Permissions []*MacaroonPermission `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions,omitempty"`
FullMethod string `protobuf:"bytes,3,opt,name=fullMethod,proto3" json:"fullMethod,omitempty"`
}
func (x *CheckMacPermRequest) Reset() {
*x = CheckMacPermRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[177]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CheckMacPermRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CheckMacPermRequest) ProtoMessage() {}
func (x *CheckMacPermRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[177]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CheckMacPermRequest.ProtoReflect.Descriptor instead.
func (*CheckMacPermRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{177}
}
func (x *CheckMacPermRequest) GetMacaroon() []byte {
if x != nil {
return x.Macaroon
}
return nil
}
func (x *CheckMacPermRequest) GetPermissions() []*MacaroonPermission {
if x != nil {
return x.Permissions
}
return nil
}
func (x *CheckMacPermRequest) GetFullMethod() string {
if x != nil {
return x.FullMethod
}
return ""
}
type CheckMacPermResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
}
func (x *CheckMacPermResponse) Reset() {
*x = CheckMacPermResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[178]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CheckMacPermResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CheckMacPermResponse) ProtoMessage() {}
func (x *CheckMacPermResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[178]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CheckMacPermResponse.ProtoReflect.Descriptor instead.
func (*CheckMacPermResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{178}
}
func (x *CheckMacPermResponse) GetValid() bool {
if x != nil {
return x.Valid
}
return false
}
type RPCMiddlewareRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The unique ID of the intercepted original gRPC request. Useful for mapping
//request to response when implementing full duplex message interception. For
//streaming requests, this will be the same ID for all incoming and outgoing
//middleware intercept messages of the _same_ stream.
RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
//
//The raw bytes of the complete macaroon as sent by the gRPC client in the
//original request. This might be empty for a request that doesn't require
//macaroons such as the wallet unlocker RPCs.
RawMacaroon []byte `protobuf:"bytes,2,opt,name=raw_macaroon,json=rawMacaroon,proto3" json:"raw_macaroon,omitempty"`
//
//The parsed condition of the macaroon's custom caveat for convenient access.
//This field only contains the value of the custom caveat that the handling
//middleware has registered itself for. The condition _must_ be validated for
//messages of intercept_type stream_auth and request!
CustomCaveatCondition string `protobuf:"bytes,3,opt,name=custom_caveat_condition,json=customCaveatCondition,proto3" json:"custom_caveat_condition,omitempty"`
//
//There are three types of messages that will be sent to the middleware for
//inspection and approval: Stream authentication, request and response
//interception. The first two can only be accepted (=forward to main RPC
//server) or denied (=return error to client). Intercepted responses can also
//be replaced/overwritten.
//
// Types that are assignable to InterceptType:
// *RPCMiddlewareRequest_StreamAuth
// *RPCMiddlewareRequest_Request
// *RPCMiddlewareRequest_Response
InterceptType isRPCMiddlewareRequest_InterceptType `protobuf_oneof:"intercept_type"`
//
//The unique message ID of this middleware intercept message. There can be
//multiple middleware intercept messages per single gRPC request (one for the
//incoming request and one for the outgoing response) or gRPC stream (one for
//each incoming message and one for each outgoing response). This message ID
//must be referenced when responding (accepting/rejecting/modifying) to an
//intercept message.
MsgId uint64 `protobuf:"varint,7,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"`
}
func (x *RPCMiddlewareRequest) Reset() {
*x = RPCMiddlewareRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[179]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RPCMiddlewareRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RPCMiddlewareRequest) ProtoMessage() {}
func (x *RPCMiddlewareRequest) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[179]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RPCMiddlewareRequest.ProtoReflect.Descriptor instead.
func (*RPCMiddlewareRequest) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{179}
}
func (x *RPCMiddlewareRequest) GetRequestId() uint64 {
if x != nil {
return x.RequestId
}
return 0
}
func (x *RPCMiddlewareRequest) GetRawMacaroon() []byte {
if x != nil {
return x.RawMacaroon
}
return nil
}
func (x *RPCMiddlewareRequest) GetCustomCaveatCondition() string {
if x != nil {
return x.CustomCaveatCondition
}
return ""
}
func (m *RPCMiddlewareRequest) GetInterceptType() isRPCMiddlewareRequest_InterceptType {
if m != nil {
return m.InterceptType
}
return nil
}
func (x *RPCMiddlewareRequest) GetStreamAuth() *StreamAuth {
if x, ok := x.GetInterceptType().(*RPCMiddlewareRequest_StreamAuth); ok {
return x.StreamAuth
}
return nil
}
func (x *RPCMiddlewareRequest) GetRequest() *RPCMessage {
if x, ok := x.GetInterceptType().(*RPCMiddlewareRequest_Request); ok {
return x.Request
}
return nil
}
func (x *RPCMiddlewareRequest) GetResponse() *RPCMessage {
if x, ok := x.GetInterceptType().(*RPCMiddlewareRequest_Response); ok {
return x.Response
}
return nil
}
func (x *RPCMiddlewareRequest) GetMsgId() uint64 {
if x != nil {
return x.MsgId
}
return 0
}
type isRPCMiddlewareRequest_InterceptType interface {
isRPCMiddlewareRequest_InterceptType()
}
type RPCMiddlewareRequest_StreamAuth struct {
//
//Intercept stream authentication: each new streaming RPC call that is
//initiated against lnd and contains the middleware's custom macaroon
//caveat can be approved or denied based upon the macaroon in the stream
//header. This message will only be sent for streaming RPCs, unary RPCs
//must handle the macaroon authentication in the request interception to
//avoid an additional message round trip between lnd and the middleware.
StreamAuth *StreamAuth `protobuf:"bytes,4,opt,name=stream_auth,json=streamAuth,proto3,oneof"`
}
type RPCMiddlewareRequest_Request struct {
//
//Intercept incoming gRPC client request message: all incoming messages,
//both on streaming and unary RPCs, are forwarded to the middleware for
//inspection. For unary RPC messages the middleware is also expected to
//validate the custom macaroon caveat of the request.
Request *RPCMessage `protobuf:"bytes,5,opt,name=request,proto3,oneof"`
}
type RPCMiddlewareRequest_Response struct {
//
//Intercept outgoing gRPC response message: all outgoing messages, both on
//streaming and unary RPCs, are forwarded to the middleware for inspection
//and amendment. The response in this message is the original response as
//it was generated by the main RPC server. It can either be accepted
//(=forwarded to the client), replaced/overwritten with a new message of
//the same type, or replaced by an error message.
Response *RPCMessage `protobuf:"bytes,6,opt,name=response,proto3,oneof"`
}
func (*RPCMiddlewareRequest_StreamAuth) isRPCMiddlewareRequest_InterceptType() {}
func (*RPCMiddlewareRequest_Request) isRPCMiddlewareRequest_InterceptType() {}
func (*RPCMiddlewareRequest_Response) isRPCMiddlewareRequest_InterceptType() {}
type StreamAuth struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The full URI (in the format /<rpcpackage>.<ServiceName>/MethodName, for
//example /lnrpc.Lightning/GetInfo) of the streaming RPC method that was just
//established.
MethodFullUri string `protobuf:"bytes,1,opt,name=method_full_uri,json=methodFullUri,proto3" json:"method_full_uri,omitempty"`
}
func (x *StreamAuth) Reset() {
*x = StreamAuth{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[180]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StreamAuth) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StreamAuth) ProtoMessage() {}
func (x *StreamAuth) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[180]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StreamAuth.ProtoReflect.Descriptor instead.
func (*StreamAuth) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{180}
}
func (x *StreamAuth) GetMethodFullUri() string {
if x != nil {
return x.MethodFullUri
}
return ""
}
type RPCMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The full URI (in the format /<rpcpackage>.<ServiceName>/MethodName, for
//example /lnrpc.Lightning/GetInfo) of the RPC method the message was sent
//to/from.
MethodFullUri string `protobuf:"bytes,1,opt,name=method_full_uri,json=methodFullUri,proto3" json:"method_full_uri,omitempty"`
//
//Indicates whether the message was sent over a streaming RPC method or not.
StreamRpc bool `protobuf:"varint,2,opt,name=stream_rpc,json=streamRpc,proto3" json:"stream_rpc,omitempty"`
//
//The full canonical gRPC name of the message type (in the format
//<rpcpackage>.TypeName, for example lnrpc.GetInfoRequest).
TypeName string `protobuf:"bytes,3,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
//
//The full content of the gRPC message, serialized in the binary protobuf
//format.
Serialized []byte `protobuf:"bytes,4,opt,name=serialized,proto3" json:"serialized,omitempty"`
}
func (x *RPCMessage) Reset() {
*x = RPCMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[181]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RPCMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RPCMessage) ProtoMessage() {}
func (x *RPCMessage) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[181]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RPCMessage.ProtoReflect.Descriptor instead.
func (*RPCMessage) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{181}
}
func (x *RPCMessage) GetMethodFullUri() string {
if x != nil {
return x.MethodFullUri
}
return ""
}
func (x *RPCMessage) GetStreamRpc() bool {
if x != nil {
return x.StreamRpc
}
return false
}
func (x *RPCMessage) GetTypeName() string {
if x != nil {
return x.TypeName
}
return ""
}
func (x *RPCMessage) GetSerialized() []byte {
if x != nil {
return x.Serialized
}
return nil
}
type RPCMiddlewareResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The request message ID this response refers to. Must always be set when
//giving feedback to an intercept but is ignored for the initial registration
//message.
RefMsgId uint64 `protobuf:"varint,1,opt,name=ref_msg_id,json=refMsgId,proto3" json:"ref_msg_id,omitempty"`
//
//The middleware can only send two types of messages to lnd: The initial
//registration message that identifies the middleware and after that only
//feedback messages to requests sent to the middleware.
//
// Types that are assignable to MiddlewareMessage:
// *RPCMiddlewareResponse_Register
// *RPCMiddlewareResponse_Feedback
MiddlewareMessage isRPCMiddlewareResponse_MiddlewareMessage `protobuf_oneof:"middleware_message"`
}
func (x *RPCMiddlewareResponse) Reset() {
*x = RPCMiddlewareResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[182]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RPCMiddlewareResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RPCMiddlewareResponse) ProtoMessage() {}
func (x *RPCMiddlewareResponse) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[182]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RPCMiddlewareResponse.ProtoReflect.Descriptor instead.
func (*RPCMiddlewareResponse) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{182}
}
func (x *RPCMiddlewareResponse) GetRefMsgId() uint64 {
if x != nil {
return x.RefMsgId
}
return 0
}
func (m *RPCMiddlewareResponse) GetMiddlewareMessage() isRPCMiddlewareResponse_MiddlewareMessage {
if m != nil {
return m.MiddlewareMessage
}
return nil
}
func (x *RPCMiddlewareResponse) GetRegister() *MiddlewareRegistration {
if x, ok := x.GetMiddlewareMessage().(*RPCMiddlewareResponse_Register); ok {
return x.Register
}
return nil
}
func (x *RPCMiddlewareResponse) GetFeedback() *InterceptFeedback {
if x, ok := x.GetMiddlewareMessage().(*RPCMiddlewareResponse_Feedback); ok {
return x.Feedback
}
return nil
}
type isRPCMiddlewareResponse_MiddlewareMessage interface {
isRPCMiddlewareResponse_MiddlewareMessage()
}
type RPCMiddlewareResponse_Register struct {
//
//The registration message identifies the middleware that's being
//registered in lnd. The registration message must be sent immediately
//after initiating the RegisterRpcMiddleware stream, otherwise lnd will
//time out the attempt and terminate the request. NOTE: The middleware
//will only receive interception messages for requests that contain a
//macaroon with the custom caveat that the middleware declares it is
//responsible for handling in the registration message! As a security
//measure, _no_ middleware can intercept requests made with _unencumbered_
//macaroons!
Register *MiddlewareRegistration `protobuf:"bytes,2,opt,name=register,proto3,oneof"`
}
type RPCMiddlewareResponse_Feedback struct {
//
//The middleware received an interception request and gives feedback to
//it. The request_id indicates what message the feedback refers to.
Feedback *InterceptFeedback `protobuf:"bytes,3,opt,name=feedback,proto3,oneof"`
}
func (*RPCMiddlewareResponse_Register) isRPCMiddlewareResponse_MiddlewareMessage() {}
func (*RPCMiddlewareResponse_Feedback) isRPCMiddlewareResponse_MiddlewareMessage() {}
type MiddlewareRegistration struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The name of the middleware to register. The name should be as informative
//as possible and is logged on registration.
MiddlewareName string `protobuf:"bytes,1,opt,name=middleware_name,json=middlewareName,proto3" json:"middleware_name,omitempty"`
//
//The name of the custom macaroon caveat that this middleware is responsible
//for. Only requests/responses that contain a macaroon with the registered
//custom caveat are forwarded for interception to the middleware. The
//exception being the read-only mode: All requests/responses are forwarded to
//a middleware that requests read-only access but such a middleware won't be
//allowed to _alter_ responses. As a security measure, _no_ middleware can
//change responses to requests made with _unencumbered_ macaroons!
//NOTE: Cannot be used at the same time as read_only_mode.
CustomMacaroonCaveatName string `protobuf:"bytes,2,opt,name=custom_macaroon_caveat_name,json=customMacaroonCaveatName,proto3" json:"custom_macaroon_caveat_name,omitempty"`
//
//Instead of defining a custom macaroon caveat name a middleware can register
//itself for read-only access only. In that mode all requests/responses are
//forwarded to the middleware but the middleware isn't allowed to alter any of
//the responses.
//NOTE: Cannot be used at the same time as custom_macaroon_caveat_name.
ReadOnlyMode bool `protobuf:"varint,3,opt,name=read_only_mode,json=readOnlyMode,proto3" json:"read_only_mode,omitempty"`
}
func (x *MiddlewareRegistration) Reset() {
*x = MiddlewareRegistration{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[183]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MiddlewareRegistration) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MiddlewareRegistration) ProtoMessage() {}
func (x *MiddlewareRegistration) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[183]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MiddlewareRegistration.ProtoReflect.Descriptor instead.
func (*MiddlewareRegistration) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{183}
}
func (x *MiddlewareRegistration) GetMiddlewareName() string {
if x != nil {
return x.MiddlewareName
}
return ""
}
func (x *MiddlewareRegistration) GetCustomMacaroonCaveatName() string {
if x != nil {
return x.CustomMacaroonCaveatName
}
return ""
}
func (x *MiddlewareRegistration) GetReadOnlyMode() bool {
if x != nil {
return x.ReadOnlyMode
}
return false
}
type InterceptFeedback struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
//The error to return to the user. If this is non-empty, the incoming gRPC
//stream/request is aborted and the error is returned to the gRPC client. If
//this value is empty, it means the middleware accepts the stream/request/
//response and the processing of it can continue.
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
//
//A boolean indicating that the gRPC response should be replaced/overwritten.
//As its name suggests, this can only be used as a feedback to an intercepted
//response RPC message and is ignored for feedback on any other message. This
//boolean is needed because in protobuf an empty message is serialized as a
//0-length or nil byte slice and we wouldn't be able to distinguish between
//an empty replacement message and the "don't replace anything" case.
ReplaceResponse bool `protobuf:"varint,2,opt,name=replace_response,json=replaceResponse,proto3" json:"replace_response,omitempty"`
//
//If the replace_response field is set to true, this field must contain the
//binary serialized gRPC response message in the protobuf format.
ReplacementSerialized []byte `protobuf:"bytes,3,opt,name=replacement_serialized,json=replacementSerialized,proto3" json:"replacement_serialized,omitempty"`
}
func (x *InterceptFeedback) Reset() {
*x = InterceptFeedback{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[184]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InterceptFeedback) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InterceptFeedback) ProtoMessage() {}
func (x *InterceptFeedback) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[184]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InterceptFeedback.ProtoReflect.Descriptor instead.
func (*InterceptFeedback) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{184}
}
func (x *InterceptFeedback) GetError() string {
if x != nil {
return x.Error
}
return ""
}
func (x *InterceptFeedback) GetReplaceResponse() bool {
if x != nil {
return x.ReplaceResponse
}
return false
}
func (x *InterceptFeedback) GetReplacementSerialized() []byte {
if x != nil {
return x.ReplacementSerialized
}
return nil
}
type PendingChannelsResponse_PendingChannel struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RemoteNodePub string `protobuf:"bytes,1,opt,name=remote_node_pub,json=remoteNodePub,proto3" json:"remote_node_pub,omitempty"`
ChannelPoint string `protobuf:"bytes,2,opt,name=channel_point,json=channelPoint,proto3" json:"channel_point,omitempty"`
Capacity int64 `protobuf:"varint,3,opt,name=capacity,proto3" json:"capacity,omitempty"`
LocalBalance int64 `protobuf:"varint,4,opt,name=local_balance,json=localBalance,proto3" json:"local_balance,omitempty"`
RemoteBalance int64 `protobuf:"varint,5,opt,name=remote_balance,json=remoteBalance,proto3" json:"remote_balance,omitempty"`
// The minimum satoshis this node is required to reserve in its
// balance.
LocalChanReserveSat int64 `protobuf:"varint,6,opt,name=local_chan_reserve_sat,json=localChanReserveSat,proto3" json:"local_chan_reserve_sat,omitempty"`
//
//The minimum satoshis the other node is required to reserve in its
//balance.
RemoteChanReserveSat int64 `protobuf:"varint,7,opt,name=remote_chan_reserve_sat,json=remoteChanReserveSat,proto3" json:"remote_chan_reserve_sat,omitempty"`
// The party that initiated opening the channel.
Initiator Initiator `protobuf:"varint,8,opt,name=initiator,proto3,enum=lnrpc.Initiator" json:"initiator,omitempty"`
// The commitment type used by this channel.
CommitmentType CommitmentType `protobuf:"varint,9,opt,name=commitment_type,json=commitmentType,proto3,enum=lnrpc.CommitmentType" json:"commitment_type,omitempty"`
// Total number of forwarding packages created in this channel.
NumForwardingPackages int64 `protobuf:"varint,10,opt,name=num_forwarding_packages,json=numForwardingPackages,proto3" json:"num_forwarding_packages,omitempty"`
}
func (x *PendingChannelsResponse_PendingChannel) Reset() {
*x = PendingChannelsResponse_PendingChannel{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[190]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PendingChannelsResponse_PendingChannel) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PendingChannelsResponse_PendingChannel) ProtoMessage() {}
func (x *PendingChannelsResponse_PendingChannel) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[190]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PendingChannelsResponse_PendingChannel.ProtoReflect.Descriptor instead.
func (*PendingChannelsResponse_PendingChannel) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{79, 0}
}
func (x *PendingChannelsResponse_PendingChannel) GetRemoteNodePub() string {
if x != nil {
return x.RemoteNodePub
}
return ""
}
func (x *PendingChannelsResponse_PendingChannel) GetChannelPoint() string {
if x != nil {
return x.ChannelPoint
}
return ""
}
func (x *PendingChannelsResponse_PendingChannel) GetCapacity() int64 {
if x != nil {
return x.Capacity
}
return 0
}
func (x *PendingChannelsResponse_PendingChannel) GetLocalBalance() int64 {
if x != nil {
return x.LocalBalance
}
return 0
}
func (x *PendingChannelsResponse_PendingChannel) GetRemoteBalance() int64 {
if x != nil {
return x.RemoteBalance
}
return 0
}
func (x *PendingChannelsResponse_PendingChannel) GetLocalChanReserveSat() int64 {
if x != nil {
return x.LocalChanReserveSat
}
return 0
}
func (x *PendingChannelsResponse_PendingChannel) GetRemoteChanReserveSat() int64 {
if x != nil {
return x.RemoteChanReserveSat
}
return 0
}
func (x *PendingChannelsResponse_PendingChannel) GetInitiator() Initiator {
if x != nil {
return x.Initiator
}
return Initiator_INITIATOR_UNKNOWN
}
func (x *PendingChannelsResponse_PendingChannel) GetCommitmentType() CommitmentType {
if x != nil {
return x.CommitmentType
}
return CommitmentType_UNKNOWN_COMMITMENT_TYPE
}
func (x *PendingChannelsResponse_PendingChannel) GetNumForwardingPackages() int64 {
if x != nil {
return x.NumForwardingPackages
}
return 0
}
type PendingChannelsResponse_PendingOpenChannel struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The pending channel
Channel *PendingChannelsResponse_PendingChannel `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
// The height at which this channel will be confirmed
ConfirmationHeight uint32 `protobuf:"varint,2,opt,name=confirmation_height,json=confirmationHeight,proto3" json:"confirmation_height,omitempty"`
//
//The amount calculated to be paid in fees for the current set of
//commitment transactions. The fee amount is persisted with the channel
//in order to allow the fee amount to be removed and recalculated with
//each channel state update, including updates that happen after a system
//restart.
CommitFee int64 `protobuf:"varint,4,opt,name=commit_fee,json=commitFee,proto3" json:"commit_fee,omitempty"`
// The weight of the commitment transaction
CommitWeight int64 `protobuf:"varint,5,opt,name=commit_weight,json=commitWeight,proto3" json:"commit_weight,omitempty"`
//
//The required number of satoshis per kilo-weight that the requester will
//pay at all times, for both the funding transaction and commitment
//transaction. This value can later be updated once the channel is open.
FeePerKw int64 `protobuf:"varint,6,opt,name=fee_per_kw,json=feePerKw,proto3" json:"fee_per_kw,omitempty"`
}
func (x *PendingChannelsResponse_PendingOpenChannel) Reset() {
*x = PendingChannelsResponse_PendingOpenChannel{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[191]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PendingChannelsResponse_PendingOpenChannel) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PendingChannelsResponse_PendingOpenChannel) ProtoMessage() {}
func (x *PendingChannelsResponse_PendingOpenChannel) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[191]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PendingChannelsResponse_PendingOpenChannel.ProtoReflect.Descriptor instead.
func (*PendingChannelsResponse_PendingOpenChannel) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{79, 1}
}
func (x *PendingChannelsResponse_PendingOpenChannel) GetChannel() *PendingChannelsResponse_PendingChannel {
if x != nil {
return x.Channel
}
return nil
}
func (x *PendingChannelsResponse_PendingOpenChannel) GetConfirmationHeight() uint32 {
if x != nil {
return x.ConfirmationHeight
}
return 0
}
func (x *PendingChannelsResponse_PendingOpenChannel) GetCommitFee() int64 {
if x != nil {
return x.CommitFee
}
return 0
}
func (x *PendingChannelsResponse_PendingOpenChannel) GetCommitWeight() int64 {
if x != nil {
return x.CommitWeight
}
return 0
}
func (x *PendingChannelsResponse_PendingOpenChannel) GetFeePerKw() int64 {
if x != nil {
return x.FeePerKw
}
return 0
}
type PendingChannelsResponse_WaitingCloseChannel struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The pending channel waiting for closing tx to confirm
Channel *PendingChannelsResponse_PendingChannel `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
// The balance in satoshis encumbered in this channel
LimboBalance int64 `protobuf:"varint,2,opt,name=limbo_balance,json=limboBalance,proto3" json:"limbo_balance,omitempty"`
//
//A list of valid commitment transactions. Any of these can confirm at
//this point.
Commitments *PendingChannelsResponse_Commitments `protobuf:"bytes,3,opt,name=commitments,proto3" json:"commitments,omitempty"`
}
func (x *PendingChannelsResponse_WaitingCloseChannel) Reset() {
*x = PendingChannelsResponse_WaitingCloseChannel{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[192]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PendingChannelsResponse_WaitingCloseChannel) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PendingChannelsResponse_WaitingCloseChannel) ProtoMessage() {}
func (x *PendingChannelsResponse_WaitingCloseChannel) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[192]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PendingChannelsResponse_WaitingCloseChannel.ProtoReflect.Descriptor instead.
func (*PendingChannelsResponse_WaitingCloseChannel) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{79, 2}
}
func (x *PendingChannelsResponse_WaitingCloseChannel) GetChannel() *PendingChannelsResponse_PendingChannel {
if x != nil {
return x.Channel
}
return nil
}
func (x *PendingChannelsResponse_WaitingCloseChannel) GetLimboBalance() int64 {
if x != nil {
return x.LimboBalance
}
return 0
}
func (x *PendingChannelsResponse_WaitingCloseChannel) GetCommitments() *PendingChannelsResponse_Commitments {
if x != nil {
return x.Commitments
}
return nil
}
type PendingChannelsResponse_Commitments struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Hash of the local version of the commitment tx.
LocalTxid string `protobuf:"bytes,1,opt,name=local_txid,json=localTxid,proto3" json:"local_txid,omitempty"`
// Hash of the remote version of the commitment tx.
RemoteTxid string `protobuf:"bytes,2,opt,name=remote_txid,json=remoteTxid,proto3" json:"remote_txid,omitempty"`
// Hash of the remote pending version of the commitment tx.
RemotePendingTxid string `protobuf:"bytes,3,opt,name=remote_pending_txid,json=remotePendingTxid,proto3" json:"remote_pending_txid,omitempty"`
//
//The amount in satoshis calculated to be paid in fees for the local
//commitment.
LocalCommitFeeSat uint64 `protobuf:"varint,4,opt,name=local_commit_fee_sat,json=localCommitFeeSat,proto3" json:"local_commit_fee_sat,omitempty"`
//
//The amount in satoshis calculated to be paid in fees for the remote
//commitment.
RemoteCommitFeeSat uint64 `protobuf:"varint,5,opt,name=remote_commit_fee_sat,json=remoteCommitFeeSat,proto3" json:"remote_commit_fee_sat,omitempty"`
//
//The amount in satoshis calculated to be paid in fees for the remote
//pending commitment.
RemotePendingCommitFeeSat uint64 `protobuf:"varint,6,opt,name=remote_pending_commit_fee_sat,json=remotePendingCommitFeeSat,proto3" json:"remote_pending_commit_fee_sat,omitempty"`
}
func (x *PendingChannelsResponse_Commitments) Reset() {
*x = PendingChannelsResponse_Commitments{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[193]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PendingChannelsResponse_Commitments) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PendingChannelsResponse_Commitments) ProtoMessage() {}
func (x *PendingChannelsResponse_Commitments) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[193]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil |
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PendingChannelsResponse_Commitments.ProtoReflect.Descriptor instead.
func (*PendingChannelsResponse_Commitments) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{79, 3}
}
func (x *PendingChannelsResponse_Commitments) GetLocalTxid() string {
if x != nil {
return x.LocalTxid
}
return ""
}
func (x *PendingChannelsResponse_Commitments) GetRemoteTxid() string {
if x != nil {
return x.RemoteTxid
}
return ""
}
func (x *PendingChannelsResponse_Commitments) GetRemotePendingTxid() string {
if x != nil {
return x.RemotePendingTxid
}
return ""
}
func (x *PendingChannelsResponse_Commitments) GetLocalCommitFeeSat() uint64 {
if x != nil {
return x.LocalCommitFeeSat
}
return 0
}
func (x *PendingChannelsResponse_Commitments) GetRemoteCommitFeeSat() uint64 {
if x != nil {
return x.RemoteCommitFeeSat
}
return 0
}
func (x *PendingChannelsResponse_Commitments) GetRemotePendingCommitFeeSat() uint64 {
if x != nil {
return x.RemotePendingCommitFeeSat
}
return 0
}
type PendingChannelsResponse_ClosedChannel struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The pending channel to be closed
Channel *PendingChannelsResponse_PendingChannel `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
// The transaction id of the closing transaction
ClosingTxid string `protobuf:"bytes,2,opt,name=closing_txid,json=closingTxid,proto3" json:"closing_txid,omitempty"`
}
func (x *PendingChannelsResponse_ClosedChannel) Reset() {
*x = PendingChannelsResponse_ClosedChannel{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[194]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PendingChannelsResponse_ClosedChannel) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PendingChannelsResponse_ClosedChannel) ProtoMessage() {}
func (x *PendingChannelsResponse_ClosedChannel) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[194]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PendingChannelsResponse_ClosedChannel.ProtoReflect.Descriptor instead.
func (*PendingChannelsResponse_ClosedChannel) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{79, 4}
}
func (x *PendingChannelsResponse_ClosedChannel) GetChannel() *PendingChannelsResponse_PendingChannel {
if x != nil {
return x.Channel
}
return nil
}
func (x *PendingChannelsResponse_ClosedChannel) GetClosingTxid() string {
if x != nil {
return x.ClosingTxid
}
return ""
}
type PendingChannelsResponse_ForceClosedChannel struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The pending channel to be force closed
Channel *PendingChannelsResponse_PendingChannel `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
// The transaction id of the closing transaction
ClosingTxid string `protobuf:"bytes,2,opt,name=closing_txid,json=closingTxid,proto3" json:"closing_txid,omitempty"`
// The balance in satoshis encumbered in this pending channel
LimboBalance int64 `protobuf:"varint,3,opt,name=limbo_balance,json=limboBalance,proto3" json:"limbo_balance,omitempty"`
// The height at which funds can be swept into the wallet
MaturityHeight uint32 `protobuf:"varint,4,opt,name=maturity_height,json=maturityHeight,proto3" json:"maturity_height,omitempty"`
//
//Remaining # of blocks until the commitment output can be swept.
//Negative values indicate how many blocks have passed since becoming
//mature.
BlocksTilMaturity int32 `protobuf:"varint,5,opt,name=blocks_til_maturity,json=blocksTilMaturity,proto3" json:"blocks_til_maturity,omitempty"`
// The total value of funds successfully recovered from this channel
RecoveredBalance int64 `protobuf:"varint,6,opt,name=recovered_balance,json=recoveredBalance,proto3" json:"recovered_balance,omitempty"`
PendingHtlcs []*PendingHTLC `protobuf:"bytes,8,rep,name=pending_htlcs,json=pendingHtlcs,proto3" json:"pending_htlcs,omitempty"`
Anchor PendingChannelsResponse_ForceClosedChannel_AnchorState `protobuf:"varint,9,opt,name=anchor,proto3,enum=lnrpc.PendingChannelsResponse_ForceClosedChannel_AnchorState" json:"anchor,omitempty"`
}
func (x *PendingChannelsResponse_ForceClosedChannel) Reset() {
*x = PendingChannelsResponse_ForceClosedChannel{}
if protoimpl.UnsafeEnabled {
mi := &file_lightning_proto_msgTypes[195]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PendingChannelsResponse_ForceClosedChannel) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PendingChannelsResponse_ForceClosedChannel) ProtoMessage() {}
func (x *PendingChannelsResponse_ForceClosedChannel) ProtoReflect() protoreflect.Message {
mi := &file_lightning_proto_msgTypes[195]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PendingChannelsResponse_ForceClosedChannel.ProtoReflect.Descriptor instead.
func (*PendingChannelsResponse_ForceClosedChannel) Descriptor() ([]byte, []int) {
return file_lightning_proto_rawDescGZIP(), []int{79, 5}
}
func (x *PendingChannelsResponse_ForceClosedChannel) GetChannel() *PendingChannelsResponse_PendingChannel {
if x != nil {
return x.Channel
}
return nil
}
func (x *PendingChannelsResponse_ForceClosedChannel) GetClosingTxid() string {
if x != nil {
return x.ClosingTxid
}
return ""
}
func (x *PendingChannelsResponse_ForceClosedChannel) GetLimboBalance() int64 {
if x != nil {
return x.LimboBalance
}
return 0
}
func (x *PendingChannelsResponse_ForceClosedChannel) GetMaturityHeight() uint32 {
if x != nil {
return x.MaturityHeight
}
return 0
}
func (x *PendingChannelsResponse_ForceClosedChannel) GetBlocksTilMaturity() int32 {
if x != nil {
return x.BlocksTilMaturity
}
return 0
}
func (x *PendingChannelsResponse_ForceClosedChannel) GetRecoveredBalance() int64 {
if x != nil {
return x.RecoveredBalance
}
return 0
}
func (x *PendingChannelsResponse_ForceClosedChannel) GetPendingHtlcs() []*PendingHTLC {
if x != nil {
return x.PendingHtlcs
}
return nil
}
func (x *PendingChannelsResponse_ForceClosedChannel) GetAnchor() PendingChannelsResponse_ForceClosedChannel_AnchorState {
if x != nil {
return x.Anchor
}
return PendingChannelsResponse_ForceClosedChannel_LIMBO
}
var File_lightning_proto protoreflect.FileDescriptor
var file_lightning_proto_rawDesc = []byte{
0x0a, 0x0f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x05, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x22, 0x20, 0x0a, 0x1e, 0x53, 0x75, 0x62, 0x73,
0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x0d, 0x43, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70,
0x65, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x12,
0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74,
0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x18, 0x53, 0x65, 0x6e, 0x64, 0x43,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64,
0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
0x1b, 0x0a, 0x19, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe6, 0x01, 0x0a,
0x04, 0x55, 0x74, 0x78, 0x6f, 0x12, 0x35, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52,
0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07,
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
0x5f, 0x73, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x6d, 0x6f, 0x75,
0x6e, 0x74, 0x53, 0x61, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6b, 0x5f, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6b, 0x53, 0x63, 0x72, 0x69,
0x70, 0x74, 0x12, 0x2b, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74,
0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12,
0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc6, 0x02, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16,
0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f,
0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x10, 0x6e, 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73,
0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61,
0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67,
0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48,
0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x53,
0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x65,
0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46,
0x65, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73,
0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x0a, 0x72, 0x61,
0x77, 0x5f, 0x74, 0x78, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x72, 0x61, 0x77, 0x54, 0x78, 0x48, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x74,
0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72,
0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b,
0x73, 0x74, 0x61, 0x72, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x65,
0x6e, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x09, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x22, 0x4c, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x36, 0x0a, 0x0c, 0x74, 0x72,
0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x22, 0x68, 0x0a, 0x08, 0x46, 0x65, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16,
0x0a, 0x05, 0x66, 0x69, 0x78, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52,
0x05, 0x66, 0x69, 0x78, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f,
0x6d, 0x73, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, 0x66, 0x69,
0x78, 0x65, 0x64, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x1a, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65,
0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x07, 0x70, 0x65, 0x72, 0x63,
0x65, 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xea, 0x05, 0x0a,
0x0b, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
0x64, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x65, 0x73, 0x74,
0x12, 0x23, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x74, 0x53,
0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6d, 0x74, 0x18, 0x03, 0x20, 0x01,
0x28, 0x03, 0x52, 0x03, 0x61, 0x6d, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x6d, 0x74, 0x5f, 0x6d,
0x73, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x6d, 0x74, 0x4d, 0x73,
0x61, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61,
0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x32, 0x0a, 0x13, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x11, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48,
0x61, 0x73, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x74, 0x76,
0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x69,
0x6e, 0x61, 0x6c, 0x43, 0x6c, 0x74, 0x76, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x09,
0x66, 0x65, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74,
0x52, 0x08, 0x66, 0x65, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2c, 0x0a, 0x10, 0x6f, 0x75,
0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x09,
0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x30, 0x01, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69,
0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74,
0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x6f, 0x70, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79,
0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x74, 0x76, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x6c, 0x74, 0x76, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12,
0x59, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x2e, 0x44, 0x65, 0x73, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x43, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x6c,
0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x53, 0x65, 0x6c,
0x66, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0d, 0x64, 0x65, 0x73, 0x74,
0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0e, 0x32,
0x11, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42,
0x69, 0x74, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73,
0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72,
0x18, 0x10, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41,
0x64, 0x64, 0x72, 0x1a, 0x44, 0x0a, 0x16, 0x44, 0x65, 0x73, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f,
0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb4, 0x01, 0x0a, 0x0c, 0x53, 0x65,
0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61,
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12,
0x29, 0x0a, 0x10, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x69, 0x6d,
0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x0d, 0x70, 0x61,
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52,
0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x21, 0x0a,
0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68,
0x22, 0x95, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x32, 0x0a, 0x13, 0x70, 0x61,
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e,
0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x11, 0x70, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x22,
0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x75,
0x74, 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x9a, 0x04, 0x0a, 0x14, 0x43, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x75, 0x62, 0x6b,
0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x61, 0x73,
0x68, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61,
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x65, 0x6e, 0x64,
0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x75, 0x6e,
0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x6d, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a,
0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x6d, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x75,
0x73, 0x68, 0x5f, 0x61, 0x6d, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x70, 0x75,
0x73, 0x68, 0x41, 0x6d, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x75, 0x73, 0x74, 0x5f, 0x6c, 0x69,
0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x64, 0x75, 0x73, 0x74, 0x4c,
0x69, 0x6d, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28,
0x04, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x46, 0x6c, 0x69,
0x67, 0x68, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x72,
0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x63, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x12, 0x19, 0x0a, 0x08,
0x6d, 0x69, 0x6e, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07,
0x6d, 0x69, 0x6e, 0x48, 0x74, 0x6c, 0x63, 0x12, 0x1c, 0x0a, 0x0a, 0x66, 0x65, 0x65, 0x5f, 0x70,
0x65, 0x72, 0x5f, 0x6b, 0x77, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x66, 0x65, 0x65,
0x50, 0x65, 0x72, 0x4b, 0x77, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x73, 0x76, 0x5f, 0x64, 0x65, 0x6c,
0x61, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x73, 0x76, 0x44, 0x65, 0x6c,
0x61, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74,
0x65, 0x64, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10,
0x6d, 0x61, 0x78, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x48, 0x74, 0x6c, 0x63, 0x73,
0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x66, 0x6c, 0x61, 0x67,
0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x3e, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d,
0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e,
0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e,
0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xf3, 0x02, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x16, 0x0a, 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69,
0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x12,
0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x70, 0x66, 0x72, 0x6f, 0x6e, 0x74,
0x5f, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0f, 0x75, 0x70, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e,
0x12, 0x1b, 0x0a, 0x09, 0x63, 0x73, 0x76, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x05, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x73, 0x76, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x1f, 0x0a,
0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01,
0x28, 0x04, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x61, 0x74, 0x12, 0x2b,
0x0a, 0x12, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x6d, 0x61, 0x78, 0x5f,
0x6d, 0x73, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x69, 0x6e, 0x46, 0x6c,
0x69, 0x67, 0x68, 0x74, 0x4d, 0x61, 0x78, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x6d,
0x61, 0x78, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x48, 0x74, 0x6c, 0x63, 0x43, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e,
0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x48, 0x74, 0x6c, 0x63, 0x49,
0x6e, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f,
0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6d, 0x69, 0x6e,
0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x22, 0x9d, 0x01, 0x0a, 0x0c,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x12,
0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x69, 0x64, 0x5f, 0x62, 0x79, 0x74,
0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x10, 0x66, 0x75, 0x6e, 0x64,
0x69, 0x6e, 0x67, 0x54, 0x78, 0x69, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10,
0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x72,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e,
0x67, 0x54, 0x78, 0x69, 0x64, 0x53, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70,
0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b,
0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x0e, 0x0a, 0x0c, 0x66,
0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x69, 0x64, 0x22, 0x67, 0x0a, 0x08, 0x4f,
0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x78, 0x69, 0x64, 0x5f,
0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x78, 0x69,
0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x69, 0x64, 0x5f, 0x73,
0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x78, 0x69, 0x64, 0x53, 0x74,
0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65,
0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49,
0x6e, 0x64, 0x65, 0x78, 0x22, 0x3e, 0x0a, 0x10, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e,
0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79,
0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x68, 0x6f, 0x73, 0x74, 0x22, 0x91, 0x02, 0x0a, 0x12, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74,
0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x0c, 0x41,
0x64, 0x64, 0x72, 0x54, 0x6f, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x2b, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61,
0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x64, 0x64,
0x72, 0x54, 0x6f, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c,
0x41, 0x64, 0x64, 0x72, 0x54, 0x6f, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b,
0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x1b, 0x0a,
0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x70,
0x65, 0x6e, 0x64, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x18,
0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f,
0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x1a, 0x3f, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x72, 0x54,
0x6f, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x87, 0x01, 0x0a, 0x13, 0x45, 0x73, 0x74,
0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x17, 0x0a, 0x07, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x03, 0x52, 0x06, 0x66, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, 0x33, 0x0a, 0x14, 0x66, 0x65, 0x65,
0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x11, 0x66, 0x65, 0x65,
0x72, 0x61, 0x74, 0x65, 0x53, 0x61, 0x74, 0x50, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, 0x12, 0x22,
0x0a, 0x0d, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79,
0x74, 0x65, 0x22, 0xeb, 0x02, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x79, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x72, 0x54, 0x6f,
0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x54, 0x6f, 0x41, 0x6d, 0x6f, 0x75, 0x6e,
0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x41, 0x64, 0x64, 0x72, 0x54, 0x6f, 0x41, 0x6d,
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63,
0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65,
0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72,
0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x61,
0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0c, 0x73, 0x61, 0x74,
0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42,
0x02, 0x18, 0x01, 0x52, 0x0a, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e,
0x66, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e,
0x66, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x6e, 0x63, 0x6f,
0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73,
0x70, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x1a,
0x3f, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x72, 0x54, 0x6f, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0x26, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x22, 0xa4, 0x02, 0x0a, 0x10, 0x53, 0x65, 0x6e,
0x64, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64,
0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72,
0x67, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x61,
0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x04, 0x52, 0x0b, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x12, 0x24,
0x0a, 0x0c, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x18, 0x05,
0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72,
0x42, 0x79, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x6c, 0x6c,
0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x65, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x12,
0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e,
0x66, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e,
0x66, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x6e, 0x63, 0x6f,
0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73,
0x70, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x22,
0x27, 0x0a, 0x11, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x22, 0x68, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74,
0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b,
0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d,
0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x22, 0x38, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x74, 0x78,
0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x55, 0x74, 0x78, 0x6f, 0x52, 0x05, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x22, 0x55, 0x0a, 0x11,
0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54,
0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x12, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x22, 0x47, 0x0a, 0x12, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x73,
0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0a, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x48, 0x61, 0x73, 0x68, 0x22, 0x33, 0x0a, 0x13,
0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
0x65, 0x22, 0x46, 0x0a, 0x14, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x73,
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x45, 0x0a, 0x15, 0x56, 0x65, 0x72,
0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b,
0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79,
0x22, 0x6f, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x67,
0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x04, 0x61,
0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x65, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28,
0x08, 0x52, 0x04, 0x70, 0x65, 0x72, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f,
0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x65, 0x65, 0x72,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x63,
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x69,
0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x86, 0x02, 0x0a, 0x04, 0x48, 0x54, 0x4c, 0x43, 0x12, 0x1a, 0x0a,
0x08, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
0x08, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x68, 0x61, 0x73, 0x68, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x2b,
0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69,
0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x65, 0x78, 0x70, 0x69, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x68,
0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52,
0x09, 0x68, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x12, 0x66, 0x6f,
0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69,
0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x6f, 0x72,
0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x64,
0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72,
0x64, 0x69, 0x6e, 0x67, 0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x84, 0x02,
0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61,
0x69, 0x6e, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x73, 0x76, 0x5f, 0x64, 0x65, 0x6c, 0x61,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x73, 0x76, 0x44, 0x65, 0x6c, 0x61,
0x79, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76,
0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x63, 0x68, 0x61,
0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x61, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x64,
0x75, 0x73, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0c, 0x64, 0x75, 0x73, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x61,
0x74, 0x12, 0x2f, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67,
0x5f, 0x61, 0x6d, 0x74, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52,
0x11, 0x6d, 0x61, 0x78, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x6d, 0x74, 0x4d, 0x73,
0x61, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x69, 0x6e, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x6d,
0x73, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x48, 0x74,
0x6c, 0x63, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x63,
0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x73, 0x18, 0x06, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x48,
0x74, 0x6c, 0x63, 0x73, 0x22, 0xd7, 0x09, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6d, 0x6f,
0x74, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a,
0x0d, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x6f, 0x69,
0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20,
0x01, 0x28, 0x04, 0x42, 0x02, 0x30, 0x01, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x12,
0x1a, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28,
0x03, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x6c,
0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65,
0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e,
0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65,
0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69,
0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6f, 0x6d,
0x6d, 0x69, 0x74, 0x46, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63,
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x66,
0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x6b, 0x77, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52,
0x08, 0x66, 0x65, 0x65, 0x50, 0x65, 0x72, 0x4b, 0x77, 0x12, 0x2b, 0x0a, 0x11, 0x75, 0x6e, 0x73,
0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0b,
0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x75, 0x6e, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x42,
0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f,
0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0c, 0x20,
0x01, 0x28, 0x03, 0x52, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68,
0x69, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x17, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f,
0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x61,
0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x1f,
0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x0e, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12,
0x30, 0x0a, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x73,
0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x48,
0x54, 0x4c, 0x43, 0x52, 0x0c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x74, 0x6c, 0x63,
0x73, 0x12, 0x1f, 0x0a, 0x09, 0x63, 0x73, 0x76, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x10,
0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x63, 0x73, 0x76, 0x44, 0x65, 0x6c,
0x61, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x11, 0x20,
0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09,
0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52,
0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x68,
0x61, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18,
0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x68, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75,
0x73, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x37, 0x0a, 0x16, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f,
0x63, 0x68, 0x61, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x73, 0x61, 0x74,
0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x13, 0x6c, 0x6f, 0x63, 0x61,
0x6c, 0x43, 0x68, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x61, 0x74, 0x12,
0x39, 0x0a, 0x17, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x72,
0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x03,
0x42, 0x02, 0x18, 0x01, 0x52, 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e,
0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x61, 0x74, 0x12, 0x2e, 0x0a, 0x11, 0x73, 0x74,
0x61, 0x74, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18,
0x16, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x69,
0x63, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x0f, 0x63, 0x6f,
0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x1a, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d,
0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x69,
0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6c, 0x69,
0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x18, 0x18, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x23,
0x0a, 0x0d, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x41, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x61, 0x6d, 0x6f, 0x75,
0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x75,
0x73, 0x68, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74,
0x68, 0x61, 0x77, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x0a, 0x74, 0x68, 0x61, 0x77, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x46, 0x0a, 0x11,
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74,
0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e,
0x74, 0x73, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61,
0x69, 0x6e, 0x74, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63,
0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x11, 0x72, 0x65, 0x6d,
0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x22, 0xb3,
0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65,
0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x63, 0x74,
0x69, 0x76, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x61, 0x63, 0x74,
0x69, 0x76, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c,
0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1f, 0x0a, 0x0b,
0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
0x08, 0x52, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x21, 0x0a,
0x0c, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20,
0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79,
0x12, 0x12, 0x0a, 0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04,
0x70, 0x65, 0x65, 0x72, 0x22, 0x42, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x08,
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x08,
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0xd8, 0x05, 0x0a, 0x13, 0x43, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79,
0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x69, 0x6e,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x30, 0x01, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e,
0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x61, 0x73,
0x68, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x5f,
0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6c, 0x6f, 0x73,
0x69, 0x6e, 0x67, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6d,
0x6f, 0x74, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1a,
0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03,
0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c,
0x6f, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x0b, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x27, 0x0a,
0x0f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65,
0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x42,
0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c,
0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x09, 0x20,
0x01, 0x28, 0x03, 0x52, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42,
0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53,
0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x75, 0x72, 0x65, 0x54, 0x79,
0x70, 0x65, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x37, 0x0a,
0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18,
0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e,
0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x69,
0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x39, 0x0a, 0x0f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f,
0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x10, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f,
0x72, 0x52, 0x0e, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f,
0x72, 0x12, 0x33, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52,
0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x6c,
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x0b, 0x43, 0x6c, 0x6f, 0x73, 0x75,
0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4f, 0x50, 0x45, 0x52,
0x41, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x10, 0x00, 0x12, 0x15, 0x0a,
0x11, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4c, 0x4f,
0x53, 0x45, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x46,
0x4f, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c,
0x42, 0x52, 0x45, 0x41, 0x43, 0x48, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x10, 0x03, 0x12, 0x14,
0x0a, 0x10, 0x46, 0x55, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c,
0x45, 0x44, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45,
0x44, 0x10, 0x05, 0x22, 0xeb, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79,
0x70, 0x65, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79,
0x70, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x63, 0x6f, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f,
0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x63, 0x6f, 0x6d, 0x65, 0x52, 0x07, 0x6f,
0x75, 0x74, 0x63, 0x6f, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69,
0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f,
0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61,
0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53,
0x61, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x74, 0x78, 0x69, 0x64,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x69,
0x64, 0x22, 0xde, 0x01, 0x0a, 0x15, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63,
0x6f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0b, 0x63, 0x6f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1f, 0x0a,
0x0b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x08, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x21,
0x0a, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x46, 0x6f, 0x72, 0x63,
0x65, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x65, 0x61, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28,
0x08, 0x52, 0x06, 0x62, 0x72, 0x65, 0x61, 0x63, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x66, 0x75, 0x6e,
0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20,
0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x6e, 0x63,
0x65, 0x6c, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x65,
0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e,
0x65, 0x64, 0x22, 0x50, 0x0a, 0x16, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x08,
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6c,
0x6f, 0x73, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x73, 0x22, 0x8b, 0x05, 0x0a, 0x04, 0x50, 0x65, 0x65, 0x72, 0x12, 0x17, 0x0a,
0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x04,
0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x79, 0x74, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12,
0x1d, 0x0a, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x18, 0x05, 0x20,
0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x76, 0x12, 0x19,
0x0a, 0x08, 0x73, 0x61, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03,
0x52, 0x07, 0x73, 0x61, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x61, 0x74,
0x5f, 0x72, 0x65, 0x63, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x61, 0x74,
0x52, 0x65, 0x63, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18,
0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1b,
0x0a, 0x09, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28,
0x03, 0x52, 0x08, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x73,
0x79, 0x6e, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x2e, 0x53, 0x79, 0x6e, 0x63,
0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35,
0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x2e, 0x46, 0x65,
0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x66, 0x65, 0x61,
0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18,
0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06,
0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x66, 0x6c, 0x61, 0x70,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x6c,
0x61, 0x70, 0x5f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x61, 0x73,
0x74, 0x46, 0x6c, 0x61, 0x70, 0x4e, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f,
0x70, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x0f, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6c,
0x6f, 0x61, 0x64, 0x1a, 0x4b, 0x0a, 0x0d, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65,
0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0x50, 0x0a, 0x08, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x00, 0x12, 0x0f,
0x0a, 0x0b, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x01, 0x12,
0x10, 0x0a, 0x0c, 0x50, 0x41, 0x53, 0x53, 0x49, 0x56, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10,
0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x49, 0x4e, 0x4e, 0x45, 0x44, 0x5f, 0x53, 0x59, 0x4e, 0x43,
0x10, 0x03, 0x22, 0x46, 0x0a, 0x10, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65,
0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x35, 0x0a, 0x10, 0x4c, 0x69,
0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21,
0x0a, 0x0c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x22, 0x36, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65,
0x65, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x50, 0x65, 0x65,
0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x22, 0x84, 0x01, 0x0a, 0x09, 0x50, 0x65, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74,
0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x50, 0x65, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54,
0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2e, 0x0a, 0x09, 0x45, 0x76, 0x65,
0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x4f,
0x4e, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x45, 0x45, 0x52, 0x5f,
0x4f, 0x46, 0x46, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x22, 0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x87, 0x06, 0x0a, 0x0f,
0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6d,
0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x64,
0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x75, 0x62,
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6c,
0x6f, 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12,
0x30, 0x0a, 0x14, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x6e,
0x75, 0x6d, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x73, 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x75, 0x6d, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f,
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11,
0x6e, 0x75, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x73, 0x12, 0x32, 0x0a, 0x15, 0x6e, 0x75, 0x6d, 0x5f, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76,
0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x13, 0x6e, 0x75, 0x6d, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x65, 0x65,
0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x50, 0x65, 0x65,
0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67,
0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48,
0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68,
0x61, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
0x48, 0x61, 0x73, 0x68, 0x12, 0x32, 0x0a, 0x15, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0d, 0x20,
0x01, 0x28, 0x03, 0x52, 0x13, 0x62, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x79, 0x6e, 0x63,
0x65, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28,
0x08, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x54, 0x6f, 0x43, 0x68, 0x61, 0x69, 0x6e,
0x12, 0x26, 0x0a, 0x0f, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x67, 0x72,
0x61, 0x70, 0x68, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x65,
0x64, 0x54, 0x6f, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x65, 0x73, 0x74,
0x6e, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74,
0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73,
0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43,
0x68, 0x61, 0x69, 0x6e, 0x52, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04,
0x75, 0x72, 0x69, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, 0x72, 0x69, 0x73,
0x12, 0x40, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x13, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e,
0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75,
0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72,
0x65, 0x73, 0x1a, 0x4b, 0x0a, 0x0d, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x61,
0x74, 0x75, 0x72, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a,
0x04, 0x08, 0x0b, 0x10, 0x0c, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f,
0x76, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
0x87, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72,
0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x65,
0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x66, 0x69, 0x6e,
0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x65, 0x63,
0x6f, 0x76, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1a, 0x0a,
0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52,
0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x37, 0x0a, 0x05, 0x43, 0x68, 0x61,
0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f,
0x72, 0x6b, 0x22, 0x7a, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63,
0x6b, 0x5f, 0x73, 0x68, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x62, 0x6c, 0x6f,
0x63, 0x6b, 0x53, 0x68, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68,
0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x6c, 0x6f,
0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x75, 0x6d, 0x5f,
0x63, 0x6f, 0x6e, 0x66, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x0c, 0x6e, 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x22, 0x4d,
0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x6e, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x70,
0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52,
0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x51, 0x0a,
0x12, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x74,
0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6c, 0x6f, 0x73, 0x69,
0x6e, 0x67, 0x54, 0x78, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73,
0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
0x22, 0xfb, 0x01, 0x0a, 0x13, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x50,
0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x6f, 0x69,
0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67,
0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74,
0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x24, 0x0a, 0x0c, 0x73, 0x61, 0x74,
0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42,
0x02, 0x18, 0x01, 0x52, 0x0a, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, 0x12,
0x29, 0x0a, 0x10, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x6c, 0x69, 0x76,
0x65, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x61,
0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
0x04, 0x52, 0x0b, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x22, 0x96,
0x01, 0x0a, 0x11, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x70, 0x65,
0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e,
0x67, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x48, 0x00, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x42, 0x08, 0x0a,
0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x46, 0x0a, 0x0d, 0x50, 0x65, 0x6e, 0x64, 0x69,
0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c,
0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22,
0x79, 0x0a, 0x13, 0x52, 0x65, 0x61, 0x64, 0x79, 0x46, 0x6f, 0x72, 0x50, 0x73, 0x62, 0x74, 0x46,
0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e,
0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0e, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12,
0x25, 0x0a, 0x0e, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67,
0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x73, 0x62, 0x74, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, 0x73, 0x62, 0x74, 0x22, 0xf3, 0x01, 0x0a, 0x17, 0x42,
0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74,
0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x22, 0x0a, 0x0d,
0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65,
0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x04, 0x20,
0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x2b, 0x0a,
0x11, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d,
0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x55,
0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61,
0x62, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c,
0x22, 0xf5, 0x02, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x75,
0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65,
0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f,
0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x46, 0x75, 0x6e, 0x64, 0x69,
0x6e, 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x75, 0x73, 0x68,
0x5f, 0x73, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x75, 0x73, 0x68,
0x53, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x04,
0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a,
0x0d, 0x6d, 0x69, 0x6e, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x05,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x48, 0x74, 0x6c, 0x63, 0x4d, 0x73, 0x61,
0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x73, 0x76, 0x5f,
0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65, 0x6d,
0x6f, 0x74, 0x65, 0x43, 0x73, 0x76, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x63,
0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x12, 0x26, 0x0a, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e,
0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69,
0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d,
0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x5b, 0x0a, 0x18, 0x42, 0x61, 0x74, 0x63,
0x68, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f,
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x52, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0x80, 0x06, 0x0a, 0x12, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0d,
0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65,
0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x75, 0x62, 0x6b, 0x65,
0x79, 0x12, 0x30, 0x0a, 0x12, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79,
0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18,
0x01, 0x52, 0x10, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x53, 0x74, 0x72,
0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x66, 0x75, 0x6e,
0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
0x03, 0x52, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41,
0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x73, 0x61,
0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x75, 0x73, 0x68, 0x53, 0x61, 0x74,
0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18,
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e,
0x66, 0x12, 0x24, 0x0a, 0x0c, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74,
0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x73, 0x61, 0x74,
0x50, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61,
0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74,
0x65, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x69, 0x6e, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x6d, 0x73,
0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x48, 0x74, 0x6c,
0x63, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f,
0x63, 0x73, 0x76, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x73, 0x76, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12,
0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x0b, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x2b, 0x0a, 0x11,
0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65,
0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x55, 0x6e,
0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x6f,
0x73, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x35,
0x0a, 0x0c, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x68, 0x69, 0x6d, 0x18, 0x0e,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e,
0x64, 0x69, 0x6e, 0x67, 0x53, 0x68, 0x69, 0x6d, 0x52, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e,
0x67, 0x53, 0x68, 0x69, 0x6d, 0x12, 0x43, 0x0a, 0x1f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f,
0x6d, 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69,
0x67, 0x68, 0x74, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1a,
0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x61, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x6e,
0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65,
0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x73, 0x18, 0x10,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x61, 0x78, 0x48,
0x74, 0x6c, 0x63, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x6f, 0x63, 0x61,
0x6c, 0x5f, 0x63, 0x73, 0x76, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x61, 0x78,
0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x73, 0x76, 0x12, 0x3e, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d,
0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xf3, 0x01, 0x0a, 0x10, 0x4f, 0x70, 0x65,
0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x39, 0x0a,
0x0c, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64,
0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x68, 0x61,
0x6e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x37, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6e,
0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x6e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x4f, 0x70, 0x65,
0x6e, 0x12, 0x39, 0x0a, 0x09, 0x70, 0x73, 0x62, 0x74, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x18, 0x05,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x61,
0x64, 0x79, 0x46, 0x6f, 0x72, 0x50, 0x73, 0x62, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67,
0x48, 0x00, 0x52, 0x08, 0x70, 0x73, 0x62, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x0f,
0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68,
0x61, 0x6e, 0x49, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x48,
0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a,
0x6b, 0x65, 0x79, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x09, 0x6b, 0x65, 0x79, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6b,
0x65, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x6b, 0x65, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x5f, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x44,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x22, 0x0a, 0x0d, 0x72, 0x61, 0x77,
0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x0b, 0x72, 0x61, 0x77, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2a, 0x0a,
0x07, 0x6b, 0x65, 0x79, 0x5f, 0x6c, 0x6f, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f,
0x72, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x4c, 0x6f, 0x63, 0x22, 0xf0, 0x01, 0x0a, 0x0d, 0x43, 0x68,
0x61, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x68, 0x69, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x61,
0x6d, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x61, 0x6d, 0x74, 0x12, 0x32, 0x0a,
0x0a, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x50, 0x6f, 0x69, 0x6e,
0x74, 0x12, 0x31, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79,
0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61,
0x6c, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x6b,
0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65,
0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63,
0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x65,
0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74,
0x68, 0x61, 0x77, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x0a, 0x74, 0x68, 0x61, 0x77, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x6e, 0x0a, 0x08,
0x50, 0x73, 0x62, 0x74, 0x53, 0x68, 0x69, 0x6d, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x65, 0x6e, 0x64,
0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x49, 0x64,
0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, 0x73, 0x62, 0x74, 0x12, 0x1d, 0x0a,
0x0a, 0x6e, 0x6f, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28,
0x08, 0x52, 0x09, 0x6e, 0x6f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x22, 0x85, 0x01, 0x0a,
0x0b, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x68, 0x69, 0x6d, 0x12, 0x3e, 0x0a, 0x0f,
0x63, 0x68, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x68, 0x69, 0x6d, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68,
0x61, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x68, 0x69, 0x6d, 0x48, 0x00, 0x52, 0x0d, 0x63,
0x68, 0x61, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x68, 0x69, 0x6d, 0x12, 0x2e, 0x0a, 0x09,
0x70, 0x73, 0x62, 0x74, 0x5f, 0x73, 0x68, 0x69, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x73, 0x62, 0x74, 0x53, 0x68, 0x69, 0x6d,
0x48, 0x00, 0x52, 0x08, 0x70, 0x73, 0x62, 0x74, 0x53, 0x68, 0x69, 0x6d, 0x42, 0x06, 0x0a, 0x04,
0x73, 0x68, 0x69, 0x6d, 0x22, 0x3b, 0x0a, 0x11, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53,
0x68, 0x69, 0x6d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x65, 0x6e,
0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x49,
0x64, 0x22, 0x81, 0x01, 0x0a, 0x11, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x73, 0x62,
0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x65,
0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x66, 0x75,
0x6e, 0x64, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x65, 0x6e, 0x64,
0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x49, 0x64,
0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x46, 0x69, 0x6e,
0x61, 0x6c, 0x69, 0x7a, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x13, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e,
0x67, 0x50, 0x73, 0x62, 0x74, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a,
0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x26,
0x0a, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67,
0x43, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f,
0x72, 0x61, 0x77, 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x66, 0x69,
0x6e, 0x61, 0x6c, 0x52, 0x61, 0x77, 0x54, 0x78, 0x22, 0x99, 0x02, 0x0a, 0x14, 0x46, 0x75, 0x6e,
0x64, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73,
0x67, 0x12, 0x39, 0x0a, 0x0d, 0x73, 0x68, 0x69, 0x6d, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x68, 0x69, 0x6d, 0x48, 0x00, 0x52, 0x0c,
0x73, 0x68, 0x69, 0x6d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b,
0x73, 0x68, 0x69, 0x6d, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e,
0x67, 0x53, 0x68, 0x69, 0x6d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x48, 0x00, 0x52, 0x0a, 0x73,
0x68, 0x69, 0x6d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x0b, 0x70, 0x73, 0x62,
0x74, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x73,
0x62, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x73, 0x62, 0x74,
0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x41, 0x0a, 0x0d, 0x70, 0x73, 0x62, 0x74, 0x5f, 0x66,
0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x73, 0x62,
0x74, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x73, 0x62,
0x74, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x74, 0x72, 0x69,
0x67, 0x67, 0x65, 0x72, 0x22, 0x16, 0x0a, 0x14, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53,
0x74, 0x61, 0x74, 0x65, 0x53, 0x74, 0x65, 0x70, 0x52, 0x65, 0x73, 0x70, 0x22, 0xcc, 0x01, 0x0a,
0x0b, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x54, 0x4c, 0x43, 0x12, 0x1a, 0x0a, 0x08,
0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08,
0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75,
0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f,
0x6d, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6d, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79, 0x48,
0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f,
0x74, 0x69, 0x6c, 0x5f, 0x6d, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01,
0x28, 0x05, 0x52, 0x11, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x54, 0x69, 0x6c, 0x4d, 0x61, 0x74,
0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x06,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x50,
0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xb5, 0x12, 0x0a, 0x17, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e,
0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x6d, 0x62, 0x6f,
0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x69, 0x6d, 0x62, 0x6f, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
0x65, 0x12, 0x65, 0x0a, 0x15, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x70, 0x65,
0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x31, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x52, 0x13, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x6e,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x6a, 0x0a, 0x18, 0x70, 0x65, 0x6e, 0x64,
0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65,
0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x02, 0x18, 0x01, 0x52, 0x16, 0x70, 0x65,
0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x73, 0x12, 0x76, 0x0a, 0x1e, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f,
0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x6f, 0x72,
0x63, 0x65, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52,
0x1b, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x6f,
0x73, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x68, 0x0a, 0x16,
0x77, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x63, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x57, 0x61, 0x69,
0x74, 0x69, 0x6e, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x52, 0x14, 0x77, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x1a, 0xd9, 0x03, 0x0a, 0x0e, 0x50, 0x65, 0x6e, 0x64, 0x69,
0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x6d,
0x6f, 0x74, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x75,
0x62, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x69,
0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69,
0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69,
0x74, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61,
0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74,
0x65, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x33,
0x0a, 0x16, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x72, 0x65, 0x73,
0x65, 0x72, 0x76, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13,
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65,
0x53, 0x61, 0x74, 0x12, 0x35, 0x0a, 0x17, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x68,
0x61, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x07,
0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e,
0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x61, 0x74, 0x12, 0x2e, 0x0a, 0x09, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x52,
0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x3e, 0x0a, 0x0f, 0x63, 0x6f,
0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d,
0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x6e, 0x75,
0x6d, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x63,
0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x6e, 0x75, 0x6d,
0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67,
0x65, 0x73, 0x1a, 0xf0, 0x01, 0x0a, 0x12, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x70,
0x65, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x47, 0x0a, 0x07, 0x63, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69,
0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69,
0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x65,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x46,
0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x77, 0x65, 0x69,
0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x69,
0x74, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x66, 0x65, 0x65, 0x5f, 0x70,
0x65, 0x72, 0x5f, 0x6b, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x66, 0x65, 0x65,
0x50, 0x65, 0x72, 0x4b, 0x77, 0x1a, 0xd1, 0x01, 0x0a, 0x13, 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e,
0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x47, 0x0a,
0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50,
0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x07, 0x63,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x69, 0x6d, 0x62, 0x6f, 0x5f,
0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6c,
0x69, 0x6d, 0x62, 0x6f, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x63,
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x2a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x0b, 0x63, 0x6f,
0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0xa3, 0x02, 0x0a, 0x0b, 0x43, 0x6f,
0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x63,
0x61, 0x6c, 0x5f, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c,
0x6f, 0x63, 0x61, 0x6c, 0x54, 0x78, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x6d, 0x6f,
0x74, 0x65, 0x5f, 0x74, 0x78, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72,
0x65, 0x6d, 0x6f, 0x74, 0x65, 0x54, 0x78, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x65, 0x6d,
0x6f, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x69, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x65,
0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x6c, 0x6f, 0x63,
0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61,
0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6f,
0x6d, 0x6d, 0x69, 0x74, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, 0x31, 0x0a, 0x15, 0x72, 0x65,
0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x5f,
0x73, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x72, 0x65, 0x6d, 0x6f, 0x74,
0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, 0x40, 0x0a,
0x1d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f,
0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x06,
0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x65, 0x6e, 0x64,
0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x1a,
0x7b, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x12, 0x47, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x2d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e,
0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x6f,
0x73, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x69, 0x64, 0x1a, 0xee, 0x03, 0x0a,
0x12, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x12, 0x47, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e,
0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x0c,
0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x69, 0x64, 0x12,
0x23, 0x0a, 0x0d, 0x6c, 0x69, 0x6d, 0x62, 0x6f, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6c, 0x69, 0x6d, 0x62, 0x6f, 0x42, 0x61, 0x6c,
0x61, 0x6e, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79,
0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6d,
0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2e, 0x0a,
0x13, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x74, 0x69, 0x6c, 0x5f, 0x6d, 0x61, 0x74, 0x75,
0x72, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x62, 0x6c, 0x6f, 0x63,
0x6b, 0x73, 0x54, 0x69, 0x6c, 0x4d, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2b, 0x0a,
0x11, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e,
0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65,
0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x70, 0x65,
0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e,
0x67, 0x48, 0x54, 0x4c, 0x43, 0x52, 0x0c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x74,
0x6c, 0x63, 0x73, 0x12, 0x55, 0x0a, 0x06, 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x18, 0x09, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64,
0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x2e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x53, 0x74, 0x61,
0x74, 0x65, 0x52, 0x06, 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x22, 0x31, 0x0a, 0x0b, 0x41, 0x6e,
0x63, 0x68, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x49, 0x4d,
0x42, 0x4f, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x45,
0x44, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x53, 0x54, 0x10, 0x02, 0x22, 0x1a, 0x0a,
0x18, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xff, 0x04, 0x0a, 0x12, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x12, 0x33, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x43, 0x0a, 0x0e, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x5f,
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6c, 0x6f,
0x73, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6c, 0x6f,
0x73, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3c, 0x0a, 0x0e, 0x61, 0x63,
0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x76,
0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x40, 0x0a, 0x10, 0x69, 0x6e, 0x61, 0x63,
0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x69, 0x6e, 0x61, 0x63, 0x74,
0x69, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x48, 0x0a, 0x14, 0x70, 0x65,
0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x00,
0x52, 0x12, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x4b, 0x0a, 0x16, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65,
0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x07,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x14, 0x66, 0x75, 0x6c,
0x6c, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x24, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45,
0x76, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x0a,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50,
0x45, 0x4e, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e,
0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x10, 0x01,
0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e,
0x45, 0x4c, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45,
0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x45,
0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e,
0x45, 0x4c, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x55, 0x4c, 0x4c, 0x59, 0x5f, 0x52, 0x45,
0x53, 0x4f, 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x10, 0x05,
0x42, 0x09, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x74, 0x0a, 0x14, 0x57,
0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61,
0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64,
0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10,
0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65,
0x12, 0x2f, 0x0a, 0x13, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x5f,
0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x75,
0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
0x65, 0x22, 0x16, 0x0a, 0x14, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e,
0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xd5, 0x02, 0x0a, 0x15, 0x57, 0x61,
0x6c, 0x6c, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c,
0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61,
0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66,
0x69, 0x72, 0x6d, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x03, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x61,
0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
0x72, 0x6d, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x03, 0x52, 0x12, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42,
0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x30, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x61,
0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
0x65, 0x1a, 0x5e, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61,
0x6e, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42,
0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x01, 0x22, 0x2e, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73,
0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x61, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x6d, 0x73, 0x61,
0x74, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x6c, 0x61,
0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x80, 0x04, 0x0a, 0x16, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61,
0x6e, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x14, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f,
0x70, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x70,
0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x0d, 0x6c, 0x6f, 0x63,
0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52,
0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x34, 0x0a,
0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x6d,
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x42, 0x61, 0x6c, 0x61,
0x6e, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x17, 0x75, 0x6e, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64,
0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x6d, 0x6f,
0x75, 0x6e, 0x74, 0x52, 0x15, 0x75, 0x6e, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x4c, 0x6f,
0x63, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x18, 0x75, 0x6e,
0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x62,
0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x16, 0x75, 0x6e, 0x73,
0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x42, 0x61, 0x6c, 0x61,
0x6e, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x1a, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f,
0x70, 0x65, 0x6e, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63,
0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x17, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f,
0x70, 0x65, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12,
0x4c, 0x0a, 0x1b, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f,
0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x08,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x6d, 0x6f,
0x75, 0x6e, 0x74, 0x52, 0x18, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x6e,
0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xae, 0x06,
0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x61, 0x6d, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x61, 0x6d, 0x74, 0x12,
0x19, 0x0a, 0x08, 0x61, 0x6d, 0x74, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28,
0x03, 0x52, 0x07, 0x61, 0x6d, 0x74, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x66, 0x69,
0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x74, 0x76, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x04,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x43, 0x6c, 0x74, 0x76, 0x44,
0x65, 0x6c, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69,
0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x46, 0x65, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x08, 0x66, 0x65, 0x65, 0x4c, 0x69, 0x6d,
0x69, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x6e, 0x6f,
0x64, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72,
0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0d, 0x69, 0x67, 0x6e, 0x6f, 0x72,
0x65, 0x64, 0x5f, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x64, 0x67, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74,
0x6f, 0x72, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x45,
0x64, 0x67, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70,
0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x75, 0x73,
0x65, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x75, 0x73, 0x65, 0x4d, 0x69, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x34, 0x0a, 0x0d, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x61,
0x69, 0x72, 0x52, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x50, 0x61, 0x69, 0x72, 0x73,
0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x74, 0x76, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0b,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x6c, 0x74, 0x76, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12,
0x60, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x43, 0x75, 0x73, 0x74,
0x6f, 0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11,
0x64, 0x65, 0x73, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x73, 0x12, 0x2c, 0x0a, 0x10, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68,
0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x30, 0x01, 0x52,
0x0e, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x12,
0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x70, 0x75, 0x62, 0x6b,
0x65, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x6f,
0x70, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65,
0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x0a,
0x72, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x0d, 0x64, 0x65,
0x73, 0x74, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28,
0x0e, 0x32, 0x11, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72,
0x65, 0x42, 0x69, 0x74, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72,
0x65, 0x73, 0x1a, 0x44, 0x0a, 0x16, 0x44, 0x65, 0x73, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x2e,
0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72,
0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e,
0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x74, 0x6f, 0x22, 0x5d,
0x0a, 0x0b, 0x45, 0x64, 0x67, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x21, 0x0a,
0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x04, 0x42, 0x02, 0x30, 0x01, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64,
0x12, 0x2b, 0x0a, 0x11, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65,
0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x64, 0x69, 0x72,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x5e, 0x0a,
0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75,
0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x75,
0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01,
0x52, 0x0b, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x62, 0x22, 0x91, 0x04,
0x0a, 0x03, 0x48, 0x6f, 0x70, 0x12, 0x1b, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x30, 0x01, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e,
0x49, 0x64, 0x12, 0x27, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63,
0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x63,
0x68, 0x61, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x28, 0x0a, 0x0e, 0x61,
0x6d, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20,
0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x61, 0x6d, 0x74, 0x54, 0x6f, 0x46, 0x6f,
0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01,
0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65,
0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x65, 0x78, 0x70,
0x69, 0x72, 0x79, 0x12, 0x2d, 0x0a, 0x13, 0x61, 0x6d, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x66, 0x6f,
0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03,
0x52, 0x10, 0x61, 0x6d, 0x74, 0x54, 0x6f, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x4d, 0x73,
0x61, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x07,
0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x66, 0x65, 0x65, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x17, 0x0a,
0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6c, 0x76, 0x5f, 0x70, 0x61,
0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x74, 0x6c, 0x76,
0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x6d, 0x70, 0x70, 0x5f, 0x72,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x4d, 0x50, 0x50, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x09, 0x6d,
0x70, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x61, 0x6d, 0x70, 0x5f,
0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x4d, 0x50, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x09,
0x61, 0x6d, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x44, 0x0a, 0x0e, 0x63, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x6f, 0x70, 0x2e, 0x43, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x1a,
0x40, 0x0a, 0x12, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x01, 0x22, 0x54, 0x0a, 0x09, 0x4d, 0x50, 0x50, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x21,
0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x0b,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64,
0x72, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x6d, 0x74, 0x5f, 0x6d,
0x73, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c,
0x41, 0x6d, 0x74, 0x4d, 0x73, 0x61, 0x74, 0x22, 0x62, 0x0a, 0x09, 0x41, 0x4d, 0x50, 0x52, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x73, 0x68, 0x61,
0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x53, 0x68,
0x61, 0x72, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x68,
0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xe1, 0x01, 0x0a, 0x05,
0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x74,
0x69, 0x6d, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a,
0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73,
0x12, 0x1f, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x6d, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x6d,
0x74, 0x12, 0x1e, 0x0a, 0x04, 0x68, 0x6f, 0x70, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x0a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x6f, 0x70, 0x52, 0x04, 0x68, 0x6f, 0x70,
0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f,
0x6d, 0x73, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61,
0x6c, 0x46, 0x65, 0x65, 0x73, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x6f, 0x74,
0x61, 0x6c, 0x5f, 0x61, 0x6d, 0x74, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,
0x03, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x6d, 0x74, 0x4d, 0x73, 0x61, 0x74, 0x22,
0x55, 0x0a, 0x0f, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x69,
0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18,
0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0xae, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49,
0x6e, 0x66, 0x6f, 0x12, 0x28, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x6e,
0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a,
0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73,
0x12, 0x25, 0x0a, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69,
0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43,
0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x64, 0x67, 0x65, 0x52, 0x08, 0x63,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0xb4, 0x02, 0x0a, 0x0d, 0x4c, 0x69, 0x67, 0x68,
0x74, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, 0x73,
0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a,
0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75,
0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62,
0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x30, 0x0a, 0x09, 0x61, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63,
0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f,
0x72, 0x12, 0x3e, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x06, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x67, 0x68,
0x74, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72,
0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65,
0x73, 0x1a, 0x4b, 0x0a, 0x0d, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x61, 0x74,
0x75, 0x72, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3b,
0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a,
0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x22, 0x86, 0x02, 0x0a, 0x0d,
0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x26, 0x0a,
0x0f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x6f, 0x63, 0x6b,
0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x6e, 0x5f, 0x68, 0x74, 0x6c,
0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x48, 0x74, 0x6c, 0x63,
0x12, 0x22, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6d, 0x73, 0x61,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x66, 0x65, 0x65, 0x42, 0x61, 0x73, 0x65,
0x4d, 0x73, 0x61, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65,
0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
0x03, 0x52, 0x10, 0x66, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x4d,
0x73, 0x61, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18,
0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12,
0x22, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x6d, 0x73, 0x61, 0x74,
0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x48, 0x74, 0x6c, 0x63, 0x4d,
0x73, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61,
0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x22, 0xbc, 0x02, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x45, 0x64, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x30, 0x01, 0x52, 0x09, 0x63, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x5f,
0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61,
0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52,
0x0a, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e,
0x6f, 0x64, 0x65, 0x31, 0x5f, 0x70, 0x75, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x6e, 0x6f, 0x64, 0x65, 0x31, 0x50, 0x75, 0x62, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65,
0x32, 0x5f, 0x70, 0x75, 0x62, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64,
0x65, 0x32, 0x50, 0x75, 0x62, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74,
0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74,
0x79, 0x12, 0x37, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x31, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63,
0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x6e,
0x6f, 0x64, 0x65, 0x31, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x37, 0x0a, 0x0c, 0x6e, 0x6f,
0x64, 0x65, 0x32, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x14, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x32, 0x50, 0x6f, 0x6c,
0x69, 0x63, 0x79, 0x22, 0x46, 0x0a, 0x13, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x47, 0x72,
0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x13, 0x69, 0x6e,
0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x75, 0x6e, 0x61, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65,
0x55, 0x6e, 0x61, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x64, 0x22, 0x64, 0x0a, 0x0c, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x2a, 0x0a, 0x05, 0x6e,
0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65,
0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73,
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65,
0x73, 0x22, 0x41, 0x0a, 0x12, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4e,
0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74,
0x79, 0x70, 0x65, 0x73, 0x22, 0xe1, 0x01, 0x0a, 0x13, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74,
0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x16,
0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x65, 0x6e, 0x74,
0x72, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e,
0x6e, 0x65, 0x73, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x15, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x6e, 0x65, 0x73, 0x73,
0x43, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x1a, 0x5c, 0x0a, 0x1a, 0x42, 0x65,
0x74, 0x77, 0x65, 0x65, 0x6e, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c,
0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4e, 0x0a, 0x0b, 0x46, 0x6c, 0x6f, 0x61,
0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x29, 0x0a,
0x10, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69,
0x7a, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2e, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x07, 0x63,
0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x30, 0x01,
0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x4e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xd5,
0x03, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25,
0x0a, 0x0e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x5f, 0x64, 0x69, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x67, 0x72, 0x61, 0x70, 0x68, 0x44, 0x69, 0x61,
0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x76, 0x67, 0x5f, 0x6f, 0x75, 0x74,
0x5f, 0x64, 0x65, 0x67, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x61,
0x76, 0x67, 0x4f, 0x75, 0x74, 0x44, 0x65, 0x67, 0x72, 0x65, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6d,
0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x64, 0x65, 0x67, 0x72, 0x65, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x4f, 0x75, 0x74, 0x44, 0x65, 0x67, 0x72, 0x65,
0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x21,
0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x05,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x73, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f,
0x72, 0x6b, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28,
0x03, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43,
0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x76, 0x67, 0x5f, 0x63,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
0x01, 0x52, 0x0e, 0x61, 0x76, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x69, 0x7a,
0x65, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6d, 0x69, 0x6e,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6d,
0x61, 0x78, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18,
0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x5f,
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x73, 0x61, 0x74,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x53, 0x61, 0x74, 0x12, 0x28, 0x0a, 0x10,
0x6e, 0x75, 0x6d, 0x5f, 0x7a, 0x6f, 0x6d, 0x62, 0x69, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x73,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6e, 0x75, 0x6d, 0x5a, 0x6f, 0x6d, 0x62, 0x69,
0x65, 0x43, 0x68, 0x61, 0x6e, 0x73, 0x22, 0x0d, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x72, 0x61, 0x70, 0x68, 0x54, 0x6f,
0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x22, 0xcd, 0x01, 0x0a, 0x13, 0x47, 0x72, 0x61, 0x70, 0x68, 0x54, 0x6f, 0x70, 0x6f,
0x6c, 0x6f, 0x67, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x6e, 0x6f,
0x64, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x11, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73,
0x12, 0x41, 0x0a, 0x0f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x75, 0x70, 0x64, 0x61,
0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x64, 0x67, 0x65, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x52, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x63, 0x68,
0x61, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x61,
0x6e, 0x73, 0x22, 0xef, 0x02, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f,
0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74,
0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c,
0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42,
0x02, 0x18, 0x01, 0x52, 0x0e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75,
0x72, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6c,
0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12,
0x39, 0x0a, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65,
0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0d, 0x6e, 0x6f, 0x64,
0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x08, 0x66, 0x65,
0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e,
0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x66,
0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x1a, 0x4b, 0x0a, 0x0d, 0x46, 0x65, 0x61, 0x74, 0x75,
0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x22, 0x91, 0x02, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x45, 0x64, 0x67, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x07, 0x63, 0x68,
0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x30, 0x01, 0x52,
0x06, 0x63, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x5f,
0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74,
0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63,
0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63,
0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0e, 0x72, 0x6f, 0x75, 0x74, 0x69,
0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73,
0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f,
0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x12,
0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f,
0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
0x74, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x13, 0x43, 0x6c, 0x6f,
0x73, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x12, 0x1b, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x04, 0x42, 0x02, 0x30, 0x01, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a,
0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x6f,
0x73, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x32,
0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x50, 0x6f, 0x69,
0x6e, 0x74, 0x22, 0xcf, 0x01, 0x0a, 0x07, 0x48, 0x6f, 0x70, 0x48, 0x69, 0x6e, 0x74, 0x12, 0x17,
0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x30, 0x01, 0x52, 0x06, 0x63, 0x68,
0x61, 0x6e, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65,
0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x66, 0x65, 0x65,
0x42, 0x61, 0x73, 0x65, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x3e, 0x0a, 0x1b, 0x66, 0x65, 0x65, 0x5f,
0x70, 0x72, 0x6f, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x6d, 0x69, 0x6c,
0x6c, 0x69, 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x19, 0x66,
0x65, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4d, 0x69,
0x6c, 0x6c, 0x69, 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, 0x74, 0x76,
0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x05, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x0f, 0x63, 0x6c, 0x74, 0x76, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x44,
0x65, 0x6c, 0x74, 0x61, 0x22, 0x1e, 0x0a, 0x05, 0x53, 0x65, 0x74, 0x49, 0x44, 0x12, 0x15, 0x0a,
0x06, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73,
0x65, 0x74, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x09, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e,
0x74, 0x12, 0x2b, 0x0a, 0x09, 0x68, 0x6f, 0x70, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x6f, 0x70,
0x48, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x68, 0x6f, 0x70, 0x48, 0x69, 0x6e, 0x74, 0x73, 0x22, 0xa8,
0x01, 0x0a, 0x0f, 0x41, 0x4d, 0x50, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61,
0x74, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x17, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63,
0x65, 0x48, 0x54, 0x4c, 0x43, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74,
0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65,
0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x49,
0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x74,
0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x65, 0x74, 0x74, 0x6c,
0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x6d, 0x74, 0x5f, 0x70, 0x61, 0x69,
0x64, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x6d,
0x74, 0x50, 0x61, 0x69, 0x64, 0x4d, 0x73, 0x61, 0x74, 0x22, 0xc3, 0x09, 0x0a, 0x07, 0x49, 0x6e,
0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x5f, 0x70,
0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72,
0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x5f, 0x68, 0x61,
0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12,
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d,
0x73, 0x61, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x4d, 0x73, 0x61, 0x74, 0x12, 0x1c, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x18,
0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x6c,
0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64,
0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x74, 0x74, 0x6c,
0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x65,
0x74, 0x74, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x79, 0x6d,
0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x64, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06,
0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78,
0x70, 0x69, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b,
0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x61, 0x6c,
0x6c, 0x62, 0x61, 0x63, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x74,
0x76, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a,
0x63, 0x6c, 0x74, 0x76, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x0b, 0x72, 0x6f,
0x75, 0x74, 0x65, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x10, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e,
0x74, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a,
0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x5f, 0x69,
0x6e, 0x64, 0x65, 0x78, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x61, 0x64, 0x64, 0x49,
0x6e, 0x64, 0x65, 0x78, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x69,
0x6e, 0x64, 0x65, 0x78, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x65, 0x74, 0x74,
0x6c, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x08, 0x61, 0x6d, 0x74, 0x5f, 0x70,
0x61, 0x69, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x61,
0x6d, 0x74, 0x50, 0x61, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x61, 0x6d, 0x74, 0x5f, 0x70, 0x61,
0x69, 0x64, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x6d,
0x74, 0x50, 0x61, 0x69, 0x64, 0x53, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x6d, 0x74, 0x5f,
0x70, 0x61, 0x69, 0x64, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0b, 0x61, 0x6d, 0x74, 0x50, 0x61, 0x69, 0x64, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x31, 0x0a, 0x05,
0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6e, 0x76, 0x6f,
0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12,
0x28, 0x0a, 0x05, 0x68, 0x74, 0x6c, 0x63, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x48, 0x54,
0x4c, 0x43, 0x52, 0x05, 0x68, 0x74, 0x6c, 0x63, 0x73, 0x12, 0x38, 0x0a, 0x08, 0x66, 0x65, 0x61,
0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x65, 0x61, 0x74,
0x75, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75,
0x72, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x65, 0x6e,
0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x65,
0x6e, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64,
0x64, 0x72, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x61, 0x6d, 0x70, 0x18,
0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x41, 0x6d, 0x70, 0x12, 0x4f, 0x0a, 0x11,
0x61, 0x6d, 0x70, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74,
0x65, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x41, 0x6d, 0x70, 0x49, 0x6e, 0x76, 0x6f, 0x69,
0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x61, 0x6d,
0x70, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x4b, 0x0a,
0x0d, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5a, 0x0a, 0x14, 0x41, 0x6d,
0x70, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x4d, 0x50, 0x49,
0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x41, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63,
0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x00,
0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a,
0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x41,
0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22,
0xfc, 0x03, 0x0a, 0x0b, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x48, 0x54, 0x4c, 0x43, 0x12,
0x1b, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
0x42, 0x02, 0x30, 0x01, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a,
0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
0x52, 0x09, 0x68, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x0a, 0x08, 0x61,
0x6d, 0x74, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61,
0x6d, 0x74, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74,
0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61,
0x63, 0x63, 0x65, 0x70, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61,
0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c,
0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74,
0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x48, 0x65,
0x69, 0x67, 0x68, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f,
0x69, 0x63, 0x65, 0x48, 0x54, 0x4c, 0x43, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74,
0x61, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x48, 0x54, 0x4c, 0x43, 0x2e,
0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x52, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x73, 0x12, 0x2b, 0x0a, 0x12, 0x6d, 0x70, 0x70, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61,
0x6d, 0x74, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6d,
0x70, 0x70, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x6d, 0x74, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x1c,
0x0a, 0x03, 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x41, 0x4d, 0x50, 0x52, 0x03, 0x61, 0x6d, 0x70, 0x1a, 0x40, 0x0a, 0x12,
0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8c,
0x01, 0x0a, 0x03, 0x41, 0x4d, 0x50, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x73,
0x68, 0x61, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x6f, 0x6f, 0x74,
0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b,
0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a,
0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73,
0x68, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x94, 0x01,
0x0a, 0x12, 0x41, 0x64, 0x64, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x27, 0x0a, 0x0f, 0x70,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65,
0x78, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x61, 0x64, 0x64, 0x49, 0x6e, 0x64, 0x65,
0x78, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64,
0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
0x41, 0x64, 0x64, 0x72, 0x22, 0x46, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48,
0x61, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0a, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x73, 0x74,
0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x48, 0x61,
0x73, 0x68, 0x53, 0x74, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x48, 0x61, 0x73, 0x68, 0x22, 0xa0, 0x01, 0x0a,
0x12, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f,
0x6e, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x65, 0x6e, 0x64, 0x69,
0x6e, 0x67, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f,
0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x69, 0x6e,
0x64, 0x65, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x75, 0x6d,
0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0e, 0x6e, 0x75, 0x6d, 0x4d, 0x61, 0x78, 0x49, 0x6e, 0x76, 0x6f, 0x69,
0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x64, 0x18,
0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x64, 0x22,
0x9b, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x69, 0x6e, 0x76, 0x6f, 0x69,
0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x76, 0x6f, 0x69,
0x63, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65,
0x78, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f,
0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12,
0x2c, 0x0a, 0x12, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6f,
0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x66, 0x69, 0x72,
0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x55, 0x0a,
0x13, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65,
0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x61, 0x64, 0x64, 0x49, 0x6e, 0x64, 0x65,
0x78, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65,
0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x49,
0x6e, 0x64, 0x65, 0x78, 0x22, 0x8a, 0x05, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48,
0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a,
0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x44, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20,
0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x29, 0x0a, 0x10,
0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65,
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50,
0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x5f, 0x73, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x53, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x73,
0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4d,
0x73, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61,
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x06,
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x0b, 0x20,
0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x66,
0x65, 0x65, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x66,
0x65, 0x65, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x73,
0x12, 0x28, 0x0a, 0x05, 0x68, 0x74, 0x6c, 0x63, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x54, 0x4c, 0x43, 0x41, 0x74, 0x74, 0x65,
0x6d, 0x70, 0x74, 0x52, 0x05, 0x68, 0x74, 0x6c, 0x63, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61,
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0f, 0x20, 0x01, 0x28,
0x04, 0x52, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12,
0x42, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f,
0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65,
0x61, 0x73, 0x6f, 0x6e, 0x52, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61,
0x73, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10,
0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x01,
0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x02, 0x12,
0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10,
0x05, 0x22, 0xd5, 0x02, 0x0a, 0x0b, 0x48, 0x54, 0x4c, 0x43, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70,
0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18,
0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x49, 0x64,
0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x1d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x54, 0x4c, 0x43, 0x41, 0x74, 0x74,
0x65, 0x6d, 0x70, 0x74, 0x2e, 0x48, 0x54, 0x4c, 0x43, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52,
0x6f, 0x75, 0x74, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x61,
0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x18, 0x03,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x54, 0x69, 0x6d,
0x65, 0x4e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x5f, 0x74,
0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65,
0x73, 0x6f, 0x6c, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x73, 0x12, 0x28, 0x0a, 0x07, 0x66,
0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x07, 0x66, 0x61,
0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67,
0x65, 0x22, 0x36, 0x0a, 0x0a, 0x48, 0x54, 0x4c, 0x43, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x00, 0x12, 0x0d,
0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a,
0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x22, 0xa6, 0x01, 0x0a, 0x13, 0x4c, 0x69,
0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x2d, 0x0a, 0x12, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x63,
0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69,
0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65,
0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x66,
0x73, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x50, 0x61,
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73,
0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73,
0x65, 0x64, 0x22, 0x9c, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x70,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x70,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x69, 0x72, 0x73, 0x74,
0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x04, 0x52, 0x10, 0x66, 0x69, 0x72, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f,
0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e,
0x64, 0x65, 0x78, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04,
0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65,
0x74, 0x22, 0x65, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2a, 0x0a, 0x11,
0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x73, 0x5f, 0x6f, 0x6e, 0x6c,
0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x48,
0x74, 0x6c, 0x63, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x78, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x41, 0x6c, 0x6c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x70,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x08, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64,
0x5f, 0x68, 0x74, 0x6c, 0x63, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
0x08, 0x52, 0x0f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x48, 0x74, 0x6c, 0x63, 0x73, 0x4f, 0x6e,
0x6c, 0x79, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d,
0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x15, 0x41, 0x62, 0x61,
0x6e, 0x64, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x38, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x70, 0x6f,
0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0c,
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x19,
0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f,
0x73, 0x68, 0x69, 0x6d, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
0x16, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53,
0x68, 0x69, 0x6d, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x16, 0x69, 0x5f, 0x6b, 0x6e, 0x6f,
0x77, 0x5f, 0x77, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x5f, 0x61, 0x6d, 0x5f, 0x64, 0x6f, 0x69, 0x6e,
0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x4b, 0x6e, 0x6f, 0x77, 0x57, 0x68,
0x61, 0x74, 0x49, 0x41, 0x6d, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x22, 0x18, 0x0a, 0x16, 0x41, 0x62,
0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x0a, 0x11, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x65, 0x76,
0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x68, 0x6f,
0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x73, 0x68, 0x6f, 0x77, 0x12, 0x1d, 0x0a,
0x0a, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x22, 0x35, 0x0a, 0x12,
0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x53, 0x79, 0x73, 0x74,
0x65, 0x6d, 0x73, 0x22, 0x27, 0x0a, 0x0c, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x53, 0x74, 0x72,
0x69, 0x6e, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x79, 0x52, 0x65, 0x71, 0x22, 0xb0, 0x04, 0x0a,
0x06, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69,
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c,
0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12,
0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01,
0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a,
0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65,
0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61,
0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x61,
0x64, 0x64, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x61, 0x6c, 0x6c, 0x62,
0x61, 0x63, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x74, 0x76, 0x5f,
0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x6c,
0x74, 0x76, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x74,
0x65, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x52,
0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x19,
0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03,
0x52, 0x07, 0x6e, 0x75, 0x6d, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61,
0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75,
0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72,
0x65, 0x73, 0x1a, 0x4b, 0x0a, 0x0d, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x61,
0x74, 0x75, 0x72, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
0x59, 0x0a, 0x07, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f,
0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20,
0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12,
0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28,
0x08, 0x52, 0x07, 0x69, 0x73, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x22, 0x12, 0x0a, 0x10, 0x46, 0x65,
0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xb3,
0x01, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x46, 0x65, 0x65, 0x52, 0x65, 0x70,
0x6f, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05,
0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x30, 0x01, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x49, 0x64,
0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x69, 0x6e,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65,
0x65, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x61,
0x73, 0x65, 0x46, 0x65, 0x65, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x66, 0x65, 0x65,
0x5f, 0x70, 0x65, 0x72, 0x5f, 0x6d, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
0x66, 0x65, 0x65, 0x50, 0x65, 0x72, 0x4d, 0x69, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x65, 0x65,
0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x66, 0x65, 0x65,
0x52, 0x61, 0x74, 0x65, 0x22, 0xb5, 0x01, 0x0a, 0x11, 0x46, 0x65, 0x65, 0x52, 0x65, 0x70, 0x6f,
0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x63, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x17, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x46, 0x65, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x64, 0x61, 0x79, 0x5f, 0x66, 0x65,
0x65, 0x5f, 0x73, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x64, 0x61, 0x79,
0x46, 0x65, 0x65, 0x53, 0x75, 0x6d, 0x12, 0x20, 0x0a, 0x0c, 0x77, 0x65, 0x65, 0x6b, 0x5f, 0x66,
0x65, 0x65, 0x5f, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x77, 0x65,
0x65, 0x6b, 0x46, 0x65, 0x65, 0x53, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x6f, 0x6e, 0x74,
0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52,
0x0b, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x46, 0x65, 0x65, 0x53, 0x75, 0x6d, 0x22, 0xd4, 0x02, 0x0a,
0x13, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x12, 0x34,
0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x50,
0x6f, 0x69, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65,
0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x61, 0x73,
0x65, 0x46, 0x65, 0x65, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f,
0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x66, 0x65, 0x65, 0x52,
0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x6b,
0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x74, 0x69,
0x6d, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x0d, 0x6d,
0x61, 0x78, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01,
0x28, 0x04, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x48, 0x74, 0x6c, 0x63, 0x4d, 0x73, 0x61, 0x74, 0x12,
0x22, 0x0a, 0x0d, 0x6d, 0x69, 0x6e, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x6d, 0x73, 0x61, 0x74,
0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x48, 0x74, 0x6c, 0x63, 0x4d,
0x73, 0x61, 0x74, 0x12, 0x35, 0x0a, 0x17, 0x6d, 0x69, 0x6e, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f,
0x6d, 0x73, 0x61, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x08,
0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x6d, 0x69, 0x6e, 0x48, 0x74, 0x6c, 0x63, 0x4d, 0x73, 0x61,
0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x73, 0x63,
0x6f, 0x70, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x0c, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f,
0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e,
0x74, 0x12, 0x2c, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x14, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12,
0x21, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x72, 0x72,
0x6f, 0x72, 0x22, 0x52, 0x0a, 0x14, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0e, 0x66, 0x61,
0x69, 0x6c, 0x65, 0x64, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x65,
0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x18, 0x46, 0x6f, 0x72, 0x77, 0x61,
0x72, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69,
0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a,
0x0c, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74,
0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x75, 0x6d, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x76, 0x65, 0x6e,
0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6e, 0x75, 0x6d, 0x4d, 0x61, 0x78,
0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xbb, 0x02, 0x0a, 0x0f, 0x46, 0x6f, 0x72, 0x77, 0x61,
0x72, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x74, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x18,
0x01, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x20, 0x0a, 0x0a,
0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x5f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
0x42, 0x02, 0x30, 0x01, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x49, 0x6e, 0x12, 0x22,
0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20,
0x01, 0x28, 0x04, 0x42, 0x02, 0x30, 0x01, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x4f,
0x75, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x6d, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01,
0x28, 0x04, 0x52, 0x05, 0x61, 0x6d, 0x74, 0x49, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x6d, 0x74,
0x5f, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x74, 0x4f,
0x75, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52,
0x03, 0x66, 0x65, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f, 0x6d, 0x73, 0x61, 0x74,
0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x66, 0x65, 0x65, 0x4d, 0x73, 0x61, 0x74, 0x12,
0x1e, 0x0a, 0x0b, 0x61, 0x6d, 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x09,
0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x6d, 0x74, 0x49, 0x6e, 0x4d, 0x73, 0x61, 0x74, 0x12,
0x20, 0x0a, 0x0c, 0x61, 0x6d, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x61, 0x6d, 0x74, 0x4f, 0x75, 0x74, 0x4d, 0x73, 0x61,
0x74, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e,
0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x4e, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x19, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64,
0x69, 0x6e, 0x67, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x43, 0x0a, 0x11, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67,
0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67,
0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x10, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e,
0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f,
0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x49, 0x6e,
0x64, 0x65, 0x78, 0x22, 0x50, 0x0a, 0x1a, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e,
0x50, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x64, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x70,
0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52,
0x09, 0x63, 0x68, 0x61, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x68,
0x61, 0x6e, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x0a, 0x63, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x73, 0x0a, 0x0f, 0x4d,
0x75, 0x6c, 0x74, 0x69, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x34,
0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x50, 0x6f,
0x69, 0x6e, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x63, 0x68,
0x61, 0x6e, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70,
0x22, 0x19, 0x0a, 0x17, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x45, 0x78,
0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x9f, 0x01, 0x0a, 0x12,
0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68,
0x6f, 0x74, 0x12, 0x45, 0x0a, 0x13, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x61,
0x6e, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x15, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42,
0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x11, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68,
0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x42, 0x0a, 0x11, 0x6d, 0x75, 0x6c,
0x74, 0x69, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x75, 0x6c,
0x74, 0x69, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x0f, 0x6d, 0x75,
0x6c, 0x74, 0x69, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x49, 0x0a,
0x0e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12,
0x37, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x0b, 0x63, 0x68, 0x61,
0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x73,
0x74, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x62, 0x61,
0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x75,
0x70, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70,
0x73, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x5f,
0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0f,
0x6d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x42,
0x08, 0x0a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x73,
0x74, 0x6f, 0x72, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x63,
0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22,
0x1a, 0x0a, 0x18, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63,
0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x12, 0x4d,
0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x22, 0xb0, 0x01, 0x0a, 0x13, 0x42, 0x61, 0x6b, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f,
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x70, 0x65, 0x72,
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x50,
0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69,
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x6b,
0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x72, 0x6f, 0x6f,
0x74, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f,
0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x61, 0x6c, 0x6c, 0x6f,
0x77, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x73, 0x22, 0x32, 0x0a, 0x14, 0x42, 0x61, 0x6b, 0x65, 0x4d, 0x61, 0x63, 0x61,
0x72, 0x6f, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08,
0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x22, 0x18, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74,
0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x22, 0x3b, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f,
0x6f, 0x6e, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a,
0x0c, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x04, 0x52, 0x0a, 0x72, 0x6f, 0x6f, 0x74, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x22,
0x39, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f,
0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x72, 0x6f,
0x6f, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
0x09, 0x72, 0x6f, 0x6f, 0x74, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x22, 0x34, 0x0a, 0x18, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64,
0x22, 0x55, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x6d,
0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x70, 0x65,
0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e,
0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d,
0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x50,
0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x22, 0xe4, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a,
0x12, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x11, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x73, 0x1a, 0x63, 0x0a, 0x16, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x65, 0x72,
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x50,
0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb0, 0x08, 0x0a, 0x07, 0x46, 0x61, 0x69,
0x6c, 0x75, 0x72, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75,
0x72, 0x65, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04,
0x63, 0x6f, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x52, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x04,
0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x68, 0x74, 0x6c, 0x63, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x22,
0x0a, 0x0d, 0x6f, 0x6e, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x68, 0x61, 0x5f, 0x32, 0x35, 0x36, 0x18,
0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6f, 0x6e, 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x61, 0x32,
0x35, 0x36, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x74, 0x76, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72,
0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x63, 0x6c, 0x74, 0x76, 0x45, 0x78, 0x70,
0x69, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, 0x69,
0x6c, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65,
0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65,
0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x68,
0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69,
0x67, 0x68, 0x74, 0x22, 0xef, 0x05, 0x0a, 0x0b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x43,
0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x10,
0x00, 0x12, 0x28, 0x0a, 0x24, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x4f,
0x52, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e,
0x54, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x49,
0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54,
0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x46, 0x49, 0x4e,
0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x43, 0x4c, 0x54,
0x56, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x10, 0x03, 0x12, 0x1f, 0x0a, 0x1b, 0x46, 0x49,
0x4e, 0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x48, 0x54,
0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x46,
0x49, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x54, 0x4f, 0x4f, 0x5f,
0x53, 0x4f, 0x4f, 0x4e, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49,
0x44, 0x5f, 0x52, 0x45, 0x41, 0x4c, 0x4d, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x58, 0x50,
0x49, 0x52, 0x59, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x53, 0x4f, 0x4f, 0x4e, 0x10, 0x07, 0x12, 0x19,
0x0a, 0x15, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4f, 0x4e, 0x49, 0x4f, 0x4e, 0x5f,
0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x4e, 0x56,
0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4f, 0x4e, 0x49, 0x4f, 0x4e, 0x5f, 0x48, 0x4d, 0x41, 0x43, 0x10,
0x09, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4f, 0x4e, 0x49,
0x4f, 0x4e, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x0a, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x4d, 0x4f, 0x55,
0x4e, 0x54, 0x5f, 0x42, 0x45, 0x4c, 0x4f, 0x57, 0x5f, 0x4d, 0x49, 0x4e, 0x49, 0x4d, 0x55, 0x4d,
0x10, 0x0b, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x45, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46,
0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x19, 0x0a, 0x15, 0x49, 0x4e, 0x43, 0x4f,
0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x43, 0x4c, 0x54, 0x56, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52,
0x59, 0x10, 0x0d, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x44,
0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x0e, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x45, 0x4d,
0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x46,
0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x0f, 0x12, 0x21, 0x0a, 0x1d, 0x52, 0x45, 0x51, 0x55,
0x49, 0x52, 0x45, 0x44, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x46, 0x45, 0x41, 0x54, 0x55, 0x52,
0x45, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x10, 0x12, 0x24, 0x0a, 0x20, 0x52,
0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f,
0x46, 0x45, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10,
0x11, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4e, 0x45, 0x58,
0x54, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x10, 0x12, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x4d, 0x50,
0x4f, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55,
0x52, 0x45, 0x10, 0x13, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e,
0x54, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x14,
0x12, 0x1d, 0x0a, 0x19, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x48,
0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x15, 0x12,
0x12, 0x0a, 0x0e, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x46, 0x41,
0x52, 0x10, 0x16, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x50, 0x50, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f,
0x55, 0x54, 0x10, 0x17, 0x12, 0x19, 0x0a, 0x15, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f,
0x4f, 0x4e, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x18, 0x12,
0x15, 0x0a, 0x10, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x46, 0x41, 0x49, 0x4c,
0x55, 0x52, 0x45, 0x10, 0xe5, 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57,
0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0xe6, 0x07, 0x12, 0x17, 0x0a, 0x12,
0x55, 0x4e, 0x52, 0x45, 0x41, 0x44, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55,
0x52, 0x45, 0x10, 0xe7, 0x07, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0xb3, 0x03, 0x0a, 0x0d,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a,
0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63,
0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x07, 0x63, 0x68,
0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x30, 0x01, 0x52,
0x06, 0x63, 0x68, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12,
0x26, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x6c,
0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x6f,
0x63, 0x6b, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x11, 0x68, 0x74, 0x6c, 0x63, 0x5f,
0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01,
0x28, 0x04, 0x52, 0x0f, 0x68, 0x74, 0x6c, 0x63, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x4d,
0x73, 0x61, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18,
0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, 0x19,
0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x07, 0x66, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x68, 0x74, 0x6c,
0x63, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x0b,
0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x68, 0x74, 0x6c, 0x63, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75,
0x6d, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x6f,
0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x0f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x44, 0x61, 0x74,
0x61, 0x22, 0x5d, 0x0a, 0x0a, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x49, 0x64, 0x12,
0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05,
0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x03, 0x6f, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x09, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x70, 0x52, 0x03, 0x6f, 0x70, 0x73,
0x22, 0x36, 0x0a, 0x02, 0x4f, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x18,
0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x65,
0x63, 0x6b, 0x4d, 0x61, 0x63, 0x50, 0x65, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x08, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b,
0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f,
0x6f, 0x6e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65,
0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x75, 0x6c,
0x6c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66,
0x75, 0x6c, 0x6c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x2c, 0x0a, 0x14, 0x43, 0x68, 0x65,
0x63, 0x6b, 0x4d, 0x61, 0x63, 0x50, 0x65, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0xcf, 0x02, 0x0a, 0x14, 0x52, 0x50, 0x43, 0x4d,
0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12,
0x21, 0x0a, 0x0c, 0x72, 0x61, 0x77, 0x5f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x72, 0x61, 0x77, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f,
0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x17, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x61, 0x76,
0x65, 0x61, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x15, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x61, 0x76, 0x65, 0x61,
0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x11, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x75,
0x74, 0x68, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x75, 0x74, 0x68,
0x12, 0x2d, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x2f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x15, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04,
0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x63, 0x65, 0x70, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x34, 0x0a, 0x0a, 0x53, 0x74, 0x72,
0x65, 0x61, 0x6d, 0x41, 0x75, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0d, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x46, 0x75, 0x6c, 0x6c, 0x55, 0x72, 0x69, 0x22,
0x90, 0x01, 0x0a, 0x0a, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26,
0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x75, 0x72,
0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x46,
0x75, 0x6c, 0x6c, 0x55, 0x72, 0x69, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d,
0x5f, 0x72, 0x70, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x74, 0x72, 0x65,
0x61, 0x6d, 0x52, 0x70, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61,
0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a,
0x65, 0x64, 0x22, 0xc0, 0x01, 0x0a, 0x15, 0x52, 0x50, 0x43, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65,
0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x0a,
0x72, 0x65, 0x66, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
0x52, 0x08, 0x72, 0x65, 0x66, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x08, 0x72, 0x65,
0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52,
0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x72,
0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x64, 0x62,
0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x46, 0x65, 0x65, 0x64, 0x62,
0x61, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x42,
0x14, 0x0a, 0x12, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x16, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65,
0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x69, 0x64, 0x64, 0x6c,
0x65, 0x77, 0x61, 0x72, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x1b, 0x63, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x63, 0x61, 0x76,
0x65, 0x61, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x43, 0x61,
0x76, 0x65, 0x61, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x65, 0x61, 0x64,
0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0c, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x8b,
0x01, 0x0a, 0x11, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x46, 0x65, 0x65, 0x64,
0x62, 0x61, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65,
0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x16, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65,
0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x15, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65,
0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x2a, 0x7d, 0x0a, 0x0b,
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x57,
0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41,
0x53, 0x48, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x50,
0x55, 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a,
0x55, 0x4e, 0x55, 0x53, 0x45, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50,
0x55, 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19,
0x55, 0x4e, 0x55, 0x53, 0x45, 0x44, 0x5f, 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x55,
0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x03, 0x2a, 0x78, 0x0a, 0x0e, 0x43,
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a,
0x17, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d,
0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45,
0x47, 0x41, 0x43, 0x59, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43,
0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x02, 0x12, 0x0b, 0x0a,
0x07, 0x41, 0x4e, 0x43, 0x48, 0x4f, 0x52, 0x53, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x43,
0x52, 0x49, 0x50, 0x54, 0x5f, 0x45, 0x4e, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, 0x5f, 0x4c, 0x45,
0x41, 0x53, 0x45, 0x10, 0x04, 0x2a, 0x61, 0x0a, 0x09, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74,
0x6f, 0x72, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x4f, 0x52, 0x5f,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x49,
0x54, 0x49, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14,
0x0a, 0x10, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x4d, 0x4f,
0x54, 0x45, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x4f,
0x52, 0x5f, 0x42, 0x4f, 0x54, 0x48, 0x10, 0x03, 0x2a, 0x60, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f,
0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59,
0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06,
0x41, 0x4e, 0x43, 0x48, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x4e, 0x43, 0x4f,
0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x4f,
0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x10, 0x03, 0x12, 0x0a,
0x0a, 0x06, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x04, 0x2a, 0x71, 0x0a, 0x11, 0x52, 0x65,
0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x63, 0x6f, 0x6d, 0x65, 0x12,
0x13, 0x0a, 0x0f, 0x4f, 0x55, 0x54, 0x43, 0x4f, 0x4d, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f,
0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x10,
0x01, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x10, 0x02,
0x12, 0x0d, 0x0a, 0x09, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x03, 0x12,
0x0f, 0x0a, 0x0b, 0x46, 0x49, 0x52, 0x53, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x10, 0x04,
0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x05, 0x2a, 0x39, 0x0a,
0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16,
0x42, 0x45, 0x54, 0x57, 0x45, 0x45, 0x4e, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x43, 0x45, 0x4e, 0x54,
0x52, 0x41, 0x4c, 0x49, 0x54, 0x59, 0x10, 0x01, 0x2a, 0x3b, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x6f,
0x69, 0x63, 0x65, 0x48, 0x54, 0x4c, 0x43, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0c, 0x0a, 0x08,
0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45,
0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45,
0x4c, 0x45, 0x44, 0x10, 0x02, 0x2a, 0xd9, 0x01, 0x0a, 0x14, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17,
0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e,
0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, 0x49, 0x4c, 0x55,
0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55,
0x54, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52,
0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, 0x02,
0x12, 0x18, 0x0a, 0x14, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53,
0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x2c, 0x0a, 0x28, 0x46, 0x41,
0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43,
0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x44,
0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x10, 0x04, 0x12, 0x27, 0x0a, 0x23, 0x46, 0x41, 0x49, 0x4c,
0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46,
0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10,
0x05, 0x2a, 0xcf, 0x04, 0x0a, 0x0a, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x69, 0x74,
0x12, 0x18, 0x0a, 0x14, 0x44, 0x41, 0x54, 0x41, 0x4c, 0x4f, 0x53, 0x53, 0x5f, 0x50, 0x52, 0x4f,
0x54, 0x45, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x41,
0x54, 0x41, 0x4c, 0x4f, 0x53, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, 0x5f, 0x4f,
0x50, 0x54, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x5f,
0x52, 0x4f, 0x55, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x03, 0x12, 0x1f, 0x0a,
0x1b, 0x55, 0x50, 0x46, 0x52, 0x4f, 0x4e, 0x54, 0x5f, 0x53, 0x48, 0x55, 0x54, 0x44, 0x4f, 0x57,
0x4e, 0x5f, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x10, 0x04, 0x12, 0x1f,
0x0a, 0x1b, 0x55, 0x50, 0x46, 0x52, 0x4f, 0x4e, 0x54, 0x5f, 0x53, 0x48, 0x55, 0x54, 0x44, 0x4f,
0x57, 0x4e, 0x5f, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x5f, 0x4f, 0x50, 0x54, 0x10, 0x05, 0x12,
0x16, 0x0a, 0x12, 0x47, 0x4f, 0x53, 0x53, 0x49, 0x50, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x49, 0x45,
0x53, 0x5f, 0x52, 0x45, 0x51, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x47, 0x4f, 0x53, 0x53, 0x49,
0x50, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x49, 0x45, 0x53, 0x5f, 0x4f, 0x50, 0x54, 0x10, 0x07, 0x12,
0x11, 0x0a, 0x0d, 0x54, 0x4c, 0x56, 0x5f, 0x4f, 0x4e, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x51,
0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x4c, 0x56, 0x5f, 0x4f, 0x4e, 0x49, 0x4f, 0x4e, 0x5f,
0x4f, 0x50, 0x54, 0x10, 0x09, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x58, 0x54, 0x5f, 0x47, 0x4f, 0x53,
0x53, 0x49, 0x50, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x49, 0x45, 0x53, 0x5f, 0x52, 0x45, 0x51, 0x10,
0x0a, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x58, 0x54, 0x5f, 0x47, 0x4f, 0x53, 0x53, 0x49, 0x50, 0x5f,
0x51, 0x55, 0x45, 0x52, 0x49, 0x45, 0x53, 0x5f, 0x4f, 0x50, 0x54, 0x10, 0x0b, 0x12, 0x19, 0x0a,
0x15, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x4b,
0x45, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x10, 0x0c, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, 0x41, 0x54,
0x49, 0x43, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x4f, 0x50,
0x54, 0x10, 0x0d, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41,
0x44, 0x44, 0x52, 0x5f, 0x52, 0x45, 0x51, 0x10, 0x0e, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x59,
0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x5f, 0x4f, 0x50, 0x54, 0x10, 0x0f, 0x12,
0x0b, 0x0a, 0x07, 0x4d, 0x50, 0x50, 0x5f, 0x52, 0x45, 0x51, 0x10, 0x10, 0x12, 0x0b, 0x0a, 0x07,
0x4d, 0x50, 0x50, 0x5f, 0x4f, 0x50, 0x54, 0x10, 0x11, 0x12, 0x16, 0x0a, 0x12, 0x57, 0x55, 0x4d,
0x42, 0x4f, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x53, 0x5f, 0x52, 0x45, 0x51, 0x10,
0x12, 0x12, 0x16, 0x0a, 0x12, 0x57, 0x55, 0x4d, 0x42, 0x4f, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e,
0x45, 0x4c, 0x53, 0x5f, 0x4f, 0x50, 0x54, 0x10, 0x13, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x4e, 0x43,
0x48, 0x4f, 0x52, 0x53, 0x5f, 0x52, 0x45, 0x51, 0x10, 0x14, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x4e,
0x43, 0x48, 0x4f, 0x52, 0x53, 0x5f, 0x4f, 0x50, 0x54, 0x10, 0x15, 0x12, 0x1d, 0x0a, 0x19, 0x41,
0x4e, 0x43, 0x48, 0x4f, 0x52, 0x53, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x5f, 0x46, 0x45, 0x45, 0x5f,
0x48, 0x54, 0x4c, 0x43, 0x5f, 0x52, 0x45, 0x51, 0x10, 0x16, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x4e,
0x43, 0x48, 0x4f, 0x52, 0x53, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x48,
0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x50, 0x54, 0x10, 0x17, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x4d, 0x50,
0x5f, 0x52, 0x45, 0x51, 0x10, 0x1e, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x4d, 0x50, 0x5f, 0x4f, 0x50,
0x54, 0x10, 0x1f, 0x2a, 0xac, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61,
0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f,
0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10,
0x00, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c,
0x55, 0x52, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1c, 0x0a,
0x18, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f,
0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x55,
0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x49, 0x4e,
0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x10, 0x03, 0x12, 0x24, 0x0a, 0x20,
0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x49,
0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52,
0x10, 0x04, 0x32, 0xc9, 0x25, 0x0a, 0x09, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67,
0x12, 0x4a, 0x0a, 0x0d, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
0x65, 0x12, 0x1b, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74,
0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x61, 0x6c,
0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0e,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61,
0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x6c, 0x61,
0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x47,
0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x44, 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69,
0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d,
0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e,
0x0a, 0x09, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x12, 0x17, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e,
0x64, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44,
0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x30, 0x01, 0x12, 0x3b, 0x0a, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x16,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x79, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53,
0x65, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x41, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x12, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x56, 0x65, 0x72, 0x69,
0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x56,
0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50,
0x65, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e,
0x65, 0x63, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x65,
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0e, 0x44, 0x69,
0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50,
0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x65, 0x65,
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x09, 0x4c, 0x69, 0x73,
0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x17, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x18, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x13, 0x53, 0x75, 0x62,
0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x50, 0x65, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x12, 0x1c, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x45, 0x76, 0x65,
0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x10,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74,
0x30, 0x01, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x15, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f,
0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x1d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x76,
0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65,
0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50,
0x0a, 0x0f, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x73, 0x12, 0x1d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e,
0x67, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x47, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73,
0x12, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x16, 0x53, 0x75, 0x62,
0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x76, 0x65,
0x6e, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x30,
0x01, 0x12, 0x4d, 0x0a, 0x0e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x73, 0x12, 0x1c, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x73,
0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x41, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53,
0x79, 0x6e, 0x63, 0x12, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x70, 0x65, 0x6e,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x6f,
0x69, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x12, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x30, 0x01, 0x12, 0x53, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x63,
0x68, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1e, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a,
0x10, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x74, 0x65,
0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e,
0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x1a, 0x1b,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74,
0x61, 0x74, 0x65, 0x53, 0x74, 0x65, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x50, 0x0a, 0x0f, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1c,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x63,
0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x1b, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65,
0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0x46, 0x0a,
0x0c, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1a, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x30, 0x01, 0x12, 0x4d, 0x0a, 0x0e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1c, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62,
0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6d,
0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02,
0x01, 0x28, 0x01, 0x30, 0x01, 0x12, 0x3a, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x46, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65,
0x12, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x52,
0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x03, 0x88, 0x02, 0x01, 0x28, 0x01, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x0f, 0x53, 0x65, 0x6e,
0x64, 0x54, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x19, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a,
0x41, 0x64, 0x64, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x1a, 0x19, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76,
0x6f, 0x69, 0x63, 0x65, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76,
0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x0d,
0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x12, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73,
0x68, 0x1a, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63,
0x65, 0x12, 0x41, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e,
0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49,
0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x1a, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69,
0x63, 0x65, 0x30, 0x01, 0x12, 0x32, 0x0a, 0x0c, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x50, 0x61,
0x79, 0x52, 0x65, 0x71, 0x12, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x79,
0x52, 0x65, 0x71, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x1a, 0x0d, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x12, 0x47, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74,
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73,
0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1c, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61,
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a,
0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x41, 0x6c, 0x6c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x41, 0x6c, 0x6c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62,
0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x47, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x6f,
0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64,
0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x39, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x16, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x64, 0x67, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x47,
0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49,
0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, 0x74,
0x65, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79,
0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0e, 0x47, 0x65, 0x74,
0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x35, 0x0a, 0x0a, 0x53, 0x74,
0x6f, 0x70, 0x44, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x57, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x20, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79,
0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x1a, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f,
0x67, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x0a, 0x44, 0x65,
0x62, 0x75, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67,
0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a,
0x09, 0x46, 0x65, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x46, 0x65, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x65, 0x52,
0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a,
0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x12, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x6c,
0x69, 0x63, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1b, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a,
0x11, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x69, 0x73, 0x74, 0x6f,
0x72, 0x79, 0x12, 0x1f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61,
0x72, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x6f, 0x72, 0x77,
0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x13, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x21, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x14, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42,
0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x54, 0x0a, 0x17, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41,
0x6c, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73,
0x12, 0x1e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63,
0x6b, 0x75, 0x70, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63,
0x6b, 0x75, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x4e, 0x0a, 0x10, 0x56,
0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12,
0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b,
0x75, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63,
0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x15, 0x52,
0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x63,
0x6b, 0x75, 0x70, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73,
0x74, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x73, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x20,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61,
0x63, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x1a, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63,
0x6b, 0x75, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x30, 0x01, 0x12, 0x47, 0x0a,
0x0c, 0x42, 0x61, 0x6b, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x12, 0x1a, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x6b, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f,
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x42, 0x61, 0x6b, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61,
0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x12, 0x1d, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x49, 0x44,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x49, 0x44, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1e, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72,
0x6f, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72,
0x6f, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a,
0x0f, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73,
0x12, 0x1d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72,
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d,
0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x53, 0x0a, 0x18, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e,
0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4d, 0x61, 0x63, 0x50, 0x65, 0x72, 0x6d,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x68, 0x65, 0x63, 0x6b, 0x4d, 0x61, 0x63, 0x50, 0x65, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
0x52, 0x50, 0x43, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x12, 0x1c, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77,
0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x1b, 0x2e, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x11,
0x53, 0x65, 0x6e, 0x64, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x12, 0x1f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12,
0x25, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x30, 0x01, 0x42, 0x27,
0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67,
0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e,
0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_lightning_proto_rawDescOnce sync.Once
file_lightning_proto_rawDescData = file_lightning_proto_rawDesc
)
func file_lightning_proto_rawDescGZIP() []byte {
file_lightning_proto_rawDescOnce.Do(func() {
file_lightning_proto_rawDescData = protoimpl.X.CompressGZIP(file_lightning_proto_rawDescData)
})
return file_lightning_proto_rawDescData
}
var file_lightning_proto_enumTypes = make([]protoimpl.EnumInfo, 19)
var file_lightning_proto_msgTypes = make([]protoimpl.MessageInfo, 207)
var file_lightning_proto_goTypes = []interface{}{
(AddressType)(0), // 0: lnrpc.AddressType
(CommitmentType)(0), // 1: lnrpc.CommitmentType
(Initiator)(0), // 2: lnrpc.Initiator
(ResolutionType)(0), // 3: lnrpc.ResolutionType
(ResolutionOutcome)(0), // 4: lnrpc.ResolutionOutcome
(NodeMetricType)(0), // 5: lnrpc.NodeMetricType
(InvoiceHTLCState)(0), // 6: lnrpc.InvoiceHTLCState
(PaymentFailureReason)(0), // 7: lnrpc.PaymentFailureReason
(FeatureBit)(0), // 8: lnrpc.FeatureBit
(UpdateFailure)(0), // 9: lnrpc.UpdateFailure
(ChannelCloseSummary_ClosureType)(0), // 10: lnrpc.ChannelCloseSummary.ClosureType
(Peer_SyncType)(0), // 11: lnrpc.Peer.SyncType
(PeerEvent_EventType)(0), // 12: lnrpc.PeerEvent.EventType
(PendingChannelsResponse_ForceClosedChannel_AnchorState)(0), // 13: lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState
(ChannelEventUpdate_UpdateType)(0), // 14: lnrpc.ChannelEventUpdate.UpdateType
(Invoice_InvoiceState)(0), // 15: lnrpc.Invoice.InvoiceState
(Payment_PaymentStatus)(0), // 16: lnrpc.Payment.PaymentStatus
(HTLCAttempt_HTLCStatus)(0), // 17: lnrpc.HTLCAttempt.HTLCStatus
(Failure_FailureCode)(0), // 18: lnrpc.Failure.FailureCode
(*SubscribeCustomMessagesRequest)(nil), // 19: lnrpc.SubscribeCustomMessagesRequest
(*CustomMessage)(nil), // 20: lnrpc.CustomMessage
(*SendCustomMessageRequest)(nil), // 21: lnrpc.SendCustomMessageRequest
(*SendCustomMessageResponse)(nil), // 22: lnrpc.SendCustomMessageResponse
(*Utxo)(nil), // 23: lnrpc.Utxo
(*Transaction)(nil), // 24: lnrpc.Transaction
(*GetTransactionsRequest)(nil), // 25: lnrpc.GetTransactionsRequest
(*TransactionDetails)(nil), // 26: lnrpc.TransactionDetails
(*FeeLimit)(nil), // 27: lnrpc.FeeLimit
(*SendRequest)(nil), // 28: lnrpc.SendRequest
(*SendResponse)(nil), // 29: lnrpc.SendResponse
(*SendToRouteRequest)(nil), // 30: lnrpc.SendToRouteRequest
(*ChannelAcceptRequest)(nil), // 31: lnrpc.ChannelAcceptRequest
(*ChannelAcceptResponse)(nil), // 32: lnrpc.ChannelAcceptResponse
(*ChannelPoint)(nil), // 33: lnrpc.ChannelPoint
(*OutPoint)(nil), // 34: lnrpc.OutPoint
(*LightningAddress)(nil), // 35: lnrpc.LightningAddress
(*EstimateFeeRequest)(nil), // 36: lnrpc.EstimateFeeRequest
(*EstimateFeeResponse)(nil), // 37: lnrpc.EstimateFeeResponse
(*SendManyRequest)(nil), // 38: lnrpc.SendManyRequest
(*SendManyResponse)(nil), // 39: lnrpc.SendManyResponse
(*SendCoinsRequest)(nil), // 40: lnrpc.SendCoinsRequest
(*SendCoinsResponse)(nil), // 41: lnrpc.SendCoinsResponse
(*ListUnspentRequest)(nil), // 42: lnrpc.ListUnspentRequest
(*ListUnspentResponse)(nil), // 43: lnrpc.ListUnspentResponse
(*NewAddressRequest)(nil), // 44: lnrpc.NewAddressRequest
(*NewAddressResponse)(nil), // 45: lnrpc.NewAddressResponse
(*SignMessageRequest)(nil), // 46: lnrpc.SignMessageRequest
(*SignMessageResponse)(nil), // 47: lnrpc.SignMessageResponse
(*VerifyMessageRequest)(nil), // 48: lnrpc.VerifyMessageRequest
(*VerifyMessageResponse)(nil), // 49: lnrpc.VerifyMessageResponse
(*ConnectPeerRequest)(nil), // 50: lnrpc.ConnectPeerRequest
(*ConnectPeerResponse)(nil), // 51: lnrpc.ConnectPeerResponse
(*DisconnectPeerRequest)(nil), // 52: lnrpc.DisconnectPeerRequest
(*DisconnectPeerResponse)(nil), // 53: lnrpc.DisconnectPeerResponse
(*HTLC)(nil), // 54: lnrpc.HTLC
(*ChannelConstraints)(nil), // 55: lnrpc.ChannelConstraints
(*Channel)(nil), // 56: lnrpc.Channel
(*ListChannelsRequest)(nil), // 57: lnrpc.ListChannelsRequest
(*ListChannelsResponse)(nil), // 58: lnrpc.ListChannelsResponse
(*ChannelCloseSummary)(nil), // 59: lnrpc.ChannelCloseSummary
(*Resolution)(nil), // 60: lnrpc.Resolution
(*ClosedChannelsRequest)(nil), // 61: lnrpc.ClosedChannelsRequest
(*ClosedChannelsResponse)(nil), // 62: lnrpc.ClosedChannelsResponse
(*Peer)(nil), // 63: lnrpc.Peer
(*TimestampedError)(nil), // 64: lnrpc.TimestampedError
(*ListPeersRequest)(nil), // 65: lnrpc.ListPeersRequest
(*ListPeersResponse)(nil), // 66: lnrpc.ListPeersResponse
(*PeerEventSubscription)(nil), // 67: lnrpc.PeerEventSubscription
(*PeerEvent)(nil), // 68: lnrpc.PeerEvent
(*GetInfoRequest)(nil), // 69: lnrpc.GetInfoRequest
(*GetInfoResponse)(nil), // 70: lnrpc.GetInfoResponse
(*GetRecoveryInfoRequest)(nil), // 71: lnrpc.GetRecoveryInfoRequest
(*GetRecoveryInfoResponse)(nil), // 72: lnrpc.GetRecoveryInfoResponse
(*Chain)(nil), // 73: lnrpc.Chain
(*ConfirmationUpdate)(nil), // 74: lnrpc.ConfirmationUpdate
(*ChannelOpenUpdate)(nil), // 75: lnrpc.ChannelOpenUpdate
(*ChannelCloseUpdate)(nil), // 76: lnrpc.ChannelCloseUpdate
(*CloseChannelRequest)(nil), // 77: lnrpc.CloseChannelRequest
(*CloseStatusUpdate)(nil), // 78: lnrpc.CloseStatusUpdate
(*PendingUpdate)(nil), // 79: lnrpc.PendingUpdate
(*ReadyForPsbtFunding)(nil), // 80: lnrpc.ReadyForPsbtFunding
(*BatchOpenChannelRequest)(nil), // 81: lnrpc.BatchOpenChannelRequest
(*BatchOpenChannel)(nil), // 82: lnrpc.BatchOpenChannel
(*BatchOpenChannelResponse)(nil), // 83: lnrpc.BatchOpenChannelResponse
(*OpenChannelRequest)(nil), // 84: lnrpc.OpenChannelRequest
(*OpenStatusUpdate)(nil), // 85: lnrpc.OpenStatusUpdate
(*KeyLocator)(nil), // 86: lnrpc.KeyLocator
(*KeyDescriptor)(nil), // 87: lnrpc.KeyDescriptor
(*ChanPointShim)(nil), // 88: lnrpc.ChanPointShim
(*PsbtShim)(nil), // 89: lnrpc.PsbtShim
(*FundingShim)(nil), // 90: lnrpc.FundingShim
(*FundingShimCancel)(nil), // 91: lnrpc.FundingShimCancel
(*FundingPsbtVerify)(nil), // 92: lnrpc.FundingPsbtVerify
(*FundingPsbtFinalize)(nil), // 93: lnrpc.FundingPsbtFinalize
(*FundingTransitionMsg)(nil), // 94: lnrpc.FundingTransitionMsg
(*FundingStateStepResp)(nil), // 95: lnrpc.FundingStateStepResp
(*PendingHTLC)(nil), // 96: lnrpc.PendingHTLC
(*PendingChannelsRequest)(nil), // 97: lnrpc.PendingChannelsRequest
(*PendingChannelsResponse)(nil), // 98: lnrpc.PendingChannelsResponse
(*ChannelEventSubscription)(nil), // 99: lnrpc.ChannelEventSubscription
(*ChannelEventUpdate)(nil), // 100: lnrpc.ChannelEventUpdate
(*WalletAccountBalance)(nil), // 101: lnrpc.WalletAccountBalance
(*WalletBalanceRequest)(nil), // 102: lnrpc.WalletBalanceRequest
(*WalletBalanceResponse)(nil), // 103: lnrpc.WalletBalanceResponse
(*Amount)(nil), // 104: lnrpc.Amount
(*ChannelBalanceRequest)(nil), // 105: lnrpc.ChannelBalanceRequest
(*ChannelBalanceResponse)(nil), // 106: lnrpc.ChannelBalanceResponse
(*QueryRoutesRequest)(nil), // 107: lnrpc.QueryRoutesRequest
(*NodePair)(nil), // 108: lnrpc.NodePair
(*EdgeLocator)(nil), // 109: lnrpc.EdgeLocator
(*QueryRoutesResponse)(nil), // 110: lnrpc.QueryRoutesResponse
(*Hop)(nil), // 111: lnrpc.Hop
(*MPPRecord)(nil), // 112: lnrpc.MPPRecord
(*AMPRecord)(nil), // 113: lnrpc.AMPRecord
(*Route)(nil), // 114: lnrpc.Route
(*NodeInfoRequest)(nil), // 115: lnrpc.NodeInfoRequest
(*NodeInfo)(nil), // 116: lnrpc.NodeInfo
(*LightningNode)(nil), // 117: lnrpc.LightningNode
(*NodeAddress)(nil), // 118: lnrpc.NodeAddress
(*RoutingPolicy)(nil), // 119: lnrpc.RoutingPolicy
(*ChannelEdge)(nil), // 120: lnrpc.ChannelEdge
(*ChannelGraphRequest)(nil), // 121: lnrpc.ChannelGraphRequest
(*ChannelGraph)(nil), // 122: lnrpc.ChannelGraph
(*NodeMetricsRequest)(nil), // 123: lnrpc.NodeMetricsRequest
(*NodeMetricsResponse)(nil), // 124: lnrpc.NodeMetricsResponse
(*FloatMetric)(nil), // 125: lnrpc.FloatMetric
(*ChanInfoRequest)(nil), // 126: lnrpc.ChanInfoRequest
(*NetworkInfoRequest)(nil), // 127: lnrpc.NetworkInfoRequest
(*NetworkInfo)(nil), // 128: lnrpc.NetworkInfo
(*StopRequest)(nil), // 129: lnrpc.StopRequest
(*StopResponse)(nil), // 130: lnrpc.StopResponse
(*GraphTopologySubscription)(nil), // 131: lnrpc.GraphTopologySubscription
(*GraphTopologyUpdate)(nil), // 132: lnrpc.GraphTopologyUpdate
(*NodeUpdate)(nil), // 133: lnrpc.NodeUpdate
(*ChannelEdgeUpdate)(nil), // 134: lnrpc.ChannelEdgeUpdate
(*ClosedChannelUpdate)(nil), // 135: lnrpc.ClosedChannelUpdate
(*HopHint)(nil), // 136: lnrpc.HopHint
(*SetID)(nil), // 137: lnrpc.SetID
(*RouteHint)(nil), // 138: lnrpc.RouteHint
(*AMPInvoiceState)(nil), // 139: lnrpc.AMPInvoiceState
(*Invoice)(nil), // 140: lnrpc.Invoice
(*InvoiceHTLC)(nil), // 141: lnrpc.InvoiceHTLC
(*AMP)(nil), // 142: lnrpc.AMP
(*AddInvoiceResponse)(nil), // 143: lnrpc.AddInvoiceResponse
(*PaymentHash)(nil), // 144: lnrpc.PaymentHash
(*ListInvoiceRequest)(nil), // 145: lnrpc.ListInvoiceRequest
(*ListInvoiceResponse)(nil), // 146: lnrpc.ListInvoiceResponse
(*InvoiceSubscription)(nil), // 147: lnrpc.InvoiceSubscription
(*Payment)(nil), // 148: lnrpc.Payment
(*HTLCAttempt)(nil), // 149: lnrpc.HTLCAttempt
(*ListPaymentsRequest)(nil), // 150: lnrpc.ListPaymentsRequest
(*ListPaymentsResponse)(nil), // 151: lnrpc.ListPaymentsResponse
(*DeletePaymentRequest)(nil), // 152: lnrpc.DeletePaymentRequest
(*DeleteAllPaymentsRequest)(nil), // 153: lnrpc.DeleteAllPaymentsRequest
(*DeletePaymentResponse)(nil), // 154: lnrpc.DeletePaymentResponse
(*DeleteAllPaymentsResponse)(nil), // 155: lnrpc.DeleteAllPaymentsResponse
(*AbandonChannelRequest)(nil), // 156: lnrpc.AbandonChannelRequest
(*AbandonChannelResponse)(nil), // 157: lnrpc.AbandonChannelResponse
(*DebugLevelRequest)(nil), // 158: lnrpc.DebugLevelRequest
(*DebugLevelResponse)(nil), // 159: lnrpc.DebugLevelResponse
(*PayReqString)(nil), // 160: lnrpc.PayReqString
(*PayReq)(nil), // 161: lnrpc.PayReq
(*Feature)(nil), // 162: lnrpc.Feature
(*FeeReportRequest)(nil), // 163: lnrpc.FeeReportRequest
(*ChannelFeeReport)(nil), // 164: lnrpc.ChannelFeeReport
(*FeeReportResponse)(nil), // 165: lnrpc.FeeReportResponse
(*PolicyUpdateRequest)(nil), // 166: lnrpc.PolicyUpdateRequest
(*FailedUpdate)(nil), // 167: lnrpc.FailedUpdate
(*PolicyUpdateResponse)(nil), // 168: lnrpc.PolicyUpdateResponse
(*ForwardingHistoryRequest)(nil), // 169: lnrpc.ForwardingHistoryRequest
(*ForwardingEvent)(nil), // 170: lnrpc.ForwardingEvent
(*ForwardingHistoryResponse)(nil), // 171: lnrpc.ForwardingHistoryResponse
(*ExportChannelBackupRequest)(nil), // 172: lnrpc.ExportChannelBackupRequest
(*ChannelBackup)(nil), // 173: lnrpc.ChannelBackup
(*MultiChanBackup)(nil), // 174: lnrpc.MultiChanBackup
(*ChanBackupExportRequest)(nil), // 175: lnrpc.ChanBackupExportRequest
(*ChanBackupSnapshot)(nil), // 176: lnrpc.ChanBackupSnapshot
(*ChannelBackups)(nil), // 177: lnrpc.ChannelBackups
(*RestoreChanBackupRequest)(nil), // 178: lnrpc.RestoreChanBackupRequest
(*RestoreBackupResponse)(nil), // 179: lnrpc.RestoreBackupResponse
(*ChannelBackupSubscription)(nil), // 180: lnrpc.ChannelBackupSubscription
(*VerifyChanBackupResponse)(nil), // 181: lnrpc.VerifyChanBackupResponse
(*MacaroonPermission)(nil), // 182: lnrpc.MacaroonPermission
(*BakeMacaroonRequest)(nil), // 183: lnrpc.BakeMacaroonRequest
(*BakeMacaroonResponse)(nil), // 184: lnrpc.BakeMacaroonResponse
(*ListMacaroonIDsRequest)(nil), // 185: lnrpc.ListMacaroonIDsRequest
(*ListMacaroonIDsResponse)(nil), // 186: lnrpc.ListMacaroonIDsResponse
(*DeleteMacaroonIDRequest)(nil), // 187: lnrpc.DeleteMacaroonIDRequest
(*DeleteMacaroonIDResponse)(nil), // 188: lnrpc.DeleteMacaroonIDResponse
(*MacaroonPermissionList)(nil), // 189: lnrpc.MacaroonPermissionList
(*ListPermissionsRequest)(nil), // 190: lnrpc.ListPermissionsRequest
(*ListPermissionsResponse)(nil), // 191: lnrpc.ListPermissionsResponse
(*Failure)(nil), // 192: lnrpc.Failure
(*ChannelUpdate)(nil), // 193: lnrpc.ChannelUpdate
(*MacaroonId)(nil), // 194: lnrpc.MacaroonId
(*Op)(nil), // 195: lnrpc.Op
(*CheckMacPermRequest)(nil), // 196: lnrpc.CheckMacPermRequest
(*CheckMacPermResponse)(nil), // 197: lnrpc.CheckMacPermResponse
(*RPCMiddlewareRequest)(nil), // 198: lnrpc.RPCMiddlewareRequest
(*StreamAuth)(nil), // 199: lnrpc.StreamAuth
(*RPCMessage)(nil), // 200: lnrpc.RPCMessage
(*RPCMiddlewareResponse)(nil), // 201: lnrpc.RPCMiddlewareResponse
(*MiddlewareRegistration)(nil), // 202: lnrpc.MiddlewareRegistration
(*InterceptFeedback)(nil), // 203: lnrpc.InterceptFeedback
nil, // 204: lnrpc.SendRequest.DestCustomRecordsEntry
nil, // 205: lnrpc.EstimateFeeRequest.AddrToAmountEntry
nil, // 206: lnrpc.SendManyRequest.AddrToAmountEntry
nil, // 207: lnrpc.Peer.FeaturesEntry
nil, // 208: lnrpc.GetInfoResponse.FeaturesEntry
(*PendingChannelsResponse_PendingChannel)(nil), // 209: lnrpc.PendingChannelsResponse.PendingChannel
(*PendingChannelsResponse_PendingOpenChannel)(nil), // 210: lnrpc.PendingChannelsResponse.PendingOpenChannel
(*PendingChannelsResponse_WaitingCloseChannel)(nil), // 211: lnrpc.PendingChannelsResponse.WaitingCloseChannel
(*PendingChannelsResponse_Commitments)(nil), // 212: lnrpc.PendingChannelsResponse.Commitments
(*PendingChannelsResponse_ClosedChannel)(nil), // 213: lnrpc.PendingChannelsResponse.ClosedChannel
(*PendingChannelsResponse_ForceClosedChannel)(nil), // 214: lnrpc.PendingChannelsResponse.ForceClosedChannel
nil, // 215: lnrpc.WalletBalanceResponse.AccountBalanceEntry
nil, // 216: lnrpc.QueryRoutesRequest.DestCustomRecordsEntry
nil, // 217: lnrpc.Hop.CustomRecordsEntry
nil, // 218: lnrpc.LightningNode.FeaturesEntry
nil, // 219: lnrpc.NodeMetricsResponse.BetweennessCentralityEntry
nil, // 220: lnrpc.NodeUpdate.FeaturesEntry
nil, // 221: lnrpc.Invoice.FeaturesEntry
nil, // 222: lnrpc.Invoice.AmpInvoiceStateEntry
nil, // 223: lnrpc.InvoiceHTLC.CustomRecordsEntry
nil, // 224: lnrpc.PayReq.FeaturesEntry
nil, // 225: lnrpc.ListPermissionsResponse.MethodPermissionsEntry
}
var file_lightning_proto_depIdxs = []int32{
0, // 0: lnrpc.Utxo.address_type:type_name -> lnrpc.AddressType
34, // 1: lnrpc.Utxo.outpoint:type_name -> lnrpc.OutPoint
24, // 2: lnrpc.TransactionDetails.transactions:type_name -> lnrpc.Transaction
27, // 3: lnrpc.SendRequest.fee_limit:type_name -> lnrpc.FeeLimit
204, // 4: lnrpc.SendRequest.dest_custom_records:type_name -> lnrpc.SendRequest.DestCustomRecordsEntry
8, // 5: lnrpc.SendRequest.dest_features:type_name -> lnrpc.FeatureBit
114, // 6: lnrpc.SendResponse.payment_route:type_name -> lnrpc.Route
114, // 7: lnrpc.SendToRouteRequest.route:type_name -> lnrpc.Route
1, // 8: lnrpc.ChannelAcceptRequest.commitment_type:type_name -> lnrpc.CommitmentType
205, // 9: lnrpc.EstimateFeeRequest.AddrToAmount:type_name -> lnrpc.EstimateFeeRequest.AddrToAmountEntry
206, // 10: lnrpc.SendManyRequest.AddrToAmount:type_name -> lnrpc.SendManyRequest.AddrToAmountEntry
23, // 11: lnrpc.ListUnspentResponse.utxos:type_name -> lnrpc.Utxo
0, // 12: lnrpc.NewAddressRequest.type:type_name -> lnrpc.AddressType
35, // 13: lnrpc.ConnectPeerRequest.addr:type_name -> lnrpc.LightningAddress
54, // 14: lnrpc.Channel.pending_htlcs:type_name -> lnrpc.HTLC
1, // 15: lnrpc.Channel.commitment_type:type_name -> lnrpc.CommitmentType
55, // 16: lnrpc.Channel.local_constraints:type_name -> lnrpc.ChannelConstraints
55, // 17: lnrpc.Channel.remote_constraints:type_name -> lnrpc.ChannelConstraints
56, // 18: lnrpc.ListChannelsResponse.channels:type_name -> lnrpc.Channel
10, // 19: lnrpc.ChannelCloseSummary.close_type:type_name -> lnrpc.ChannelCloseSummary.ClosureType
2, // 20: lnrpc.ChannelCloseSummary.open_initiator:type_name -> lnrpc.Initiator
2, // 21: lnrpc.ChannelCloseSummary.close_initiator:type_name -> lnrpc.Initiator
60, // 22: lnrpc.ChannelCloseSummary.resolutions:type_name -> lnrpc.Resolution
3, // 23: lnrpc.Resolution.resolution_type:type_name -> lnrpc.ResolutionType
4, // 24: lnrpc.Resolution.outcome:type_name -> lnrpc.ResolutionOutcome
34, // 25: lnrpc.Resolution.outpoint:type_name -> lnrpc.OutPoint
59, // 26: lnrpc.ClosedChannelsResponse.channels:type_name -> lnrpc.ChannelCloseSummary
11, // 27: lnrpc.Peer.sync_type:type_name -> lnrpc.Peer.SyncType
207, // 28: lnrpc.Peer.features:type_name -> lnrpc.Peer.FeaturesEntry
64, // 29: lnrpc.Peer.errors:type_name -> lnrpc.TimestampedError
63, // 30: lnrpc.ListPeersResponse.peers:type_name -> lnrpc.Peer
12, // 31: lnrpc.PeerEvent.type:type_name -> lnrpc.PeerEvent.EventType
73, // 32: lnrpc.GetInfoResponse.chains:type_name -> lnrpc.Chain
208, // 33: lnrpc.GetInfoResponse.features:type_name -> lnrpc.GetInfoResponse.FeaturesEntry
33, // 34: lnrpc.ChannelOpenUpdate.channel_point:type_name -> lnrpc.ChannelPoint
33, // 35: lnrpc.CloseChannelRequest.channel_point:type_name -> lnrpc.ChannelPoint
79, // 36: lnrpc.CloseStatusUpdate.close_pending:type_name -> lnrpc.PendingUpdate
76, // 37: lnrpc.CloseStatusUpdate.chan_close:type_name -> lnrpc.ChannelCloseUpdate
82, // 38: lnrpc.BatchOpenChannelRequest.channels:type_name -> lnrpc.BatchOpenChannel
1, // 39: lnrpc.BatchOpenChannel.commitment_type:type_name -> lnrpc.CommitmentType
79, // 40: lnrpc.BatchOpenChannelResponse.pending_channels:type_name -> lnrpc.PendingUpdate
90, // 41: lnrpc.OpenChannelRequest.funding_shim:type_name -> lnrpc.FundingShim
1, // 42: lnrpc.OpenChannelRequest.commitment_type:type_name -> lnrpc.CommitmentType
79, // 43: lnrpc.OpenStatusUpdate.chan_pending:type_name -> lnrpc.PendingUpdate
75, // 44: lnrpc.OpenStatusUpdate.chan_open:type_name -> lnrpc.ChannelOpenUpdate
80, // 45: lnrpc.OpenStatusUpdate.psbt_fund:type_name -> lnrpc.ReadyForPsbtFunding
86, // 46: lnrpc.KeyDescriptor.key_loc:type_name -> lnrpc.KeyLocator
33, // 47: lnrpc.ChanPointShim.chan_point:type_name -> lnrpc.ChannelPoint
87, // 48: lnrpc.ChanPointShim.local_key:type_name -> lnrpc.KeyDescriptor
88, // 49: lnrpc.FundingShim.chan_point_shim:type_name -> lnrpc.ChanPointShim
89, // 50: lnrpc.FundingShim.psbt_shim:type_name -> lnrpc.PsbtShim
90, // 51: lnrpc.FundingTransitionMsg.shim_register:type_name -> lnrpc.FundingShim
91, // 52: lnrpc.FundingTransitionMsg.shim_cancel:type_name -> lnrpc.FundingShimCancel
92, // 53: lnrpc.FundingTransitionMsg.psbt_verify:type_name -> lnrpc.FundingPsbtVerify
93, // 54: lnrpc.FundingTransitionMsg.psbt_finalize:type_name -> lnrpc.FundingPsbtFinalize
210, // 55: lnrpc.PendingChannelsResponse.pending_open_channels:type_name -> lnrpc.PendingChannelsResponse.PendingOpenChannel
213, // 56: lnrpc.PendingChannelsResponse.pending_closing_channels:type_name -> lnrpc.PendingChannelsResponse.ClosedChannel
214, // 57: lnrpc.PendingChannelsResponse.pending_force_closing_channels:type_name -> lnrpc.PendingChannelsResponse.ForceClosedChannel
211, // 58: lnrpc.PendingChannelsResponse.waiting_close_channels:type_name -> lnrpc.PendingChannelsResponse.WaitingCloseChannel
56, // 59: lnrpc.ChannelEventUpdate.open_channel:type_name -> lnrpc.Channel
59, // 60: lnrpc.ChannelEventUpdate.closed_channel:type_name -> lnrpc.ChannelCloseSummary
33, // 61: lnrpc.ChannelEventUpdate.active_channel:type_name -> lnrpc.ChannelPoint
33, // 62: lnrpc.ChannelEventUpdate.inactive_channel:type_name -> lnrpc.ChannelPoint
79, // 63: lnrpc.ChannelEventUpdate.pending_open_channel:type_name -> lnrpc.PendingUpdate
33, // 64: lnrpc.ChannelEventUpdate.fully_resolved_channel:type_name -> lnrpc.ChannelPoint
14, // 65: lnrpc.ChannelEventUpdate.type:type_name -> lnrpc.ChannelEventUpdate.UpdateType
215, // 66: lnrpc.WalletBalanceResponse.account_balance:type_name -> lnrpc.WalletBalanceResponse.AccountBalanceEntry
104, // 67: lnrpc.ChannelBalanceResponse.local_balance:type_name -> lnrpc.Amount
104, // 68: lnrpc.ChannelBalanceResponse.remote_balance:type_name -> lnrpc.Amount
104, // 69: lnrpc.ChannelBalanceResponse.unsettled_local_balance:type_name -> lnrpc.Amount
104, // 70: lnrpc.ChannelBalanceResponse.unsettled_remote_balance:type_name -> lnrpc.Amount
104, // 71: lnrpc.ChannelBalanceResponse.pending_open_local_balance:type_name -> lnrpc.Amount
104, // 72: lnrpc.ChannelBalanceResponse.pending_open_remote_balance:type_name -> lnrpc.Amount
27, // 73: lnrpc.QueryRoutesRequest.fee_limit:type_name -> lnrpc.FeeLimit
109, // 74: lnrpc.QueryRoutesRequest.ignored_edges:type_name -> lnrpc.EdgeLocator
108, // 75: lnrpc.QueryRoutesRequest.ignored_pairs:type_name -> lnrpc.NodePair
216, // 76: lnrpc.QueryRoutesRequest.dest_custom_records:type_name -> lnrpc.QueryRoutesRequest.DestCustomRecordsEntry
138, // 77: lnrpc.QueryRoutesRequest.route_hints:type_name -> lnrpc.RouteHint
8, // 78: lnrpc.QueryRoutesRequest.dest_features:type_name -> lnrpc.FeatureBit
114, // 79: lnrpc.QueryRoutesResponse.routes:type_name -> lnrpc.Route
112, // 80: lnrpc.Hop.mpp_record:type_name -> lnrpc.MPPRecord
113, // 81: lnrpc.Hop.amp_record:type_name -> lnrpc.AMPRecord
217, // 82: lnrpc.Hop.custom_records:type_name -> lnrpc.Hop.CustomRecordsEntry
111, // 83: lnrpc.Route.hops:type_name -> lnrpc.Hop
117, // 84: lnrpc.NodeInfo.node:type_name -> lnrpc.LightningNode
120, // 85: lnrpc.NodeInfo.channels:type_name -> lnrpc.ChannelEdge
118, // 86: lnrpc.LightningNode.addresses:type_name -> lnrpc.NodeAddress
218, // 87: lnrpc.LightningNode.features:type_name -> lnrpc.LightningNode.FeaturesEntry
119, // 88: lnrpc.ChannelEdge.node1_policy:type_name -> lnrpc.RoutingPolicy
119, // 89: lnrpc.ChannelEdge.node2_policy:type_name -> lnrpc.RoutingPolicy
117, // 90: lnrpc.ChannelGraph.nodes:type_name -> lnrpc.LightningNode
120, // 91: lnrpc.ChannelGraph.edges:type_name -> lnrpc.ChannelEdge
5, // 92: lnrpc.NodeMetricsRequest.types:type_name -> lnrpc.NodeMetricType
219, // 93: lnrpc.NodeMetricsResponse.betweenness_centrality:type_name -> lnrpc.NodeMetricsResponse.BetweennessCentralityEntry
133, // 94: lnrpc.GraphTopologyUpdate.node_updates:type_name -> lnrpc.NodeUpdate
134, // 95: lnrpc.GraphTopologyUpdate.channel_updates:type_name -> lnrpc.ChannelEdgeUpdate
135, // 96: lnrpc.GraphTopologyUpdate.closed_chans:type_name -> lnrpc.ClosedChannelUpdate
118, // 97: lnrpc.NodeUpdate.node_addresses:type_name -> lnrpc.NodeAddress
220, // 98: lnrpc.NodeUpdate.features:type_name -> lnrpc.NodeUpdate.FeaturesEntry
33, // 99: lnrpc.ChannelEdgeUpdate.chan_point:type_name -> lnrpc.ChannelPoint
119, // 100: lnrpc.ChannelEdgeUpdate.routing_policy:type_name -> lnrpc.RoutingPolicy
33, // 101: lnrpc.ClosedChannelUpdate.chan_point:type_name -> lnrpc.ChannelPoint
136, // 102: lnrpc.RouteHint.hop_hints:type_name -> lnrpc.HopHint
6, // 103: lnrpc.AMPInvoiceState.state:type_name -> lnrpc.InvoiceHTLCState
138, // 104: lnrpc.Invoice.route_hints:type_name -> lnrpc.RouteHint
15, // 105: lnrpc.Invoice.state:type_name -> lnrpc.Invoice.InvoiceState
141, // 106: lnrpc.Invoice.htlcs:type_name -> lnrpc.InvoiceHTLC
221, // 107: lnrpc.Invoice.features:type_name -> lnrpc.Invoice.FeaturesEntry
222, // 108: lnrpc.Invoice.amp_invoice_state:type_name -> lnrpc.Invoice.AmpInvoiceStateEntry
6, // 109: lnrpc.InvoiceHTLC.state:type_name -> lnrpc.InvoiceHTLCState
223, // 110: lnrpc.InvoiceHTLC.custom_records:type_name -> lnrpc.InvoiceHTLC.CustomRecordsEntry
142, // 111: lnrpc.InvoiceHTLC.amp:type_name -> lnrpc.AMP
140, // 112: lnrpc.ListInvoiceResponse.invoices:type_name -> lnrpc.Invoice
16, // 113: lnrpc.Payment.status:type_name -> lnrpc.Payment.PaymentStatus
149, // 114: lnrpc.Payment.htlcs:type_name -> lnrpc.HTLCAttempt
7, // 115: lnrpc.Payment.failure_reason:type_name -> lnrpc.PaymentFailureReason
17, // 116: lnrpc.HTLCAttempt.status:type_name -> lnrpc.HTLCAttempt.HTLCStatus
114, // 117: lnrpc.HTLCAttempt.route:type_name -> lnrpc.Route
192, // 118: lnrpc.HTLCAttempt.failure:type_name -> lnrpc.Failure
148, // 119: lnrpc.ListPaymentsResponse.payments:type_name -> lnrpc.Payment
33, // 120: lnrpc.AbandonChannelRequest.channel_point:type_name -> lnrpc.ChannelPoint
138, // 121: lnrpc.PayReq.route_hints:type_name -> lnrpc.RouteHint
224, // 122: lnrpc.PayReq.features:type_name -> lnrpc.PayReq.FeaturesEntry
164, // 123: lnrpc.FeeReportResponse.channel_fees:type_name -> lnrpc.ChannelFeeReport
33, // 124: lnrpc.PolicyUpdateRequest.chan_point:type_name -> lnrpc.ChannelPoint
34, // 125: lnrpc.FailedUpdate.outpoint:type_name -> lnrpc.OutPoint
9, // 126: lnrpc.FailedUpdate.reason:type_name -> lnrpc.UpdateFailure
167, // 127: lnrpc.PolicyUpdateResponse.failed_updates:type_name -> lnrpc.FailedUpdate
170, // 128: lnrpc.ForwardingHistoryResponse.forwarding_events:type_name -> lnrpc.ForwardingEvent
33, // 129: lnrpc.ExportChannelBackupRequest.chan_point:type_name -> lnrpc.ChannelPoint
33, // 130: lnrpc.ChannelBackup.chan_point:type_name -> lnrpc.ChannelPoint
33, // 131: lnrpc.MultiChanBackup.chan_points:type_name -> lnrpc.ChannelPoint
177, // 132: lnrpc.ChanBackupSnapshot.single_chan_backups:type_name -> lnrpc.ChannelBackups
174, // 133: lnrpc.ChanBackupSnapshot.multi_chan_backup:type_name -> lnrpc.MultiChanBackup
173, // 134: lnrpc.ChannelBackups.chan_backups:type_name -> lnrpc.ChannelBackup
177, // 135: lnrpc.RestoreChanBackupRequest.chan_backups:type_name -> lnrpc.ChannelBackups
182, // 136: lnrpc.BakeMacaroonRequest.permissions:type_name -> lnrpc.MacaroonPermission
182, // 137: lnrpc.MacaroonPermissionList.permissions:type_name -> lnrpc.MacaroonPermission
225, // 138: lnrpc.ListPermissionsResponse.method_permissions:type_name -> lnrpc.ListPermissionsResponse.MethodPermissionsEntry
18, // 139: lnrpc.Failure.code:type_name -> lnrpc.Failure.FailureCode
193, // 140: lnrpc.Failure.channel_update:type_name -> lnrpc.ChannelUpdate
195, // 141: lnrpc.MacaroonId.ops:type_name -> lnrpc.Op
182, // 142: lnrpc.CheckMacPermRequest.permissions:type_name -> lnrpc.MacaroonPermission
199, // 143: lnrpc.RPCMiddlewareRequest.stream_auth:type_name -> lnrpc.StreamAuth
200, // 144: lnrpc.RPCMiddlewareRequest.request:type_name -> lnrpc.RPCMessage
200, // 145: lnrpc.RPCMiddlewareRequest.response:type_name -> lnrpc.RPCMessage
202, // 146: lnrpc.RPCMiddlewareResponse.register:type_name -> lnrpc.MiddlewareRegistration
203, // 147: lnrpc.RPCMiddlewareResponse.feedback:type_name -> lnrpc.InterceptFeedback
162, // 148: lnrpc.Peer.FeaturesEntry.value:type_name -> lnrpc.Feature
162, // 149: lnrpc.GetInfoResponse.FeaturesEntry.value:type_name -> lnrpc.Feature
2, // 150: lnrpc.PendingChannelsResponse.PendingChannel.initiator:type_name -> lnrpc.Initiator
1, // 151: lnrpc.PendingChannelsResponse.PendingChannel.commitment_type:type_name -> lnrpc.CommitmentType
209, // 152: lnrpc.PendingChannelsResponse.PendingOpenChannel.channel:type_name -> lnrpc.PendingChannelsResponse.PendingChannel
209, // 153: lnrpc.PendingChannelsResponse.WaitingCloseChannel.channel:type_name -> lnrpc.PendingChannelsResponse.PendingChannel
212, // 154: lnrpc.PendingChannelsResponse.WaitingCloseChannel.commitments:type_name -> lnrpc.PendingChannelsResponse.Commitments
209, // 155: lnrpc.PendingChannelsResponse.ClosedChannel.channel:type_name -> lnrpc.PendingChannelsResponse.PendingChannel
209, // 156: lnrpc.PendingChannelsResponse.ForceClosedChannel.channel:type_name -> lnrpc.PendingChannelsResponse.PendingChannel
96, // 157: lnrpc.PendingChannelsResponse.ForceClosedChannel.pending_htlcs:type_name -> lnrpc.PendingHTLC
13, // 158: lnrpc.PendingChannelsResponse.ForceClosedChannel.anchor:type_name -> lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState
101, // 159: lnrpc.WalletBalanceResponse.AccountBalanceEntry.value:type_name -> lnrpc.WalletAccountBalance
162, // 160: lnrpc.LightningNode.FeaturesEntry.value:type_name -> lnrpc.Feature
125, // 161: lnrpc.NodeMetricsResponse.BetweennessCentralityEntry.value:type_name -> lnrpc.FloatMetric
162, // 162: lnrpc.NodeUpdate.FeaturesEntry.value:type_name -> lnrpc.Feature
162, // 163: lnrpc.Invoice.FeaturesEntry.value:type_name -> lnrpc.Feature
139, // 164: lnrpc.Invoice.AmpInvoiceStateEntry.value:type_name -> lnrpc.AMPInvoiceState
162, // 165: lnrpc.PayReq.FeaturesEntry.value:type_name -> lnrpc.Feature
189, // 166: lnrpc.ListPermissionsResponse.MethodPermissionsEntry.value:type_name -> lnrpc.MacaroonPermissionList
102, // 167: lnrpc.Lightning.WalletBalance:input_type -> lnrpc.WalletBalanceRequest
105, // 168: lnrpc.Lightning.ChannelBalance:input_type -> lnrpc.ChannelBalanceRequest
25, // 169: lnrpc.Lightning.GetTransactions:input_type -> lnrpc.GetTransactionsRequest
36, // 170: lnrpc.Lightning.EstimateFee:input_type -> lnrpc.EstimateFeeRequest
40, // 171: lnrpc.Lightning.SendCoins:input_type -> lnrpc.SendCoinsRequest
42, // 172: lnrpc.Lightning.ListUnspent:input_type -> lnrpc.ListUnspentRequest
25, // 173: lnrpc.Lightning.SubscribeTransactions:input_type -> lnrpc.GetTransactionsRequest
38, // 174: lnrpc.Lightning.SendMany:input_type -> lnrpc.SendManyRequest
44, // 175: lnrpc.Lightning.NewAddress:input_type -> lnrpc.NewAddressRequest
46, // 176: lnrpc.Lightning.SignMessage:input_type -> lnrpc.SignMessageRequest
48, // 177: lnrpc.Lightning.VerifyMessage:input_type -> lnrpc.VerifyMessageRequest
50, // 178: lnrpc.Lightning.ConnectPeer:input_type -> lnrpc.ConnectPeerRequest
52, // 179: lnrpc.Lightning.DisconnectPeer:input_type -> lnrpc.DisconnectPeerRequest
65, // 180: lnrpc.Lightning.ListPeers:input_type -> lnrpc.ListPeersRequest
67, // 181: lnrpc.Lightning.SubscribePeerEvents:input_type -> lnrpc.PeerEventSubscription
69, // 182: lnrpc.Lightning.GetInfo:input_type -> lnrpc.GetInfoRequest
71, // 183: lnrpc.Lightning.GetRecoveryInfo:input_type -> lnrpc.GetRecoveryInfoRequest
97, // 184: lnrpc.Lightning.PendingChannels:input_type -> lnrpc.PendingChannelsRequest
57, // 185: lnrpc.Lightning.ListChannels:input_type -> lnrpc.ListChannelsRequest
99, // 186: lnrpc.Lightning.SubscribeChannelEvents:input_type -> lnrpc.ChannelEventSubscription
61, // 187: lnrpc.Lightning.ClosedChannels:input_type -> lnrpc.ClosedChannelsRequest
84, // 188: lnrpc.Lightning.OpenChannelSync:input_type -> lnrpc.OpenChannelRequest
84, // 189: lnrpc.Lightning.OpenChannel:input_type -> lnrpc.OpenChannelRequest
81, // 190: lnrpc.Lightning.BatchOpenChannel:input_type -> lnrpc.BatchOpenChannelRequest
94, // 191: lnrpc.Lightning.FundingStateStep:input_type -> lnrpc.FundingTransitionMsg
32, // 192: lnrpc.Lightning.ChannelAcceptor:input_type -> lnrpc.ChannelAcceptResponse
77, // 193: lnrpc.Lightning.CloseChannel:input_type -> lnrpc.CloseChannelRequest
156, // 194: lnrpc.Lightning.AbandonChannel:input_type -> lnrpc.AbandonChannelRequest
28, // 195: lnrpc.Lightning.SendPayment:input_type -> lnrpc.SendRequest
28, // 196: lnrpc.Lightning.SendPaymentSync:input_type -> lnrpc.SendRequest
30, // 197: lnrpc.Lightning.SendToRoute:input_type -> lnrpc.SendToRouteRequest
30, // 198: lnrpc.Lightning.SendToRouteSync:input_type -> lnrpc.SendToRouteRequest
140, // 199: lnrpc.Lightning.AddInvoice:input_type -> lnrpc.Invoice
145, // 200: lnrpc.Lightning.ListInvoices:input_type -> lnrpc.ListInvoiceRequest
144, // 201: lnrpc.Lightning.LookupInvoice:input_type -> lnrpc.PaymentHash
147, // 202: lnrpc.Lightning.SubscribeInvoices:input_type -> lnrpc.InvoiceSubscription
160, // 203: lnrpc.Lightning.DecodePayReq:input_type -> lnrpc.PayReqString
150, // 204: lnrpc.Lightning.ListPayments:input_type -> lnrpc.ListPaymentsRequest
152, // 205: lnrpc.Lightning.DeletePayment:input_type -> lnrpc.DeletePaymentRequest
153, // 206: lnrpc.Lightning.DeleteAllPayments:input_type -> lnrpc.DeleteAllPaymentsRequest
121, // 207: lnrpc.Lightning.DescribeGraph:input_type -> lnrpc.ChannelGraphRequest
123, // 208: lnrpc.Lightning.GetNodeMetrics:input_type -> lnrpc.NodeMetricsRequest
126, // 209: lnrpc.Lightning.GetChanInfo:input_type -> lnrpc.ChanInfoRequest
115, // 210: lnrpc.Lightning.GetNodeInfo:input_type -> lnrpc.NodeInfoRequest
107, // 211: lnrpc.Lightning.QueryRoutes:input_type -> lnrpc.QueryRoutesRequest
127, // 212: lnrpc.Lightning.GetNetworkInfo:input_type -> lnrpc.NetworkInfoRequest
129, // 213: lnrpc.Lightning.StopDaemon:input_type -> lnrpc.StopRequest
131, // 214: lnrpc.Lightning.SubscribeChannelGraph:input_type -> lnrpc.GraphTopologySubscription
158, // 215: lnrpc.Lightning.DebugLevel:input_type -> lnrpc.DebugLevelRequest
163, // 216: lnrpc.Lightning.FeeReport:input_type -> lnrpc.FeeReportRequest
166, // 217: lnrpc.Lightning.UpdateChannelPolicy:input_type -> lnrpc.PolicyUpdateRequest
169, // 218: lnrpc.Lightning.ForwardingHistory:input_type -> lnrpc.ForwardingHistoryRequest
172, // 219: lnrpc.Lightning.ExportChannelBackup:input_type -> lnrpc.ExportChannelBackupRequest
175, // 220: lnrpc.Lightning.ExportAllChannelBackups:input_type -> lnrpc.ChanBackupExportRequest
176, // 221: lnrpc.Lightning.VerifyChanBackup:input_type -> lnrpc.ChanBackupSnapshot
178, // 222: lnrpc.Lightning.RestoreChannelBackups:input_type -> lnrpc.RestoreChanBackupRequest
180, // 223: lnrpc.Lightning.SubscribeChannelBackups:input_type -> lnrpc.ChannelBackupSubscription
183, // 224: lnrpc.Lightning.BakeMacaroon:input_type -> lnrpc.BakeMacaroonRequest
185, // 225: lnrpc.Lightning.ListMacaroonIDs:input_type -> lnrpc.ListMacaroonIDsRequest
187, // 226: lnrpc.Lightning.DeleteMacaroonID:input_type -> lnrpc.DeleteMacaroonIDRequest
190, // 227: lnrpc.Lightning.ListPermissions:input_type -> lnrpc.ListPermissionsRequest
196, // 228: lnrpc.Lightning.CheckMacaroonPermissions:input_type -> lnrpc.CheckMacPermRequest
201, // 229: lnrpc.Lightning.RegisterRPCMiddleware:input_type -> lnrpc.RPCMiddlewareResponse
21, // 230: lnrpc.Lightning.SendCustomMessage:input_type -> lnrpc.SendCustomMessageRequest
19, // 231: lnrpc.Lightning.SubscribeCustomMessages:input_type -> lnrpc.SubscribeCustomMessagesRequest
103, // 232: lnrpc.Lightning.WalletBalance:output_type -> lnrpc.WalletBalanceResponse
106, // 233: lnrpc.Lightning.ChannelBalance:output_type -> lnrpc.ChannelBalanceResponse
26, // 234: lnrpc.Lightning.GetTransactions:output_type -> lnrpc.TransactionDetails
37, // 235: lnrpc.Lightning.EstimateFee:output_type -> lnrpc.EstimateFeeResponse
41, // 236: lnrpc.Lightning.SendCoins:output_type -> lnrpc.SendCoinsResponse
43, // 237: lnrpc.Lightning.ListUnspent:output_type -> lnrpc.ListUnspentResponse
24, // 238: lnrpc.Lightning.SubscribeTransactions:output_type -> lnrpc.Transaction
39, // 239: lnrpc.Lightning.SendMany:output_type -> lnrpc.SendManyResponse
45, // 240: lnrpc.Lightning.NewAddress:output_type -> lnrpc.NewAddressResponse
47, // 241: lnrpc.Lightning.SignMessage:output_type -> lnrpc.SignMessageResponse
49, // 242: lnrpc.Lightning.VerifyMessage:output_type -> lnrpc.VerifyMessageResponse
51, // 243: lnrpc.Lightning.ConnectPeer:output_type -> lnrpc.ConnectPeerResponse
53, // 244: lnrpc.Lightning.DisconnectPeer:output_type -> lnrpc.DisconnectPeerResponse
66, // 245: lnrpc.Lightning.ListPeers:output_type -> lnrpc.ListPeersResponse
68, // 246: lnrpc.Lightning.SubscribePeerEvents:output_type -> lnrpc.PeerEvent
70, // 247: lnrpc.Lightning.GetInfo:output_type -> lnrpc.GetInfoResponse
72, // 248: lnrpc.Lightning.GetRecoveryInfo:output_type -> lnrpc.GetRecoveryInfoResponse
98, // 249: lnrpc.Lightning.PendingChannels:output_type -> lnrpc.PendingChannelsResponse
58, // 250: lnrpc.Lightning.ListChannels:output_type -> lnrpc.ListChannelsResponse
100, // 251: lnrpc.Lightning.SubscribeChannelEvents:output_type -> lnrpc.ChannelEventUpdate
62, // 252: lnrpc.Lightning.ClosedChannels:output_type -> lnrpc.ClosedChannelsResponse
33, // 253: lnrpc.Lightning.OpenChannelSync:output_type -> lnrpc.ChannelPoint
85, // 254: lnrpc.Lightning.OpenChannel:output_type -> lnrpc.OpenStatusUpdate
83, // 255: lnrpc.Lightning.BatchOpenChannel:output_type -> lnrpc.BatchOpenChannelResponse
95, // 256: lnrpc.Lightning.FundingStateStep:output_type -> lnrpc.FundingStateStepResp
31, // 257: lnrpc.Lightning.ChannelAcceptor:output_type -> lnrpc.ChannelAcceptRequest
78, // 258: lnrpc.Lightning.CloseChannel:output_type -> lnrpc.CloseStatusUpdate
157, // 259: lnrpc.Lightning.AbandonChannel:output_type -> lnrpc.AbandonChannelResponse
29, // 260: lnrpc.Lightning.SendPayment:output_type -> lnrpc.SendResponse
29, // 261: lnrpc.Lightning.SendPaymentSync:output_type -> lnrpc.SendResponse
29, // 262: lnrpc.Lightning.SendToRoute:output_type -> lnrpc.SendResponse
29, // 263: lnrpc.Lightning.SendToRouteSync:output_type -> lnrpc.SendResponse
143, // 264: lnrpc.Lightning.AddInvoice:output_type -> lnrpc.AddInvoiceResponse
146, // 265: lnrpc.Lightning.ListInvoices:output_type -> lnrpc.ListInvoiceResponse
140, // 266: lnrpc.Lightning.LookupInvoice:output_type -> lnrpc.Invoice
140, // 267: lnrpc.Lightning.SubscribeInvoices:output_type -> lnrpc.Invoice
161, // 268: lnrpc.Lightning.DecodePayReq:output_type -> lnrpc.PayReq
151, // 269: lnrpc.Lightning.ListPayments:output_type -> lnrpc.ListPaymentsResponse
154, // 270: lnrpc.Lightning.DeletePayment:output_type -> lnrpc.DeletePaymentResponse
155, // 271: lnrpc.Lightning.DeleteAllPayments:output_type -> lnrpc.DeleteAllPaymentsResponse
122, // 272: lnrpc.Lightning.DescribeGraph:output_type -> lnrpc.ChannelGraph
124, // 273: lnrpc.Lightning.GetNodeMetrics:output_type -> lnrpc.NodeMetricsResponse
120, // 274: lnrpc.Lightning.GetChanInfo:output_type -> lnrpc.ChannelEdge
116, // 275: lnrpc.Lightning.GetNodeInfo:output_type -> lnrpc.NodeInfo
110, // 276: lnrpc.Lightning.QueryRoutes:output_type -> lnrpc.QueryRoutesResponse
128, // 277: lnrpc.Lightning.GetNetworkInfo:output_type -> lnrpc.NetworkInfo
130, // 278: lnrpc.Lightning.StopDaemon:output_type -> lnrpc.StopResponse
132, // 279: lnrpc.Lightning.SubscribeChannelGraph:output_type -> lnrpc.GraphTopologyUpdate
159, // 280: lnrpc.Lightning.DebugLevel:output_type -> lnrpc.DebugLevelResponse
165, // 281: lnrpc.Lightning.FeeReport:output_type -> lnrpc.FeeReportResponse
168, // 282: lnrpc.Lightning.UpdateChannelPolicy:output_type -> lnrpc.PolicyUpdateResponse
171, // 283: lnrpc.Lightning.ForwardingHistory:output_type -> lnrpc.ForwardingHistoryResponse
173, // 284: lnrpc.Lightning.ExportChannelBackup:output_type -> lnrpc.ChannelBackup
176, // 285: lnrpc.Lightning.ExportAllChannelBackups:output_type -> lnrpc.ChanBackupSnapshot
181, // 286: lnrpc.Lightning.VerifyChanBackup:output_type -> lnrpc.VerifyChanBackupResponse
179, // 287: lnrpc.Lightning.RestoreChannelBackups:output_type -> lnrpc.RestoreBackupResponse
176, // 288: lnrpc.Lightning.SubscribeChannelBackups:output_type -> lnrpc.ChanBackupSnapshot
184, // 289: lnrpc.Lightning.BakeMacaroon:output_type -> lnrpc.BakeMacaroonResponse
186, // 290: lnrpc.Lightning.ListMacaroonIDs:output_type -> lnrpc.ListMacaroonIDsResponse
188, // 291: lnrpc.Lightning.DeleteMacaroonID:output_type -> lnrpc.DeleteMacaroonIDResponse
191, // 292: lnrpc.Lightning.ListPermissions:output_type -> lnrpc.ListPermissionsResponse
197, // 293: lnrpc.Lightning.CheckMacaroonPermissions:output_type -> lnrpc.CheckMacPermResponse
198, // 294: lnrpc.Lightning.RegisterRPCMiddleware:output_type -> lnrpc.RPCMiddlewareRequest
22, // 295: lnrpc.Lightning.SendCustomMessage:output_type -> lnrpc.SendCustomMessageResponse
20, // 296: lnrpc.Lightning.SubscribeCustomMessages:output_type -> lnrpc.CustomMessage
232, // [232:297] is the sub-list for method output_type
167, // [167:232] is the sub-list for method input_type
167, // [167:167] is the sub-list for extension type_name
167, // [167:167] is the sub-list for extension extendee
0, // [0:167] is the sub-list for field type_name
}
func init() { file_lightning_proto_init() }
func file_lightning_proto_init() {
if File_lightning_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_lightning_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SubscribeCustomMessagesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CustomMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendCustomMessageRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendCustomMessageResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Utxo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Transaction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetTransactionsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TransactionDetails); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FeeLimit); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendToRouteRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelAcceptRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelAcceptResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelPoint); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OutPoint); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LightningAddress); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EstimateFeeRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EstimateFeeResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendManyRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendManyResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendCoinsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendCoinsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListUnspentRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListUnspentResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NewAddressRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NewAddressResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignMessageRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignMessageResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VerifyMessageRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VerifyMessageResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ConnectPeerRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ConnectPeerResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DisconnectPeerRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DisconnectPeerResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HTLC); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelConstraints); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Channel); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListChannelsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListChannelsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelCloseSummary); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Resolution); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ClosedChannelsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ClosedChannelsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Peer); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TimestampedError); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPeersRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPeersResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PeerEventSubscription); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PeerEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetInfoRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetInfoResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetRecoveryInfoRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetRecoveryInfoResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Chain); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ConfirmationUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelOpenUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelCloseUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CloseChannelRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CloseStatusUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PendingUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ReadyForPsbtFunding); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchOpenChannelRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchOpenChannel); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchOpenChannelResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OpenChannelRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OpenStatusUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KeyLocator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KeyDescriptor); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChanPointShim); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PsbtShim); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FundingShim); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FundingShimCancel); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FundingPsbtVerify); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FundingPsbtFinalize); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FundingTransitionMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FundingStateStepResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PendingHTLC); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PendingChannelsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PendingChannelsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelEventSubscription); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelEventUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WalletAccountBalance); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WalletBalanceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WalletBalanceResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Amount); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelBalanceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelBalanceResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryRoutesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodePair); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EdgeLocator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryRoutesResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Hop); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MPPRecord); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AMPRecord); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Route); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodeInfoRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodeInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LightningNode); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodeAddress); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RoutingPolicy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelEdge); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelGraphRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelGraph); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodeMetricsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodeMetricsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FloatMetric); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChanInfoRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NetworkInfoRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NetworkInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StopRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StopResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GraphTopologySubscription); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GraphTopologyUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodeUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelEdgeUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ClosedChannelUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HopHint); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetID); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RouteHint); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AMPInvoiceState); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Invoice); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InvoiceHTLC); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AMP); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddInvoiceResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PaymentHash); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListInvoiceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListInvoiceResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InvoiceSubscription); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Payment); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HTLCAttempt); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPaymentsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPaymentsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeletePaymentRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteAllPaymentsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeletePaymentResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteAllPaymentsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AbandonChannelRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AbandonChannelResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DebugLevelRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DebugLevelResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PayReqString); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PayReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Feature); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[144].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FeeReportRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[145].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelFeeReport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[146].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FeeReportResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PolicyUpdateRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FailedUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PolicyUpdateResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[150].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ForwardingHistoryRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[151].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ForwardingEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[152].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ForwardingHistoryResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[153].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExportChannelBackupRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[154].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelBackup); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[155].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiChanBackup); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[156].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChanBackupExportRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[157].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChanBackupSnapshot); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[158].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelBackups); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[159].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RestoreChanBackupRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[160].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RestoreBackupResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[161].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelBackupSubscription); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[162].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VerifyChanBackupResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[163].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MacaroonPermission); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[164].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BakeMacaroonRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[165].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BakeMacaroonResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[166].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListMacaroonIDsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[167].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListMacaroonIDsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[168].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteMacaroonIDRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[169].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteMacaroonIDResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[170].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MacaroonPermissionList); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[171].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPermissionsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[172].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPermissionsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[173].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Failure); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[174].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[175].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MacaroonId); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[176].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Op); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[177].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CheckMacPermRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[178].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CheckMacPermResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[179].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPCMiddlewareRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[180].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StreamAuth); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[181].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPCMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[182].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPCMiddlewareResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[183].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MiddlewareRegistration); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[184].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InterceptFeedback); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[190].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PendingChannelsResponse_PendingChannel); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[191].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PendingChannelsResponse_PendingOpenChannel); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[192].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PendingChannelsResponse_WaitingCloseChannel); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[193].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PendingChannelsResponse_Commitments); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[194].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PendingChannelsResponse_ClosedChannel); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_lightning_proto_msgTypes[195].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PendingChannelsResponse_ForceClosedChannel); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_lightning_proto_msgTypes[8].OneofWrappers = []interface{}{
(*FeeLimit_Fixed)(nil),
(*FeeLimit_FixedMsat)(nil),
(*FeeLimit_Percent)(nil),
}
file_lightning_proto_msgTypes[14].OneofWrappers = []interface{}{
(*ChannelPoint_FundingTxidBytes)(nil),
(*ChannelPoint_FundingTxidStr)(nil),
}
file_lightning_proto_msgTypes[59].OneofWrappers = []interface{}{
(*CloseStatusUpdate_ClosePending)(nil),
(*CloseStatusUpdate_ChanClose)(nil),
}
file_lightning_proto_msgTypes[66].OneofWrappers = []interface{}{
(*OpenStatusUpdate_ChanPending)(nil),
(*OpenStatusUpdate_ChanOpen)(nil),
(*OpenStatusUpdate_PsbtFund)(nil),
}
file_lightning_proto_msgTypes[71].OneofWrappers = []interface{}{
(*FundingShim_ChanPointShim)(nil),
(*FundingShim_PsbtShim)(nil),
}
file_lightning_proto_msgTypes[75].OneofWrappers = []interface{}{
(*FundingTransitionMsg_ShimRegister)(nil),
(*FundingTransitionMsg_ShimCancel)(nil),
(*FundingTransitionMsg_PsbtVerify)(nil),
(*FundingTransitionMsg_PsbtFinalize)(nil),
}
file_lightning_proto_msgTypes[81].OneofWrappers = []interface{}{
(*ChannelEventUpdate_OpenChannel)(nil),
(*ChannelEventUpdate_ClosedChannel)(nil),
(*ChannelEventUpdate_ActiveChannel)(nil),
(*ChannelEventUpdate_InactiveChannel)(nil),
(*ChannelEventUpdate_PendingOpenChannel)(nil),
(*ChannelEventUpdate_FullyResolvedChannel)(nil),
}
file_lightning_proto_msgTypes[147].OneofWrappers = []interface{}{
(*PolicyUpdateRequest_Global)(nil),
(*PolicyUpdateRequest_ChanPoint)(nil),
}
file_lightning_proto_msgTypes[159].OneofWrappers = []interface{}{
(*RestoreChanBackupRequest_ChanBackups)(nil),
(*RestoreChanBackupRequest_MultiChanBackup)(nil),
}
file_lightning_proto_msgTypes[179].OneofWrappers = []interface{}{
(*RPCMiddlewareRequest_StreamAuth)(nil),
(*RPCMiddlewareRequest_Request)(nil),
(*RPCMiddlewareRequest_Response)(nil),
}
file_lightning_proto_msgTypes[182].OneofWrappers = []interface{}{
(*RPCMiddlewareResponse_Register)(nil),
(*RPCMiddlewareResponse_Feedback)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_lightning_proto_rawDesc,
NumEnums: 19,
NumMessages: 207,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_lightning_proto_goTypes,
DependencyIndexes: file_lightning_proto_depIdxs,
EnumInfos: file_lightning_proto_enumTypes,
MessageInfos: file_lightning_proto_msgTypes,
}.Build()
File_lightning_proto = out.File
file_lightning_proto_rawDesc = nil
file_lightning_proto_goTypes = nil
file_lightning_proto_depIdxs = nil
}
| {
ms.StoreMessageInfo(mi)
} |
indexedsharedflowableimpl.py | from dataclasses import replace
from dataclass_abc import dataclass_abc
from rxbp.indexed.indexedflowable import IndexedFlowable
from rxbp.indexed.indexedsharedflowable import IndexedSharedFlowable
from rxbp.indexed.mixins.indexedflowablemixin import IndexedFlowableMixin
from rxbp.typing import ValueType
@dataclass_abc
class IndexedSharedFlowableImpl(IndexedSharedFlowable[ValueType]):
underlying: IndexedFlowableMixin
def | (
self,
is_shared: bool = None,
**kwargs,
):
return replace(self, **kwargs)
| _copy |
interpod_affinity.go | /*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package priorities
import (
"context"
"sync/atomic"
"k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/util/workqueue"
"k8s.io/kubernetes/pkg/scheduler/algorithm/predicates"
priorityutil "k8s.io/kubernetes/pkg/scheduler/algorithm/priorities/util"
schedulerapi "k8s.io/kubernetes/pkg/scheduler/api"
schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo"
schedutil "k8s.io/kubernetes/pkg/scheduler/util"
"k8s.io/klog"
)
// InterPodAffinity contains information to calculate inter pod affinity.
type InterPodAffinity struct {
info predicates.NodeInfo
hardPodAffinityWeight int32
}
// NewInterPodAffinityPriority creates an InterPodAffinity.
func NewInterPodAffinityPriority(
info predicates.NodeInfo,
hardPodAffinityWeight int32) PriorityFunction {
interPodAffinity := &InterPodAffinity{
info: info,
hardPodAffinityWeight: hardPodAffinityWeight,
}
return interPodAffinity.CalculateInterPodAffinityPriority
}
type podAffinityPriorityMap struct {
// nodes contain all nodes that should be considered
nodes []*v1.Node
// counts store the mapping from node name to so-far computed score of
// the node.
counts map[string]*int64
}
func newPodAffinityPriorityMap(nodes []*v1.Node) *podAffinityPriorityMap {
return &podAffinityPriorityMap{
nodes: nodes,
counts: make(map[string]*int64, len(nodes)),
}
}
func (p *podAffinityPriorityMap) processTerm(term *v1.PodAffinityTerm, podDefiningAffinityTerm, podToCheck *v1.Pod, fixedNode *v1.Node, weight int64) error {
namespaces := priorityutil.GetNamespacesFromPodAffinityTerm(podDefiningAffinityTerm, term)
selector, err := metav1.LabelSelectorAsSelector(term.LabelSelector)
if err != nil {
return err
}
match := priorityutil.PodMatchesTermsNamespaceAndSelector(podToCheck, namespaces, selector)
if match {
for _, node := range p.nodes {
if priorityutil.NodesHaveSameTopologyKey(node, fixedNode, term.TopologyKey) {
atomic.AddInt64(p.counts[node.Name], weight)
}
}
}
return nil
}
func (p *podAffinityPriorityMap) processTerms(terms []v1.WeightedPodAffinityTerm, podDefiningAffinityTerm, podToCheck *v1.Pod, fixedNode *v1.Node, multiplier int) error {
for i := range terms {
term := &terms[i]
if err := p.processTerm(&term.PodAffinityTerm, podDefiningAffinityTerm, podToCheck, fixedNode, int64(term.Weight*int32(multiplier))); err != nil {
return err
}
}
return nil
}
// CalculateInterPodAffinityPriority compute a sum by iterating through the elements of weightedPodAffinityTerm and adding
// "weight" to the sum if the corresponding PodAffinityTerm is satisfied for
// that node; the node(s) with the highest sum are the most preferred.
// Symmetry need to be considered for preferredDuringSchedulingIgnoredDuringExecution from podAffinity & podAntiAffinity,
// symmetry need to be considered for hard requirements from podAffinity
func (ipa *InterPodAffinity) CalculateInterPodAffinityPriority(pod *v1.Pod, nodeNameToInfo map[string]*schedulernodeinfo.NodeInfo, nodes []*v1.Node) (schedulerapi.HostPriorityList, error) {
affinity := pod.Spec.Affinity
hasAffinityConstraints := affinity != nil && affinity.PodAffinity != nil
hasAntiAffinityConstraints := affinity != nil && affinity.PodAntiAffinity != nil
// priorityMap stores the mapping from node name to so-far computed score of
// the node.
pm := newPodAffinityPriorityMap(nodes)
allNodeNames := make([]string, 0, len(nodeNameToInfo))
lazyInit := hasAffinityConstraints || hasAntiAffinityConstraints
for name := range nodeNameToInfo {
allNodeNames = append(allNodeNames, name)
// if pod has affinity defined, or target node has affinityPods
if lazyInit || len(nodeNameToInfo[name].PodsWithAffinity()) != 0 {
pm.counts[name] = new(int64)
}
}
// convert the topology key based weights to the node name based weights
var maxCount, minCount int64
processPod := func(existingPod *v1.Pod) error {
existingPodNode, err := ipa.info.GetNodeInfo(existingPod.Spec.NodeName)
if err != nil |
existingPodAffinity := existingPod.Spec.Affinity
existingHasAffinityConstraints := existingPodAffinity != nil && existingPodAffinity.PodAffinity != nil
existingHasAntiAffinityConstraints := existingPodAffinity != nil && existingPodAffinity.PodAntiAffinity != nil
if hasAffinityConstraints {
// For every soft pod affinity term of <pod>, if <existingPod> matches the term,
// increment <pm.counts> for every node in the cluster with the same <term.TopologyKey>
// value as that of <existingPods>`s node by the term`s weight.
terms := affinity.PodAffinity.PreferredDuringSchedulingIgnoredDuringExecution
if err := pm.processTerms(terms, pod, existingPod, existingPodNode, 1); err != nil {
return err
}
}
if hasAntiAffinityConstraints {
// For every soft pod anti-affinity term of <pod>, if <existingPod> matches the term,
// decrement <pm.counts> for every node in the cluster with the same <term.TopologyKey>
// value as that of <existingPod>`s node by the term`s weight.
terms := affinity.PodAntiAffinity.PreferredDuringSchedulingIgnoredDuringExecution
if err := pm.processTerms(terms, pod, existingPod, existingPodNode, -1); err != nil {
return err
}
}
if existingHasAffinityConstraints {
// For every hard pod affinity term of <existingPod>, if <pod> matches the term,
// increment <pm.counts> for every node in the cluster with the same <term.TopologyKey>
// value as that of <existingPod>'s node by the constant <ipa.hardPodAffinityWeight>
if ipa.hardPodAffinityWeight > 0 {
terms := existingPodAffinity.PodAffinity.RequiredDuringSchedulingIgnoredDuringExecution
// TODO: Uncomment this block when implement RequiredDuringSchedulingRequiredDuringExecution.
//if len(existingPodAffinity.PodAffinity.RequiredDuringSchedulingRequiredDuringExecution) != 0 {
// terms = append(terms, existingPodAffinity.PodAffinity.RequiredDuringSchedulingRequiredDuringExecution...)
//}
for _, term := range terms {
if err := pm.processTerm(&term, existingPod, pod, existingPodNode, int64(ipa.hardPodAffinityWeight)); err != nil {
return err
}
}
}
// For every soft pod affinity term of <existingPod>, if <pod> matches the term,
// increment <pm.counts> for every node in the cluster with the same <term.TopologyKey>
// value as that of <existingPod>'s node by the term's weight.
terms := existingPodAffinity.PodAffinity.PreferredDuringSchedulingIgnoredDuringExecution
if err := pm.processTerms(terms, existingPod, pod, existingPodNode, 1); err != nil {
return err
}
}
if existingHasAntiAffinityConstraints {
// For every soft pod anti-affinity term of <existingPod>, if <pod> matches the term,
// decrement <pm.counts> for every node in the cluster with the same <term.TopologyKey>
// value as that of <existingPod>'s node by the term's weight.
terms := existingPodAffinity.PodAntiAffinity.PreferredDuringSchedulingIgnoredDuringExecution
if err := pm.processTerms(terms, existingPod, pod, existingPodNode, -1); err != nil {
return err
}
}
return nil
}
errCh := schedutil.NewErrorChannel()
ctx, cancel := context.WithCancel(context.Background())
processNode := func(i int) {
nodeInfo := nodeNameToInfo[allNodeNames[i]]
if nodeInfo.Node() != nil {
if hasAffinityConstraints || hasAntiAffinityConstraints {
// We need to process all the pods.
for _, existingPod := range nodeInfo.Pods() {
if err := processPod(existingPod); err != nil {
errCh.SendErrorWithCancel(err, cancel)
return
}
}
} else {
// The pod doesn't have any constraints - we need to check only existing
// ones that have some.
for _, existingPod := range nodeInfo.PodsWithAffinity() {
if err := processPod(existingPod); err != nil {
errCh.SendErrorWithCancel(err, cancel)
return
}
}
}
}
}
workqueue.ParallelizeUntil(ctx, 16, len(allNodeNames), processNode)
if err := errCh.ReceiveError(); err != nil {
return nil, err
}
for _, node := range nodes {
if pm.counts[node.Name] == nil {
continue
}
if *pm.counts[node.Name] > maxCount {
maxCount = *pm.counts[node.Name]
}
if *pm.counts[node.Name] < minCount {
minCount = *pm.counts[node.Name]
}
}
// calculate final priority score for each node
result := make(schedulerapi.HostPriorityList, 0, len(nodes))
maxMinDiff := maxCount - minCount
for _, node := range nodes {
fScore := float64(0)
if maxMinDiff > 0 && pm.counts[node.Name] != nil {
fScore = float64(schedulerapi.MaxPriority) * (float64(*pm.counts[node.Name]-minCount) / float64(maxCount-minCount))
}
result = append(result, schedulerapi.HostPriority{Host: node.Name, Score: int(fScore)})
if klog.V(10) {
klog.Infof("%v -> %v: InterPodAffinityPriority, Score: (%d)", pod.Name, node.Name, int(fScore))
}
}
return result, nil
}
| {
if apierrors.IsNotFound(err) {
klog.Errorf("Node not found, %v", existingPod.Spec.NodeName)
return nil
}
return err
} |
lib.rs | // pub mod ed25519;
pub mod mss;
pub mod seed;
pub mod wots;
pub use seed::Seed;
// TODO: documentation
pub trait PrivateKeyGenerator {
type PrivateKey;
fn generate(&self, seed: &Seed, index: u64) -> Self::PrivateKey;
}
// TODO: documentation
pub trait PrivateKey {
type PublicKey;
type Signature;
fn generate_public_key(&self) -> Self::PublicKey;
fn sign(&mut self, message: &[i8]) -> Self::Signature;
}
// TODO: documentation
pub trait PublicKey {
type Signature;
fn verify(&self, message: &[i8], signature: &Self::Signature) -> bool;
fn from_bytes(bytes: &[i8]) -> Self;
fn to_bytes(&self) -> &[i8];
}
// TODO: documentation
pub trait Signature {
fn size(&self) -> usize;
fn from_bytes(bytes: &[i8]) -> Self;
fn to_bytes(&self) -> &[i8];
}
// TODO: documentation
pub trait RecoverableSignature {
type PublicKey;
fn recover_public_key(&self, message: &[i8]) -> Self::PublicKey;
}
// TODO: remove
pub fn | (xs: &[i8], ys: &[i8]) -> bool {
for (x, y) in xs.iter().zip(ys.iter()) {
if x != y {
return false;
}
}
true
}
| slice_eq |
link.js | */
CKEDITOR.dialog.add('link',function(a){var b=CKEDITOR.plugins.link,c=function(){var F=this.getDialog(),G=F.getContentElement('target','popupFeatures'),H=F.getContentElement('target','linkTargetName'),I=this.getValue();if(!G||!H)return;G=G.getElement();G.hide();H.setValue('');switch(I){case 'frame':H.setLabel(a.lang.link.targetFrameName);H.getElement().show();break;case 'popup':G.show();H.setLabel(a.lang.link.targetPopupName);H.getElement().show();break;default:H.setValue(I);H.getElement().hide();break;}},d=function(){var F=this.getDialog(),G=['urlOptions','anchorOptions','emailOptions'],H=this.getValue(),I=F.definition.getContents('upload'),J=I&&I.hidden;if(H=='url'){if(a.config.linkShowTargetTab)F.showPage('target');if(!J)F.showPage('upload');}else{F.hidePage('target');if(!J)F.hidePage('upload');}for(var K=0;K<G.length;K++){var L=F.getContentElement('info',G[K]);if(!L)continue;L=L.getElement().getParent().getParent();if(G[K]==H+'Options')L.show();else L.hide();}F.layout();},e=/^javascript:/,f=/^mailto:([^?]+)(?:\?(.+))?$/,g=/subject=([^;?:@&=$,\/]*)/,h=/body=([^;?:@&=$,\/]*)/,i=/^#(.*)$/,j=/^((?:http|https|ftp|news):\/\/)?(.*)$/,k=/^(_(?:self|top|parent|blank))$/,l=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,m=/^javascript:([^(]+)\(([^)]+)\)$/,n=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,o=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,p=function(F,G){var H=G&&(G.data('cke-saved-href')||G.getAttribute('href'))||'',I,J,K,L,M={};if(I=H.match(e))if(y=='encode')H=H.replace(l,function(ae,af,ag){return 'mailto:'+String.fromCharCode.apply(String,af.split(','))+(ag&&w(ag));});else if(y)H.replace(m,function(ae,af,ag){if(af==z.name){M.type='email';var ah=M.email={},ai=/[^,\s]+/g,aj=/(^')|('$)/g,ak=ag.match(ai),al=ak.length,am,an;for(var ao=0;ao<al;ao++){an=decodeURIComponent(w(ak[ao].replace(aj,'')));am=z.params[ao].toLowerCase();ah[am]=an;}ah.address=[ah.name,ah.domain].join('@');}});if(!M.type)if(K=H.match(i)){M.type='anchor';M.anchor={};M.anchor.name=M.anchor.id=K[1];}else if(J=H.match(f)){var N=H.match(g),O=H.match(h);M.type='email';var P=M.email={};P.address=J[1];N&&(P.subject=decodeURIComponent(N[1]));O&&(P.body=decodeURIComponent(O[1]));}else if(H&&(L=H.match(j))){M.type='url';M.url={};M.url.protocol=L[1];M.url.url=L[2];}else M.type='url';if(G){var Q=G.getAttribute('target');M.target={};M.adv={};if(!Q){var R=G.data('cke-pa-onclick')||G.getAttribute('onclick'),S=R&&R.match(n);
if(S){M.target.type='popup';M.target.name=S[1];var T;while(T=o.exec(S[2])){if((T[2]=='yes'||T[2]=='1')&&!(T[1] in {height:1,width:1,top:1,left:1}))M.target[T[1]]=true;else if(isFinite(T[2]))M.target[T[1]]=T[2];}}}else{var U=Q.match(k);if(U)M.target.type=M.target.name=Q;else{M.target.type='frame';M.target.name=Q;}}var V=this,W=function(ae,af){var ag=G.getAttribute(af);if(ag!==null)M.adv[ae]=ag||'';};W('advId','id');W('advLangDir','dir');W('advAccessKey','accessKey');M.adv.advName=G.data('cke-saved-name')||G.getAttribute('name')||'';W('advLangCode','lang');W('advTabIndex','tabindex');W('advTitle','title');W('advContentType','type');CKEDITOR.plugins.link.synAnchorSelector?M.adv.advCSSClasses=C(G):W('advCSSClasses','class');W('advCharset','charset');W('advStyles','style');W('advRel','rel');}var X=M.anchors=[],Y;if(CKEDITOR.plugins.link.emptyAnchorFix){var Z=F.document.getElementsByTag('a');for(i=0,count=Z.count();i<count;i++){Y=Z.getItem(i);if(Y.data('cke-saved-name')||Y.hasAttribute('name'))X.push({name:Y.data('cke-saved-name')||Y.getAttribute('name'),id:Y.getAttribute('id')});}}else{var aa=new CKEDITOR.dom.nodeList(F.document.$.anchors);for(var ab=0,ac=aa.count();ab<ac;ab++){Y=aa.getItem(ab);X[ab]={name:Y.getAttribute('name'),id:Y.getAttribute('id')};}}if(CKEDITOR.plugins.link.fakeAnchor){var ad=F.document.getElementsByTag('img');for(ab=0,ac=ad.count();ab<ac;ab++){if(Y=CKEDITOR.plugins.link.tryRestoreFakeAnchor(F,ad.getItem(ab)))X.push({name:Y.getAttribute('name'),id:Y.getAttribute('id')});}}this._.selectedElement=G;return M;},q=function(F,G){if(G[F])this.setValue(G[F][this.id]||'');},r=function(F){return q.call(this,'target',F);},s=function(F){return q.call(this,'adv',F);},t=function(F,G){if(!G[F])G[F]={};G[F][this.id]=this.getValue()||'';},u=function(F){return t.call(this,'target',F);},v=function(F){return t.call(this,'adv',F);};function w(F){return F.replace(/\\'/g,"'");};function x(F){return F.replace(/'/g,'\\$&');};var y=a.config.emailProtection||'';if(y&&y!='encode'){var z={};y.replace(/^([^(]+)\(([^)]+)\)$/,function(F,G,H){z.name=G;z.params=[];H.replace(/[^,\s]+/g,function(I){z.params.push(I);});});}function A(F){var G,H=z.name,I=z.params,J,K;G=[H,'('];for(var L=0;L<I.length;L++){J=I[L].toLowerCase();K=F[J];L>0&&G.push(',');G.push("'",K?x(encodeURIComponent(F[J])):'',"'");}G.push(')');return G.join('');};function B(F){var G,H=F.length,I=[];for(var J=0;J<H;J++){G=F.charCodeAt(J);I.push(G);}return 'String.fromCharCode('+I.join(',')+')';};function C(F){var G=F.getAttribute('class');
return G?G.replace(/\s*(?:cke_anchor_empty|cke_anchor)(?:\s*$)?/g,''):'';};var D=a.lang.common,E=a.lang.link;return{title:E.title,minWidth:350,minHeight:230,contents:[{id:'info',label:E.info,title:E.info,elements:[{id:'linkType',type:'select',label:E.type,'default':'url',items:[[E.toUrl,'url'],[E.toAnchor,'anchor'],[E.toEmail,'email']],onChange:d,setup:function(F){if(F.type)this.setValue(F.type);},commit:function(F){F.type=this.getValue();}},{type:'vbox',id:'urlOptions',children:[{type:'hbox',widths:['25%','75%'],children:[{id:'protocol',type:'select',label:D.protocol,'default':'http://',items:[['http://','http://'],['https://','https://'],['ftp://','ftp://'],['news://','news://'],[E.other,'']],setup:function(F){if(F.url)this.setValue(F.url.protocol||'');},commit:function(F){if(!F.url)F.url={};F.url.protocol=this.getValue();}},{type:'text',id:'url',label:D.url,required:true,onLoad:function(){this.allowOnChange=true;},onKeyUp:function(){var K=this;K.allowOnChange=false;var F=K.getDialog().getContentElement('info','protocol'),G=K.getValue(),H=/^(http|https|ftp|news):\/\/(?=.)/i,I=/^((javascript:)|[#\/\.\?])/i,J=H.exec(G);if(J){K.setValue(G.substr(J[0].length));F.setValue(J[0].toLowerCase());}else if(I.test(G))F.setValue('');K.allowOnChange=true;},onChange:function(){if(this.allowOnChange)this.onKeyUp();},validate:function(){var F=this.getDialog();if(F.getContentElement('info','linkType')&&F.getValueOf('info','linkType')!='url')return true;if(this.getDialog().fakeObj)return true;var G=CKEDITOR.dialog.validate.notEmpty(E.noUrl);return G.apply(this);},setup:function(F){this.allowOnChange=false;if(F.url)this.setValue(F.url.url);this.allowOnChange=true;},commit:function(F){this.onChange();if(!F.url)F.url={};F.url.url=this.getValue();this.allowOnChange=false;}}],setup:function(F){if(!this.getDialog().getContentElement('info','linkType'))this.getElement().show();}},{type:'button',id:'browse',hidden:'true',filebrowser:'info:url',label:D.browseServer}]},{type:'vbox',id:'anchorOptions',width:260,align:'center',padding:0,children:[{type:'fieldset',id:'selectAnchorText',label:E.selectAnchor,setup:function(F){if(F.anchors.length>0)this.getElement().show();else this.getElement().hide();},children:[{type:'hbox',id:'selectAnchor',children:[{type:'select',id:'anchorName','default':'',label:E.anchorName,style:'width: 100%;',items:[['']],setup:function(F){var I=this;I.clear();I.add('');for(var G=0;G<F.anchors.length;G++){if(F.anchors[G].name)I.add(F.anchors[G].name);}if(F.anchor)I.setValue(F.anchor.name);
var H=I.getDialog().getContentElement('info','linkType');if(H&&H.getValue()=='email')I.focus();},commit:function(F){if(!F.anchor)F.anchor={};F.anchor.name=this.getValue();}},{type:'select',id:'anchorId','default':'',label:E.anchorId,style:'width: 100%;',items:[['']],setup:function(F){var H=this;H.clear();H.add('');for(var G=0;G<F.anchors.length;G++){if(F.anchors[G].id)H.add(F.anchors[G].id);}if(F.anchor)H.setValue(F.anchor.id);},commit:function(F){if(!F.anchor)F.anchor={};F.anchor.id=this.getValue();}}],setup:function(F){if(F.anchors.length>0)this.getElement().show();else this.getElement().hide();}}]},{type:'html',id:'noAnchors',style:'text-align: center;',html:'<div role="label" tabIndex="-1">'+CKEDITOR.tools.htmlEncode(E.noAnchors)+'</div>',focus:true,setup:function(F){if(F.anchors.length<1)this.getElement().show();else this.getElement().hide();}}],setup:function(F){if(!this.getDialog().getContentElement('info','linkType'))this.getElement().hide();}},{type:'vbox',id:'emailOptions',padding:1,children:[{type:'text',id:'emailAddress',label:E.emailAddress,required:true,validate:function(){var F=this.getDialog();if(!F.getContentElement('info','linkType')||F.getValueOf('info','linkType')!='email')return true;var G=CKEDITOR.dialog.validate.notEmpty(E.noEmail);return G.apply(this);},setup:function(F){if(F.email)this.setValue(F.email.address);var G=this.getDialog().getContentElement('info','linkType');if(G&&G.getValue()=='email')this.select();},commit:function(F){if(!F.email)F.email={};F.email.address=this.getValue();}},{type:'text',id:'emailSubject',label:E.emailSubject,setup:function(F){if(F.email)this.setValue(F.email.subject);},commit:function(F){if(!F.email)F.email={};F.email.subject=this.getValue();}},{type:'textarea',id:'emailBody',label:E.emailBody,rows:3,'default':'',setup:function(F){if(F.email)this.setValue(F.email.body);},commit:function(F){if(!F.email)F.email={};F.email.body=this.getValue();}}],setup:function(F){if(!this.getDialog().getContentElement('info','linkType'))this.getElement().hide();}}]},{id:'target',label:E.target,title:E.target,elements:[{type:'hbox',widths:['50%','50%'],children:[{type:'select',id:'linkTargetType',label:D.target,'default':'notSet',style:'width : 100%;',items:[[D.notSet,'notSet'],[E.targetFrame,'frame'],[E.targetPopup,'popup'],[D.targetNew,'_blank'],[D.targetTop,'_top'],[D.targetSelf,'_self'],[D.targetParent,'_parent']],onChange:c,setup:function(F){if(F.target)this.setValue(F.target.type||'notSet');c.call(this);},commit:function(F){if(!F.target)F.target={};
F.target.type=this.getValue();}},{type:'text',id:'linkTargetName',label:E.targetFrameName,'default':'',setup:function(F){if(F.target)this.setValue(F.target.name);},commit:function(F){if(!F.target)F.target={};F.target.name=this.getValue().replace(/\W/gi,'');}}]},{type:'vbox',width:'100%',align:'center',padding:2,id:'popupFeatures',children:[{type:'fieldset',label:E.popupFeatures,children:[{type:'hbox',children:[{type:'checkbox',id:'resizable',label:E.popupResizable,setup:r,commit:u},{type:'checkbox',id:'status',label:E.popupStatusBar,setup:r,commit:u}]},{type:'hbox',children:[{type:'checkbox',id:'location',label:E.popupLocationBar,setup:r,commit:u},{type:'checkbox',id:'toolbar',label:E.popupToolbar,setup:r,commit:u}]},{type:'hbox',children:[{type:'checkbox',id:'menubar',label:E.popupMenuBar,setup:r,commit:u},{type:'checkbox',id:'fullscreen',label:E.popupFullScreen,setup:r,commit:u}]},{type:'hbox',children:[{type:'checkbox',id:'scrollbars',label:E.popupScrollBars,setup:r,commit:u},{type:'checkbox',id:'dependent',label:E.popupDependent,setup:r,commit:u}]},{type:'hbox',children:[{type:'text',widths:['50%','50%'],labelLayout:'horizontal',label:D.width,id:'width',setup:r,commit:u},{type:'text',labelLayout:'horizontal',widths:['50%','50%'],label:E.popupLeft,id:'left',setup:r,commit:u}]},{type:'hbox',children:[{type:'text',labelLayout:'horizontal',widths:['50%','50%'],label:D.height,id:'height',setup:r,commit:u},{type:'text',labelLayout:'horizontal',label:E.popupTop,widths:['50%','50%'],id:'top',setup:r,commit:u}]}]}]}]},{id:'upload',label:E.upload,title:E.upload,hidden:true,filebrowser:'uploadButton',elements:[{type:'file',id:'upload',label:D.upload,style:'height:40px',size:29},{type:'fileButton',id:'uploadButton',label:D.uploadSubmit,filebrowser:'info:url','for':['upload','upload']}]},{id:'advanced',label:E.advanced,title:E.advanced,elements:[{type:'vbox',padding:1,children:[{type:'hbox',widths:['45%','35%','20%'],children:[{type:'text',id:'advId',label:E.id,setup:s,commit:v},{type:'select',id:'advLangDir',label:E.langDir,'default':'',style:'width:110px',items:[[D.notSet,''],[E.langDirLTR,'ltr'],[E.langDirRTL,'rtl']],setup:s,commit:v},{type:'text',id:'advAccessKey',width:'80px',label:E.acccessKey,maxLength:1,setup:s,commit:v}]},{type:'hbox',widths:['45%','35%','20%'],children:[{type:'text',label:E.name,id:'advName',setup:s,commit:v},{type:'text',label:E.langCode,id:'advLangCode',width:'110px','default':'',setup:s,commit:v},{type:'text',label:E.tabIndex,id:'advTabIndex',width:'80px',maxLength:5,setup:s,commit:v}]}]},{type:'vbox',padding:1,children:[{type:'hbox',widths:['45%','55%'],children:[{type:'text',label:E.advisoryTitle,'default':'',id:'advTitle',setup:s,commit:v},{type:'text',label:E.advisoryContentType,'default':'',id:'advContentType',setup:s,commit:v}]},{type:'hbox',widths:['45%','55%'],children:[{type:'text',label:E.cssClasses,'default':'',id:'advCSSClasses',setup:s,commit:v},{type:'text',label:E.charset,'default':'',id:'advCharset',setup:s,commit:v}]},{type:'hbox',widths:['45%','55%'],children:[{type:'text',label:E.rel,'default':'',id:'advRel',setup:s,commit:v},{type:'text',label:E.styles,'default':'',id:'advStyles',validate:CKEDITOR.dialog.validate.inlineStyle(a.lang.common.invalidInlineStyle),setup:s,commit:v}]}]}]}],onShow:function(){var F=this.getParentEditor(),G=F.getSelection(),H=null;
if((H=b.getSelectedLink(F))&&H.hasAttribute('href'))G.selectElement(H);else H=null;this.setupContent(p.apply(this,[F,H]));},onOk:function(){var F={},G=[],H={},I=this,J=this.getParentEditor();this.commitContent(H);switch(H.type||'url'){case 'url':var K=H.url&&H.url.protocol!=undefined?H.url.protocol:'http://',L=H.url&&CKEDITOR.tools.trim(H.url.url)||'';F['data-cke-saved-href']=L.indexOf('/')===0?L:K+L;break;case 'anchor':var M=H.anchor&&H.anchor.name,N=H.anchor&&H.anchor.id;F['data-cke-saved-href']='#'+(M||N||'');break;case 'email':var O,P=H.email,Q=P.address;switch(y){case '':case 'encode':var R=encodeURIComponent(P.subject||''),S=encodeURIComponent(P.body||''),T=[];R&&T.push('subject='+R);S&&T.push('body='+S);T=T.length?'?'+T.join('&'):'';if(y=='encode'){O=["javascript:void(location.href='mailto:'+",B(Q)];T&&O.push("+'",x(T),"'");O.push(')');}else O=['mailto:',Q,T];break;default:var U=Q.split('@',2);P.name=U[0];P.domain=U[1];O=['javascript:',A(P)];}F['data-cke-saved-href']=O.join('');break;}if(H.target)if(H.target.type=='popup'){var V=["window.open(this.href, '",H.target.name||'',"', '"],W=['resizable','status','location','toolbar','menubar','fullscreen','scrollbars','dependent'],X=W.length,Y=function(ai){if(H.target[ai])W.push(ai+'='+H.target[ai]);};for(var Z=0;Z<X;Z++)W[Z]=W[Z]+(H.target[W[Z]]?'=yes':'=no');Y('width');Y('left');Y('height');Y('top');V.push(W.join(','),"'); return false;");F['data-cke-pa-onclick']=V.join('');G.push('target');}else{if(H.target.type!='notSet'&&H.target.name)F.target=H.target.name;else G.push('target');G.push('data-cke-pa-onclick','onclick');}if(H.adv){var aa=function(ai,aj){var ak=H.adv[ai];if(ak)F[aj]=ak;else G.push(aj);};aa('advId','id');aa('advLangDir','dir');aa('advAccessKey','accessKey');if(H.adv.advName)F.name=F['data-cke-saved-name']=H.adv.advName;else G=G.concat(['data-cke-saved-name','name']);aa('advLangCode','lang');aa('advTabIndex','tabindex');aa('advTitle','title');aa('advContentType','type');aa('advCSSClasses','class');aa('advCharset','charset');aa('advStyles','style');aa('advRel','rel');}F.href=F['data-cke-saved-href'];if(!this._.selectedElement){var ab=J.getSelection(),ac=ab.getRanges(true);if(ac.length==1&&ac[0].collapsed){var ad=new CKEDITOR.dom.text(H.type=='email'?H.email.address:F['data-cke-saved-href'],J.document);ac[0].insertNode(ad);ac[0].selectNodeContents(ad);ab.selectRanges(ac);}var ae=new CKEDITOR.style({element:'a',attributes:F});ae.type=CKEDITOR.STYLE_INLINE;ae.apply(J.document);}else{var af=this._.selectedElement,ag=af.data('cke-saved-href'),ah=af.getHtml();
af.setAttributes(F);af.removeAttributes(G);if(H.adv&&H.adv.advName&&CKEDITOR.plugins.link.synAnchorSelector)af.addClass(af.getChildCount()?'cke_anchor':'cke_anchor_empty');if(ag==ah||H.type=='email'&&ah.indexOf('@')!=-1)af.setHtml(H.type=='email'?H.email.address:F['data-cke-saved-href']);delete this._.selectedElement;}},onLoad:function(){if(!a.config.linkShowAdvancedTab)this.hidePage('advanced');if(!a.config.linkShowTargetTab)this.hidePage('target');},onFocus:function(){var F=this.getContentElement('info','linkType'),G;if(F&&F.getValue()=='url'){G=this.getContentElement('info','url');G.select();}}};}); | /*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license |
|
idscheme.go | // Copyright 2018 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// The go-ethereum library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
package enode
import (
"crypto/ecdsa"
"fmt"
"io"
"github.com/MetisProtocol/l2geth/common/math"
"github.com/MetisProtocol/l2geth/crypto"
"github.com/MetisProtocol/l2geth/p2p/enr"
"github.com/MetisProtocol/l2geth/rlp"
"golang.org/x/crypto/sha3"
)
// List of known secure identity schemes.
var ValidSchemes = enr.SchemeMap{
"v4": V4ID{},
}
var ValidSchemesForTesting = enr.SchemeMap{
"v4": V4ID{},
"null": NullID{},
}
// v4ID is the "v4" identity scheme.
type V4ID struct{}
// SignV4 signs a record using the v4 scheme.
func SignV4(r *enr.Record, privkey *ecdsa.PrivateKey) error {
// Copy r to avoid modifying it if signing fails.
cpy := *r
cpy.Set(enr.ID("v4"))
cpy.Set(Secp256k1(privkey.PublicKey))
h := sha3.NewLegacyKeccak256()
rlp.Encode(h, cpy.AppendElements(nil))
sig, err := crypto.Sign(h.Sum(nil), privkey)
if err != nil {
return err
}
sig = sig[:len(sig)-1] // remove v
if err = cpy.SetSig(V4ID{}, sig); err == nil {
*r = cpy
}
return err
}
func (V4ID) Verify(r *enr.Record, sig []byte) error {
var entry s256raw
if err := r.Load(&entry); err != nil {
return err
} else if len(entry) != 33 {
return fmt.Errorf("invalid public key")
}
h := sha3.NewLegacyKeccak256()
rlp.Encode(h, r.AppendElements(nil))
if !crypto.VerifySignature(entry, h.Sum(nil), sig) {
return enr.ErrInvalidSig
}
return nil
}
func (V4ID) NodeAddr(r *enr.Record) []byte {
var pubkey Secp256k1
err := r.Load(&pubkey)
if err != nil {
return nil
}
buf := make([]byte, 64)
math.ReadBits(pubkey.X, buf[:32])
math.ReadBits(pubkey.Y, buf[32:])
return crypto.Keccak256(buf)
}
// Secp256k1 is the "secp256k1" key, which holds a public key.
type Secp256k1 ecdsa.PublicKey
func (v Secp256k1) ENRKey() string { return "secp256k1" }
// EncodeRLP implements rlp.Encoder.
func (v Secp256k1) EncodeRLP(w io.Writer) error {
return rlp.Encode(w, crypto.CompressPubkey((*ecdsa.PublicKey)(&v)))
}
// DecodeRLP implements rlp.Decoder.
func (v *Secp256k1) DecodeRLP(s *rlp.Stream) error {
buf, err := s.Bytes()
if err != nil {
return err
}
pk, err := crypto.DecompressPubkey(buf)
if err != nil {
return err
}
*v = (Secp256k1)(*pk)
return nil
}
// s256raw is an unparsed secp256k1 public key entry.
type s256raw []byte
func (s256raw) ENRKey() string { return "secp256k1" }
// v4CompatID is a weaker and insecure version of the "v4" scheme which only checks for the
// presence of a secp256k1 public key, but doesn't verify the signature.
type v4CompatID struct {
V4ID
}
func (v4CompatID) Verify(r *enr.Record, sig []byte) error {
var pubkey Secp256k1
return r.Load(&pubkey)
}
func signV4Compat(r *enr.Record, pubkey *ecdsa.PublicKey) |
// NullID is the "null" ENR identity scheme. This scheme stores the node
// ID in the record without any signature.
type NullID struct{}
func (NullID) Verify(r *enr.Record, sig []byte) error {
return nil
}
func (NullID) NodeAddr(r *enr.Record) []byte {
var id ID
r.Load(enr.WithEntry("nulladdr", &id))
return id[:]
}
func SignNull(r *enr.Record, id ID) *Node {
r.Set(enr.ID("null"))
r.Set(enr.WithEntry("nulladdr", id))
if err := r.SetSig(NullID{}, []byte{}); err != nil {
panic(err)
}
return &Node{r: *r, id: id}
}
| {
r.Set((*Secp256k1)(pubkey))
if err := r.SetSig(v4CompatID{}, []byte{}); err != nil {
panic(err)
}
} |
main.go | /*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"os"
"github.com/richardcase/itsrandomoperator/pkg/apis"
"github.com/richardcase/itsrandomoperator/pkg/controller"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/controller-runtime/pkg/manager"
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
"sigs.k8s.io/controller-runtime/pkg/runtime/signals"
)
func main() {
logf.SetLogger(logf.ZapLogger(false))
log := logf.Log.WithName("entrypoint")
namespace := os.Getenv("POD_NAMESPACE")
if len(namespace) == 0 {
log.Info("must set env POD_NAMESPACE")
return
}
// Get a config to talk to the apiserver
log.Info("setting up client for manager")
cfg, err := config.GetConfig()
if err != nil {
log.Error(err, "unable to set up client config")
os.Exit(1)
}
// Create a new Cmd to provide shared dependencies and start components
log.Info("setting up manager")
mgr, err := manager.New(cfg, manager.Options{
LeaderElection: true,
LeaderElectionID: "rpa-operator",
LeaderElectionNamespace: namespace,
})
if err != nil |
log.Info("Registering Components.")
// Setup Scheme for all resources
log.Info("setting up scheme")
if err := apis.AddToScheme(mgr.GetScheme()); err != nil {
log.Error(err, "unable add APIs to scheme")
os.Exit(1)
}
// Setup all Controllers
log.Info("Setting up controller")
if err := controller.AddToManager(mgr); err != nil {
log.Error(err, "unable to register controllers to the manager")
os.Exit(1)
}
// Start the Cmd
log.Info("Starting the Cmd.")
if err := mgr.Start(signals.SetupSignalHandler()); err != nil {
log.Error(err, "unable to run the manager")
os.Exit(1)
}
}
| {
log.Error(err, "unable to set up overall controller manager")
os.Exit(1)
} |
main.rs | extern crate postgres;
extern crate rand;
extern crate time;
extern crate csv;
use postgres::{Connection, SslMode};
use std::env::{var_os};
use time::{precise_time_ns, now_utc};
use rand::{random};
use std::cmp::{min};
use std::thread::{sleep_ms};
use std::io::{stdout,Write};
use csv::Writer;
struct RingBuffer {
d: Vec<(f64, f64)>,
size: usize,
pos:usize
}
fn update (r: RingBuffer, value: (f64, f64)) -> RingBuffer {
let p = r.pos % r.size;
if r.d.len() > p {
let mut d = r.d.clone();
d[p] = value;
let d1 = d;
RingBuffer{d:d1,size:r.size,pos:p+1}
} else {
let mut d = r.d.clone();
d.push(value);
let d1 = d;
RingBuffer{d:d1,size:r.size,pos:p+1}
}
}
fn pair_wise_mean (v: &Vec<(f64, f64)>) -> (f64, f64) {
let mut xsum = 0.0f64;
let mut ysum = 0.0f64;
for i in 0..v.len() {
xsum = xsum + v[i].0;
ysum = ysum + v[i].1;
}
(xsum/(v.len() as f64), ysum/(v.len() as f64))
}
fn least_squares_line_of_best_fit (pairs: Vec<(f64, f64)>) -> (f64, f64) |
fn x_intercept (m: f64, b: f64) -> f64 {
(0f64 - b) / m
}
fn main () {
match (var_os("URL"), var_os("QUERY"), var_os("BUFFER"), var_os("INTERVAL")) {
(Some(url), Some(query), Some(buffer_size_s), Some(interval_s)) => {
let conn = Connection::connect(url.to_str().unwrap(), &SslMode::None).unwrap();
let stmt = conn.prepare(query.to_str().unwrap()).unwrap();
let mut r = RingBuffer{d:Vec::new(), size: buffer_size_s.to_str().unwrap().parse::<usize>().unwrap(), pos: 0};
let mut i = 0;
loop {
let mut w = Writer::from_memory().delimiter(b'\t');
if (i % 20) == 0 {
w.encode(("time", "recent-x", "recent-y", "x-intercept", "y-intercept", "m")).ok().unwrap();
}
for row in stmt.query(&[]).unwrap() {
let x = row.get(0);
let y = row.get(1);
r = update(r, (x,y));
if i > 2 {
let (m, b) = least_squares_line_of_best_fit(r.d.clone());
w.encode((now_utc().rfc3339().to_string(), x, y, x_intercept(m, b), b, m)).ok().unwrap();
}
};
stdout().write_all(w.as_bytes()).ok().unwrap();
sleep_ms(interval_s.to_str().unwrap().parse::<u32>().unwrap());
i = i + 1
}
},
_ => println!("Be sure to define URL, QUERY, BUFFER, and INTERVAL")
}
}
| {
let ref p = pairs;
let means = pair_wise_mean(p);
let mut t = 0f64;
let mut u = 0f64;
let l = p.len();
for i in 0..l {
t = ((pairs[i].0 - means.0) * (pairs[i].1 - means.1)) + t;
u = ((pairs[i].0 - means.0) * (pairs[i].0 - means.0)) + u;
}
let m = t/u;
let b = means.1 - (m * means.0);
(m, b)
} |
008_Add_deleted_flag_to_batch.py | from sqlalchemy import MetaData, Table, Column, Boolean
meta = MetaData()
def upgrade(migrate_engine):
meta = MetaData(bind=migrate_engine)
batch = Table("batch", meta, autoload=True)
deleted = Column("deleted", Boolean())
deleted.create(batch)
def downgrade(migrate_engine):
| meta = MetaData(bind=migrate_engine)
batch = Table("batch", meta, autoload=True)
batch.c.deleted.drop() |
|
networkSecurityGroupsUpdateTagsSample.ts | /*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { TagsObject, NetworkManagementClient } from "@azure/arm-network";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Updates a network security group tags.
*
* @summary Updates a network security group tags.
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkSecurityGroupUpdateTags.json
*/
async function updateNetworkSecurityGroupTags() {
const subscriptionId = "subid"; | const credential = new DefaultAzureCredential();
const client = new NetworkManagementClient(credential, subscriptionId);
const result = await client.networkSecurityGroups.updateTags(
resourceGroupName,
networkSecurityGroupName,
parameters
);
console.log(result);
}
updateNetworkSecurityGroupTags().catch(console.error); | const resourceGroupName = "rg1";
const networkSecurityGroupName = "testnsg";
const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.