// Code generated by Kitex v0.12.0. DO NOT EDIT.

package api

import (
	"bytes"
	"fmt"
	"reflect"
	"strings"

	"github.com/cloudwego/gopkg/protocol/thrift"
)

// unused protection
var (
	_ = fmt.Formatter(nil)
	_ = (*bytes.Buffer)(nil)
	_ = (*strings.Builder)(nil)
	_ = reflect.Type(nil)
	_ = thrift.STOP
)

type EchoEchoArgs struct {
	Req *Request `thrift:"req,1" frugal:"1,default,Request" json:"req"`
}

func NewEchoEchoArgs() *EchoEchoArgs {
	return &EchoEchoArgs{}
}

func (p *EchoEchoArgs) InitDefault() {
}

var EchoEchoArgs_Req_DEFAULT *Request

func (p *EchoEchoArgs) GetReq() (v *Request) {
	if !p.IsSetReq() {
		return EchoEchoArgs_Req_DEFAULT
	}
	return p.Req
}
func (p *EchoEchoArgs) SetReq(val *Request) {
	p.Req = val
}

func (p *EchoEchoArgs) IsSetReq() bool {
	return p.Req != nil
}

func (p *EchoEchoArgs) String() string {
	if p == nil {
		return "<nil>"
	}
	return fmt.Sprintf("EchoEchoArgs(%+v)", *p)
}

func (p *EchoEchoArgs) GetFirstArgument() interface{} {
	return p.Req
}

type EchoEchoResult struct {
	Success *Response `thrift:"success,0,optional" frugal:"0,optional,Response" json:"success,omitempty"`
}

func NewEchoEchoResult() *EchoEchoResult {
	return &EchoEchoResult{}
}

func (p *EchoEchoResult) InitDefault() {
}

var EchoEchoResult_Success_DEFAULT *Response

func (p *EchoEchoResult) GetSuccess() (v *Response) {
	if !p.IsSetSuccess() {
		return EchoEchoResult_Success_DEFAULT
	}
	return p.Success
}
func (p *EchoEchoResult) SetSuccess(x interface{}) {
	p.Success = x.(*Response)
}

func (p *EchoEchoResult) IsSetSuccess() bool {
	return p.Success != nil
}

func (p *EchoEchoResult) String() string {
	if p == nil {
		return "<nil>"
	}
	return fmt.Sprintf("EchoEchoResult(%+v)", *p)
}

func (p *EchoEchoResult) GetResult() interface{} {
	return p.Success
}
