// Code generated by thriftgo (0.3.15). DO NOT EDIT.

package baseline

import (
	"context"
	"fmt"
)

type Simple struct {
	ByteField   int8    `thrift:"ByteField,1" json:"ByteField"`
	I64Field    int64   `thrift:"I64Field,2" json:"I64Field"`
	DoubleField float64 `thrift:"DoubleField,3" json:"DoubleField"`
	I32Field    int32   `thrift:"I32Field,4" json:"I32Field"`
	StringField string  `thrift:"StringField,5" json:"StringField"`
	BinaryField []byte  `thrift:"BinaryField,6" json:"BinaryField"`
}

func NewSimple() *Simple {
	return &Simple{}
}

func (p *Simple) InitDefault() {
}

func (p *Simple) GetByteField() (v int8) {
	return p.ByteField
}

func (p *Simple) GetI64Field() (v int64) {
	return p.I64Field
}

func (p *Simple) GetDoubleField() (v float64) {
	return p.DoubleField
}

func (p *Simple) GetI32Field() (v int32) {
	return p.I32Field
}

func (p *Simple) GetStringField() (v string) {
	return p.StringField
}

func (p *Simple) GetBinaryField() (v []byte) {
	return p.BinaryField
}

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

var fieldIDToName_Simple = map[int16]string{
	1: "ByteField",
	2: "I64Field",
	3: "DoubleField",
	4: "I32Field",
	5: "StringField",
	6: "BinaryField",
}

type PartialSimple struct {
	ByteField   int8    `thrift:"ByteField,1" json:"ByteField"`
	DoubleField float64 `thrift:"DoubleField,3" json:"DoubleField"`
	BinaryField []byte  `thrift:"BinaryField,6" json:"BinaryField"`
}

func NewPartialSimple() *PartialSimple {
	return &PartialSimple{}
}

func (p *PartialSimple) InitDefault() {
}

func (p *PartialSimple) GetByteField() (v int8) {
	return p.ByteField
}

func (p *PartialSimple) GetDoubleField() (v float64) {
	return p.DoubleField
}

func (p *PartialSimple) GetBinaryField() (v []byte) {
	return p.BinaryField
}

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

var fieldIDToName_PartialSimple = map[int16]string{
	1: "ByteField",
	3: "DoubleField",
	6: "BinaryField",
}

type Nesting struct {
	String_         string             `thrift:"String,1" json:"String"`
	ListSimple      []*Simple          `thrift:"ListSimple,2" json:"ListSimple"`
	Double          float64            `thrift:"Double,3" json:"Double"`
	I32             int32              `thrift:"I32,4" json:"I32"`
	ListI32         []int32            `thrift:"ListI32,5" json:"ListI32"`
	I64             int64              `thrift:"I64,6" json:"I64"`
	MapStringString map[string]string  `thrift:"MapStringString,7" json:"MapStringString"`
	SimpleStruct    *Simple            `thrift:"SimpleStruct,8" json:"SimpleStruct"`
	MapI32I64       map[int32]int64    `thrift:"MapI32I64,9" json:"MapI32I64"`
	ListString      []string           `thrift:"ListString,10" json:"ListString"`
	Binary          []byte             `thrift:"Binary,11" json:"Binary"`
	MapI64String    map[int64]string   `thrift:"MapI64String,12" json:"MapI64String"`
	ListI64         []int64            `thrift:"ListI64,13" json:"ListI64"`
	Byte            int8               `thrift:"Byte,14" json:"Byte"`
	MapStringSimple map[string]*Simple `thrift:"MapStringSimple,15" json:"MapStringSimple"`
}

func NewNesting() *Nesting {
	return &Nesting{}
}

func (p *Nesting) InitDefault() {
}

func (p *Nesting) GetString() (v string) {
	return p.String_
}

func (p *Nesting) GetListSimple() (v []*Simple) {
	return p.ListSimple
}

func (p *Nesting) GetDouble() (v float64) {
	return p.Double
}

func (p *Nesting) GetI32() (v int32) {
	return p.I32
}

func (p *Nesting) GetListI32() (v []int32) {
	return p.ListI32
}

func (p *Nesting) GetI64() (v int64) {
	return p.I64
}

func (p *Nesting) GetMapStringString() (v map[string]string) {
	return p.MapStringString
}

var Nesting_SimpleStruct_DEFAULT *Simple

func (p *Nesting) GetSimpleStruct() (v *Simple) {
	if !p.IsSetSimpleStruct() {
		return Nesting_SimpleStruct_DEFAULT
	}
	return p.SimpleStruct
}

func (p *Nesting) GetMapI32I64() (v map[int32]int64) {
	return p.MapI32I64
}

func (p *Nesting) GetListString() (v []string) {
	return p.ListString
}

func (p *Nesting) GetBinary() (v []byte) {
	return p.Binary
}

func (p *Nesting) GetMapI64String() (v map[int64]string) {
	return p.MapI64String
}

func (p *Nesting) GetListI64() (v []int64) {
	return p.ListI64
}

func (p *Nesting) GetByte() (v int8) {
	return p.Byte
}

func (p *Nesting) GetMapStringSimple() (v map[string]*Simple) {
	return p.MapStringSimple
}

func (p *Nesting) IsSetSimpleStruct() bool {
	return p.SimpleStruct != nil
}

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

var fieldIDToName_Nesting = map[int16]string{
	1:  "String",
	2:  "ListSimple",
	3:  "Double",
	4:  "I32",
	5:  "ListI32",
	6:  "I64",
	7:  "MapStringString",
	8:  "SimpleStruct",
	9:  "MapI32I64",
	10: "ListString",
	11: "Binary",
	12: "MapI64String",
	13: "ListI64",
	14: "Byte",
	15: "MapStringSimple",
}

type PartialNesting struct {
	ListSimple      []*PartialSimple          `thrift:"ListSimple,2" json:"ListSimple"`
	SimpleStruct    *PartialSimple            `thrift:"SimpleStruct,8" json:"SimpleStruct"`
	MapStringSimple map[string]*PartialSimple `thrift:"MapStringSimple,15" json:"MapStringSimple"`
}

func NewPartialNesting() *PartialNesting {
	return &PartialNesting{}
}

func (p *PartialNesting) InitDefault() {
}

func (p *PartialNesting) GetListSimple() (v []*PartialSimple) {
	return p.ListSimple
}

var PartialNesting_SimpleStruct_DEFAULT *PartialSimple

func (p *PartialNesting) GetSimpleStruct() (v *PartialSimple) {
	if !p.IsSetSimpleStruct() {
		return PartialNesting_SimpleStruct_DEFAULT
	}
	return p.SimpleStruct
}

func (p *PartialNesting) GetMapStringSimple() (v map[string]*PartialSimple) {
	return p.MapStringSimple
}

func (p *PartialNesting) IsSetSimpleStruct() bool {
	return p.SimpleStruct != nil
}

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

var fieldIDToName_PartialNesting = map[int16]string{
	2:  "ListSimple",
	8:  "SimpleStruct",
	15: "MapStringSimple",
}

type Nesting2 struct {
	MapSimpleNesting map[*Simple]*Nesting `thrift:"MapSimpleNesting,1" json:"MapSimpleNesting"`
	SimpleStruct     *Simple              `thrift:"SimpleStruct,2" json:"SimpleStruct"`
	Byte             int8                 `thrift:"Byte,3" json:"Byte"`
	Double           float64              `thrift:"Double,4" json:"Double"`
	ListNesting      []*Nesting           `thrift:"ListNesting,5" json:"ListNesting"`
	I64              int64                `thrift:"I64,6" json:"I64"`
	NestingStruct    *Nesting             `thrift:"NestingStruct,7" json:"NestingStruct"`
	Binary           []byte               `thrift:"Binary,8" json:"Binary"`
	String_          string               `thrift:"String,9" json:"String"`
	SetNesting       []*Nesting           `thrift:"SetNesting,10" json:"SetNesting"`
	I32              int32                `thrift:"I32,11" json:"I32"`
}

func NewNesting2() *Nesting2 {
	return &Nesting2{}
}

func (p *Nesting2) InitDefault() {
}

func (p *Nesting2) GetMapSimpleNesting() (v map[*Simple]*Nesting) {
	return p.MapSimpleNesting
}

var Nesting2_SimpleStruct_DEFAULT *Simple

func (p *Nesting2) GetSimpleStruct() (v *Simple) {
	if !p.IsSetSimpleStruct() {
		return Nesting2_SimpleStruct_DEFAULT
	}
	return p.SimpleStruct
}

func (p *Nesting2) GetByte() (v int8) {
	return p.Byte
}

func (p *Nesting2) GetDouble() (v float64) {
	return p.Double
}

func (p *Nesting2) GetListNesting() (v []*Nesting) {
	return p.ListNesting
}

func (p *Nesting2) GetI64() (v int64) {
	return p.I64
}

var Nesting2_NestingStruct_DEFAULT *Nesting

func (p *Nesting2) GetNestingStruct() (v *Nesting) {
	if !p.IsSetNestingStruct() {
		return Nesting2_NestingStruct_DEFAULT
	}
	return p.NestingStruct
}

func (p *Nesting2) GetBinary() (v []byte) {
	return p.Binary
}

func (p *Nesting2) GetString() (v string) {
	return p.String_
}

func (p *Nesting2) GetSetNesting() (v []*Nesting) {
	return p.SetNesting
}

func (p *Nesting2) GetI32() (v int32) {
	return p.I32
}

func (p *Nesting2) IsSetSimpleStruct() bool {
	return p.SimpleStruct != nil
}

func (p *Nesting2) IsSetNestingStruct() bool {
	return p.NestingStruct != nil
}

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

var fieldIDToName_Nesting2 = map[int16]string{
	1:  "MapSimpleNesting",
	2:  "SimpleStruct",
	3:  "Byte",
	4:  "Double",
	5:  "ListNesting",
	6:  "I64",
	7:  "NestingStruct",
	8:  "Binary",
	9:  "String",
	10: "SetNesting",
	11: "I32",
}

type BaselineService interface {
	SimpleMethod(ctx context.Context, req *Simple) (r *Simple, err error)

	PartialSimpleMethod(ctx context.Context, req *PartialSimple) (r *PartialSimple, err error)

	NestingMethod(ctx context.Context, req *Nesting) (r *Nesting, err error)

	PartialNestingMethod(ctx context.Context, req *PartialNesting) (r *PartialNesting, err error)

	Nesting2Method(ctx context.Context, req *Nesting2) (r *Nesting2, err error)
}

type BaselineServiceSimpleMethodArgs struct {
	Req *Simple `thrift:"req,1" json:"req"`
}

func NewBaselineServiceSimpleMethodArgs() *BaselineServiceSimpleMethodArgs {
	return &BaselineServiceSimpleMethodArgs{}
}

func (p *BaselineServiceSimpleMethodArgs) InitDefault() {
}

var BaselineServiceSimpleMethodArgs_Req_DEFAULT *Simple

func (p *BaselineServiceSimpleMethodArgs) GetReq() (v *Simple) {
	if !p.IsSetReq() {
		return BaselineServiceSimpleMethodArgs_Req_DEFAULT
	}
	return p.Req
}

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

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

var fieldIDToName_BaselineServiceSimpleMethodArgs = map[int16]string{
	1: "req",
}

type BaselineServiceSimpleMethodResult struct {
	Success *Simple `thrift:"success,0,optional" json:"success,omitempty"`
}

func NewBaselineServiceSimpleMethodResult() *BaselineServiceSimpleMethodResult {
	return &BaselineServiceSimpleMethodResult{}
}

func (p *BaselineServiceSimpleMethodResult) InitDefault() {
}

var BaselineServiceSimpleMethodResult_Success_DEFAULT *Simple

func (p *BaselineServiceSimpleMethodResult) GetSuccess() (v *Simple) {
	if !p.IsSetSuccess() {
		return BaselineServiceSimpleMethodResult_Success_DEFAULT
	}
	return p.Success
}

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

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

var fieldIDToName_BaselineServiceSimpleMethodResult = map[int16]string{
	0: "success",
}

type BaselineServicePartialSimpleMethodArgs struct {
	Req *PartialSimple `thrift:"req,1" json:"req"`
}

func NewBaselineServicePartialSimpleMethodArgs() *BaselineServicePartialSimpleMethodArgs {
	return &BaselineServicePartialSimpleMethodArgs{}
}

func (p *BaselineServicePartialSimpleMethodArgs) InitDefault() {
}

var BaselineServicePartialSimpleMethodArgs_Req_DEFAULT *PartialSimple

func (p *BaselineServicePartialSimpleMethodArgs) GetReq() (v *PartialSimple) {
	if !p.IsSetReq() {
		return BaselineServicePartialSimpleMethodArgs_Req_DEFAULT
	}
	return p.Req
}

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

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

var fieldIDToName_BaselineServicePartialSimpleMethodArgs = map[int16]string{
	1: "req",
}

type BaselineServicePartialSimpleMethodResult struct {
	Success *PartialSimple `thrift:"success,0,optional" json:"success,omitempty"`
}

func NewBaselineServicePartialSimpleMethodResult() *BaselineServicePartialSimpleMethodResult {
	return &BaselineServicePartialSimpleMethodResult{}
}

func (p *BaselineServicePartialSimpleMethodResult) InitDefault() {
}

var BaselineServicePartialSimpleMethodResult_Success_DEFAULT *PartialSimple

func (p *BaselineServicePartialSimpleMethodResult) GetSuccess() (v *PartialSimple) {
	if !p.IsSetSuccess() {
		return BaselineServicePartialSimpleMethodResult_Success_DEFAULT
	}
	return p.Success
}

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

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

var fieldIDToName_BaselineServicePartialSimpleMethodResult = map[int16]string{
	0: "success",
}

type BaselineServiceNestingMethodArgs struct {
	Req *Nesting `thrift:"req,1" json:"req"`
}

func NewBaselineServiceNestingMethodArgs() *BaselineServiceNestingMethodArgs {
	return &BaselineServiceNestingMethodArgs{}
}

func (p *BaselineServiceNestingMethodArgs) InitDefault() {
}

var BaselineServiceNestingMethodArgs_Req_DEFAULT *Nesting

func (p *BaselineServiceNestingMethodArgs) GetReq() (v *Nesting) {
	if !p.IsSetReq() {
		return BaselineServiceNestingMethodArgs_Req_DEFAULT
	}
	return p.Req
}

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

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

var fieldIDToName_BaselineServiceNestingMethodArgs = map[int16]string{
	1: "req",
}

type BaselineServiceNestingMethodResult struct {
	Success *Nesting `thrift:"success,0,optional" json:"success,omitempty"`
}

func NewBaselineServiceNestingMethodResult() *BaselineServiceNestingMethodResult {
	return &BaselineServiceNestingMethodResult{}
}

func (p *BaselineServiceNestingMethodResult) InitDefault() {
}

var BaselineServiceNestingMethodResult_Success_DEFAULT *Nesting

func (p *BaselineServiceNestingMethodResult) GetSuccess() (v *Nesting) {
	if !p.IsSetSuccess() {
		return BaselineServiceNestingMethodResult_Success_DEFAULT
	}
	return p.Success
}

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

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

var fieldIDToName_BaselineServiceNestingMethodResult = map[int16]string{
	0: "success",
}

type BaselineServicePartialNestingMethodArgs struct {
	Req *PartialNesting `thrift:"req,1" json:"req"`
}

func NewBaselineServicePartialNestingMethodArgs() *BaselineServicePartialNestingMethodArgs {
	return &BaselineServicePartialNestingMethodArgs{}
}

func (p *BaselineServicePartialNestingMethodArgs) InitDefault() {
}

var BaselineServicePartialNestingMethodArgs_Req_DEFAULT *PartialNesting

func (p *BaselineServicePartialNestingMethodArgs) GetReq() (v *PartialNesting) {
	if !p.IsSetReq() {
		return BaselineServicePartialNestingMethodArgs_Req_DEFAULT
	}
	return p.Req
}

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

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

var fieldIDToName_BaselineServicePartialNestingMethodArgs = map[int16]string{
	1: "req",
}

type BaselineServicePartialNestingMethodResult struct {
	Success *PartialNesting `thrift:"success,0,optional" json:"success,omitempty"`
}

func NewBaselineServicePartialNestingMethodResult() *BaselineServicePartialNestingMethodResult {
	return &BaselineServicePartialNestingMethodResult{}
}

func (p *BaselineServicePartialNestingMethodResult) InitDefault() {
}

var BaselineServicePartialNestingMethodResult_Success_DEFAULT *PartialNesting

func (p *BaselineServicePartialNestingMethodResult) GetSuccess() (v *PartialNesting) {
	if !p.IsSetSuccess() {
		return BaselineServicePartialNestingMethodResult_Success_DEFAULT
	}
	return p.Success
}

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

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

var fieldIDToName_BaselineServicePartialNestingMethodResult = map[int16]string{
	0: "success",
}

type BaselineServiceNesting2MethodArgs struct {
	Req *Nesting2 `thrift:"req,1" json:"req"`
}

func NewBaselineServiceNesting2MethodArgs() *BaselineServiceNesting2MethodArgs {
	return &BaselineServiceNesting2MethodArgs{}
}

func (p *BaselineServiceNesting2MethodArgs) InitDefault() {
}

var BaselineServiceNesting2MethodArgs_Req_DEFAULT *Nesting2

func (p *BaselineServiceNesting2MethodArgs) GetReq() (v *Nesting2) {
	if !p.IsSetReq() {
		return BaselineServiceNesting2MethodArgs_Req_DEFAULT
	}
	return p.Req
}

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

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

var fieldIDToName_BaselineServiceNesting2MethodArgs = map[int16]string{
	1: "req",
}

type BaselineServiceNesting2MethodResult struct {
	Success *Nesting2 `thrift:"success,0,optional" json:"success,omitempty"`
}

func NewBaselineServiceNesting2MethodResult() *BaselineServiceNesting2MethodResult {
	return &BaselineServiceNesting2MethodResult{}
}

func (p *BaselineServiceNesting2MethodResult) InitDefault() {
}

var BaselineServiceNesting2MethodResult_Success_DEFAULT *Nesting2

func (p *BaselineServiceNesting2MethodResult) GetSuccess() (v *Nesting2) {
	if !p.IsSetSuccess() {
		return BaselineServiceNesting2MethodResult_Success_DEFAULT
	}
	return p.Success
}

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

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

var fieldIDToName_BaselineServiceNesting2MethodResult = map[int16]string{
	0: "success",
}
