librespot/protocol/src/playlist4content.rs
2019-12-16 12:47:52 +01:00

1457 lines
50 KiB
Rust

// This file is generated by rust-protobuf 2.8.1. Do not edit
// @generated
// https://github.com/Manishearth/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `playlist4content.proto`
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_1;
#[derive(PartialEq,Clone,Default)]
pub struct Item {
// message fields
uri: ::protobuf::SingularField<::std::string::String>,
attributes: ::protobuf::SingularPtrField<super::playlist4meta::ItemAttributes>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Item {
fn default() -> &'a Item {
<Item as ::protobuf::Message>::default_instance()
}
}
impl Item {
pub fn new() -> Item {
::std::default::Default::default()
}
// optional string uri = 1;
pub fn get_uri(&self) -> &str {
match self.uri.as_ref() {
Some(v) => &v,
None => "",
}
}
pub fn clear_uri(&mut self) {
self.uri.clear();
}
pub fn has_uri(&self) -> bool {
self.uri.is_some()
}
// Param is passed by value, moved
pub fn set_uri(&mut self, v: ::std::string::String) {
self.uri = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_uri(&mut self) -> &mut ::std::string::String {
if self.uri.is_none() {
self.uri.set_default();
}
self.uri.as_mut().unwrap()
}
// Take field
pub fn take_uri(&mut self) -> ::std::string::String {
self.uri.take().unwrap_or_else(|| ::std::string::String::new())
}
// optional .ItemAttributes attributes = 2;
pub fn get_attributes(&self) -> &super::playlist4meta::ItemAttributes {
self.attributes.as_ref().unwrap_or_else(|| super::playlist4meta::ItemAttributes::default_instance())
}
pub fn clear_attributes(&mut self) {
self.attributes.clear();
}
pub fn has_attributes(&self) -> bool {
self.attributes.is_some()
}
// Param is passed by value, moved
pub fn set_attributes(&mut self, v: super::playlist4meta::ItemAttributes) {
self.attributes = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_attributes(&mut self) -> &mut super::playlist4meta::ItemAttributes {
if self.attributes.is_none() {
self.attributes.set_default();
}
self.attributes.as_mut().unwrap()
}
// Take field
pub fn take_attributes(&mut self) -> super::playlist4meta::ItemAttributes {
self.attributes.take().unwrap_or_else(|| super::playlist4meta::ItemAttributes::new())
}
}
impl ::protobuf::Message for Item {
fn is_initialized(&self) -> bool {
for v in &self.attributes {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.uri)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.attributes)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.uri.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
if let Some(ref v) = self.attributes.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.uri.as_ref() {
os.write_string(1, &v)?;
}
if let Some(ref v) = self.attributes.as_ref() {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Item {
Item::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"uri",
|m: &Item| { &m.uri },
|m: &mut Item| { &mut m.uri },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::playlist4meta::ItemAttributes>>(
"attributes",
|m: &Item| { &m.attributes },
|m: &mut Item| { &mut m.attributes },
));
::protobuf::reflect::MessageDescriptor::new::<Item>(
"Item",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Item {
static mut instance: ::protobuf::lazy::Lazy<Item> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Item,
};
unsafe {
instance.get(Item::new)
}
}
}
impl ::protobuf::Clear for Item {
fn clear(&mut self) {
self.uri.clear();
self.attributes.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Item {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Item {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ListItems {
// message fields
pos: ::std::option::Option<i32>,
truncated: ::std::option::Option<bool>,
items: ::protobuf::RepeatedField<Item>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ListItems {
fn default() -> &'a ListItems {
<ListItems as ::protobuf::Message>::default_instance()
}
}
impl ListItems {
pub fn new() -> ListItems {
::std::default::Default::default()
}
// optional int32 pos = 1;
pub fn get_pos(&self) -> i32 {
self.pos.unwrap_or(0)
}
pub fn clear_pos(&mut self) {
self.pos = ::std::option::Option::None;
}
pub fn has_pos(&self) -> bool {
self.pos.is_some()
}
// Param is passed by value, moved
pub fn set_pos(&mut self, v: i32) {
self.pos = ::std::option::Option::Some(v);
}
// optional bool truncated = 2;
pub fn get_truncated(&self) -> bool {
self.truncated.unwrap_or(false)
}
pub fn clear_truncated(&mut self) {
self.truncated = ::std::option::Option::None;
}
pub fn has_truncated(&self) -> bool {
self.truncated.is_some()
}
// Param is passed by value, moved
pub fn set_truncated(&mut self, v: bool) {
self.truncated = ::std::option::Option::Some(v);
}
// repeated .Item items = 3;
pub fn get_items(&self) -> &[Item] {
&self.items
}
pub fn clear_items(&mut self) {
self.items.clear();
}
// Param is passed by value, moved
pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Item>) {
self.items = v;
}
// Mutable pointer to the field.
pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Item> {
&mut self.items
}
// Take field
pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Item> {
::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for ListItems {
fn is_initialized(&self) -> bool {
for v in &self.items {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int32()?;
self.pos = ::std::option::Option::Some(tmp);
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.truncated = ::std::option::Option::Some(tmp);
},
3 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(v) = self.pos {
my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(v) = self.truncated {
my_size += 2;
}
for value in &self.items {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.pos {
os.write_int32(1, v)?;
}
if let Some(v) = self.truncated {
os.write_bool(2, v)?;
}
for v in &self.items {
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ListItems {
ListItems::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
"pos",
|m: &ListItems| { &m.pos },
|m: &mut ListItems| { &mut m.pos },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"truncated",
|m: &ListItems| { &m.truncated },
|m: &mut ListItems| { &mut m.truncated },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Item>>(
"items",
|m: &ListItems| { &m.items },
|m: &mut ListItems| { &mut m.items },
));
::protobuf::reflect::MessageDescriptor::new::<ListItems>(
"ListItems",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ListItems {
static mut instance: ::protobuf::lazy::Lazy<ListItems> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ListItems,
};
unsafe {
instance.get(ListItems::new)
}
}
}
impl ::protobuf::Clear for ListItems {
fn clear(&mut self) {
self.pos = ::std::option::Option::None;
self.truncated = ::std::option::Option::None;
self.items.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ListItems {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ListItems {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ContentRange {
// message fields
pos: ::std::option::Option<i32>,
length: ::std::option::Option<i32>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ContentRange {
fn default() -> &'a ContentRange {
<ContentRange as ::protobuf::Message>::default_instance()
}
}
impl ContentRange {
pub fn new() -> ContentRange {
::std::default::Default::default()
}
// optional int32 pos = 1;
pub fn get_pos(&self) -> i32 {
self.pos.unwrap_or(0)
}
pub fn clear_pos(&mut self) {
self.pos = ::std::option::Option::None;
}
pub fn has_pos(&self) -> bool {
self.pos.is_some()
}
// Param is passed by value, moved
pub fn set_pos(&mut self, v: i32) {
self.pos = ::std::option::Option::Some(v);
}
// optional int32 length = 2;
pub fn get_length(&self) -> i32 {
self.length.unwrap_or(0)
}
pub fn clear_length(&mut self) {
self.length = ::std::option::Option::None;
}
pub fn has_length(&self) -> bool {
self.length.is_some()
}
// Param is passed by value, moved
pub fn set_length(&mut self, v: i32) {
self.length = ::std::option::Option::Some(v);
}
}
impl ::protobuf::Message for ContentRange {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int32()?;
self.pos = ::std::option::Option::Some(tmp);
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int32()?;
self.length = ::std::option::Option::Some(tmp);
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(v) = self.pos {
my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(v) = self.length {
my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.pos {
os.write_int32(1, v)?;
}
if let Some(v) = self.length {
os.write_int32(2, v)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ContentRange {
ContentRange::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
"pos",
|m: &ContentRange| { &m.pos },
|m: &mut ContentRange| { &mut m.pos },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
"length",
|m: &ContentRange| { &m.length },
|m: &mut ContentRange| { &mut m.length },
));
::protobuf::reflect::MessageDescriptor::new::<ContentRange>(
"ContentRange",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ContentRange {
static mut instance: ::protobuf::lazy::Lazy<ContentRange> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ContentRange,
};
unsafe {
instance.get(ContentRange::new)
}
}
}
impl ::protobuf::Clear for ContentRange {
fn clear(&mut self) {
self.pos = ::std::option::Option::None;
self.length = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ContentRange {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ContentRange {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ListContentSelection {
// message fields
wantRevision: ::std::option::Option<bool>,
wantLength: ::std::option::Option<bool>,
wantAttributes: ::std::option::Option<bool>,
wantChecksum: ::std::option::Option<bool>,
wantContent: ::std::option::Option<bool>,
contentRange: ::protobuf::SingularPtrField<ContentRange>,
wantDiff: ::std::option::Option<bool>,
baseRevision: ::protobuf::SingularField<::std::vec::Vec<u8>>,
hintRevision: ::protobuf::SingularField<::std::vec::Vec<u8>>,
wantNothingIfUpToDate: ::std::option::Option<bool>,
wantResolveAction: ::std::option::Option<bool>,
issues: ::protobuf::RepeatedField<super::playlist4issues::ClientIssue>,
resolveAction: ::protobuf::RepeatedField<super::playlist4issues::ClientResolveAction>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ListContentSelection {
fn default() -> &'a ListContentSelection {
<ListContentSelection as ::protobuf::Message>::default_instance()
}
}
impl ListContentSelection {
pub fn new() -> ListContentSelection {
::std::default::Default::default()
}
// optional bool wantRevision = 1;
pub fn get_wantRevision(&self) -> bool {
self.wantRevision.unwrap_or(false)
}
pub fn clear_wantRevision(&mut self) {
self.wantRevision = ::std::option::Option::None;
}
pub fn has_wantRevision(&self) -> bool {
self.wantRevision.is_some()
}
// Param is passed by value, moved
pub fn set_wantRevision(&mut self, v: bool) {
self.wantRevision = ::std::option::Option::Some(v);
}
// optional bool wantLength = 2;
pub fn get_wantLength(&self) -> bool {
self.wantLength.unwrap_or(false)
}
pub fn clear_wantLength(&mut self) {
self.wantLength = ::std::option::Option::None;
}
pub fn has_wantLength(&self) -> bool {
self.wantLength.is_some()
}
// Param is passed by value, moved
pub fn set_wantLength(&mut self, v: bool) {
self.wantLength = ::std::option::Option::Some(v);
}
// optional bool wantAttributes = 3;
pub fn get_wantAttributes(&self) -> bool {
self.wantAttributes.unwrap_or(false)
}
pub fn clear_wantAttributes(&mut self) {
self.wantAttributes = ::std::option::Option::None;
}
pub fn has_wantAttributes(&self) -> bool {
self.wantAttributes.is_some()
}
// Param is passed by value, moved
pub fn set_wantAttributes(&mut self, v: bool) {
self.wantAttributes = ::std::option::Option::Some(v);
}
// optional bool wantChecksum = 4;
pub fn get_wantChecksum(&self) -> bool {
self.wantChecksum.unwrap_or(false)
}
pub fn clear_wantChecksum(&mut self) {
self.wantChecksum = ::std::option::Option::None;
}
pub fn has_wantChecksum(&self) -> bool {
self.wantChecksum.is_some()
}
// Param is passed by value, moved
pub fn set_wantChecksum(&mut self, v: bool) {
self.wantChecksum = ::std::option::Option::Some(v);
}
// optional bool wantContent = 5;
pub fn get_wantContent(&self) -> bool {
self.wantContent.unwrap_or(false)
}
pub fn clear_wantContent(&mut self) {
self.wantContent = ::std::option::Option::None;
}
pub fn has_wantContent(&self) -> bool {
self.wantContent.is_some()
}
// Param is passed by value, moved
pub fn set_wantContent(&mut self, v: bool) {
self.wantContent = ::std::option::Option::Some(v);
}
// optional .ContentRange contentRange = 6;
pub fn get_contentRange(&self) -> &ContentRange {
self.contentRange.as_ref().unwrap_or_else(|| ContentRange::default_instance())
}
pub fn clear_contentRange(&mut self) {
self.contentRange.clear();
}
pub fn has_contentRange(&self) -> bool {
self.contentRange.is_some()
}
// Param is passed by value, moved
pub fn set_contentRange(&mut self, v: ContentRange) {
self.contentRange = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_contentRange(&mut self) -> &mut ContentRange {
if self.contentRange.is_none() {
self.contentRange.set_default();
}
self.contentRange.as_mut().unwrap()
}
// Take field
pub fn take_contentRange(&mut self) -> ContentRange {
self.contentRange.take().unwrap_or_else(|| ContentRange::new())
}
// optional bool wantDiff = 7;
pub fn get_wantDiff(&self) -> bool {
self.wantDiff.unwrap_or(false)
}
pub fn clear_wantDiff(&mut self) {
self.wantDiff = ::std::option::Option::None;
}
pub fn has_wantDiff(&self) -> bool {
self.wantDiff.is_some()
}
// Param is passed by value, moved
pub fn set_wantDiff(&mut self, v: bool) {
self.wantDiff = ::std::option::Option::Some(v);
}
// optional bytes baseRevision = 8;
pub fn get_baseRevision(&self) -> &[u8] {
match self.baseRevision.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_baseRevision(&mut self) {
self.baseRevision.clear();
}
pub fn has_baseRevision(&self) -> bool {
self.baseRevision.is_some()
}
// Param is passed by value, moved
pub fn set_baseRevision(&mut self, v: ::std::vec::Vec<u8>) {
self.baseRevision = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_baseRevision(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.baseRevision.is_none() {
self.baseRevision.set_default();
}
self.baseRevision.as_mut().unwrap()
}
// Take field
pub fn take_baseRevision(&mut self) -> ::std::vec::Vec<u8> {
self.baseRevision.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bytes hintRevision = 9;
pub fn get_hintRevision(&self) -> &[u8] {
match self.hintRevision.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_hintRevision(&mut self) {
self.hintRevision.clear();
}
pub fn has_hintRevision(&self) -> bool {
self.hintRevision.is_some()
}
// Param is passed by value, moved
pub fn set_hintRevision(&mut self, v: ::std::vec::Vec<u8>) {
self.hintRevision = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_hintRevision(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.hintRevision.is_none() {
self.hintRevision.set_default();
}
self.hintRevision.as_mut().unwrap()
}
// Take field
pub fn take_hintRevision(&mut self) -> ::std::vec::Vec<u8> {
self.hintRevision.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bool wantNothingIfUpToDate = 10;
pub fn get_wantNothingIfUpToDate(&self) -> bool {
self.wantNothingIfUpToDate.unwrap_or(false)
}
pub fn clear_wantNothingIfUpToDate(&mut self) {
self.wantNothingIfUpToDate = ::std::option::Option::None;
}
pub fn has_wantNothingIfUpToDate(&self) -> bool {
self.wantNothingIfUpToDate.is_some()
}
// Param is passed by value, moved
pub fn set_wantNothingIfUpToDate(&mut self, v: bool) {
self.wantNothingIfUpToDate = ::std::option::Option::Some(v);
}
// optional bool wantResolveAction = 12;
pub fn get_wantResolveAction(&self) -> bool {
self.wantResolveAction.unwrap_or(false)
}
pub fn clear_wantResolveAction(&mut self) {
self.wantResolveAction = ::std::option::Option::None;
}
pub fn has_wantResolveAction(&self) -> bool {
self.wantResolveAction.is_some()
}
// Param is passed by value, moved
pub fn set_wantResolveAction(&mut self, v: bool) {
self.wantResolveAction = ::std::option::Option::Some(v);
}
// repeated .ClientIssue issues = 13;
pub fn get_issues(&self) -> &[super::playlist4issues::ClientIssue] {
&self.issues
}
pub fn clear_issues(&mut self) {
self.issues.clear();
}
// Param is passed by value, moved
pub fn set_issues(&mut self, v: ::protobuf::RepeatedField<super::playlist4issues::ClientIssue>) {
self.issues = v;
}
// Mutable pointer to the field.
pub fn mut_issues(&mut self) -> &mut ::protobuf::RepeatedField<super::playlist4issues::ClientIssue> {
&mut self.issues
}
// Take field
pub fn take_issues(&mut self) -> ::protobuf::RepeatedField<super::playlist4issues::ClientIssue> {
::std::mem::replace(&mut self.issues, ::protobuf::RepeatedField::new())
}
// repeated .ClientResolveAction resolveAction = 14;
pub fn get_resolveAction(&self) -> &[super::playlist4issues::ClientResolveAction] {
&self.resolveAction
}
pub fn clear_resolveAction(&mut self) {
self.resolveAction.clear();
}
// Param is passed by value, moved
pub fn set_resolveAction(&mut self, v: ::protobuf::RepeatedField<super::playlist4issues::ClientResolveAction>) {
self.resolveAction = v;
}
// Mutable pointer to the field.
pub fn mut_resolveAction(&mut self) -> &mut ::protobuf::RepeatedField<super::playlist4issues::ClientResolveAction> {
&mut self.resolveAction
}
// Take field
pub fn take_resolveAction(&mut self) -> ::protobuf::RepeatedField<super::playlist4issues::ClientResolveAction> {
::std::mem::replace(&mut self.resolveAction, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for ListContentSelection {
fn is_initialized(&self) -> bool {
for v in &self.contentRange {
if !v.is_initialized() {
return false;
}
};
for v in &self.issues {
if !v.is_initialized() {
return false;
}
};
for v in &self.resolveAction {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.wantRevision = ::std::option::Option::Some(tmp);
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.wantLength = ::std::option::Option::Some(tmp);
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.wantAttributes = ::std::option::Option::Some(tmp);
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.wantChecksum = ::std::option::Option::Some(tmp);
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.wantContent = ::std::option::Option::Some(tmp);
},
6 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.contentRange)?;
},
7 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.wantDiff = ::std::option::Option::Some(tmp);
},
8 => {
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.baseRevision)?;
},
9 => {
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.hintRevision)?;
},
10 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.wantNothingIfUpToDate = ::std::option::Option::Some(tmp);
},
12 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.wantResolveAction = ::std::option::Option::Some(tmp);
},
13 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.issues)?;
},
14 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.resolveAction)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(v) = self.wantRevision {
my_size += 2;
}
if let Some(v) = self.wantLength {
my_size += 2;
}
if let Some(v) = self.wantAttributes {
my_size += 2;
}
if let Some(v) = self.wantChecksum {
my_size += 2;
}
if let Some(v) = self.wantContent {
my_size += 2;
}
if let Some(ref v) = self.contentRange.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(v) = self.wantDiff {
my_size += 2;
}
if let Some(ref v) = self.baseRevision.as_ref() {
my_size += ::protobuf::rt::bytes_size(8, &v);
}
if let Some(ref v) = self.hintRevision.as_ref() {
my_size += ::protobuf::rt::bytes_size(9, &v);
}
if let Some(v) = self.wantNothingIfUpToDate {
my_size += 2;
}
if let Some(v) = self.wantResolveAction {
my_size += 2;
}
for value in &self.issues {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
for value in &self.resolveAction {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.wantRevision {
os.write_bool(1, v)?;
}
if let Some(v) = self.wantLength {
os.write_bool(2, v)?;
}
if let Some(v) = self.wantAttributes {
os.write_bool(3, v)?;
}
if let Some(v) = self.wantChecksum {
os.write_bool(4, v)?;
}
if let Some(v) = self.wantContent {
os.write_bool(5, v)?;
}
if let Some(ref v) = self.contentRange.as_ref() {
os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(v) = self.wantDiff {
os.write_bool(7, v)?;
}
if let Some(ref v) = self.baseRevision.as_ref() {
os.write_bytes(8, &v)?;
}
if let Some(ref v) = self.hintRevision.as_ref() {
os.write_bytes(9, &v)?;
}
if let Some(v) = self.wantNothingIfUpToDate {
os.write_bool(10, v)?;
}
if let Some(v) = self.wantResolveAction {
os.write_bool(12, v)?;
}
for v in &self.issues {
os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
for v in &self.resolveAction {
os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ListContentSelection {
ListContentSelection::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"wantRevision",
|m: &ListContentSelection| { &m.wantRevision },
|m: &mut ListContentSelection| { &mut m.wantRevision },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"wantLength",
|m: &ListContentSelection| { &m.wantLength },
|m: &mut ListContentSelection| { &mut m.wantLength },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"wantAttributes",
|m: &ListContentSelection| { &m.wantAttributes },
|m: &mut ListContentSelection| { &mut m.wantAttributes },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"wantChecksum",
|m: &ListContentSelection| { &m.wantChecksum },
|m: &mut ListContentSelection| { &mut m.wantChecksum },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"wantContent",
|m: &ListContentSelection| { &m.wantContent },
|m: &mut ListContentSelection| { &mut m.wantContent },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ContentRange>>(
"contentRange",
|m: &ListContentSelection| { &m.contentRange },
|m: &mut ListContentSelection| { &mut m.contentRange },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"wantDiff",
|m: &ListContentSelection| { &m.wantDiff },
|m: &mut ListContentSelection| { &mut m.wantDiff },
));
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"baseRevision",
|m: &ListContentSelection| { &m.baseRevision },
|m: &mut ListContentSelection| { &mut m.baseRevision },
));
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"hintRevision",
|m: &ListContentSelection| { &m.hintRevision },
|m: &mut ListContentSelection| { &mut m.hintRevision },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"wantNothingIfUpToDate",
|m: &ListContentSelection| { &m.wantNothingIfUpToDate },
|m: &mut ListContentSelection| { &mut m.wantNothingIfUpToDate },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"wantResolveAction",
|m: &ListContentSelection| { &m.wantResolveAction },
|m: &mut ListContentSelection| { &mut m.wantResolveAction },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::playlist4issues::ClientIssue>>(
"issues",
|m: &ListContentSelection| { &m.issues },
|m: &mut ListContentSelection| { &mut m.issues },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::playlist4issues::ClientResolveAction>>(
"resolveAction",
|m: &ListContentSelection| { &m.resolveAction },
|m: &mut ListContentSelection| { &mut m.resolveAction },
));
::protobuf::reflect::MessageDescriptor::new::<ListContentSelection>(
"ListContentSelection",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ListContentSelection {
static mut instance: ::protobuf::lazy::Lazy<ListContentSelection> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ListContentSelection,
};
unsafe {
instance.get(ListContentSelection::new)
}
}
}
impl ::protobuf::Clear for ListContentSelection {
fn clear(&mut self) {
self.wantRevision = ::std::option::Option::None;
self.wantLength = ::std::option::Option::None;
self.wantAttributes = ::std::option::Option::None;
self.wantChecksum = ::std::option::Option::None;
self.wantContent = ::std::option::Option::None;
self.contentRange.clear();
self.wantDiff = ::std::option::Option::None;
self.baseRevision.clear();
self.hintRevision.clear();
self.wantNothingIfUpToDate = ::std::option::Option::None;
self.wantResolveAction = ::std::option::Option::None;
self.issues.clear();
self.resolveAction.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ListContentSelection {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ListContentSelection {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x16playlist4content.proto\x12\0\">\n\x04Item\x12\r\n\x03uri\x18\x01\
\x20\x01(\tB\0\x12%\n\nattributes\x18\x02\x20\x01(\x0b2\x0f.ItemAttribut\
esB\0:\0\"I\n\tListItems\x12\r\n\x03pos\x18\x01\x20\x01(\x05B\0\x12\x13\
\n\ttruncated\x18\x02\x20\x01(\x08B\0\x12\x16\n\x05items\x18\x03\x20\x03\
(\x0b2\x05.ItemB\0:\0\"1\n\x0cContentRange\x12\r\n\x03pos\x18\x01\x20\
\x01(\x05B\0\x12\x10\n\x06length\x18\x02\x20\x01(\x05B\0:\0\"\x87\x03\n\
\x14ListContentSelection\x12\x16\n\x0cwantRevision\x18\x01\x20\x01(\x08B\
\0\x12\x14\n\nwantLength\x18\x02\x20\x01(\x08B\0\x12\x18\n\x0ewantAttrib\
utes\x18\x03\x20\x01(\x08B\0\x12\x16\n\x0cwantChecksum\x18\x04\x20\x01(\
\x08B\0\x12\x15\n\x0bwantContent\x18\x05\x20\x01(\x08B\0\x12%\n\x0cconte\
ntRange\x18\x06\x20\x01(\x0b2\r.ContentRangeB\0\x12\x12\n\x08wantDiff\
\x18\x07\x20\x01(\x08B\0\x12\x16\n\x0cbaseRevision\x18\x08\x20\x01(\x0cB\
\0\x12\x16\n\x0chintRevision\x18\t\x20\x01(\x0cB\0\x12\x1f\n\x15wantNoth\
ingIfUpToDate\x18\n\x20\x01(\x08B\0\x12\x1b\n\x11wantResolveAction\x18\
\x0c\x20\x01(\x08B\0\x12\x1e\n\x06issues\x18\r\x20\x03(\x0b2\x0c.ClientI\
ssueB\0\x12-\n\rresolveAction\x18\x0e\x20\x03(\x0b2\x14.ClientResolveAct\
ionB\0:\0B\0b\x06proto2\
";
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
};
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
unsafe {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
}