// Code generated by gotdgen, DO NOT EDIT.

package mt

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

// GetFutureSaltsRequest represents TL type `get_future_salts#b921bd04`.
type GetFutureSaltsRequest struct {
	// Num field of GetFutureSaltsRequest.
	Num int
}

// GetFutureSaltsRequestTypeID is TL type id of GetFutureSaltsRequest.
const GetFutureSaltsRequestTypeID = 0xb921bd04

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

func ( *GetFutureSaltsRequest) () bool {
	if  == nil {
		return true
	}
	if !(.Num == 0) {
		return false
	}

	return true
}

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

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

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

// TypeInfo returns info about TL type.
func ( *GetFutureSaltsRequest) () tdp.Type {
	 := tdp.Type{
		Name: "get_future_salts",
		ID:   GetFutureSaltsRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Num",
			SchemaName: "num",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *GetFutureSaltsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode get_future_salts#b921bd04 as nil")
	}
	.PutID(GetFutureSaltsRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *GetFutureSaltsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode get_future_salts#b921bd04 as nil")
	}
	.PutInt(.Num)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *GetFutureSaltsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode get_future_salts#b921bd04 to nil")
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode get_future_salts#b921bd04: field num: %w", )
		}
		.Num = 
	}
	return nil
}

// GetNum returns value of Num field.
func ( *GetFutureSaltsRequest) () ( int) {
	if  == nil {
		return
	}
	return .Num
}