// // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024 // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" #include "td/telegram/UserId.h" #include "td/utils/common.h" #include "td/utils/StringBuilder.h" namespace td { class Td; class BusinessRecipients { public: BusinessRecipients() = default; explicit BusinessRecipients(telegram_api::object_ptr recipients); explicit BusinessRecipients(telegram_api::object_ptr recipients); explicit BusinessRecipients(td_api::object_ptr recipients); td_api::object_ptr get_business_recipients_object(Td *td) const; telegram_api::object_ptr get_input_business_recipients(Td *td) const; telegram_api::object_ptr get_input_business_bot_recipients(Td *td) const; template void store(StorerT &storer) const; template void parse(ParserT &parser); private: vector user_ids_; bool existing_chats_ = false; bool new_chats_ = false; bool contacts_ = false; bool non_contacts_ = false; bool exclude_selected_ = false; friend bool operator==(const BusinessRecipients &lhs, const BusinessRecipients &rhs); friend StringBuilder &operator<<(StringBuilder &string_builder, const BusinessRecipients &recipients); }; bool operator==(const BusinessRecipients &lhs, const BusinessRecipients &rhs); inline bool operator!=(const BusinessRecipients &lhs, const BusinessRecipients &rhs) { return !(lhs == rhs); } StringBuilder &operator<<(StringBuilder &string_builder, const BusinessRecipients &recipients); } // namespace td