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

package null

import (
	"context"
	"fmt"
)

type NullStruct struct {
	Null1 int64            `thrift:"Null1,1" json:"Null1"`
	Null2 *int64           `thrift:"Null2,2,optional" json:"Null2,omitempty"`
	Null3 int64            `thrift:"Null3,3,required" json:"Null3"`
	Null4 []int64          `thrift:"Null4,4" json:"Null4"`
	Null5 map[string]int64 `thrift:"Null5,5" json:"Null5"`
	Null6 map[int64]int64  `thrift:"Null6,6" json:"Null6"`
}

func NewNullStruct() *NullStruct {
	return &NullStruct{}
}

func (p *NullStruct) InitDefault() {
}

func (p *NullStruct) GetNull1() (v int64) {
	return p.Null1
}

var NullStruct_Null2_DEFAULT int64

func (p *NullStruct) GetNull2() (v int64) {
	if !p.IsSetNull2() {
		return NullStruct_Null2_DEFAULT
	}
	return *p.Null2
}

func (p *NullStruct) GetNull3() (v int64) {
	return p.Null3
}

func (p *NullStruct) GetNull4() (v []int64) {
	return p.Null4
}

func (p *NullStruct) GetNull5() (v map[string]int64) {
	return p.Null5
}

func (p *NullStruct) GetNull6() (v map[int64]int64) {
	return p.Null6
}

func (p *NullStruct) IsSetNull2() bool {
	return p.Null2 != nil
}

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

var fieldIDToName_NullStruct = map[int16]string{
	1: "Null1",
	2: "Null2",
	3: "Null3",
	4: "Null4",
	5: "Null5",
	6: "Null6",
}

type NullService interface {
	NullTest(ctx context.Context, req *NullStruct) (r *NullStruct, err error)
}

type NullServiceNullTestArgs struct {
	Req *NullStruct `thrift:"req,1" json:"req"`
}

func NewNullServiceNullTestArgs() *NullServiceNullTestArgs {
	return &NullServiceNullTestArgs{}
}

func (p *NullServiceNullTestArgs) InitDefault() {
}

var NullServiceNullTestArgs_Req_DEFAULT *NullStruct

func (p *NullServiceNullTestArgs) GetReq() (v *NullStruct) {
	if !p.IsSetReq() {
		return NullServiceNullTestArgs_Req_DEFAULT
	}
	return p.Req
}

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

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

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

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

func NewNullServiceNullTestResult() *NullServiceNullTestResult {
	return &NullServiceNullTestResult{}
}

func (p *NullServiceNullTestResult) InitDefault() {
}

var NullServiceNullTestResult_Success_DEFAULT *NullStruct

func (p *NullServiceNullTestResult) GetSuccess() (v *NullStruct) {
	if !p.IsSetSuccess() {
		return NullServiceNullTestResult_Success_DEFAULT
	}
	return p.Success
}

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

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

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