// Code generated by gotdgen, DO NOT EDIT.

package tg

import (
	
	
	
	
	

	

	
	
	
	
)

// No-op definition for keeping imports.
var (
	_ = bin.Buffer{}
	_ = context.Background()
	_ = fmt.Stringer(nil)
	_ = strings.Builder{}
	_ = errors.Is
	_ = multierr.AppendInto
	_ = sort.Ints
	_ = tdp.Format
	_ = tgerr.Error{}
	_ = tdjson.Encoder{}
)

// PeerSettings represents TL type `peerSettings#f47741f7`.
// List of actions that are possible when interacting with this user, to be shown as
// suggested actions in the chat action bar »¹, see here »² for more info.
//
// Links:
//  1. https://core.telegram.org/api/action-bar
//  2. https://core.telegram.org/api/action-bar
//
// See https://core.telegram.org/constructor/peerSettings for reference.
type PeerSettings struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether we can still report the user for spam
	ReportSpam bool
	// Whether we can add the user as contact
	AddContact bool
	// Whether we can block the user
	BlockContact bool
	// Whether we can share the user's contact
	ShareContact bool
	// Whether a special exception for contacts is needed
	NeedContactsException bool
	// Whether we can report a geogroup as irrelevant for this location
	ReportGeo bool
	// Whether this peer was automatically archived according to privacy settings¹ and can
	// be unarchived
	//
	// Links:
	//  1) https://core.telegram.org/constructor/globalPrivacySettings
	Autoarchived bool
	// If set, this is a recently created group chat to which new members can be invited
	InviteMembers bool
	// This flag is set if request_chat_title and request_chat_date fields are set and the
	// join request »¹ is related to a channel (otherwise if only the request fields are
	// set, the join request »² is related to a chat).
	//
	// Links:
	//  1) https://core.telegram.org/api/invites#join-requests
	//  2) https://core.telegram.org/api/invites#join-requests
	RequestChatBroadcast bool
	// This flag is set if both business_bot_id and business_bot_manage_url are set and all
	// connected business bots »¹ were paused in this chat using account
	// toggleConnectedBotPaused »².
	//
	// Links:
	//  1) https://core.telegram.org/api/bots/connected-business-bots
	//  2) https://core.telegram.org/method/account.toggleConnectedBotPaused
	BusinessBotPaused bool
	// This flag is set if both business_bot_id and business_bot_manage_url are set and
	// connected business bots »¹ can reply to messages in this chat, as specified by the
	// settings during initial configuration².
	//
	// Links:
	//  1) https://core.telegram.org/api/bots/connected-business-bots
	//  2) https://core.telegram.org/api/bots/connected-business-bots
	BusinessBotCanReply bool
	// Distance in meters between us and this peer
	//
	// Use SetGeoDistance and GetGeoDistance helpers.
	GeoDistance int
	// If set, this is a private chat with an administrator of a chat or channel to which the
	// user sent a join request, and this field contains the chat/channel's title.
	//
	// Use SetRequestChatTitle and GetRequestChatTitle helpers.
	RequestChatTitle string
	// If set, this is a private chat with an administrator of a chat or channel to which the
	// user sent a join request, and this field contains the timestamp when the join request
	// »¹ was sent.
	//
	// Links:
	//  1) https://core.telegram.org/api/invites#join-requests
	//
	// Use SetRequestChatDate and GetRequestChatDate helpers.
	RequestChatDate int
	// Contains the ID of the business bot »¹ managing this chat, used to display info
	// about the bot in the action bar.
	//
	// Links:
	//  1) https://core.telegram.org/api/bots/connected-business-bots
	//
	// Use SetBusinessBotID and GetBusinessBotID helpers.
	BusinessBotID int64
	// Contains a deep link »¹, used to open a management menu in the business bot. This
	// flag is set if and only if business_bot_id is set.
	//
	// Links:
	//  1) https://core.telegram.org/api/links
	//
	// Use SetBusinessBotManageURL and GetBusinessBotManageURL helpers.
	BusinessBotManageURL string
	// All users that must pay us »¹ to send us private messages will have this flag set
	// only for us, containing the amount of required stars, see here »² for more info on
	// paid messages.
	//
	// Links:
	//  1) https://core.telegram.org/api/paid-messages
	//  2) https://core.telegram.org/api/paid-messages
	//
	// Use SetChargePaidMessageStars and GetChargePaidMessageStars helpers.
	ChargePaidMessageStars int64
	// Used to display the user's registration year and month, the string is in MM.YYYY
	// format, where MM is the registration month (1-12), and YYYY is the registration year.
	//
	// Use SetRegistrationMonth and GetRegistrationMonth helpers.
	RegistrationMonth string
	// The country code of the user's phone number.
	//
	// Use SetPhoneCountry and GetPhoneCountry helpers.
	PhoneCountry string
	// When was the user's name last changed.
	//
	// Use SetNameChangeDate and GetNameChangeDate helpers.
	NameChangeDate int
	// When was the user's photo last changed.
	//
	// Use SetPhotoChangeDate and GetPhotoChangeDate helpers.
	PhotoChangeDate int
}

// PeerSettingsTypeID is TL type id of PeerSettings.
const PeerSettingsTypeID = 0xf47741f7

// Ensuring interfaces in compile-time for PeerSettings.
var (
	_ bin.Encoder     = &PeerSettings{}
	_ bin.Decoder     = &PeerSettings{}
	_ bin.BareEncoder = &PeerSettings{}
	_ bin.BareDecoder = &PeerSettings{}
)

func ( *PeerSettings) () bool {
	if  == nil {
		return true
	}
	if !(.Flags.Zero()) {
		return false
	}
	if !(.ReportSpam == false) {
		return false
	}
	if !(.AddContact == false) {
		return false
	}
	if !(.BlockContact == false) {
		return false
	}
	if !(.ShareContact == false) {
		return false
	}
	if !(.NeedContactsException == false) {
		return false
	}
	if !(.ReportGeo == false) {
		return false
	}
	if !(.Autoarchived == false) {
		return false
	}
	if !(.InviteMembers == false) {
		return false
	}
	if !(.RequestChatBroadcast == false) {
		return false
	}
	if !(.BusinessBotPaused == false) {
		return false
	}
	if !(.BusinessBotCanReply == false) {
		return false
	}
	if !(.GeoDistance == 0) {
		return false
	}
	if !(.RequestChatTitle == "") {
		return false
	}
	if !(.RequestChatDate == 0) {
		return false
	}
	if !(.BusinessBotID == 0) {
		return false
	}
	if !(.BusinessBotManageURL == "") {
		return false
	}
	if !(.ChargePaidMessageStars == 0) {
		return false
	}
	if !(.RegistrationMonth == "") {
		return false
	}
	if !(.PhoneCountry == "") {
		return false
	}
	if !(.NameChangeDate == 0) {
		return false
	}
	if !(.PhotoChangeDate == 0) {
		return false
	}

	return true
}

// String implements fmt.Stringer.
func ( *PeerSettings) () string {
	if  == nil {
		return "PeerSettings(nil)"
	}
	type  PeerSettings
	return fmt.Sprintf("PeerSettings%+v", (*))
}

// FillFrom fills PeerSettings from given interface.
func ( *PeerSettings) ( interface {
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( int,  bool)
	() ( string,  bool)
	() ( int,  bool)
	() ( int64,  bool)
	() ( string,  bool)
	() ( int64,  bool)
	() ( string,  bool)
	() ( string,  bool)
	() ( int,  bool)
	() ( int,  bool)
}) {
	.ReportSpam = .()
	.AddContact = .()
	.BlockContact = .()
	.ShareContact = .()
	.NeedContactsException = .()
	.ReportGeo = .()
	.Autoarchived = .()
	.InviteMembers = .()
	.RequestChatBroadcast = .()
	.BusinessBotPaused = .()
	.BusinessBotCanReply = .()
	if ,  := .();  {
		.GeoDistance = 
	}

	if ,  := .();  {
		.RequestChatTitle = 
	}

	if ,  := .();  {
		.RequestChatDate = 
	}

	if ,  := .();  {
		.BusinessBotID = 
	}

	if ,  := .();  {
		.BusinessBotManageURL = 
	}

	if ,  := .();  {
		.ChargePaidMessageStars = 
	}

	if ,  := .();  {
		.RegistrationMonth = 
	}

	if ,  := .();  {
		.PhoneCountry = 
	}

	if ,  := .();  {
		.NameChangeDate = 
	}

	if ,  := .();  {
		.PhotoChangeDate = 
	}

}

// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*PeerSettings) () uint32 {
	return PeerSettingsTypeID
}

// TypeName returns name of type in TL schema.
func (*PeerSettings) () string {
	return "peerSettings"
}

// TypeInfo returns info about TL type.
func ( *PeerSettings) () tdp.Type {
	 := tdp.Type{
		Name: "peerSettings",
		ID:   PeerSettingsTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "ReportSpam",
			SchemaName: "report_spam",
			Null:       !.Flags.Has(0),
		},
		{
			Name:       "AddContact",
			SchemaName: "add_contact",
			Null:       !.Flags.Has(1),
		},
		{
			Name:       "BlockContact",
			SchemaName: "block_contact",
			Null:       !.Flags.Has(2),
		},
		{
			Name:       "ShareContact",
			SchemaName: "share_contact",
			Null:       !.Flags.Has(3),
		},
		{
			Name:       "NeedContactsException",
			SchemaName: "need_contacts_exception",
			Null:       !.Flags.Has(4),
		},
		{
			Name:       "ReportGeo",
			SchemaName: "report_geo",
			Null:       !.Flags.Has(5),
		},
		{
			Name:       "Autoarchived",
			SchemaName: "autoarchived",
			Null:       !.Flags.Has(7),
		},
		{
			Name:       "InviteMembers",
			SchemaName: "invite_members",
			Null:       !.Flags.Has(8),
		},
		{
			Name:       "RequestChatBroadcast",
			SchemaName: "request_chat_broadcast",
			Null:       !.Flags.Has(10),
		},
		{
			Name:       "BusinessBotPaused",
			SchemaName: "business_bot_paused",
			Null:       !.Flags.Has(11),
		},
		{
			Name:       "BusinessBotCanReply",
			SchemaName: "business_bot_can_reply",
			Null:       !.Flags.Has(12),
		},
		{
			Name:       "GeoDistance",
			SchemaName: "geo_distance",
			Null:       !.Flags.Has(6),
		},
		{
			Name:       "RequestChatTitle",
			SchemaName: "request_chat_title",
			Null:       !.Flags.Has(9),
		},
		{
			Name:       "RequestChatDate",
			SchemaName: "request_chat_date",
			Null:       !.Flags.Has(9),
		},
		{
			Name:       "BusinessBotID",
			SchemaName: "business_bot_id",
			Null:       !.Flags.Has(13),
		},
		{
			Name:       "BusinessBotManageURL",
			SchemaName: "business_bot_manage_url",
			Null:       !.Flags.Has(13),
		},
		{
			Name:       "ChargePaidMessageStars",
			SchemaName: "charge_paid_message_stars",
			Null:       !.Flags.Has(14),
		},
		{
			Name:       "RegistrationMonth",
			SchemaName: "registration_month",
			Null:       !.Flags.Has(15),
		},
		{
			Name:       "PhoneCountry",
			SchemaName: "phone_country",
			Null:       !.Flags.Has(16),
		},
		{
			Name:       "NameChangeDate",
			SchemaName: "name_change_date",
			Null:       !.Flags.Has(17),
		},
		{
			Name:       "PhotoChangeDate",
			SchemaName: "photo_change_date",
			Null:       !.Flags.Has(18),
		},
	}
	return 
}

// SetFlags sets flags for non-zero fields.
func ( *PeerSettings) () {
	if !(.ReportSpam == false) {
		.Flags.Set(0)
	}
	if !(.AddContact == false) {
		.Flags.Set(1)
	}
	if !(.BlockContact == false) {
		.Flags.Set(2)
	}
	if !(.ShareContact == false) {
		.Flags.Set(3)
	}
	if !(.NeedContactsException == false) {
		.Flags.Set(4)
	}
	if !(.ReportGeo == false) {
		.Flags.Set(5)
	}
	if !(.Autoarchived == false) {
		.Flags.Set(7)
	}
	if !(.InviteMembers == false) {
		.Flags.Set(8)
	}
	if !(.RequestChatBroadcast == false) {
		.Flags.Set(10)
	}
	if !(.BusinessBotPaused == false) {
		.Flags.Set(11)
	}
	if !(.BusinessBotCanReply == false) {
		.Flags.Set(12)
	}
	if !(.GeoDistance == 0) {
		.Flags.Set(6)
	}
	if !(.RequestChatTitle == "") {
		.Flags.Set(9)
	}
	if !(.RequestChatDate == 0) {
		.Flags.Set(9)
	}
	if !(.BusinessBotID == 0) {
		.Flags.Set(13)
	}
	if !(.BusinessBotManageURL == "") {
		.Flags.Set(13)
	}
	if !(.ChargePaidMessageStars == 0) {
		.Flags.Set(14)
	}
	if !(.RegistrationMonth == "") {
		.Flags.Set(15)
	}
	if !(.PhoneCountry == "") {
		.Flags.Set(16)
	}
	if !(.NameChangeDate == 0) {
		.Flags.Set(17)
	}
	if !(.PhotoChangeDate == 0) {
		.Flags.Set(18)
	}
}

// Encode implements bin.Encoder.
func ( *PeerSettings) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode peerSettings#f47741f7 as nil")
	}
	.PutID(PeerSettingsTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *PeerSettings) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode peerSettings#f47741f7 as nil")
	}
	.SetFlags()
	if  := .Flags.Encode();  != nil {
		return fmt.Errorf("unable to encode peerSettings#f47741f7: field flags: %w", )
	}
	if .Flags.Has(6) {
		.PutInt(.GeoDistance)
	}
	if .Flags.Has(9) {
		.PutString(.RequestChatTitle)
	}
	if .Flags.Has(9) {
		.PutInt(.RequestChatDate)
	}
	if .Flags.Has(13) {
		.PutLong(.BusinessBotID)
	}
	if .Flags.Has(13) {
		.PutString(.BusinessBotManageURL)
	}
	if .Flags.Has(14) {
		.PutLong(.ChargePaidMessageStars)
	}
	if .Flags.Has(15) {
		.PutString(.RegistrationMonth)
	}
	if .Flags.Has(16) {
		.PutString(.PhoneCountry)
	}
	if .Flags.Has(17) {
		.PutInt(.NameChangeDate)
	}
	if .Flags.Has(18) {
		.PutInt(.PhotoChangeDate)
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *PeerSettings) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode peerSettings#f47741f7 to nil")
	}
	if  := .ConsumeID(PeerSettingsTypeID);  != nil {
		return fmt.Errorf("unable to decode peerSettings#f47741f7: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *PeerSettings) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode peerSettings#f47741f7 to nil")
	}
	{
		if  := .Flags.Decode();  != nil {
			return fmt.Errorf("unable to decode peerSettings#f47741f7: field flags: %w", )
		}
	}
	.ReportSpam = .Flags.Has(0)
	.AddContact = .Flags.Has(1)
	.BlockContact = .Flags.Has(2)
	.ShareContact = .Flags.Has(3)
	.NeedContactsException = .Flags.Has(4)
	.ReportGeo = .Flags.Has(5)
	.Autoarchived = .Flags.Has(7)
	.InviteMembers = .Flags.Has(8)
	.RequestChatBroadcast = .Flags.Has(10)
	.BusinessBotPaused = .Flags.Has(11)
	.BusinessBotCanReply = .Flags.Has(12)
	if .Flags.Has(6) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode peerSettings#f47741f7: field geo_distance: %w", )
		}
		.GeoDistance = 
	}
	if .Flags.Has(9) {
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode peerSettings#f47741f7: field request_chat_title: %w", )
		}
		.RequestChatTitle = 
	}
	if .Flags.Has(9) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode peerSettings#f47741f7: field request_chat_date: %w", )
		}
		.RequestChatDate = 
	}
	if .Flags.Has(13) {
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode peerSettings#f47741f7: field business_bot_id: %w", )
		}
		.BusinessBotID = 
	}
	if .Flags.Has(13) {
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode peerSettings#f47741f7: field business_bot_manage_url: %w", )
		}
		.BusinessBotManageURL = 
	}
	if .Flags.Has(14) {
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode peerSettings#f47741f7: field charge_paid_message_stars: %w", )
		}
		.ChargePaidMessageStars = 
	}
	if .Flags.Has(15) {
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode peerSettings#f47741f7: field registration_month: %w", )
		}
		.RegistrationMonth = 
	}
	if .Flags.Has(16) {
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode peerSettings#f47741f7: field phone_country: %w", )
		}
		.PhoneCountry = 
	}
	if .Flags.Has(17) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode peerSettings#f47741f7: field name_change_date: %w", )
		}
		.NameChangeDate = 
	}
	if .Flags.Has(18) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode peerSettings#f47741f7: field photo_change_date: %w", )
		}
		.PhotoChangeDate = 
	}
	return nil
}

// SetReportSpam sets value of ReportSpam conditional field.
func ( *PeerSettings) ( bool) {
	if  {
		.Flags.Set(0)
		.ReportSpam = true
	} else {
		.Flags.Unset(0)
		.ReportSpam = false
	}
}

// GetReportSpam returns value of ReportSpam conditional field.
func ( *PeerSettings) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(0)
}

// SetAddContact sets value of AddContact conditional field.
func ( *PeerSettings) ( bool) {
	if  {
		.Flags.Set(1)
		.AddContact = true
	} else {
		.Flags.Unset(1)
		.AddContact = false
	}
}

// GetAddContact returns value of AddContact conditional field.
func ( *PeerSettings) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(1)
}

// SetBlockContact sets value of BlockContact conditional field.
func ( *PeerSettings) ( bool) {
	if  {
		.Flags.Set(2)
		.BlockContact = true
	} else {
		.Flags.Unset(2)
		.BlockContact = false
	}
}

// GetBlockContact returns value of BlockContact conditional field.
func ( *PeerSettings) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(2)
}

// SetShareContact sets value of ShareContact conditional field.
func ( *PeerSettings) ( bool) {
	if  {
		.Flags.Set(3)
		.ShareContact = true
	} else {
		.Flags.Unset(3)
		.ShareContact = false
	}
}

// GetShareContact returns value of ShareContact conditional field.
func ( *PeerSettings) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(3)
}

// SetNeedContactsException sets value of NeedContactsException conditional field.
func ( *PeerSettings) ( bool) {
	if  {
		.Flags.Set(4)
		.NeedContactsException = true
	} else {
		.Flags.Unset(4)
		.NeedContactsException = false
	}
}

// GetNeedContactsException returns value of NeedContactsException conditional field.
func ( *PeerSettings) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(4)
}

// SetReportGeo sets value of ReportGeo conditional field.
func ( *PeerSettings) ( bool) {
	if  {
		.Flags.Set(5)
		.ReportGeo = true
	} else {
		.Flags.Unset(5)
		.ReportGeo = false
	}
}

// GetReportGeo returns value of ReportGeo conditional field.
func ( *PeerSettings) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(5)
}

// SetAutoarchived sets value of Autoarchived conditional field.
func ( *PeerSettings) ( bool) {
	if  {
		.Flags.Set(7)
		.Autoarchived = true
	} else {
		.Flags.Unset(7)
		.Autoarchived = false
	}
}

// GetAutoarchived returns value of Autoarchived conditional field.
func ( *PeerSettings) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(7)
}

// SetInviteMembers sets value of InviteMembers conditional field.
func ( *PeerSettings) ( bool) {
	if  {
		.Flags.Set(8)
		.InviteMembers = true
	} else {
		.Flags.Unset(8)
		.InviteMembers = false
	}
}

// GetInviteMembers returns value of InviteMembers conditional field.
func ( *PeerSettings) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(8)
}

// SetRequestChatBroadcast sets value of RequestChatBroadcast conditional field.
func ( *PeerSettings) ( bool) {
	if  {
		.Flags.Set(10)
		.RequestChatBroadcast = true
	} else {
		.Flags.Unset(10)
		.RequestChatBroadcast = false
	}
}

// GetRequestChatBroadcast returns value of RequestChatBroadcast conditional field.
func ( *PeerSettings) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(10)
}

// SetBusinessBotPaused sets value of BusinessBotPaused conditional field.
func ( *PeerSettings) ( bool) {
	if  {
		.Flags.Set(11)
		.BusinessBotPaused = true
	} else {
		.Flags.Unset(11)
		.BusinessBotPaused = false
	}
}

// GetBusinessBotPaused returns value of BusinessBotPaused conditional field.
func ( *PeerSettings) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(11)
}

// SetBusinessBotCanReply sets value of BusinessBotCanReply conditional field.
func ( *PeerSettings) ( bool) {
	if  {
		.Flags.Set(12)
		.BusinessBotCanReply = true
	} else {
		.Flags.Unset(12)
		.BusinessBotCanReply = false
	}
}

// GetBusinessBotCanReply returns value of BusinessBotCanReply conditional field.
func ( *PeerSettings) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(12)
}

// SetGeoDistance sets value of GeoDistance conditional field.
func ( *PeerSettings) ( int) {
	.Flags.Set(6)
	.GeoDistance = 
}

// GetGeoDistance returns value of GeoDistance conditional field and
// boolean which is true if field was set.
func ( *PeerSettings) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(6) {
		return , false
	}
	return .GeoDistance, true
}

// SetRequestChatTitle sets value of RequestChatTitle conditional field.
func ( *PeerSettings) ( string) {
	.Flags.Set(9)
	.RequestChatTitle = 
}

// GetRequestChatTitle returns value of RequestChatTitle conditional field and
// boolean which is true if field was set.
func ( *PeerSettings) () ( string,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(9) {
		return , false
	}
	return .RequestChatTitle, true
}

// SetRequestChatDate sets value of RequestChatDate conditional field.
func ( *PeerSettings) ( int) {
	.Flags.Set(9)
	.RequestChatDate = 
}

// GetRequestChatDate returns value of RequestChatDate conditional field and
// boolean which is true if field was set.
func ( *PeerSettings) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(9) {
		return , false
	}
	return .RequestChatDate, true
}

// SetBusinessBotID sets value of BusinessBotID conditional field.
func ( *PeerSettings) ( int64) {
	.Flags.Set(13)
	.BusinessBotID = 
}

// GetBusinessBotID returns value of BusinessBotID conditional field and
// boolean which is true if field was set.
func ( *PeerSettings) () ( int64,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(13) {
		return , false
	}
	return .BusinessBotID, true
}

// SetBusinessBotManageURL sets value of BusinessBotManageURL conditional field.
func ( *PeerSettings) ( string) {
	.Flags.Set(13)
	.BusinessBotManageURL = 
}

// GetBusinessBotManageURL returns value of BusinessBotManageURL conditional field and
// boolean which is true if field was set.
func ( *PeerSettings) () ( string,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(13) {
		return , false
	}
	return .BusinessBotManageURL, true
}

// SetChargePaidMessageStars sets value of ChargePaidMessageStars conditional field.
func ( *PeerSettings) ( int64) {
	.Flags.Set(14)
	.ChargePaidMessageStars = 
}

// GetChargePaidMessageStars returns value of ChargePaidMessageStars conditional field and
// boolean which is true if field was set.
func ( *PeerSettings) () ( int64,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(14) {
		return , false
	}
	return .ChargePaidMessageStars, true
}

// SetRegistrationMonth sets value of RegistrationMonth conditional field.
func ( *PeerSettings) ( string) {
	.Flags.Set(15)
	.RegistrationMonth = 
}

// GetRegistrationMonth returns value of RegistrationMonth conditional field and
// boolean which is true if field was set.
func ( *PeerSettings) () ( string,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(15) {
		return , false
	}
	return .RegistrationMonth, true
}

// SetPhoneCountry sets value of PhoneCountry conditional field.
func ( *PeerSettings) ( string) {
	.Flags.Set(16)
	.PhoneCountry = 
}

// GetPhoneCountry returns value of PhoneCountry conditional field and
// boolean which is true if field was set.
func ( *PeerSettings) () ( string,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(16) {
		return , false
	}
	return .PhoneCountry, true
}

// SetNameChangeDate sets value of NameChangeDate conditional field.
func ( *PeerSettings) ( int) {
	.Flags.Set(17)
	.NameChangeDate = 
}

// GetNameChangeDate returns value of NameChangeDate conditional field and
// boolean which is true if field was set.
func ( *PeerSettings) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(17) {
		return , false
	}
	return .NameChangeDate, true
}

// SetPhotoChangeDate sets value of PhotoChangeDate conditional field.
func ( *PeerSettings) ( int) {
	.Flags.Set(18)
	.PhotoChangeDate = 
}

// GetPhotoChangeDate returns value of PhotoChangeDate conditional field and
// boolean which is true if field was set.
func ( *PeerSettings) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(18) {
		return , false
	}
	return .PhotoChangeDate, true
}