Пример #1
0
func (p *ContainerOfEnums) ReadField9(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v16, err17 := iprot.ReadI32()
	if err17 != nil {
		return thrift.NewTProtocolExceptionReadField(9, "default_nineth", p.ThriftName(), err17)
	}
	p.DefaultNineth = HeterogeneousValues(v16)
	return err
}
Пример #2
0
func (p *ContainerOfEnums) ReadField7(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v12, err13 := iprot.ReadI32()
	if err13 != nil {
		return thrift.NewTProtocolExceptionReadField(7, "default_seventh", p.ThriftName(), err13)
	}
	p.DefaultSeventh = UndefinedValues(v12)
	return err
}
Пример #3
0
func (p *ContainerOfEnums) ReadField8(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v14, err15 := iprot.ReadI32()
	if err15 != nil {
		return thrift.NewTProtocolExceptionReadField(8, "default_eighth", p.ThriftName(), err15)
	}
	p.DefaultEighth = DefinedValues(v14)
	return err
}
Пример #4
0
func (p *ContainerOfEnums) ReadField5(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v8, err9 := iprot.ReadI32()
	if err9 != nil {
		return thrift.NewTProtocolExceptionReadField(5, "optional_fifth", p.ThriftName(), err9)
	}
	p.OptionalFifth = DefinedValues(v8)
	return err
}
Пример #5
0
func (p *ContainerOfEnums) ReadField6(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v10, err11 := iprot.ReadI32()
	if err11 != nil {
		return thrift.NewTProtocolExceptionReadField(6, "optional_sixth", p.ThriftName(), err11)
	}
	p.OptionalSixth = HeterogeneousValues(v10)
	return err
}
Пример #6
0
func (p *ContainerOfEnums) ReadField3(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v4, err5 := iprot.ReadI32()
	if err5 != nil {
		return thrift.NewTProtocolExceptionReadField(3, "third", p.ThriftName(), err5)
	}
	p.Third = HeterogeneousValues(v4)
	return err
}
Пример #7
0
func (p *ContainerOfEnums) ReadField4(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v6, err7 := iprot.ReadI32()
	if err7 != nil {
		return thrift.NewTProtocolExceptionReadField(4, "optional_fourth", p.ThriftName(), err7)
	}
	p.OptionalFourth = UndefinedValues(v6)
	return err
}
Пример #8
0
func (p *ContainerOfEnums) ReadField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v0, err1 := iprot.ReadI32()
	if err1 != nil {
		return thrift.NewTProtocolExceptionReadField(1, "first", p.ThriftName(), err1)
	}
	p.First = UndefinedValues(v0)
	return err
}
Пример #9
0
func (p *ContainerOfEnums) ReadField2(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v2, err3 := iprot.ReadI32()
	if err3 != nil {
		return thrift.NewTProtocolExceptionReadField(2, "second", p.ThriftName(), err3)
	}
	p.Second = DefinedValues(v2)
	return err
}
Пример #10
0
func (p *Reservation) ReadField2(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v2, err3 := iprot.ReadString()
	if err3 != nil {
		return thrift.NewTProtocolExceptionReadField(2, "secret", p.ThriftName(), err3)
	}
	p.Secret = v2
	return err
}
Пример #11
0
func (p *Reservation) ReadField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v0, err1 := iprot.ReadString()
	if err1 != nil {
		return thrift.NewTProtocolExceptionReadField(1, "queue", p.ThriftName(), err1)
	}
	p.Queue = v0
	return err
}
func (p *EchoResult) Read(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_, err = iprot.ReadStructBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	for {
		fieldName, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
		if fieldId < 0 {
			fieldId = int16(p.FieldIdFromFieldName(fieldName))
		} else if fieldName == "" {
			fieldName = p.FieldNameFromFieldId(int(fieldId))
		}
		if fieldTypeId == thrift.GENERIC {
			fieldTypeId = p.FieldFromFieldId(int(fieldId)).TypeId()
		}
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
		if fieldTypeId == thrift.STOP {
			break
		}
		if fieldId == 0 || fieldName == "success" {
			if fieldTypeId == thrift.STRUCT {
				err = p.ReadField0(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField0(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else {
			err = iprot.Skip(fieldTypeId)
			if err != nil {
				return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
			}
		}
		err = iprot.ReadFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
	}
	err = iprot.ReadStructEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	return err
}
Пример #13
0
func (p *ContainerOfEnums) Read(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_, err = iprot.ReadStructBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	for {
		fieldName, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
		if fieldId < 0 {
			fieldId = int16(p.FieldIdFromFieldName(fieldName))
		} else if fieldName == "" {
			fieldName = p.FieldNameFromFieldId(int(fieldId))
		}
		if fieldTypeId == thrift.GENERIC {
			fieldTypeId = p.FieldFromFieldId(int(fieldId)).TypeId()
		}
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
		if fieldTypeId == thrift.STOP {
			break
		}
		if fieldId == 1 || fieldName == "first" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField1(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField1(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 2 || fieldName == "second" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField2(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField2(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 3 || fieldName == "third" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField3(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField3(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 4 || fieldName == "optional_fourth" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField4(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField4(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 5 || fieldName == "optional_fifth" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField5(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField5(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 6 || fieldName == "optional_sixth" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField6(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField6(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 7 || fieldName == "default_seventh" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField7(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField7(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 8 || fieldName == "default_eighth" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField8(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField8(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 9 || fieldName == "default_nineth" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField9(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField9(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else {
			err = iprot.Skip(fieldTypeId)
			if err != nil {
				return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
			}
		}
		err = iprot.ReadFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
	}
	err = iprot.ReadStructEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	return err
}
Пример #14
0
func (p *Reservation) Read(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_, err = iprot.ReadStructBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	for {
		fieldName, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
		if fieldId < 0 {
			fieldId = int16(p.FieldIdFromFieldName(fieldName))
		} else if fieldName == "" {
			fieldName = p.FieldNameFromFieldId(int(fieldId))
		}
		if fieldTypeId == thrift.GENERIC {
			fieldTypeId = p.FieldFromFieldId(int(fieldId)).TypeId()
		}
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
		if fieldTypeId == thrift.STOP {
			break
		}
		if fieldId == 1 || fieldName == "queue" {
			if fieldTypeId == thrift.STRING {
				err = p.ReadField1(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField1(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 2 || fieldName == "secret" {
			if fieldTypeId == thrift.STRING {
				err = p.ReadField2(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField2(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else {
			err = iprot.Skip(fieldTypeId)
			if err != nil {
				return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
			}
		}
		err = iprot.ReadFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
	}
	err = iprot.ReadStructEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	return err
}