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

// SMSJobsGetSMSJobRequest represents TL type `smsjobs.getSmsJob#778d902f`.
// Get info about an SMS job (official clients only).
//
// See https://core.telegram.org/method/smsjobs.getSmsJob for reference.
type SMSJobsGetSMSJobRequest struct {
	// Job ID
	JobID string
}

// SMSJobsGetSMSJobRequestTypeID is TL type id of SMSJobsGetSMSJobRequest.
const SMSJobsGetSMSJobRequestTypeID = 0x778d902f

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

func ( *SMSJobsGetSMSJobRequest) () bool {
	if  == nil {
		return true
	}
	if !(.JobID == "") {
		return false
	}

	return true
}

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

// FillFrom fills SMSJobsGetSMSJobRequest from given interface.
func ( *SMSJobsGetSMSJobRequest) ( interface {
	() ( string)
}) {
	.JobID = .()
}

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

// TypeName returns name of type in TL schema.
func (*SMSJobsGetSMSJobRequest) () string {
	return "smsjobs.getSmsJob"
}

// TypeInfo returns info about TL type.
func ( *SMSJobsGetSMSJobRequest) () tdp.Type {
	 := tdp.Type{
		Name: "smsjobs.getSmsJob",
		ID:   SMSJobsGetSMSJobRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "JobID",
			SchemaName: "job_id",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *SMSJobsGetSMSJobRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode smsjobs.getSmsJob#778d902f as nil")
	}
	.PutID(SMSJobsGetSMSJobRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *SMSJobsGetSMSJobRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode smsjobs.getSmsJob#778d902f as nil")
	}
	.PutString(.JobID)
	return nil
}

// Decode implements bin.Decoder.
func ( *SMSJobsGetSMSJobRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode smsjobs.getSmsJob#778d902f to nil")
	}
	if  := .ConsumeID(SMSJobsGetSMSJobRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode smsjobs.getSmsJob#778d902f: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *SMSJobsGetSMSJobRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode smsjobs.getSmsJob#778d902f to nil")
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode smsjobs.getSmsJob#778d902f: field job_id: %w", )
		}
		.JobID = 
	}
	return nil
}

// GetJobID returns value of JobID field.
func ( *SMSJobsGetSMSJobRequest) () ( string) {
	if  == nil {
		return
	}
	return .JobID
}

// SMSJobsGetSMSJob invokes method smsjobs.getSmsJob#778d902f returning error if any.
// Get info about an SMS job (official clients only).
//
// Possible errors:
//
//	400 SMSJOB_ID_INVALID: The specified job ID is invalid.
//
// See https://core.telegram.org/method/smsjobs.getSmsJob for reference.
func ( *Client) ( context.Context,  string) (*SMSJob, error) {
	var  SMSJob

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