// 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{}
)

// ContactsGetBirthdaysRequest represents TL type `contacts.getBirthdays#daeda864`.
// Fetch all users with birthdays that fall within +1/-1 days, relative to the current
// day: this method should be invoked by clients every 6-8 hours, and if the result is
// non-empty, it should be used to appropriately update locally cached birthday
// information in user¹.birthday.
// See here »¹ for more info.
//
// Links:
//  1. https://core.telegram.org/constructor/user
//  2. https://core.telegram.org/api/profile#birthday
//
// See https://core.telegram.org/method/contacts.getBirthdays for reference.
type ContactsGetBirthdaysRequest struct {
}

// ContactsGetBirthdaysRequestTypeID is TL type id of ContactsGetBirthdaysRequest.
const ContactsGetBirthdaysRequestTypeID = 0xdaeda864

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

func ( *ContactsGetBirthdaysRequest) () bool {
	if  == nil {
		return true
	}

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*ContactsGetBirthdaysRequest) () string {
	return "contacts.getBirthdays"
}

// TypeInfo returns info about TL type.
func ( *ContactsGetBirthdaysRequest) () tdp.Type {
	 := tdp.Type{
		Name: "contacts.getBirthdays",
		ID:   ContactsGetBirthdaysRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *ContactsGetBirthdaysRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode contacts.getBirthdays#daeda864 as nil")
	}
	.PutID(ContactsGetBirthdaysRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ContactsGetBirthdaysRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode contacts.getBirthdays#daeda864 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ContactsGetBirthdaysRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode contacts.getBirthdays#daeda864 to nil")
	}
	return nil
}

// ContactsGetBirthdays invokes method contacts.getBirthdays#daeda864 returning error if any.
// Fetch all users with birthdays that fall within +1/-1 days, relative to the current
// day: this method should be invoked by clients every 6-8 hours, and if the result is
// non-empty, it should be used to appropriately update locally cached birthday
// information in user¹.birthday.
// See here »¹ for more info.
//
// Links:
//  1. https://core.telegram.org/constructor/user
//  2. https://core.telegram.org/api/profile#birthday
//
// See https://core.telegram.org/method/contacts.getBirthdays for reference.
func ( *Client) ( context.Context) (*ContactsContactBirthdays, error) {
	var  ContactsContactBirthdays

	 := &ContactsGetBirthdaysRequest{}
	if  := .rpc.Invoke(, , &);  != nil {
		return nil, 
	}
	return &, nil
}