// This file is generated by rust-protobuf 3.5.1. Do not edit
// .proto file is parsed by pure
// @generated

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

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

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

//! Generated file from `webuimessages_gamenotes.proto`
// Generated for lite runtime

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

// @@protoc_insertion_point(message:CGameNotes_UploadImage_Request)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CGameNotes_UploadImage_Request {
    // message fields
    // @@protoc_insertion_point(field:CGameNotes_UploadImage_Request.file_prefix)
    pub file_prefix: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:CGameNotes_UploadImage_Request.mime_type)
    pub mime_type: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:CGameNotes_UploadImage_Request.data)
    pub data: ::std::option::Option<::std::vec::Vec<u8>>,
    // special fields
    // @@protoc_insertion_point(special_field:CGameNotes_UploadImage_Request.special_fields)
    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
}

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

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

    // optional string file_prefix = 1;

    pub fn file_prefix(&self) -> &str {
        match self.file_prefix.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_file_prefix(&mut self) {
        self.file_prefix = ::std::option::Option::None;
    }

    pub fn has_file_prefix(&self) -> bool {
        self.file_prefix.is_some()
    }

    // Param is passed by value, moved
    pub fn set_file_prefix(&mut self, v: ::std::string::String) {
        self.file_prefix = ::std::option::Option::Some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_file_prefix(&mut self) -> &mut ::std::string::String {
        if self.file_prefix.is_none() {
            self.file_prefix = ::std::option::Option::Some(::std::string::String::new());
        }
        self.file_prefix.as_mut().unwrap()
    }

    // Take field
    pub fn take_file_prefix(&mut self) -> ::std::string::String {
        self.file_prefix.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional string mime_type = 2;

    pub fn mime_type(&self) -> &str {
        match self.mime_type.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_mime_type(&mut self) {
        self.mime_type = ::std::option::Option::None;
    }

    pub fn has_mime_type(&self) -> bool {
        self.mime_type.is_some()
    }

    // Param is passed by value, moved
    pub fn set_mime_type(&mut self, v: ::std::string::String) {
        self.mime_type = ::std::option::Option::Some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_mime_type(&mut self) -> &mut ::std::string::String {
        if self.mime_type.is_none() {
            self.mime_type = ::std::option::Option::Some(::std::string::String::new());
        }
        self.mime_type.as_mut().unwrap()
    }

    // Take field
    pub fn take_mime_type(&mut self) -> ::std::string::String {
        self.mime_type.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional bytes data = 3;

    pub fn data(&self) -> &[u8] {
        match self.data.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_data(&mut self) {
        self.data = ::std::option::Option::None;
    }

    pub fn has_data(&self) -> bool {
        self.data.is_some()
    }

    // Param is passed by value, moved
    pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
        self.data = ::std::option::Option::Some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.data.is_none() {
            self.data = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.data.as_mut().unwrap()
    }

    // Take field
    pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
        self.data.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }
}

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

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

    fn merge_from(&mut self, is: &mut ::steam_vent_proto_common::protobuf::CodedInputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self.file_prefix = ::std::option::Option::Some(is.read_string()?);
                },
                18 => {
                    self.mime_type = ::std::option::Option::Some(is.read_string()?);
                },
                26 => {
                    self.data = ::std::option::Option::Some(is.read_bytes()?);
                },
                tag => {
                    ::steam_vent_proto_common::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.file_prefix.as_ref() {
            my_size += ::steam_vent_proto_common::protobuf::rt::string_size(1, &v);
        }
        if let Some(v) = self.mime_type.as_ref() {
            my_size += ::steam_vent_proto_common::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.data.as_ref() {
            my_size += ::steam_vent_proto_common::protobuf::rt::bytes_size(3, &v);
        }
        my_size += ::steam_vent_proto_common::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::steam_vent_proto_common::protobuf::CodedOutputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        if let Some(v) = self.file_prefix.as_ref() {
            os.write_string(1, v)?;
        }
        if let Some(v) = self.mime_type.as_ref() {
            os.write_string(2, v)?;
        }
        if let Some(v) = self.data.as_ref() {
            os.write_bytes(3, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

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

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

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

    fn clear(&mut self) {
        self.file_prefix = ::std::option::Option::None;
        self.mime_type = ::std::option::Option::None;
        self.data = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static CGameNotes_UploadImage_Request {
        static instance: CGameNotes_UploadImage_Request = CGameNotes_UploadImage_Request {
            file_prefix: ::std::option::Option::None,
            mime_type: ::std::option::Option::None,
            data: ::std::option::Option::None,
            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

// @@protoc_insertion_point(message:CGameNotes_UploadImage_Response)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CGameNotes_UploadImage_Response {
    // message fields
    // @@protoc_insertion_point(field:CGameNotes_UploadImage_Response.filename)
    pub filename: ::std::option::Option<::std::string::String>,
    // special fields
    // @@protoc_insertion_point(special_field:CGameNotes_UploadImage_Response.special_fields)
    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
}

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

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

    // optional string filename = 1;

    pub fn filename(&self) -> &str {
        match self.filename.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_filename(&mut self) {
        self.filename = ::std::option::Option::None;
    }

    pub fn has_filename(&self) -> bool {
        self.filename.is_some()
    }

    // Param is passed by value, moved
    pub fn set_filename(&mut self, v: ::std::string::String) {
        self.filename = ::std::option::Option::Some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_filename(&mut self) -> &mut ::std::string::String {
        if self.filename.is_none() {
            self.filename = ::std::option::Option::Some(::std::string::String::new());
        }
        self.filename.as_mut().unwrap()
    }

    // Take field
    pub fn take_filename(&mut self) -> ::std::string::String {
        self.filename.take().unwrap_or_else(|| ::std::string::String::new())
    }
}

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

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

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

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.filename.as_ref() {
            my_size += ::steam_vent_proto_common::protobuf::rt::string_size(1, &v);
        }
        my_size += ::steam_vent_proto_common::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::steam_vent_proto_common::protobuf::CodedOutputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        if let Some(v) = self.filename.as_ref() {
            os.write_string(1, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

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

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

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

    fn clear(&mut self) {
        self.filename = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static CGameNotes_UploadImage_Response {
        static instance: CGameNotes_UploadImage_Response = CGameNotes_UploadImage_Response {
            filename: ::std::option::Option::None,
            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
        };
        &instance
    }
}


const _VENT_PROTO_VERSION_CHECK: () = ::steam_vent_proto_common::VERSION_0_5_0;

#[allow(unused_imports)]
use crate::steammessages_base::*;
#[allow(unused_imports)]
use crate::webuimessages_base::*;
impl ::steam_vent_proto_common::RpcMessage for CGameNotes_UploadImage_Request {
    fn parse(reader: &mut dyn std::io::Read) -> ::steam_vent_proto_common::protobuf::Result<Self> {
        <Self as ::steam_vent_proto_common::protobuf::Message>::parse_from_reader(reader)
    }
    fn write(&self, writer: &mut dyn std::io::Write) -> ::steam_vent_proto_common::protobuf::Result<()> {
        use ::steam_vent_proto_common::protobuf::Message;
        self.write_to_writer(writer)
    }
    fn encode_size(&self) -> usize {
        use ::steam_vent_proto_common::protobuf::Message;
        self.compute_size() as usize
    }
}
impl ::steam_vent_proto_common::RpcMessage for CGameNotes_UploadImage_Response {
    fn parse(reader: &mut dyn std::io::Read) -> ::steam_vent_proto_common::protobuf::Result<Self> {
        <Self as ::steam_vent_proto_common::protobuf::Message>::parse_from_reader(reader)
    }
    fn write(&self, writer: &mut dyn std::io::Write) -> ::steam_vent_proto_common::protobuf::Result<()> {
        use ::steam_vent_proto_common::protobuf::Message;
        self.write_to_writer(writer)
    }
    fn encode_size(&self) -> usize {
        use ::steam_vent_proto_common::protobuf::Message;
        self.compute_size() as usize
    }
}
///
struct GameNotes {}
impl ::steam_vent_proto_common::RpcService for GameNotes {
    const SERVICE_NAME: &'static str = "GameNotes";
}
impl ::steam_vent_proto_common::RpcMethod for CGameNotes_UploadImage_Request {
    const METHOD_NAME: &'static str = "GameNotes.UploadImage#1";
    type Response = CGameNotes_UploadImage_Response;
}
