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

// PhoneStartScheduledGroupCallRequest represents TL type `phone.startScheduledGroupCall#5680e342`.
// Start a scheduled group call.
//
// See https://core.telegram.org/method/phone.startScheduledGroupCall for reference.
type PhoneStartScheduledGroupCallRequest struct {
	// The scheduled group call
	Call InputGroupCall
}

// PhoneStartScheduledGroupCallRequestTypeID is TL type id of PhoneStartScheduledGroupCallRequest.
const PhoneStartScheduledGroupCallRequestTypeID = 0x5680e342

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

func ( *PhoneStartScheduledGroupCallRequest) () bool {
	if  == nil {
		return true
	}
	if !(.Call.Zero()) {
		return false
	}

	return true
}

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

// FillFrom fills PhoneStartScheduledGroupCallRequest from given interface.
func ( *PhoneStartScheduledGroupCallRequest) ( interface {
	() ( InputGroupCall)
}) {
	.Call = .()
}

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

// TypeName returns name of type in TL schema.
func (*PhoneStartScheduledGroupCallRequest) () string {
	return "phone.startScheduledGroupCall"
}

// TypeInfo returns info about TL type.
func ( *PhoneStartScheduledGroupCallRequest) () tdp.Type {
	 := tdp.Type{
		Name: "phone.startScheduledGroupCall",
		ID:   PhoneStartScheduledGroupCallRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Call",
			SchemaName: "call",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *PhoneStartScheduledGroupCallRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode phone.startScheduledGroupCall#5680e342 as nil")
	}
	.PutID(PhoneStartScheduledGroupCallRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *PhoneStartScheduledGroupCallRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode phone.startScheduledGroupCall#5680e342 as nil")
	}
	if  := .Call.Encode();  != nil {
		return fmt.Errorf("unable to encode phone.startScheduledGroupCall#5680e342: field call: %w", )
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *PhoneStartScheduledGroupCallRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode phone.startScheduledGroupCall#5680e342 to nil")
	}
	if  := .ConsumeID(PhoneStartScheduledGroupCallRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode phone.startScheduledGroupCall#5680e342: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *PhoneStartScheduledGroupCallRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode phone.startScheduledGroupCall#5680e342 to nil")
	}
	{
		if  := .Call.Decode();  != nil {
			return fmt.Errorf("unable to decode phone.startScheduledGroupCall#5680e342: field call: %w", )
		}
	}
	return nil
}

// GetCall returns value of Call field.
func ( *PhoneStartScheduledGroupCallRequest) () ( InputGroupCall) {
	if  == nil {
		return
	}
	return .Call
}

// PhoneStartScheduledGroupCall invokes method phone.startScheduledGroupCall#5680e342 returning error if any.
// Start a scheduled group call.
//
// See https://core.telegram.org/method/phone.startScheduledGroupCall for reference.
func ( *Client) ( context.Context,  InputGroupCall) (UpdatesClass, error) {
	var  UpdatesBox

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