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

// WalletGetStateRequest represents TL type `wallet.getState#ab83b33a`.
//
// See https://core.telegram.org/method/wallet.getState for reference.
type WalletGetStateRequest struct {
}

// WalletGetStateRequestTypeID is TL type id of WalletGetStateRequest.
const WalletGetStateRequestTypeID = 0xab83b33a

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

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*WalletGetStateRequest) () string {
	return "wallet.getState"
}

// TypeInfo returns info about TL type.
func ( *WalletGetStateRequest) () tdp.Type {
	 := tdp.Type{
		Name: "wallet.getState",
		ID:   WalletGetStateRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *WalletGetStateRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode wallet.getState#ab83b33a as nil")
	}
	.PutID(WalletGetStateRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *WalletGetStateRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode wallet.getState#ab83b33a as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *WalletGetStateRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode wallet.getState#ab83b33a to nil")
	}
	return nil
}

// WalletGetState invokes method wallet.getState#ab83b33a returning error if any.
//
// See https://core.telegram.org/method/wallet.getState for reference.
func ( *Client) ( context.Context) (WalletStateClass, error) {
	var  WalletStateBox

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